From 872064b7916aa7d309502fffa2642f4603c27bdf Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sun, 16 Jul 2023 13:50:42 +0000 Subject: [PATCH] [CWEB] Straighten case logic in sections 263/280 and 316. git-svn-id: svn://tug.org/texlive/trunk/Build/source@67648 c570f23f-e606-0410-a88d-b1316a301751 --- texk/web2c/cwebdir/ctwill-mini.ch | 8 ++++++++ texk/web2c/cwebdir/ctwill-w2c.ch | 15 ++++----------- texk/web2c/cwebdir/cweave.w | 8 +++----- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/texk/web2c/cwebdir/ctwill-mini.ch b/texk/web2c/cwebdir/ctwill-mini.ch index 6ed7400dc3..e8617e437d 100644 --- a/texk/web2c/cwebdir/ctwill-mini.ch +++ b/texk/web2c/cwebdir/ctwill-mini.ch @@ -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 diff --git a/texk/web2c/cwebdir/ctwill-w2c.ch b/texk/web2c/cwebdir/ctwill-w2c.ch index 5bcaecae0e..c7acb53960 100644 --- a/texk/web2c/cwebdir/ctwill-w2c.ch +++ b/texk/web2c/cwebdir/ctwill-w2c.ch @@ -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: @@ -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; @.\\\$@> @@ -1885,9 +1879,8 @@ 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; @.\\|@> @@ -1895,7 +1888,7 @@ lowcase: out_str("\\\\"); @.\\\\@> case wildcard: out_str("\\9"); break; @.\\9@> - case typewriter: allcaps: out_str("\\."); + case typewriter: out_str("\\."); break; @.\\.@> case roman: break; case custom: diff --git a/texk/web2c/cwebdir/cweave.w b/texk/web2c/cwebdir/cweave.w index dc645e94d6..c0f14a20d3 100644 --- a/texk/web2c/cwebdir/cweave.w +++ b/texk/web2c/cwebdir/cweave.w @@ -4774,9 +4774,8 @@ 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; @.\\|@> @@ -4784,8 +4783,7 @@ lowcase: out_str("\\\\"); @.\\\\@> 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: