diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-02 07:57:17 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-02 07:57:17 +0000 |
| commit | 4d6d2ae1b417133546c56b3150ef51fa7647e2dc (patch) | |
| tree | 4198e3ccd0a5bab17db2a0f82ee7b6c643115c69 /wince/stdio.c | |
| parent | 1668ec3e5ce555161454e9b2657c89dc27fa1364 (diff) | |
| download | ruby-4d6d2ae1b417133546c56b3150ef51fa7647e2dc.tar.gz ruby-4d6d2ae1b417133546c56b3150ef51fa7647e2dc.tar.xz ruby-4d6d2ae1b417133546c56b3150ef51fa7647e2dc.zip | |
WinCE patch merged
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'wince/stdio.c')
| -rw-r--r-- | wince/stdio.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/wince/stdio.c b/wince/stdio.c new file mode 100644 index 000000000..9047a9ab0 --- /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; +} + |
