* Print "EOF" instead of -1 when it means EOF.

This commit is contained in:
Sam Hocevar
2007-01-28 00:50:53 +00:00
committed by sam
parent 412784a97c
commit dc895f2511
+4 -4
View File
@@ -300,8 +300,8 @@ size_t NEW(fread)(void *ptr, size_t size, size_t nmemb, FILE *stream)
ret = ORIG(fn)(stream); \
_zz_unlock(fd); \
FGETC_FUZZ \
if(ret < 0) \
debug("%s([%i]) = %i", __func__, fd, ret); \
if(ret == EOF) \
debug("%s([%i]) = EOF", __func__, fd); \
else \
debug("%s([%i]) = '%c'", __func__, fd, ret); \
} while(0)
@@ -404,8 +404,8 @@ int NEW(ungetc)(int c, FILE *stream)
#endif
}
if(ret < 0)
debug("%s(0x%02x, [%i]) = %i", __func__, c, fd, ret);
if(ret == EOF)
debug("%s(0x%02x, [%i]) = EOF", __func__, c, fd);
else
debug("%s(0x%02x, [%i]) = '%c'", __func__, c, fd, ret);