From d6a97c0e0e35b0fe66a87a0b5f03fa482e84df35 Mon Sep 17 00:00:00 2001 From: tomo Date: Mon, 11 Oct 1999 21:46:34 +0000 Subject: [PATCH] (compile_extended_range): Use `CHAR_CHARSET_ID' instead of `CHAR_LEADING_BYTE' in UTF-2000. --- src/regex.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/regex.c b/src/regex.c index 375cdcf..c5cdf34 100644 --- a/src/regex.c +++ b/src/regex.c @@ -3318,8 +3318,12 @@ compile_extended_range (CONST char **p_ptr, CONST char *pend, char *translate, ranges entirely within the first 256 chars. */ if ((range_start >= 0x100 || range_end >= 0x100) - && CHAR_LEADING_BYTE (range_start) != - CHAR_LEADING_BYTE (range_end)) +#ifdef UTF2000 + && CHAR_CHARSET_ID (range_start) != CHAR_CHARSET_ID (range_end) +#else + && CHAR_LEADING_BYTE (range_start) != CHAR_LEADING_BYTE (range_end) +#endif + ) return REG_ERANGESPAN; /* As advertised, translations only work over the 0 - 0x7F range. -- 1.7.10.4