summaryrefslogtreecommitdiff
path: root/src/regex.h
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2000-04-02 23:56:46 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2000-04-02 23:56:46 +0000
commit1334a650deeedea9372cb2fa70469c9f08dec80a (patch)
tree729a4bfa5d823f9c942245fab663d23a3b39ce0a /src/regex.h
parent2e97a539d7ff9ded593e9839105ea821fb0adb56 (diff)
downloademacs-1334a650deeedea9372cb2fa70469c9f08dec80a.tar.gz
* regex.c (PTR_TO_OFFSET) [!emacs]: Remove.
(RE_MULTIBYTE_P, RE_STRING_CHAR_AND_LENGTH): New macros. (GET_CHAR_BEFORE_2): Moved from charset.h plus fixed minor bug when we are between str1 and str2. (MAX_MULTIBYTE_LENGTH, CHAR_STRING) [!emacs]: Provide trivial default. (PATFETCH): Use `TRANSLATE'. (PATFETCH_RAW): Fetch multibyte char if applicable. (PATUNFETCH): Remove. (regex_compile): Rely on PATFETCH to do most of the multibyte magic. When writing a char, write it directly into the pattern buffer rather than going needlessly through a temp char-array. (re_match_2_internal): Similarly, rely on RE_STRING_CHAR to do the multibyte magic and remove the useless `#ifdef emacs'. (bcmp_translate): Don't compare as multibyte chars when in a unibyte buffer. * regex.h (struct re_pattern_buffer): Make field `multibyte' conditional on `emacs'. * charset.h (GET_CHAR_BEFORE_2): Moved to regex.c.
Diffstat (limited to 'src/regex.h')
-rw-r--r--src/regex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/regex.h b/src/regex.h
index 9ebc4e0bf22..9ee2060a1ed 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -362,9 +362,11 @@ struct re_pattern_buffer
/* If true, an anchor at a newline matches. */
unsigned newline_anchor : 1;
+#ifdef emacs
/* If true, multi-byte form in the `buffer' should be recognized as a
multibyte character. */
unsigned multibyte : 1;
+#endif
/* [[[end pattern_buffer]]] */
};