This is the mail archive of the cygwin@sourceware.cygnus.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]

RE: When is converted to


? and why?
Date: Mon, 2 Nov 1998 14:44:33 -0000
Message-Id: <003301be066f$4e1247f0$010120c0@menpc1>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2232.26
In-Reply-To: <71gav6$rrh$1@cronkite.cygnus.com>
X-Mimeole: Produced By Microsoft MimeOLE V5.00.0518.4
Importance: Normal
X-Delivery-Agent: ToTheNet v1.3, (C) 1997, Mentor Systems plc


> >> $ echo a | tr -d '\r' > yy
> >> $ ls -l yy
> >> -rw-r--r--   1 544      everyone        3 Oct 28 15:48 yy
> >
> >Well, another improperly ported utility.  `tr' should open it's input
> >and output in binary mode; obviously from this example it isn't.
>
> Right.  It should be calling setmode(1, O_BINARY).  When tr is invoked
> it inherits an fd.  It has no idea if that fd is associated with a file
> in a directory that is mounted "binary" or not by this time.  The only
> thing it can do is call setmode() on its stdout fd.

Surly you are all missing the point.  On unix, there is no distinction
between text and binary files, so why the hell should tr go out of it's way
to change this so called "mode" on the file handle.  If CYGWIN32 is trying
to emulate Unix, then it should handle any conversions necessary.

The goal should be to provide a mechanism for dealing with the difference
between binary and text files (and the same applies to path names) without
the need to modify the unix program source or script.

OK, so that is not that simple, but I think we should be searching for a
more generic solution rather than patching programs as people find they
don't work in all circumstances.

Austin David France
Mentor Systems plc
mailto:adf@mentor-systems.com



------------------------------------------------------------------------

The views and opinions expressed in this e-mail message are the sender's
and do not necessarily represent the views of Mentor Systems plc.

------------------------------------------------------------------------


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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