Lines 1-36
Link Here
|
1 |
--- index.c.orig Sun Nov 24 01:24:10 2002 |
1 |
--- index.c.orig Mon Mar 10 01:06:16 2003 |
2 |
+++ index.c Sun Nov 24 01:24:21 2002 |
2 |
+++ index.c Mon Oct 27 22:10:18 2003 |
3 |
@@ -91,6 +91,12 @@ |
3 |
@@ -103,6 +103,12 @@ |
4 |
|
4 |
|
5 |
for (; *src; ++src) { |
5 |
for (; *src; ++src) { |
6 |
c = * (const unsigned char *) src; |
6 |
c = * (const unsigned char *) src; |
7 |
+ if((c & 0x80) && *(src+1)) { |
7 |
+ if((c & 0x80) && *(src+1)) { |
8 |
+ *dest++ = c; |
8 |
+ *dest++ = c; |
9 |
+ *dest++ = *(src+1); |
9 |
+ *dest++ = *(src+1); |
10 |
+ src++; |
10 |
+ src++; |
11 |
+ continue; |
11 |
+ continue; |
12 |
+ } |
12 |
+ } |
13 |
|
13 |
|
14 |
if (isspace( c )) { |
14 |
if (isspace( c )) { |
15 |
*dest++ = ' '; |
15 |
*dest++ = ' '; |
16 |
@@ -150,7 +156,7 @@ |
16 |
@@ -184,7 +190,7 @@ |
17 |
isspacealnumtab_allchars['\t'] = isspacealnumtab_allchars['\n'] = 0; /* special */ |
|
|
18 |
|
17 |
|
19 |
for (i = 0; i <= UCHAR_MAX; i++){ |
18 |
charcount = 0; |
20 |
- if (islower (i) || (utf8_mode && i >= 0xC0)) |
19 |
for (i = 0; i <= UCHAR_MAX; i++){ |
21 |
+ if (islower (i) || (utf8_mode && i >= 0xC0) || (i>=0x80)) |
20 |
- if (islower (i) || (utf8_mode && i >= 0xC0)) |
22 |
chartab[charcount++] = i; |
21 |
+ if (islower (i) || (utf8_mode && i >= 0xC0) || (i>=0x80)) |
23 |
} |
22 |
chartab [charcount++] = i; |
|
|
23 |
} |
24 |
|
24 |
|
25 |
@@ -317,6 +326,15 @@ |
25 |
@@ -293,6 +299,15 @@ |
26 |
|
26 |
|
27 |
/* FIXME. Optimize this inner loop. */ |
27 |
/* FIXME. Optimize this inner loop. */ |
28 |
while (*word && start < end && *start != '\t') { |
28 |
while (*word && start < end && *start != '\t') { |
29 |
+ if ((*start & 0x80) && start+1<end && start[1]!='\t') { |
29 |
+ if ((*start & 0x80) && start+1<end && start[1]!='\t') { |
30 |
+ if(start[0]!=word[0]) |
30 |
+ if(start[0]!=word[0]) |
31 |
+ return ((unsigned)word[0]<(unsigned)start[0])?-2:1; |
31 |
+ return ((unsigned)word[0]<(unsigned)start[0])?-2:1; |
32 |
+ if(start[1]!=word[1]) |
32 |
+ if(start[1]!=word[1]) |
33 |
+ return ((unsigned)word[1]<(unsigned)start[1])?-2:1; |
33 |
+ return ((unsigned)word[1]<(unsigned)start[1])?-2:1; |
34 |
+ word+=2; |
34 |
+ word+=2; |
35 |
+ start+=2; |
35 |
+ start+=2; |
36 |
+ continue; |
36 |
+ continue; |
Lines 38-44
Link Here
|
38 |
if (!dbindex -> isspacealnum[* (const unsigned char *) start]) { |
38 |
if (!dbindex -> isspacealnum[* (const unsigned char *) start]) { |
39 |
++start; |
39 |
++start; |
40 |
continue; |
40 |
continue; |
41 |
@@ -359,6 +377,8 @@ |
41 |
@@ -340,6 +355,8 @@ |
42 |
*start != '\t' && |
42 |
*start != '\t' && |
43 |
!dbindex -> isspacealnum[* (const unsigned char *) start]) |
43 |
!dbindex -> isspacealnum[* (const unsigned char *) start]) |
44 |
{ |
44 |
{ |