reactos/lib/crtdll/stdio
diff -u -r1.14 -r1.15
--- fflush.c 8 Jan 2004 18:42:44 -0000 1.14
+++ fflush.c 10 May 2004 11:53:14 -0000 1.15
@@ -36,7 +36,7 @@
__set_errno(0);
_fwalk((void (*)(FILE *))fflush);
- if (_errno)
+ if (*_errno())
return EOF;
__set_errno(e);
return 0;
reactos/lib/crtdll/stdio
diff -u -r1.16 -r1.17
--- getc.c 11 Jul 2003 17:25:32 -0000 1.16
+++ getc.c 10 May 2004 11:53:14 -0000 1.17
@@ -40,19 +40,20 @@
wint_t getwc(FILE *fp)
{
+ wint_t c;
// might check on multi bytes if text mode
if(fp->_cnt > 0) {
fp->_cnt -= sizeof(wchar_t);
- return (wint_t )*((wchar_t *)(fp->_ptr))++;
+ c = *((wchar_t *)(fp->_ptr));
+ fp->_ptr += sizeof(wchar_t);
}
else {
- return _filwbuf(fp);
+ c = _filwbuf(fp);
}
- // never reached
- return -1;
+ return c;
}
reactos/lib/crtdll/stdio
diff -u -r1.13 -r1.14
--- putc.c 11 Jul 2003 17:25:32 -0000 1.13
+++ putc.c 10 May 2004 11:53:14 -0000 1.14
@@ -46,7 +46,8 @@
if (fp->_cnt > 0 ) {
fp->_cnt-= sizeof(wchar_t);
- *((wchar_t *)(fp->_ptr))++ = c;
+ *((wchar_t *)(fp->_ptr)) = c;
+ fp->_ptr += sizeof(wchar_t);
return (wint_t)c;
}
else