Re: Mac text files and gets()
- Posted by Robert Craig <rds at Rapi?Euphor?a.com> Sep 18, 2007
- 568 views
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