[Scummvm-devel] File handling revamp

Pawel Kolodziejski aquadran at xtr.net.pl
Fri Aug 1 19:39:31 CEST 2008

On 2008-08-01, at 12:58, Max Horn wrote:

> Am Fr, 1.08.2008, 12:14, schrieb Torbjörn Andersson:
>> 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?)
> Fine by me. So, how do we determine what native line breaks are?
>   stream.writeByte('\r');
> #else
>   stream.writeByte('\n');
> #endif
> ?

#ifdef _WIN32

> Bye,
> Max
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel

More information about the Scummvm-devel mailing list