diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-07-30 11:56:42 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-07-30 11:56:42 -0700 |
commit | 7393bcbb8bf25c97aed35079da765436d4e9fc03 (patch) | |
tree | 0dda0e5bacb8115b1103c07a9abd13dc5ba80c87 /src/regex.c | |
parent | c32af1e4a04ef689097f73430982b28392d72372 (diff) |
* lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
This no-op macro hasn't been needed for many years.
* src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/regex.c b/src/regex.c index 43ee2c4521..afe3751ea5 100644 --- a/src/regex.c +++ b/src/regex.c @@ -255,8 +255,6 @@ xrealloc (void *block, size_t size) /* Sword must be nonzero for the wordchar pattern commands in re_match_2. */ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; -# define SWITCH_ENUM_CAST(x) (x) - /* Dummy macros for non-Emacs environments. */ # define CHAR_CHARSET(c) 0 # define CHARSET_LEADING_CODE_BASE(c) 0 @@ -3913,7 +3911,7 @@ analyse_first (const re_char *p, const re_char *pend, char *fastmap, const int m as used for the *? operator. */ re_char *p1 = p; - switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) + switch (*p++) { case succeed: return 1; @@ -4088,7 +4086,7 @@ analyse_first (const re_char *p, const re_char *pend, char *fastmap, const int m visited. `re_compile' should make sure this is true. */ break; p += j; - switch (SWITCH_ENUM_CAST ((re_opcode_t) *p)) + switch (*p) { case on_failure_jump: case on_failure_keep_string_jump: @@ -4621,7 +4619,7 @@ static int bcmp_translate (re_char *s1, re_char *s2, static re_char * skip_one_char (const re_char *p) { - switch (SWITCH_ENUM_CAST (*p++)) + switch (*p++) { case anychar: break; @@ -4666,7 +4664,7 @@ skip_noops (const re_char *p, const re_char *pend) int mcnt; while (p < pend) { - switch (SWITCH_ENUM_CAST ((re_opcode_t) *p)) + switch (*p) { case start_memory: case stop_memory: @@ -4711,7 +4709,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const re_char *p1, const r op2 = p2 == pend ? succeed : *p2; - switch (SWITCH_ENUM_CAST (op2)) + switch (op2) { case succeed: case endbuf: @@ -4835,7 +4833,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const re_char *p1, const r break; case charset_not: - switch (SWITCH_ENUM_CAST (*p1)) + switch (*p1) { case exactn: case charset: @@ -5313,7 +5311,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, } /* Otherwise match next pattern command. */ - switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) + switch (*p++) { /* Ignore these. Used to ignore the n of succeed_n's which currently have n == 0. */ @@ -6235,7 +6233,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, /* A restart point is known. Restore to that state. */ DEBUG_PRINT1 ("\nFAIL:\n"); POP_FAILURE_POINT (str, pat); - switch (SWITCH_ENUM_CAST ((re_opcode_t) *pat++)) + switch (*pat++) { case on_failure_keep_string_jump: assert (str == NULL); |