From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18023 invoked from network); 28 Feb 2000 13:08:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Feb 2000 13:08:30 -0000 Received: (qmail 10215 invoked by alias); 28 Feb 2000 13:08:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9904 Received: (qmail 10204 invoked from network); 28 Feb 2000 13:08:21 -0000 Date: Mon, 28 Feb 2000 14:08:10 +0100 (MET) Message-Id: <200002281308.OAA03686@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: RMSTARSILENT ... or, more precisely, getquery() and noquery(). Doing `rm *' didn't work for me any more because getquery() always retunred immediatly with `n'. Although this makes `rm *' really save, I think it shouldn't do that. The problem was in noquery(): int noquery(int purge) { int c, val = 0; #ifdef FIONREAD ioctl(SHTTY, FIONREAD, (char *)&val); if (purge) { while(val--) read(SHTTY, &c, 1); } #endif return val; } So, with FIONREAD and purge!=0, we always returned -1. That was wrong, wasn't it? Bye Sven diff -ru ../z.old/Src/utils.c Src/utils.c --- ../z.old/Src/utils.c Mon Feb 28 12:58:36 2000 +++ Src/utils.c Mon Feb 28 14:02:26 2000 @@ -1318,7 +1318,7 @@ #ifdef FIONREAD ioctl(SHTTY, FIONREAD, (char *)&val); if (purge) { - while(val--) + for (; val; val--) read(SHTTY, &c, 1); } #endif -- Sven Wischnowsky wischnow@informatik.hu-berlin.de