delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/28/02:16:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Wed, 27 Sep 2000 15:36:32 -0400
From: Chet Ramey <chet AT nike DOT ins DOT cwru DOT edu>
To: cygwin AT sources DOT redhat DOT com
Subject: Re: Has CR/LF and cat problem with textutils-2.0 been solved?
Reply-To: chet AT po DOT CWRU DOT Edu
Message-ID: <1000927193632.AA99354.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet AT po DOT CWRU DOT Edu
MIME-Version: 1.0
X-In-Reply-To: Message from cgf AT cygnus DOT com of Wed, 27 Sep 2000 13:37:30 -0400 (id <20000927133730 DOT B9348 AT cygnus DOT com>)

> On Wed, Sep 27, 2000 at 01:03:45PM -0400, Chet Ramey wrote:
> >> >Now, do you want all '\r's stripped, or \r\n translated to \n when
> >> >reading command substitution output?
> >> 
> >> \r\n -> \n.
> >
> >OK, bash-2.05 will do that.
> 
> Wow, that's responsive.

Well, geez, how hard can it be?  Here's the change I just made to
subst.c:read_comsub().  Take a look -- I'm really dragging today and
probably made an error.

*** subst.c~	Tue Sep 26 15:19:40 2000
--- subst.c	Wed Sep 27 15:38:09 2000
***************
*** 3361,3364 ****
--- 3361,3372 ----
  
        istring[istring_index++] = c;
+ 
+ #if defined (__CYGWIN__)
+       if (c == '\n' && istring_index > 1 && istring[istring_index - 2] == '\r')
+ 	{
+ 	  istring_index--;
+ 	  istring_index[-1] = '\n';
+ 	}
+ #endif
      }
  

> Are you sure you don't want to make a cygwin
> binary release?  Imagine the prestige, the acclaim!

It's hard to resist, but I have no means to make one.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet AT po DOT CWRU DOT Edu    http://cnswww.cns.cwru.edu/~chet/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019