8bit and locale fixes for search
This commit is contained in:
parent
b345da9810
commit
84e382fa39
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25878
31
mail/pine4/files/patch-aa
Normal file
31
mail/pine4/files/patch-aa
Normal file
@ -0,0 +1,31 @@
|
||||
--- pico/search.c.old Tue Oct 5 01:49:41 1999
|
||||
+++ pico/search.c Wed Feb 16 03:41:45 2000
|
||||
@@ -97,12 +97,15 @@
|
||||
int bc;
|
||||
int pc;
|
||||
{
|
||||
+ bc = (unsigned char)bc;
|
||||
+ pc = (unsigned char)pc;
|
||||
+
|
||||
if ((curwp->w_bufp->b_mode & MDEXACT) == 0){
|
||||
- if (bc>='a' && bc<='z')
|
||||
- bc -= 0x20;
|
||||
+ if (islower(bc))
|
||||
+ bc = toupper(bc);
|
||||
|
||||
- if (pc>='a' && pc<='z')
|
||||
- pc -= 0x20;
|
||||
+ if (islower(pc))
|
||||
+ pc = toupper(pc);
|
||||
}
|
||||
|
||||
return(bc == pc);
|
||||
@@ -804,7 +807,7 @@
|
||||
int maxlength; /* maximum chars in destination */
|
||||
|
||||
{
|
||||
- char c; /* current char to translate */
|
||||
+ unsigned char c; /* current char to translate */
|
||||
|
||||
/* scan through the string */
|
||||
while ((c = *srcstr++) != 0) {
|
Loading…
Reference in New Issue
Block a user