Mercurial > hg > xemacs-beta
diff src/regex.c @ 157:6b37e6ddd302 r20-3b5
Import from CVS: tag r20-3b5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:40:41 +0200 |
parents | 1370575f1259 |
children | 0132846995bd |
line wrap: on
line diff
--- a/src/regex.c Mon Aug 13 09:39:46 2007 +0200 +++ b/src/regex.c Mon Aug 13 09:40:41 2007 +0200 @@ -3249,20 +3249,19 @@ compile_extended_range (CONST char **p_ptr, CONST char *pend, char *translate, reg_syntax_t syntax, Lisp_Object rtab) { - Emchar this_char; - - CONST char *p = *p_ptr; - EMACS_INT range_start, range_end; + Emchar this_char, range_start, range_end; + CONST Bufbyte *p; - if (p == pend) + if (*p_ptr == pend) return REG_ERANGE; + p = (CONST Bufbyte *) *p_ptr; + range_end = charptr_emchar (p); p--; /* back to '-' */ DEC_CHARPTR (p); /* back to start of range */ /* We also want to fetch the endpoints without translating them; the appropriate translation is done in the bit-setting loop below. */ - range_start = charptr_emchar ((CONST Bufbyte *) p); - range_end = charptr_emchar ((CONST Bufbyte *) (*p_ptr)); + range_start = charptr_emchar (p); INC_CHARPTR (*p_ptr); /* If the start is after the end, the range is empty. */ @@ -3637,7 +3636,7 @@ case categoryspec: case notcategoryspec: bufp->can_be_null = 1; - return; + return 0; /* end if category patch */ #endif /* MULE */