From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17484 invoked from network); 4 Jun 1997 18:55:48 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Jun 1997 18:55:48 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA28918; Wed, 4 Jun 1997 14:48:38 -0400 (EDT) Resent-Date: Wed, 4 Jun 1997 14:48:38 -0400 (EDT) Sender: rz2a022@rrz.uni-hamburg.de Message-Id: <3395B976.2C3FDA40@rrz.uni-hamburg.de> Date: Wed, 04 Jun 1997 20:52:38 +0200 From: Bernd Eggink Organization: Regionales Rechenzentrum der Uni Hamburg X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.29 i586) Mime-Version: 1.0 To: zsh-workers Subject: Bugs in 3.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"AIGLh3.0.n37.5YRbp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3201 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu (I'm re-sending this because my first mail seems to have got lost). 1. There's still a minor bug in 'getopts' in 3.1.2. If the options string contains a ':', a user supplied option ':' will be accepted. Example: # tst while getopts ab:c opt do; print "option is $opt"; done tst -: # prints 'option is :' The easiest way to avoid this is to declare the option character ':' illegal. Here is a patch for "builtin.c": 2393a2394 > lenoptstr--; 2421c2422 < if (i == lenoptstr) { --- > if (i == lenoptstr || *opch == ':') { 2. 'select' still doesn't check its input correctly. As 'atoi' is used, any string starting with a valid number is accepted. IMHO it would be better to use 'strtol' instead and check the delimiting character. This patch for "loop.c" does it: 123c123 < char *str, *s; --- > char *str, *s, *estr; 126c126 < int i; --- > long i; 172,173c172,173 < i = atoi(str); < if (!i) --- > i = strtol(str, &estr, 10); > if (!i || *estr) -- Bernd Eggink Regionales Rechenzentrum der Universitaet Hamburg eggink@rrz.uni-hamburg.de http://www.rrz.uni-hamburg.de/eggink/BEggink.html