[Scummvm-devel] File handling revamp

Torbjörn Andersson eriktorbjorn at telia.com
Fri Aug 1 12:14:43 CEST 2008


One thing that was mentioned on #scummvm yesterday, which I don't think
has come up in this discussion yet (I've been out of town for a few
days, and haven't read it as carefully as I should), is that the
configuration file is apparently written with Unix line breaks, even
under Windows. They're created by

    stream.writeByte('\n');

so they're always written as one byte. (I haven't actually verified this
myself, since I don't run ScummVM under Windows.)

The readLine() function should already handle anything that looks even
remotely like a line break (which is good, because we want to be able to
read any old text file), but I guess it would be a good idea to write
text files in the native format. (Or is there any case where we want to
write non-native line breaks?)

Torbjörn Andersson




More information about the Scummvm-devel mailing list