SWI-Stream should define S__checkpasteeof #102

This commit is contained in:
Costa Vitor 2009-06-01 20:05:04 -05:00
parent 8870a1e661
commit 93a74d4224

View File

@ -224,9 +224,12 @@ PL_EXPORT_DATA(IOSTREAM) S__iob[3]; /* Libs standard streams */
#define Sgetchar() Sgetc(Sinput)
#define Sputchar(c) Sputc((c), Soutput)
#define S__checkpasteeof(s,c) \
if ( (c)==-1 && (s)->flags & (SIO_FEOF|SIO_FERR) ) \
((s)->flags |= SIO_FEOF2)
#define S__updatefilepos_getc(s, c) \
((s)->position ? S__fupdatefilepos_getc((s), (c)) \
: (c))
: S__fcheckpasteeof((s), (c)))
#define Snpgetc(s) ((s)->bufp < (s)->limitp ? (int)(*(s)->bufp++)&0xff \
: S__fillbuf(s))