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
Date: Wed, 31 Mar 2004 09:53:22 -0800 (PST)
From: "Peter A. Castro" <doctor@fruitbat.org>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
cc: zzapper <david@tvis.co.uk>, zsh-workers@sunsite.dk, cygwin@cygwin.com
Subject: Re: zsh and line breaks
In-Reply-To: <2603.1080737128@trentino.logica.co.uk>
Message-ID: <Pine.LNX.4.53.0403310935450.9892@gremlin.fruitbat.org>
References: <s38u10erwrz.fsf@ackusativ.ling.uu.se> <1vvf60l9i7n4nlobcroik2le5ofe6v2rn4@4ax.com> <Pine.LNX.4.53.0403291441160.5939@gremlin.fruitbat.org> <3372.1080639122@trentino.logica.co.uk> <Pine.LNX.4.53.0403301047250.5939@gremlin.fruitbat.org> <2603.1080737128@trentino.logica.co.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-IsSubscribed: yes

On Wed, 31 Mar 2004, Oliver Kiddle wrote:

> "Peter A. Castro" wrote:
> > > Are those corrections likely to be limited to the Cygwin package for
> > > zsh?
> >
> > Yes.  Currently, my changes are Cygwin specific and really don't apply to
> > the other platforms.
>
> It is easy for us to add `#ifdef __CYGWIN__' around changes or #define
> O_TEXT to zero on other systems so if you do correct the problem,
> please send the changes back to us.

There are about 43 open() calls which I've updated with the O_TEXT
option.  Having all those ifdef's seemed rather ugly (makes the code hard
to look at, expectially when they are within a few lines of each other)
so I took a more "elegent" approach, though you may want to revise it if
it doesn't meet your style requirements :)

> > I'm aware of O_TEXT and I thought I'd changed all of the places where
> > files are opened already, but I just checked my patches and those changes
> > are gone!  AARRGGHH!!  Ok, I'll re-edit and get that back in.  Going
> > through stdin or via piped fds may be an issue still.  Anyway, thanks for
> > the thought!
>
> It seems there is a setmode() function declared in io.h which will
> allow the mode to be changed on any already open file descriptors.

Yep, I'm experimenting with this right now.  As it stands, tests which
print out to a file and then cat it back in (currently A04redirect and
E01options) produce a diff, but don't otherwise seem to have any
problems.

> Oliver

-- 
Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

