From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5890 invoked from network); 4 Jan 2000 08:06:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Jan 2000 08:06:46 -0000 Received: (qmail 10591 invoked by alias); 4 Jan 2000 08:06:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9188 Received: (qmail 10584 invoked from network); 4 Jan 2000 08:06:38 -0000 Date: Tue, 4 Jan 2000 09:06:36 +0100 (MET) Message-Id: <200001040806.JAA22069@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: repeat with negative count I'm not completely sure about this one, but it feels wrong... `repeat' with a negative count starts looping, different from the tcsh version of `repeat' which does nothing in such cases. Should we make it return `1' in this case? Bye Sven diff -u oldsrc/loop.c Src/loop.c --- oldsrc/loop.c Fri Dec 17 21:37:50 1999 +++ Src/loop.c Wed Dec 29 23:20:14 1999 @@ -357,7 +357,7 @@ pushheap(); cmdpush(CS_REPEAT); loops++; - while (count--) { + while (count-- > 0) { execlist(cmd->u.list, 1, 0); freeheap(); if (breaks) { -- Sven Wischnowsky wischnow@informatik.hu-berlin.de