blob: 4d4fa9286a86f1b6d1d8f72e59c221caf37152bf (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--- stem_word.c.orig
+++ stem_word.c
@@ -48,7 +48,7 @@
bool (*condition)( char const *word );
};
-static char *end; // iterator at end of word being stemmed
+static char *my_end; // iterator at end of word being stemmed
// Acess to this global variable is protected by the cache_lock mutex in
// stem_word().
@@ -112,10 +112,10 @@
//
//*****************************************************************************
{
- if ( end - word < 3 )
+ if ( my_end - word < 3 )
return false;
- register char const *c = end;
+ register char const *c = my_end;
return !(is_vowel( *--c ) || *c == 'w' || *c == 'x' || *c == 'y' ) &&
(is_vowel( *--c ) || *c == 'y') && !is_vowel( *--c );
}
@@ -206,7 +206,7 @@
# endif
for ( ; rule->id; ++rule ) {
- register char *const suffix = end - rule->old_suffix_len;
+ register char *const suffix = my_end - rule->old_suffix_len;
if ( suffix < word )
continue;
@@ -226,7 +226,7 @@
# ifdef DEBUG_stem_word
cerr << "---> replaced word=" << word << "\n";
# endif
- end = suffix + rule->new_suffix_len;
+ my_end = suffix + rule->new_suffix_len;
break;
}
*suffix = ch; // no match: put back
@@ -397,7 +397,7 @@
char word_buf[ Word_Hard_Max_Size ];
::strcpy( word_buf, word );
- end = word_buf + len;
+ my_end = word_buf + len;
replace_suffix( word_buf, rules_1a );
int const rule = replace_suffix( word_buf, rules_1b );
|