Speedup in case locale not used

This commit is contained in:
Andrey A. Chernov 1997-04-04 18:44:19 +00:00
parent 8bb9171ccb
commit 5058254947
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24630
2 changed files with 12 additions and 4 deletions

View File

@ -187,8 +187,12 @@ rangematch(pattern, test, flags)
if (flags & FNM_CASEFOLD)
c2 = tolower((unsigned char)c2);
if ( __collate_range_cmp(c, test) <= 0
&& __collate_range_cmp(test, c2) <= 0
if ( ( __collate_load_error
&& c <= test && test <= c2
)
|| ( __collate_range_cmp(c, test) <= 0
&& __collate_range_cmp(test, c2) <= 0
)
)
ok = 1;
} else if (c == test)

View File

@ -187,8 +187,12 @@ rangematch(pattern, test, flags)
if (flags & FNM_CASEFOLD)
c2 = tolower((unsigned char)c2);
if ( __collate_range_cmp(c, test) <= 0
&& __collate_range_cmp(test, c2) <= 0
if ( ( __collate_load_error
&& c <= test && test <= c2
)
|| ( __collate_range_cmp(c, test) <= 0
&& __collate_range_cmp(test, c2) <= 0
)
)
ok = 1;
} else if (c == test)