comparison src/utils.cc @ 3072:ca9677cdb62e

[project @ 1997-07-15 02:45:42 by jwe]
author jwe
date Tue, 15 Jul 1997 02:45:53 +0000
parents 2280158c4449
children 98d862e12945
comparison
equal deleted inserted replaced
3071:00ef82060ebc 3072:ca9677cdb62e
108 } 108 }
109 109
110 // Ugh. 110 // Ugh.
111 111
112 int 112 int
113 keyword_almost_match (const char **std, int *min_len, const string& s, 113 keyword_almost_match (const char * const *std, int *min_len, const string& s,
114 int min_toks_to_match, int max_toks) 114 int min_toks_to_match, int max_toks)
115 { 115 {
116 int status = 0; 116 int status = 0;
117 int tok_count = 0; 117 int tok_count = 0;
118 int toks_matched = 0; 118 int toks_matched = 0;
136 136
137 if (*beg == '\0') 137 if (*beg == '\0')
138 return status; 138 return status;
139 139
140 140
141 char **to_match = new char * [max_toks + 1]; 141 const char **to_match = new const char * [max_toks + 1];
142 const char **s1 = std; 142 const char * const *s1 = std;
143 char **s2 = to_match; 143 const char **s2 = to_match;
144 144
145 if (! s1 || ! s2) 145 if (! s1 || ! s2)
146 goto done; 146 goto done;
147 147
148 s2[tok_count] = beg; 148 s2[tok_count] = beg;