* Add feof() to the list of I/O functions.

This commit is contained in:
Sam Hocevar 2006-10-13 13:38:50 +00:00 committed by sam
parent e21d948a17
commit 7b76d57ab9
3 changed files with 7 additions and 1 deletions

View file

@ -168,7 +168,7 @@ static int open_font(context_t *cx)
cx->glyphs = 0;
cx->lookup = NULL;
for(i = 0, size = 0; !feof(f); cx->glyphs++)
for(i = 0, size = 0; !toieof(f); cx->glyphs++)
{
if((cx->glyphs % 2048) == 0)
cx->lookup = realloc(cx->lookup,

View file

@ -43,6 +43,11 @@ int toiclose(TOIFILE *toif)
return fclose(f);
}
int toieof(TOIFILE *toif)
{
return feof(toif->f);
}
char *toigets(char *s, int size, TOIFILE *toif)
{
return fgets(s, size, toif->f);

View file

@ -22,5 +22,6 @@ TOIFILE;
TOIFILE *toiopen(const char *, const char *);
int toiclose(TOIFILE *);
int toieof(TOIFILE *);
char *toigets(char *, int, TOIFILE *);