[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH]
From: |
pg |
Subject: |
Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH] |
Date: |
Mon, 22 Oct 2001 07:58:30 -0600 (MDT) |
In a recent note, Thomas E. Dickey said:
> Date: Mon, 22 Oct 2001 09:36:27 -0400 (EDT)
> > >
> > > On Mon, 22 Oct 2001 address@hidden wrote:
> > >
> > > > The problem: If the last character of a string has the 0x80 bit set,
>
> then the last character of a string shouldn't have 0x80 rather than 0x00.
>
Oops. Clarification (I was not considering the terminating NUL part of
the string -- for example, strlen() doesn't count it): If the string
character preceding the terminating NUL has the 0x80 bit set ...
The offending code, distilled, is:
for (i = 0; buffer[i]; i++)
{
if (buffer[i] & 0x80) {
{ ... }
i++;
} else {
buffer[i] = UCH(TOLOWER(buffer[i]));
}
}
The i++ may skip the NUL if the preceding character has 0x80 set.
-- gil
--
StorageTek
INFORMATION made POWERFUL
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev LYLowerCase EBCDIC Crash [PATCH], pg, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], Thomas E. Dickey, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], pg, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], Thomas E. Dickey, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH],
pg <=
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], Thomas E. Dickey, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], pg, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], Thomas E. Dickey, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], pg, 2001/10/22
- Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], Thomas E. Dickey, 2001/10/22
Re: lynx-dev LYLowerCase EBCDIC Crash [PATCH], pg, 2001/10/22