From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.net.au (8.7/8.7) with SMTP id BAA01034 for ; Sat, 7 Oct 1995 01:23:37 +1000 (EST) Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA04893 (5.65c/Gatech-10.0-IDA for ); Fri, 6 Oct 1995 11:20:11 -0400 Received: by math (5.x/SMI-SVR4) id AA08406; Fri, 6 Oct 1995 11:10:41 -0400 Resent-Date: Fri, 06 Oct 95 16:12:38 +0100 Old-Return-Path: Message-Id: <8075.9510061512@pygmy.swan.ac.uk> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: problem with 8-bit chars? In-Reply-To: "hzoli@cs.elte.hu"'s message of "Wed, 04 Oct 95 14:00:08 BST." <9510041300.AA17676@turan.elte.hu> Date: Fri, 06 Oct 95 16:12:38 +0100 From: P.Stephenson@swansea.ac.uk X-Mts: smtp Resent-Message-Id: <"w0EA33.0.G32.mRKTm"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/421 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu hzoli@cs.elte.hu wrote: > Carlos Carvalho wrote: > > > > version 2.6-beta10-hzoli10.3 on linux > > > > I tried "lpr curr@culo.lj", where the @ stands for the letter i with an > > accute accent, and got "zsh: command not found: ulo.lj". Completion on > > the filename works fine. To manage to print I had to put the filename > > in single quotes :-( > > > > Carlos > > The bug is in Peter's input patches. It checks wether the character returned > by ingetc() is negative or not. If it is negative, it thinks that it is an > error. This only happens when history expansion is active, so single quotes > or the nobanghist option prevents this bug. It can be fixed by some explicit > casts from signed to unsigned characters, but I do not have time do play wit > h > that now (it is very trivial to fix, but we shold be carefull not to break > comparison line c == HISTSPACE etc.) 1) I sent the reply by mistake just to Zoltan again. I do that every time I've been away from the keyboard for a while. 2) The following version is probably better anyway. The previous version passed a char to hwaddc() which could cause problems with K&R compilers. I think hwaddc() is the only place where HISTSPACE is compared with a non-char, so casting the int to char here should be a safe fix. (I trust even K&R will distinguish been (i1 == i2) and ((char)i1 == (char)i2) ?) *** Src/hist.c.us Fri Sep 22 04:12:01 1995 --- Src/hist.c Fri Oct 6 08:48:51 1995 *************** *** 41,47 **** void hwaddc(int c) { ! if (hlastw && chline && (!(errflag || lexstop) || c == HISTSPACE)) { if (c == bangchar && unset(NOBANGHIST)) hwaddc('\\'); *hptr++ = c; --- 41,47 ---- void hwaddc(int c) { ! if (hlastw && chline && (!(errflag || lexstop) || (char)c == HISTSPACE)) { if (c == bangchar && unset(NOBANGHIST)) hwaddc('\\'); *hptr++ = c; *** Src/input.c.us Fri Sep 22 04:12:06 1995 --- Src/input.c Thu Oct 5 08:31:51 1995 *************** *** 109,115 **** if (inbufleft) { inbufleft--; inbufct--; ! return lastc = *inbufptr++; } /* * No characters in input buffer. --- 109,115 ---- if (inbufleft) { inbufleft--; inbufct--; ! return lastc = (int)(unsigned char)*inbufptr++; } /* * No characters in input buffer. -- Peter Stephenson Tel: +44 1792 205678 extn. 4461 WWW: http://python.swan.ac.uk/~pypeters/ Fax: +44 1792 295324 Department of Physics, University of Wales, Swansea, Singleton Park, Swansea, SA2 8PP, U.K.