This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Detecting text type in a shell script


Nicolas Christin wrote:
> On Thu, 6 Feb 2003, Max Bowsher wrote:
>
>> Have you tried linking you app with -lbinmode ? That should force all
>> file access to be binary, whatever the mount.
>
> No - but that's a very good point - worth trying out. Thanks a bunch.

You haven't said exactly what your program does, so I can't be sure, but
there is also -lautomode, which (IIRC) does text reads and binary writes.

Remember - When reading in binary mode, your program may receive \r\n line
terminations if that is what the file actually contains.


Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]