summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lib/stdio_compat.c7
-rw-r--r--apps/plugins/lib/stdio_compat.h2
-rw-r--r--apps/plugins/sdl/progs/duke3d/Game/src/global.c10
3 files changed, 9 insertions, 10 deletions
diff --git a/apps/plugins/lib/stdio_compat.c b/apps/plugins/lib/stdio_compat.c
index 957dd0ddc1..c1d5a7bc77 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)
83 83
84 if (fd < 0) 84 if (fd < 0)
85 { 85 {
86 //extern int errno;
87 //rb->splashf(HZ*2, "open of %s failed (%d)", path, errno);
88 return NULL; 86 return NULL;
89 } 87 }
90 88
@@ -122,11 +120,12 @@ size_t _fwrite_(const void *ptr, size_t size, size_t nmemb, _FILE_ *stream)
122 120
123 return ret / size; 121 return ret / size;
124 } 122 }
125#if 1 123#if 0
124 /* stderr, stdout (disabled) */
126 else 125 else
127 { 126 {
128 char buf[10]; 127 char buf[10];
129 rb->snprintf(buf, 10, "%%%ds", size*nmemb); 128 rb->snprintf(buf, 10, "%%%ds", (int)(size*nmemb));
130 rb->splashf(HZ, buf, ptr); 129 rb->splashf(HZ, buf, ptr);
131 return size * nmemb; 130 return size * nmemb;
132 } 131 }
diff --git a/apps/plugins/lib/stdio_compat.h b/apps/plugins/lib/stdio_compat.h
index 27ccfcf521..aec72a6af5 100644
--- a/apps/plugins/lib/stdio_compat.h
+++ b/apps/plugins/lib/stdio_compat.h
@@ -42,7 +42,9 @@
42#define ferror _ferror_ 42#define ferror _ferror_
43#define feof _feof_ 43#define feof _feof_
44#define fprintf _fprintf_ 44#define fprintf _fprintf_
45#undef stdout
45#define stdout _stdout_ 46#define stdout _stdout_
47#undef stderr
46#define stderr _stderr_ 48#define stderr _stderr_
47 49
48typedef struct { 50typedef struct {
diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/global.c b/apps/plugins/sdl/progs/duke3d/Game/src/global.c
index 861e1326e8..9c8d3a607a 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)
453void _dos_getdate(struct dosdate_t *date) 453void _dos_getdate(struct dosdate_t *date)
454{ 454{
455 time_t curtime = time(NULL); 455 time_t curtime = time(NULL);
456 struct tm *tm;
457 456
458 if (date == NULL) { 457 if (date == NULL) {
459 return; 458 return;
@@ -461,11 +460,10 @@ void _dos_getdate(struct dosdate_t *date)
461 460
462 memset(date, 0, sizeof(struct dosdate_t)); 461 memset(date, 0, sizeof(struct dosdate_t));
463 462
464 rb->mktime(&tm); 463 date->day = 1;
465 date->day = tm->tm_mday; 464 date->month = 1;
466 date->month = tm->tm_mon + 1; 465 date->year = 1970;
467 date->year = tm->tm_year + 1900; 466 date->dayofweek = 4;
468 date->dayofweek = tm->tm_wday + 1;
469} 467}
470#endif 468#endif
471 469