[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV 2.8pre2: fix for new UPPER8 7bit approx. variant
From: |
Leonid Pauzner |
Subject: |
Re: LYNX-DEV 2.8pre2: fix for new UPPER8 7bit approx. variant |
Date: |
Tue, 3 Mar 1998 13:10:56 +0300 (MSK) |
> * Subject: LYNX-DEV 2.8pre.2: fix for new UPPER8 7bit approx.
> variant
> * From: =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= <address@hidden>
> * Date: Mon, 2 Mar 1998 16:33:05 +0300
> * Mail-Followup-To: address@hidden
> * Organization: Biomechanoid
> * Reply-To: address@hidden
> * Sender: address@hidden
> _________________________________________________________________
>
> The problem is the same as in my previous posting about TOLOWER/TOUPPER
> problem. UPPER8(-1, 0377) will work properly after this fix.
>
> *** src/LYStrings.c.bak Sun Mar 1 00:00:47 1998
> --- src/LYStrings.c Mon Mar 2 16:28:39 1998
> ***************
> *** 1634,1640 ****
> {
> /* Use exact match for speed, but mostly for stability */
> /* while doing experiments with the remainder of this function. */
> ! if (ch1==ch2)
> return(0); /* Exact match */
>
> /* case-insensitive match for us-ascii */
> --- 1634,1640 ----
> {
> /* Use exact match for speed, but mostly for stability */
> /* while doing experiments with the remainder of this function. */
> ! if ((unsigned char)ch1==(unsigned char)ch2)
> return(0); /* Exact match */
>
> /* case-insensitive match for us-ascii */
No!
The comments for UPPER8 says:
** It was realized that case-insensitive user search
** got information about upper/lower mapping from TOUPPER
** (precisely from "(TOUPPER(a) - TOUPPER(b))==0").
And I may say more: Lynx case-Sensitive search done via a==b instead.
There are three functions that do so in LYStrings.c (they are paired
to those that use UPPER8) and case sensitive search works OK.
So I just write a==b in the beginning of my function, no more.
May be the comment "exact match"
should be corrected to "case-sensitive match"?
Leonid.
- Re: LYNX-DEV 2.8pre2: fix for new UPPER8 7bit approx. variant,
Leonid Pauzner <=