changeset 22006:31c39cdc9e11

(scan_lists, scan_sexps_forward): Move complex expressions outside of the switch statement.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 May 1998 07:39:00 +0000
parents 863230e3e248
children 92d6cd3eebfa
files src/syntax.c
diffstat 1 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Sat May 09 07:24:47 1998 +0000
+++ b/src/syntax.c	Sat May 09 07:39:00 1998 +0000
@@ -1769,6 +1769,7 @@
   int found;
   int from_byte = CHAR_TO_BYTE (from);
   int out_bytepos, out_charpos;
+  int temp;
 
   if (depth > 0) min_depth = 0;
 
@@ -1819,7 +1820,10 @@
 	      while (from < stop)
 		{
 		  UPDATE_SYNTAX_TABLE_FORWARD (from);
-		  switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from_byte))))
+
+		  /* Some compilers can't handle this inside the switch.  */
+		  temp = SYNTAX (FETCH_CHAR (from_byte));
+		  switch (temp)
 		    {
 		    case Scharquote:
 		    case Sescape:
@@ -1913,7 +1917,10 @@
 		      ? (FETCH_CHAR (from_byte) == stringterm)
 		      : SYNTAX (FETCH_CHAR (from_byte)) == Sstring_fence) 
 		    break;
-		  switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from_byte))))
+
+		  /* Some compilers can't handle this inside the switch.  */
+		  temp = SYNTAX (FETCH_CHAR (from_byte));
+		  switch (temp)
 		    {
 		    case Scharquote:
 		    case Sescape:
@@ -2228,6 +2235,7 @@
   int prev_from_syntax;
   int boundary_stop = commentstop == -1;
   int nofence;
+  int temp;
 
   prev_from = from;
   prev_from_byte = from_byte;
@@ -2372,7 +2380,9 @@
 	symstarted:
 	  while (from < end)
 	    {
-	      switch (SWITCH_ENUM_CAST (SYNTAX (FETCH_CHAR (from_byte))))
+	      /* Some compilers can't handle this inside the switch.  */
+	      temp = SYNTAX (FETCH_CHAR (from_byte));
+	      switch (temp)
 		{
 		case Scharquote:
 		case Sescape:
@@ -2481,7 +2491,10 @@
 		if (from >= end) goto done;
 		c = FETCH_CHAR (from_byte);
 		if (nofence && c == state.instring) break;
-		switch (SWITCH_ENUM_CAST (SYNTAX (c)))
+
+		/* Some compilers can't handle this inside the switch.  */
+		temp = SYNTAX (c);
+		switch (temp)
 		  {
 		  case Sstring_fence:
 		    if (!nofence) goto string_end;