From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id WAA07661 for ; Mon, 16 Sep 1996 22:02:20 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id HAA13185; Mon, 16 Sep 1996 07:50:19 -0400 (EDT) Resent-Date: Mon, 16 Sep 1996 07:50:19 -0400 (EDT) Message-Id: From: hoh@approve.se (Goran Larsson) Subject: Bug in zsh 3.0.0 To: zsh-workers@math.gatech.edu Date: Mon, 16 Sep 1996 13:37:23 +0200 (MET-DST) X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Resent-Message-ID: <"s3l8h3.0.tD3.wxJFo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2144 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello. I just found this: zsh> ^D (space and ^D) zsh: do you wish to see all 1344 possibilities? ÿ (^C) zsh> I expected that it would echo "n", not "ÿ" (ÿ is 0xFF in ISO-8859-1). The problem is in getzlequery() in zle_utils.c where getkey() is called, but EOF is not checked for. ---->8-------->8-------->8-------->8-------->8-------->8-------->8---- *** zle_utils.c,DIST Sat Aug 3 00:08:55 1996 --- zle_utils.c Mon Sep 16 13:31:03 1996 *************** *** 327,332 **** --- 327,334 ---- c = 'y'; else if (icntrl(c)) c = 'n'; + else if (c == EOF) + c = 'n'; else c = tulower(c); ---->8-------->8-------->8-------->8-------->8-------->8-------->8---- While looking at getkey() in zle_main.c I found that it can return EOF, -1, or a key. It is extremely common for EOF to be -1, so what is the intention with having getkey() return both EOF and -1? Shouldn't this return (r <= 0) ? -1 : cc; be changed into this? return (r <= 0) ? EOF : cc; Or should my patch above also check for -1 (for machines where EOF is not -1)? -- Goran Larsson mailto:hoh@approve.se I was an atheist, http://home1.swipnet.se/%7Ew-12153/ until I found out I was God.