ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/10/27/12:20:48

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Date: Sat, 27 Oct 2001 12:21:30 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-apps AT cygwin DOT com
Subject: Re: change default behavior of 'read' builtin in ash
Message-ID: <20011027122130.A12212@redhat.com>
Reply-To: cygwin-apps AT cygwin DOT com
Mail-Followup-To: cygwin-apps AT cygwin DOT com
References: <2180829368 DOT 20011026164918 AT logos-m DOT ru> <20011026233333 DOT I7622 AT cygbert DOT vinschen DOT de> <150279679107 DOT 20011027201649 AT logos-m DOT ru>
Mime-Version: 1.0
In-Reply-To: <150279679107.20011027201649@logos-m.ru>
User-Agent: Mutt/1.3.21i

On Sat, Oct 27, 2001 at 08:16:49PM +0400, egor duda wrote:
>Hi!
>
>Saturday, 27 October, 2001 Corinna Vinschen cygwin-apps AT cygwin DOT 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

- Raw text -


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