diff options
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/stdio_compat.c | 7 | ||||
-rw-r--r-- | apps/plugins/lib/stdio_compat.h | 2 |
2 files changed, 5 insertions, 4 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 | ||
48 | typedef struct { | 50 | typedef struct { |