[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.71,1.72
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Tue Oct 19 11:33:33 CEST 2004
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16031
Modified Files:
file.cpp
Log Message:
Got rid of ungetc() to save Chrilith from the trouble of implementing it
himself on PalmOS.
Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- file.cpp 18 Oct 2004 21:22:10 -0000 1.71
+++ file.cpp 19 Oct 2004 18:28:41 -0000 1.72
@@ -318,8 +318,10 @@
if (c == CR) {
c = getc(_handle);
- if (c != LF)
- ungetc(c, _handle);
+ // Don't use ungetc() here. It might be slightly more
+ // elegant, but PalmOS doesn't have it.
+ if (c != LF && c != EOF)
+ fseek(_handle, -1, SEEK_CUR);
break;
}
More information about the Scummvm-git-logs
mailing list