Has CR/LF and cat problem with textutils-2.0 been solved?
Chet Ramey
chet@nike.ins.cwru.edu
Wed Sep 27 21:59:00 GMT 2000
> 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@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list