From: Matt B. <ma...@be...> - 2004-07-11 10:43:30
|
Developers, I am planning a not-exactly-backwards-compatible change to the FileGetc() function. Currently it is as follows: Uint8 FileGetc(FileHandle file) { Uint8 c; FileRead(file, &c, 1); return c; } Returning the unsigned byte read, or random gack on EOF or another error. I propose changing it to: int FileGetc(FileHandle file) { Uint8 c; return (FileRead(file, &c, 1) == 1) ? (int)c : EOF; } Which will return the unsigned byte read as the bottom 8-bits of a signed (platform optimized) integer, or EOF if there is an error (including end-of-file). I will also add this to the developers forum on SourceForge, please reply there rather than this list. Matt |