zsh-workers
 help / color / mirror / code / Atom feed
From: P.Stephenson@swansea.ac.uk
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: problem with 8-bit chars?
Date: Fri, 06 Oct 95 16:12:38 +0100	[thread overview]
Message-ID: <8075.9510061512@pygmy.swan.ac.uk> (raw)
In-Reply-To: "hzoli@cs.elte.hu"'s message of "Wed, 04 Oct 95 14:00:08 BST."             <9510041300.AA17676@turan.elte.hu>

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 <P.Stephenson@swansea.ac.uk>  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.


  reply	other threads:[~1995-10-06 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-10-02 16:35 Carlos Carvalho
1995-10-03 14:45 ` Zoltan Hidvegi
1995-10-04 13:00 ` Zoltan Hidvegi
1995-10-06 15:12   ` P.Stephenson [this message]
1995-10-06 15:54     ` Vinnie Shelton
1995-10-06 16:22       ` Mark Borges
1995-10-06 17:32       ` reply behavoir for zsh's mailing lists Richard Coleman
1995-10-06 19:51     ` problem with 8-bit chars? Carlos Carvalho
1995-10-03 17:09 Joachim Reith
1995-10-03 16:36 ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8075.9510061512@pygmy.swan.ac.uk \
    --to=p.stephenson@swansea.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).