forked from len0rd/rockbox
Fix yellow & red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21107 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b2581e143d
commit
1e980cd977
2 changed files with 9 additions and 1 deletions
|
@ -67,6 +67,7 @@ static void setboolfield (lua_State *L, const char *key, int value) {
|
||||||
lua_setfield(L, -2, key);
|
lua_setfield(L, -2, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_RTC
|
||||||
static int getboolfield (lua_State *L, const char *key) {
|
static int getboolfield (lua_State *L, const char *key) {
|
||||||
int res;
|
int res;
|
||||||
lua_getfield(L, -1, key);
|
lua_getfield(L, -1, key);
|
||||||
|
@ -89,6 +90,7 @@ static int getfield (lua_State *L, const char *key, int d) {
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static int os_date (lua_State *L) {
|
static int os_date (lua_State *L) {
|
||||||
|
|
|
@ -80,7 +80,13 @@ again:
|
||||||
case 'U': no = (tm->tm_yday - tm->tm_wday + 7) / 7; goto _no;
|
case 'U': no = (tm->tm_yday - tm->tm_wday + 7) / 7; goto _no;
|
||||||
case 'W': no = (tm->tm_yday - (tm->tm_wday - 1 + 7) % 7 + 7) / 7; goto _no;
|
case 'W': no = (tm->tm_yday - (tm->tm_wday - 1 + 7) % 7 + 7) / 7; goto _no;
|
||||||
case 's': {
|
case 's': {
|
||||||
time_t t = rb->mktime((struct tm*)tm);
|
time_t t =
|
||||||
|
#if CONFIG_RTC
|
||||||
|
rb->mktime((struct tm*)tm)
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
;
|
||||||
char buf[101];
|
char buf[101];
|
||||||
char* c;
|
char* c;
|
||||||
buf[100]=0;
|
buf[100]=0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue