1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00

Speedup in case locale not used

This commit is contained in:
Andrey A. Chernov 1997-04-04 19:40:49 +00:00
parent 92fb126230
commit b5a6eb1833
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24637

View File

@ -804,12 +804,18 @@ register cset *cs;
if (start == finish)
CHadd(cs, start);
else {
(void)REQUIRE(__collate_range_cmp(start, finish) <= 0, REG_ERANGE);
for (i = CHAR_MIN; i <= CHAR_MAX; i++) {
if ( __collate_range_cmp(start, i) <= 0
&& __collate_range_cmp(i, finish) <= 0
)
if (__collate_load_error) {
(void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
for (i = (uch)start; i <= (uch)finish; i++)
CHadd(cs, i);
} else {
(void)REQUIRE(__collate_range_cmp(start, finish) <= 0, REG_ERANGE);
for (i = CHAR_MIN; i <= CHAR_MAX; i++) {
if ( __collate_range_cmp(start, i) <= 0
&& __collate_range_cmp(i, finish) <= 0
)
CHadd(cs, i);
}
}
}
break;