Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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 Content-Type: text/plain; charset=us-ascii 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