summaryrefslogtreecommitdiff
path: root/lib/libc/regex
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2016-07-10 03:49:38 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2016-07-10 03:49:38 +0000
commit5a5807dd4ca34467ac5fb458bc19f12bf62075a5 (patch)
tree061b849a08366eb8c72a8fe3e86c5d7a46eb3e1b /lib/libc/regex
parentd6f7a4fb17b6dd7a08f9acb28443b16fd5772f67 (diff)
Notes
Diffstat (limited to 'lib/libc/regex')
-rw-r--r--lib/libc/regex/regcomp.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 53332334fed7c..91398eedcb428 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -51,12 +51,9 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdlib.h>
#include <regex.h>
-#include <runetype.h>
#include <wchar.h>
#include <wctype.h>
-#include "collate.h"
-
#include "utils.h"
#include "regex2.h"
@@ -767,9 +764,6 @@ p_b_term(struct parse *p, cset *cs)
{
char c;
wint_t start, finish;
- wint_t i;
- struct xlocale_collate *table =
- (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE];
/* classify what we've got */
switch ((MORE()) ? PEEK() : '\0') {
@@ -817,18 +811,8 @@ p_b_term(struct parse *p, cset *cs)
if (start == finish)
CHadd(p, cs, start);
else {
- if (table->__collate_load_error) {
- (void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
- CHaddrange(p, cs, start, finish);
- } else {
- (void)REQUIRE(__wcollate_range_cmp(table, start, finish) <= 0, REG_ERANGE);
- for (i = 0; i <= UCHAR_MAX; i++) {
- if ( __wcollate_range_cmp(table, start, i) <= 0
- && __wcollate_range_cmp(table, i, finish) <= 0
- )
- CHadd(p, cs, i);
- }
- }
+ (void)REQUIRE(start <= finish, REG_ERANGE);
+ CHaddrange(p, cs, start, finish);
}
break;
}