zsh-workers
 help / color / mirror / code / Atom feed
From: Heiko Schroeder <heiko@pc73121.dialup.rwth-aachen.de>
To: zsh-workers@math.gatech.edu
Subject: zsh-2.6beta12 bug
Date: Wed, 29 Nov 1995 18:21:59 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.3.91.951129182113.747A-100000@pc73121.dialup.rwth-aachen.de> (raw)


Hi!

I think I found a small bug in zsh-2.6beta12: the shell won't correctly
process input lines with 8 bit (Latin-1) characters. Processing seems to
stop at the character with it and the rest of the line being discarded.

The cause seems to be line 130 of input.c. The line

	    return lastc = (unsigned)*inbufptr++;

near the beginning of ingetc() should read:

	    return lastc = (unsigned char)*inbufptr++;

The original line may still produce a negative value for characters which
have bit 7 set. (At least with gcc 2.7.0 on a i486 running linux, I
couldn't test it under different environments.)

Perhaps it would be even cleaner to change the declaration of inbufptr
to "unsigned char *" instead of "char *".

CU
   Heiko

PS: I'm not subscribed to this maling list.

--
+----------------------------------------+------------------------------------+
|Email:                                  | Snail-mail:  Heiko Schroeder       |
|                                        |              Lerchenweg 120        |
|  heiko@pool.informatik.rwth-aachen.de  |              52223 Stolberg        |
|                                        |              GERMANY               |
+----------------------------------------+------------------------------------+


                 reply	other threads:[~1995-11-29 18:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.3.91.951129182113.747A-100000@pc73121.dialup.rwth-aachen.de \
    --to=heiko@pc73121.dialup.rwth-aachen.de \
    --cc=heiko@Pool.Informatik.RWTH-Aachen.DE \
    --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).