Re: Mac text files and gets()

new topic     » topic index » view thread      » older message » newer message

CChris wrote:
> * it is not documented that "r" and "rb" are the same under Linux;
> * It is said that \r are striped from text files, but this is not true under
> Linux when the text file has the DOS/Windows EOL.
> 
> So yes, I'd be going to break code that uses opening file modes improperly,
> and
> I don't think that should be a problem. You have done the same when
> introducing
> $ and sneakily changed the evaluation rules in 2.5. 
> 
> Of course, if the documentation is changed to reflect different behaviours of
> open() on various platforms, then the code breakage issue would stand. Still
> \r's are not handled properly anyway.

OK. You got me.
I forgot to update that section after porting to Linux/FreeBSD.
I've now checked in a few extra lines of explanation for open()
and gets() on this line terminator issue. Thanks.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu