diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-27 23:02:17 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2009-05-27 23:02:17 +0000 |
commit | 1e980cd9776b27a4251f5b78d4bc87098e55ca07 (patch) | |
tree | 919af734f644720cf8e0030a4639a3599d4e35dd /apps/plugins | |
parent | b2581e143d7c9a564026fbe3bf4f471b2260fd0f (diff) | |
download | rockbox-1e980cd9776b27a4251f5b78d4bc87098e55ca07.tar.gz rockbox-1e980cd9776b27a4251f5b78d4bc87098e55ca07.zip |
Fix yellow & red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21107 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/lua/loslib.c | 2 | ||||
-rw-r--r-- | apps/plugins/lua/strftime.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/apps/plugins/lua/loslib.c b/apps/plugins/lua/loslib.c index 9d29e905e1..19fef84a9c 100644 --- a/apps/plugins/lua/loslib.c +++ b/apps/plugins/lua/loslib.c | |||
@@ -67,6 +67,7 @@ static void setboolfield (lua_State *L, const char *key, int value) { | |||
67 | lua_setfield(L, -2, key); | 67 | lua_setfield(L, -2, key); |
68 | } | 68 | } |
69 | 69 | ||
70 | #if CONFIG_RTC | ||
70 | static int getboolfield (lua_State *L, const char *key) { | 71 | static int getboolfield (lua_State *L, const char *key) { |
71 | int res; | 72 | int res; |
72 | lua_getfield(L, -1, key); | 73 | lua_getfield(L, -1, key); |
@@ -89,6 +90,7 @@ static int getfield (lua_State *L, const char *key, int d) { | |||
89 | lua_pop(L, 1); | 90 | lua_pop(L, 1); |
90 | return res; | 91 | return res; |
91 | } | 92 | } |
93 | #endif | ||
92 | 94 | ||
93 | 95 | ||
94 | static int os_date (lua_State *L) { | 96 | static int os_date (lua_State *L) { |
diff --git a/apps/plugins/lua/strftime.c b/apps/plugins/lua/strftime.c index df230f7bd0..681d4be1cf 100644 --- a/apps/plugins/lua/strftime.c +++ b/apps/plugins/lua/strftime.c | |||
@@ -80,7 +80,13 @@ again: | |||
80 | case 'U': no = (tm->tm_yday - tm->tm_wday + 7) / 7; goto _no; | 80 | case 'U': no = (tm->tm_yday - tm->tm_wday + 7) / 7; goto _no; |
81 | case 'W': no = (tm->tm_yday - (tm->tm_wday - 1 + 7) % 7 + 7) / 7; goto _no; | 81 | case 'W': no = (tm->tm_yday - (tm->tm_wday - 1 + 7) % 7 + 7) / 7; goto _no; |
82 | case 's': { | 82 | case 's': { |
83 | time_t t = rb->mktime((struct tm*)tm); | 83 | time_t t = |
84 | #if CONFIG_RTC | ||
85 | rb->mktime((struct tm*)tm) | ||
86 | #else | ||
87 | 0 | ||
88 | #endif | ||
89 | ; | ||
84 | char buf[101]; | 90 | char buf[101]; |
85 | char* c; | 91 | char* c; |
86 | buf[100]=0; | 92 | buf[100]=0; |