X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance?a=blobdiff_plain;f=src%2Fcommon%2Freadwrite.h;h=b61230fb59487ba05f0feed3a05de66bb0ab0dcb;hb=2690e30a5d476cdf8689af9203748e7ed0fa841d;hp=4aebdbc9b1d1fc3e94cad5b9898d51399da6b310;hpb=317d623e0f3bdb5407a50d635861cb0eb244dd2f;p=plomrogue diff --git a/src/common/readwrite.h b/src/common/readwrite.h index 4aebdbc..b61230f 100644 --- a/src/common/readwrite.h +++ b/src/common/readwrite.h @@ -22,7 +22,9 @@ extern void try_fputc(uint8_t c, FILE * file, char * f); /* Wrapper to calling fgetc() and fgets() from function "f". The return code is * returned unless ferror() indicates an error (i.e. to signify an end of file, - * fgetc() may return an EOF and fgets() a NULL). + * fgetc() may return an EOF and fgets() a NULL). try_fgetc() calls clearerr() + * on "file" before fgetc(), because some Unixes fgetc() remember old EOFs and + * only return those until explicitely cleared. */ extern int try_fgetc(FILE * file, char * f); extern char * try_fgets(char * line, int size, FILE * file, char * f);