# HG changeset patch # User Richard M. Stallman # Date 867544419 0 # Node ID bf0d449581c860d00f143bde91c1a0fff0a78cc6 # Parent 892910c06f242e08727c0576e7ad1b2898ebc306 (scan_sexps_forward): Split up a complex if-test. diff -r 892910c06f24 -r bf0d449581c8 src/syntax.c --- a/src/syntax.c Sun Jun 29 00:08:34 1997 +0000 +++ b/src/syntax.c Sun Jun 29 00:33:39 1997 +0000 @@ -2414,12 +2414,10 @@ UPDATE_SYNTAX_TABLE_FORWARD (from); code = SYNTAX (FETCH_CHAR (from)); INC_FROM; + if (code == Scomment) state.comstr_start = prev_from; - - else if (code == Scomment_fence - || (from < end && SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from)) - && SYNTAX_COMSTART_SECOND (FETCH_CHAR (from)))) + else if (code == Scomment_fence) { /* Record the comment style we have entered so that only the comment-end sequence of the same style actually @@ -2431,6 +2429,22 @@ if (code != Scomment_fence) INC_FROM; code = Scomment; } + else if (from < end) + if (SYNTAX_COMSTART_FIRST (FETCH_CHAR (prev_from))) + if (SYNTAX_COMSTART_SECOND (FETCH_CHAR (from))) + /* Duplicate code to avoid a very complex if-expression + which causes trouble for the SGI compiler. */ + { + /* Record the comment style we have entered so that only + the comment-end sequence of the same style actually + terminates the comment section. */ + state.comstyle = ( code == Scomment_fence + ? ST_COMMENT_STYLE + : SYNTAX_COMMENT_STYLE (FETCH_CHAR (from))); + state.comstr_start = prev_from; + if (code != Scomment_fence) INC_FROM; + code = Scomment; + } if (SYNTAX_PREFIX (FETCH_CHAR (prev_from))) continue;