* regex.c (PTR_TO_OFFSET) [!emacs]: Remove.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Apr 2000 23:56:45 +0000 (23:56 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 2 Apr 2000 23:56:45 +0000 (23:56 +0000)
commitecd705981eb3f31b6378ac3e636b03dbfc71adec
tree34f643d730663940f649348c56bbde9bbb07bd9d
parentfbf994a2ff742a8c9adfa95d99a2944913e6a9e5
* 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.
regex.c
regex.h