diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-04-02 23:56:46 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-04-02 23:56:46 +0000 |
commit | 2d1675e45c46d97aec4c6af28a0719778f79b8da (patch) | |
tree | 11c6492fbe96211f75cc8f4ac37e7e0cde1538bb /src/charset.h | |
parent | 096540869a2be7676946ef9c4ee52e5cedb5c28a (diff) | |
download | emacs-2d1675e45c46d97aec4c6af28a0719778f79b8da.tar.gz emacs-2d1675e45c46d97aec4c6af28a0719778f79b8da.tar.bz2 emacs-2d1675e45c46d97aec4c6af28a0719778f79b8da.zip |
* 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/charset.h')
-rw-r--r-- | src/charset.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/charset.h b/src/charset.h index 3acc447c5f8..d9257b8955a 100644 --- a/src/charset.h +++ b/src/charset.h @@ -577,18 +577,6 @@ else ? 1 \ : multibyte_form_length (str, len)) -/* Set C a (possibly multibyte) character before P. P points into a - string which is the virtual concatenation of STR1 (which ends at - END1) or STR2 (which ends at END2). */ - -#define GET_CHAR_BEFORE_2(c, p, str1, end1, str2, end2) \ - do { \ - const unsigned char *dtemp = (p); \ - const unsigned char *dlimit = ((p) > (str2) && (p) <= (end2)) ? (str2) : (str1); \ - while (dtemp-- > dlimit && *dtemp >= 0xA0); \ - c = STRING_CHAR (dtemp, p - dtemp); \ - } while (0) - #ifdef emacs /* Increase the buffer byte position POS_BYTE of the current buffer to |