mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
WinCE patch merged
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e193fd8d66
commit
90c4dae08f
48 changed files with 5461 additions and 68 deletions
36
wince/stdio.c
Normal file
36
wince/stdio.c
Normal file
|
@ -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;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue