Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <01f001c2ce16$90e6c380$78d96f83@pomello>
From: "Max Bowsher" <maxb@ukf.net>
To: "Nicolas Christin" <nicolas@cs.virginia.edu>, <cygwin@cygwin.com>
References: <Pine.GSO.4.53.0302061048490.1087@arachnion.cs.Virginia.EDU> <00e101c2cdf8$79490fd0$78d96f83@pomello> <Pine.GSO.4.53.0302061104010.1132@arachnion.cs.Virginia.EDU> <00ed01c2cdfc$8b6cc810$78d96f83@pomello> <Pine.GSO.4.53.0302061128430.1166@arachnion.cs.Virginia.EDU>
Subject: Re: Detecting text type in a shell script
Date: Thu, 6 Feb 2003 19:33:03 -0000
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

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/

