X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=regex.c;h=e26641bfcd9cb05ff7223fd020353f40ac14626d;hb=98cf1a06469c02df32ea978fe6c6514f1c87f2bc;hp=20ea8aebdda8fda11008b6966a07cc22504e3162;hpb=2f64731917c81d726d60c510c82028a0f1c5d72a;p=gnulib.git diff --git a/regex.c b/regex.c index 20ea8aebd..e26641bfc 100644 --- a/regex.c +++ b/regex.c @@ -55,6 +55,9 @@ #include "buffer.h" #include "syntax.h" +#define malloc xmalloc +#define free xfree + #else /* not emacs */ /* If we are not linking with Emacs proper, @@ -2083,23 +2086,24 @@ regex_compile (pattern, size, syntax, bufp) for (ch = 0; ch < 1 << BYTEWIDTH; ch++) { + int translated = TRANSLATE (ch); /* This was split into 3 if's to avoid an arbitrary limit in some compiler. */ if ( (is_alnum && ISALNUM (ch)) || (is_alpha && ISALPHA (ch)) || (is_blank && ISBLANK (ch)) || (is_cntrl && ISCNTRL (ch))) - SET_LIST_BIT (ch); + SET_LIST_BIT (translated); if ( (is_digit && ISDIGIT (ch)) || (is_graph && ISGRAPH (ch)) || (is_lower && ISLOWER (ch)) || (is_print && ISPRINT (ch))) - SET_LIST_BIT (ch); + SET_LIST_BIT (translated); if ( (is_punct && ISPUNCT (ch)) || (is_space && ISSPACE (ch)) || (is_upper && ISUPPER (ch)) || (is_xdigit && ISXDIGIT (ch))) - SET_LIST_BIT (ch); + SET_LIST_BIT (translated); } had_char_class = true; } @@ -4763,19 +4767,19 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) #ifdef emacs case before_dot: DEBUG_PRINT1 ("EXECUTING before_dot.\n"); - if (PTR_CHAR_POS ((unsigned char *) d) >= point) + if (PTR_CHAR_POS ((unsigned char *) d) >= PT) goto fail; break; case at_dot: DEBUG_PRINT1 ("EXECUTING at_dot.\n"); - if (PTR_CHAR_POS ((unsigned char *) d) != point) + if (PTR_CHAR_POS ((unsigned char *) d) != PT) goto fail; break; case after_dot: DEBUG_PRINT1 ("EXECUTING after_dot.\n"); - if (PTR_CHAR_POS ((unsigned char *) d) <= point) + if (PTR_CHAR_POS ((unsigned char *) d) <= PT) goto fail; break;