From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29131 invoked from network); 19 Sep 2004 19:26:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Sep 2004 19:26:13 -0000 Received: (qmail 89203 invoked from network); 19 Sep 2004 19:26:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Sep 2004 19:26:07 -0000 Received: (qmail 21747 invoked by alias); 19 Sep 2004 19:25:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20389 Received: (qmail 21731 invoked from network); 19 Sep 2004 19:25:52 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Sep 2004 19:25:52 -0000 Received: (qmail 88847 invoked from network); 19 Sep 2004 19:25:52 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 19 Sep 2004 19:25:50 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i8JJPn1j001066 for ; Sun, 19 Sep 2004 12:25:49 -0700 Date: Sun, 19 Sep 2004 12:25:49 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk Subject: Re: PATCH: exit after 10 EOF's In-Reply-To: Message-ID: References: <200409131118.i8DBIM5B005245@news01.csr.com> <20040919175211.3557D863A@pwstephenson.fsnet.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Sun, 19 Sep 2004, Bart Schaefer wrote: > I haven't gotten to the latter part yet, but here's a patch that (a) backs > out 20363 and (b) causes the count to apply to printing of the warning. Actually I just noticed that it doesn't _completely_ back out 20363. This part of 20363 is still there: bindk = getkeycmd(); - if (!ll && isfirstln && !(zlereadflags & ZLRF_IGNOREEOF) && - lastchar == eofchar) { - eofsent = 1; - break; - } if (bindk) { - if (execzlefunc(bindk, zlenoargs)) + if (!ll && isfirstln && !(zlereadflags & ZLRF_IGNOREEOF) && + lastchar == eofchar) { + /* + * Slight hack: this relies on getkeycmd returning + * a value for the EOF character. However, + * undefined-key is fine. That's necessary because + * otherwise we can't distinguish this case from + * a ^C. + */ + eofsent = 1; + break; + } + if (execzlefunc(bindk, zlenoargs)) { However, I can't figure out when getkeycmd() might fail to return a value for the EOF character, so I can't decide whether this makes a difference.