ctype+scanf fix

git-svn-id: svn://kolibrios.org@6432 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
siemargl
2016-05-16 11:03:59 +00:00
parent 9eb1268c4d
commit cd8030cee3
6 changed files with 51 additions and 18 deletions

View File

@@ -0,0 +1,16 @@
#include <stdio.h>
// non standard realization - no support for virtually change char
int ungetc(int c,FILE* file)
{
dword res;
if ((file->mode & 3!=FILE_OPEN_READ) && (file->mode & FILE_OPEN_PLUS==0)) return EOF;
if (file->filepos>file->filesize || file->filepos==0)
{
return EOF;
}
file->filepos--;
return c;
}