aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1995-01-18 20:47:36 +0000
committerKarl Heuer1995-01-18 20:47:36 +0000
commitc1d4ff308d5e9d24b4c3cc95b5fa9b3ad4af42a8 (patch)
treea53e68fe23a9d4dad2ef533e6096e62066d8940b /src
parent51bd4610d7233a8a5c9f7bdad2634ee5aa856496 (diff)
downloademacs-c1d4ff308d5e9d24b4c3cc95b5fa9b3ad4af42a8.tar.gz
emacs-c1d4ff308d5e9d24b4c3cc95b5fa9b3ad4af42a8.zip
[!emacs] (SWITCH_ENUM_CAST): New macro, from emacs/lisp.h
(re_compile_fastmap, re_match_2_internal): Use that macro instead of testing SWITCH_ENUM_BUG.
Diffstat (limited to 'src')
-rw-r--r--src/regex.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/regex.c b/src/regex.c
index 9e373a97f46..645b661c208 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -86,6 +86,12 @@ char *realloc ();
86#define Sword 1 86#define Sword 1
87#endif 87#endif
88 88
89#ifdef SWITCH_ENUM_BUG
90#define SWITCH_ENUM_CAST(x) ((int)(x))
91#else
92#define SWITCH_ENUM_CAST(x) (x)
93#endif
94
89#ifdef SYNTAX_TABLE 95#ifdef SYNTAX_TABLE
90 96
91extern char *re_syntax_table; 97extern char *re_syntax_table;
@@ -2813,11 +2819,7 @@ re_compile_fastmap (bufp)
2813 /* We should never be about to go beyond the end of the pattern. */ 2819 /* We should never be about to go beyond the end of the pattern. */
2814 assert (p < pend); 2820 assert (p < pend);
2815 2821
2816#ifdef SWITCH_ENUM_BUG 2822 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
2817 switch ((int) ((re_opcode_t) *p++))
2818#else
2819 switch ((re_opcode_t) *p++)
2820#endif
2821 { 2823 {
2822 2824
2823 /* I guess the idea here is to simply not bother with a fastmap 2825 /* I guess the idea here is to simply not bother with a fastmap
@@ -3770,11 +3772,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
3770 } 3772 }
3771 3773
3772 /* Otherwise match next pattern command. */ 3774 /* Otherwise match next pattern command. */
3773#ifdef SWITCH_ENUM_BUG 3775 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
3774 switch ((int) ((re_opcode_t) *p++))
3775#else
3776 switch ((re_opcode_t) *p++)
3777#endif
3778 { 3776 {
3779 /* Ignore these. Used to ignore the n of succeed_n's which 3777 /* Ignore these. Used to ignore the n of succeed_n's which
3780 currently have n == 0. */ 3778 currently have n == 0. */