diff options
| author | Franklin Wei <git@fwei.tk> | 2017-12-24 12:58:33 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2017-12-24 12:58:33 -0500 |
| commit | 7ea37bb806a6faeb4e8f9b115f256735f089b169 (patch) | |
| tree | 9acdddadc58d2c92146a44485eb9a9f4de24f809 /apps/plugins | |
| parent | 6416d96fbc6946a0eee8ba29bb881fbf4dcbe607 (diff) | |
| download | rockbox-7ea37bb806a6faeb4e8f9b115f256735f089b169.zip rockbox-7ea37bb806a6faeb4e8f9b115f256735f089b169.tar.gz rockbox-7ea37bb806a6faeb4e8f9b115f256735f089b169.tar.bz2 rockbox-7ea37bb806a6faeb4e8f9b115f256735f089b169.tar.xz | |
fix red
Change-Id: Ib28cfd9037901c7b8bc9b2960ad2c1c9a1e25a69
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/lib/stdio_compat.c | 7 | ||||
| -rw-r--r-- | apps/plugins/lib/stdio_compat.h | 2 | ||||
| -rw-r--r-- | apps/plugins/sdl/progs/duke3d/Game/src/global.c | 10 |
3 files changed, 9 insertions, 10 deletions
diff --git a/apps/plugins/lib/stdio_compat.c b/apps/plugins/lib/stdio_compat.c index 957dd0d..c1d5a7b 100644 --- a/apps/plugins/lib/stdio_compat.c +++ b/apps/plugins/lib/stdio_compat.c @@ -83,8 +83,6 @@ _FILE_ *_fopen_(const char *path, const char *mode) if (fd < 0) { - //extern int errno; - //rb->splashf(HZ*2, "open of %s failed (%d)", path, errno); return NULL; } @@ -122,11 +120,12 @@ size_t _fwrite_(const void *ptr, size_t size, size_t nmemb, _FILE_ *stream) return ret / size; } -#if 1 +#if 0 + /* stderr, stdout (disabled) */ else { char buf[10]; - rb->snprintf(buf, 10, "%%%ds", size*nmemb); + rb->snprintf(buf, 10, "%%%ds", (int)(size*nmemb)); rb->splashf(HZ, buf, ptr); return size * nmemb; } diff --git a/apps/plugins/lib/stdio_compat.h b/apps/plugins/lib/stdio_compat.h index 27ccfcf..aec72a6 100644 --- a/apps/plugins/lib/stdio_compat.h +++ b/apps/plugins/lib/stdio_compat.h @@ -42,7 +42,9 @@ #define ferror _ferror_ #define feof _feof_ #define fprintf _fprintf_ +#undef stdout #define stdout _stdout_ +#undef stderr #define stderr _stderr_ typedef struct { diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/global.c b/apps/plugins/sdl/progs/duke3d/Game/src/global.c index 861e132..9c8d3a6 100644 --- a/apps/plugins/sdl/progs/duke3d/Game/src/global.c +++ b/apps/plugins/sdl/progs/duke3d/Game/src/global.c @@ -453,7 +453,6 @@ int _dos_findnext(struct find_t *f) void _dos_getdate(struct dosdate_t *date) { time_t curtime = time(NULL); - struct tm *tm; if (date == NULL) { return; @@ -461,11 +460,10 @@ void _dos_getdate(struct dosdate_t *date) memset(date, 0, sizeof(struct dosdate_t)); - rb->mktime(&tm); - date->day = tm->tm_mday; - date->month = tm->tm_mon + 1; - date->year = tm->tm_year + 1900; - date->dayofweek = tm->tm_wday + 1; + date->day = 1; + date->month = 1; + date->year = 1970; + date->dayofweek = 4; } #endif |