Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: still bugs with 8-bit chars :-(
- X-seq: zsh-workers 471
- From: Richard Coleman <coleman@xxxxxxxxxxxxxxx>
- To: hzoli@xxxxxxxxxx, pws@xxxxxx
- Subject: Re: still bugs with 8-bit chars :-(
- Date: Wed, 18 Oct 1995 00:42:49 -0400
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: Your message of "Tue, 17 Oct 1995 16:02:16 BST." <199510171502.QAA27274@xxxxxxxxxxxxxxxxx>
> However, Peter's patch is not perfect, since it uses a cast from char to
> unsignec char, which is broken with some compilers. Here is a fix for that.
> If you have a buggy compiler, this may be your problem.
>
>
> *** 1.2 1995/10/10 18:20:38
> --- Src/input.c 1995/10/17 14:57:56
> ***************
> *** 109,115 ****
> if (inbufleft) {
> inbufleft--;
> inbufct--;
> ! return lastc = (int)(unsigned char)*inbufptr++;
> }
> /*
> * No characters in input buffer.
> --- 109,115 ----
> if (inbufleft) {
> inbufleft--;
> inbufct--;
> ! return lastc = STOUC(*inbufptr++);
> }
> /*
> * No characters in input buffer.
>
Since we already casting anyway, wouldn't the line
return lastc = (int)(unsigned short)*inbufptr++;
do just as well. I don't ever use 8-bit characters, so I not
positive about this.
rc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author