aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.c
diff options
context:
space:
mode:
authorPaul Eggert2012-07-30 11:56:42 -0700
committerPaul Eggert2012-07-30 11:56:42 -0700
commit7393bcbb8bf25c97aed35079da765436d4e9fc03 (patch)
tree0dda0e5bacb8115b1103c07a9abd13dc5ba80c87 /src/regex.c
parentc32af1e4a04ef689097f73430982b28392d72372 (diff)
downloademacs-7393bcbb8bf25c97aed35079da765436d4e9fc03.tar.gz
emacs-7393bcbb8bf25c97aed35079da765436d4e9fc03.zip
* 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.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/regex.c b/src/regex.c
index 43ee2c45212..afe3751ea5e 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -255,8 +255,6 @@ xrealloc (void *block, size_t size)
255/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */ 255/* Sword must be nonzero for the wordchar pattern commands in re_match_2. */
256enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; 256enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
257 257
258# define SWITCH_ENUM_CAST(x) (x)
259
260/* Dummy macros for non-Emacs environments. */ 258/* Dummy macros for non-Emacs environments. */
261# define CHAR_CHARSET(c) 0 259# define CHAR_CHARSET(c) 0
262# define CHARSET_LEADING_CODE_BASE(c) 0 260# 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
3913 as used for the *? operator. */ 3911 as used for the *? operator. */
3914 re_char *p1 = p; 3912 re_char *p1 = p;
3915 3913
3916 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) 3914 switch (*p++)
3917 { 3915 {
3918 case succeed: 3916 case succeed:
3919 return 1; 3917 return 1;
@@ -4088,7 +4086,7 @@ analyse_first (const re_char *p, const re_char *pend, char *fastmap, const int m
4088 visited. `re_compile' should make sure this is true. */ 4086 visited. `re_compile' should make sure this is true. */
4089 break; 4087 break;
4090 p += j; 4088 p += j;
4091 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p)) 4089 switch (*p)
4092 { 4090 {
4093 case on_failure_jump: 4091 case on_failure_jump:
4094 case on_failure_keep_string_jump: 4092 case on_failure_keep_string_jump:
@@ -4621,7 +4619,7 @@ static int bcmp_translate (re_char *s1, re_char *s2,
4621static re_char * 4619static re_char *
4622skip_one_char (const re_char *p) 4620skip_one_char (const re_char *p)
4623{ 4621{
4624 switch (SWITCH_ENUM_CAST (*p++)) 4622 switch (*p++)
4625 { 4623 {
4626 case anychar: 4624 case anychar:
4627 break; 4625 break;
@@ -4666,7 +4664,7 @@ skip_noops (const re_char *p, const re_char *pend)
4666 int mcnt; 4664 int mcnt;
4667 while (p < pend) 4665 while (p < pend)
4668 { 4666 {
4669 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p)) 4667 switch (*p)
4670 { 4668 {
4671 case start_memory: 4669 case start_memory:
4672 case stop_memory: 4670 case stop_memory:
@@ -4711,7 +4709,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const re_char *p1, const r
4711 4709
4712 op2 = p2 == pend ? succeed : *p2; 4710 op2 = p2 == pend ? succeed : *p2;
4713 4711
4714 switch (SWITCH_ENUM_CAST (op2)) 4712 switch (op2)
4715 { 4713 {
4716 case succeed: 4714 case succeed:
4717 case endbuf: 4715 case endbuf:
@@ -4835,7 +4833,7 @@ mutually_exclusive_p (struct re_pattern_buffer *bufp, const re_char *p1, const r
4835 break; 4833 break;
4836 4834
4837 case charset_not: 4835 case charset_not:
4838 switch (SWITCH_ENUM_CAST (*p1)) 4836 switch (*p1)
4839 { 4837 {
4840 case exactn: 4838 case exactn:
4841 case charset: 4839 case charset:
@@ -5313,7 +5311,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1,
5313 } 5311 }
5314 5312
5315 /* Otherwise match next pattern command. */ 5313 /* Otherwise match next pattern command. */
5316 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) 5314 switch (*p++)
5317 { 5315 {
5318 /* Ignore these. Used to ignore the n of succeed_n's which 5316 /* Ignore these. Used to ignore the n of succeed_n's which
5319 currently have n == 0. */ 5317 currently have n == 0. */
@@ -6235,7 +6233,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1,
6235 /* A restart point is known. Restore to that state. */ 6233 /* A restart point is known. Restore to that state. */
6236 DEBUG_PRINT1 ("\nFAIL:\n"); 6234 DEBUG_PRINT1 ("\nFAIL:\n");
6237 POP_FAILURE_POINT (str, pat); 6235 POP_FAILURE_POINT (str, pat);
6238 switch (SWITCH_ENUM_CAST ((re_opcode_t) *pat++)) 6236 switch (*pat++)
6239 { 6237 {
6240 case on_failure_keep_string_jump: 6238 case on_failure_keep_string_jump:
6241 assert (str == NULL); 6239 assert (str == NULL);