]> code.delx.au - gnu-emacs/blobdiff - src/regex.c
(Freplace_match): Give error if
[gnu-emacs] / src / regex.c
index 9d8d2d489fd14134e07f5a9e1439045a9abf7339..e26641bfcd9cb05ff7223fd020353f40ac14626d 100644 (file)
@@ -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;
                      }