Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: exit after 10 EOF's
- X-seq: zsh-workers 20389
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: exit after 10 EOF's
- Date: Sun, 19 Sep 2004 12:25:49 -0700 (PDT)
- In-reply-to: <Pine.LNX.4.61.0409191119580.6971@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200409131118.i8DBIM5B005245@xxxxxxxxxxxxxx> <Pine.LNX.4.61.0409181943300.6971@xxxxxxxxxxxxxxxxxx> <D8064C1C-0A0F-11D9-A0DD-0003931123E4@xxxxxxxxxxxxxxxx> <Pine.LNX.4.61.0409190935150.6971@xxxxxxxxxxxxxxxxxx> <20040919175211.3557D863A@xxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.61.0409191119580.6971@xxxxxxxxxxxxxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author