Skip to content

Commit

Permalink
[CWEB] Straighten case logic in sections 263/280 and 316.
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@67648 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed Jul 16, 2023
1 parent b4652be commit 872064b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
8 changes: 8 additions & 0 deletions texk/web2c/cwebdir/ctwill-mini.ch
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,14 @@ Section 279.
@+cur_name=sort_ptr->head;@/
@z
Section 280.
@x
if (xislower(*j)) { out_str("\\\\");@+ break; }
@y
if (xislower(*j)) { out_str("\\\\");@+ break;@+ }
@z
Section 285.
@x
Expand Down
15 changes: 4 additions & 11 deletions texk/web2c/cwebdir/ctwill-w2c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -1251,13 +1251,6 @@ switch (cur_name->ilk) {
else {@+char *j;@+@t}\6{@>
@z

@x
case wildcard: out_str("\\9");@+ goto not_an_identifier;
@y
case roman: out_str(" ");@+ goto not_an_identifier;
case wildcard: out_str("\\9");@+ goto not_an_identifier;
@z

@x
case roman: not_an_identifier: out_name(cur_name,false); goto name_done;
case custom:
Expand All @@ -1267,6 +1260,7 @@ switch (cur_name->ilk) {
out('$');
goto name_done;
@y
case roman: out_str(" ");
not_an_identifier: out_name(cur_name,false); goto name_done;
case custom: out_str("\\$"); break;
@.\\\$@>
Expand Down Expand Up @@ -1885,17 +1879,16 @@ switch (cur_name->ilk) {@+char *j;@+@t}\6{\4@>
if (is_tiny(cur_name)) out_str("\\|");
else {
for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
if (xislower(*j)) goto lowcase;
goto allcaps;
lowcase: out_str("\\\\");
if (xislower(*j)) { out_str("\\\\");@+ break; }
out_str("\\."); /* \.{UPPERCASE} */
}
break;
@.\\|@>
@.\\.@>
@.\\\\@>
case wildcard: out_str("\\9"); break;
@.\\9@>
case typewriter: allcaps: out_str("\\.");
case typewriter: out_str("\\."); break;
@.\\.@>
case roman: break;
case custom:
Expand Down
8 changes: 3 additions & 5 deletions texk/web2c/cwebdir/cweave.w
Original file line number Diff line number Diff line change
Expand Up @@ -4774,18 +4774,16 @@ switch (cur_name->ilk) {@+char *j;@+@t}\6{\4@>
if (is_tiny(cur_name)) out_str("\\|");
else {
for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
if (xislower(*j)) goto lowcase;
out_str("\\."); break;
lowcase: out_str("\\\\");
if (xislower(*j)) { out_str("\\\\");@+ break; }
out_str("\\."); /* \.{UPPERCASE} */
}
break;
@.\\|@>
@.\\.@>
@.\\\\@>
case wildcard: out_str("\\9");@+ goto not_an_identifier;
@.\\9@>
case typewriter: out_str("\\.");
@=/* fall through */@>@;
case typewriter: out_str("\\.");@+ goto not_an_identifier;
@.\\.@>
case roman: not_an_identifier: out_name(cur_name,false); goto name_done;
case custom:
Expand Down

0 comments on commit 872064b

Please sign in to comment.