@@ -216,19 +216,6 @@ findchar(char *str, int c)
216216return NULL ;
217217}
218218
219- static char *
220- findchar2 (char * str ,int c1 ,int c2 )
221- {
222- while (* str )
223- {
224- if (t_iseq (str ,c1 )|| t_iseq (str ,c2 ))
225- return str ;
226- str += pg_mblen (str );
227- }
228-
229- return NULL ;
230- }
231-
232219
233220/* backward string compare for suffix tree operations */
234221static int
@@ -1233,8 +1220,9 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename)
12331220
12341221if (flag == 0 )
12351222gotonextline ;
1236- /* Get flags after '/' (flags are case sensitive) */
1237- if ((ptr = strchr (repl ,'/' ))!= NULL )
1223+ prepl = lowerstr_ctx (Conf ,repl );
1224+ /* Find position of '/' in lowercased string "prepl" */
1225+ if ((ptr = strchr (prepl ,'/' ))!= NULL )
12381226{
12391227/*
12401228 * Here we use non-lowercased string "repl". We need position
@@ -1244,10 +1232,6 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename)
12441232ptr = repl + (ptr - prepl )+ 1 ;
12451233aflg |=getFlagValues (Conf ,getFlags (Conf ,ptr ));
12461234}
1247- /* Get lowercased version of string before '/' */
1248- prepl = lowerstr_ctx (Conf ,repl );
1249- if ((ptr = strchr (prepl ,'/' ))!= NULL )
1250- * ptr = '\0' ;
12511235pfind = lowerstr_ctx (Conf ,find );
12521236pmask = lowerstr_ctx (Conf ,mask );
12531237if (t_iseq (find ,'0' ))
@@ -1317,10 +1301,12 @@ NIImportAffixes(IspellDict *Conf, const char *filename)
13171301
13181302if (STRNCMP (pstr ,"compoundwords" )== 0 )
13191303{
1320- /* Findcase-insensitive L flag innon- lowercased string */
1321- s = findchar2 ( recoded ,'l' , 'L ' );
1304+ /* Findposition in lowercased string "pstr" */
1305+ s = findchar ( pstr ,'l' );
13221306if (s )
13231307{
1308+ /* Here we use non-lowercased string "recoded" */
1309+ s = recoded + (s - pstr );
13241310while (* s && !t_isspace (s ))
13251311s += pg_mblen (s );
13261312while (* s && t_isspace (s ))