This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: change default behavior of 'read' builtin in ash
On Sat, Oct 27, 2001 at 08:16:49PM +0400, egor duda wrote:
>Hi!
>
>Saturday, 27 October, 2001 Corinna Vinschen cygwin-apps@cygwin.com wrote:
>
>CV> On Fri, Oct 26, 2001 at 04:49:18PM +0400, egor duda wrote:
>>> Hi!
>>>
>>> currently 'read' builtin in ash requires -e option to make it treat
>>> backslashes as escapes. current BSD ash and SUSv2 do this by default
>>> and use -r option to turn this special treatment off. patch attached.
>>>
>>> after this patch, libiberty testsuite passes all test on cygwin :)
>
>CV> There's a problem with that patch. At one point it removes the
>CV> `#ifndef SMALL' while at another important point it leaves the
>CV> original SMALL handling in the code:
>
>CV> #ifdef SMALL
>CV> nextopt("");
>CV> #else
>CV> while ((i = nextopt("erp:t:")) != '\0') {
>CV> [...]
>
>CV> Did you compile ash w/o -DSMALL for Cygwin? The Cygwin version is
>CV> compiled that way.
>
>with -DSMALL backslashes are always treated by default, i.e., as
>escapes. no '-r' option available. when as compiled without -DSMALL,
>user can supply -r option to 'read' and make it process input as
>"raw". i don't see anything wrong here.
Yes. The code looks right to me. You accomodated both the SMALL and
non-SMALL cases which is correct.
FWIW,
cgf