summaryrefslogtreecommitdiff
path: root/editors/pico/files/patch-aa
blob: b6de406f8fc86aa898e4bb63e115dd9aa355b75e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- pico/search.c.orig	Thu Jun 21 10:50:05 2001
+++ pico/search.c	Fri Sep 28 00:08:23 2001
@@ -98,12 +98,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);
@@ -805,7 +808,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) {