summaryrefslogtreecommitdiff
path: root/wince/stdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'wince/stdio.c')
-rw-r--r--wince/stdio.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/wince/stdio.c b/wince/stdio.c
new file mode 100644
index 0000000000..9047a9ab0f
--- /dev/null
+++ b/wince/stdio.c
@@ -0,0 +1,36 @@
+/***************************************************************
+ stdio.c
+***************************************************************/
+
+#include <windows.h>
+#include "wince.h" /* for wce_mbtowc */
+
+
+FILE *freopen(const char *filename, const char *mode, FILE *file)
+{
+ wchar_t *wfilename, *wmode;
+ FILE *fp;
+
+ wfilename = wce_mbtowc(filename);
+ wmode = wce_mbtowc(mode);
+
+ fp = _wfreopen(wfilename, wmode, file);
+
+ free(wfilename);
+ free(wmode);
+
+ return fp;
+}
+
+FILE *_fdopen( int handle, const char *mode )
+{
+ wchar_t *wmode;
+ FILE* fp;
+
+ wmode = wce_mbtowc(mode);
+ fp = _wfdopen( (void*)handle, wmode );
+
+ free(wmode);
+ return fp;
+}
+