From 17dacaa1eaa6004708c48fd610d2808c0c77fe6e Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sun, 16 Jul 2023 14:52:40 +0000 Subject: [PATCH] [CWEB] Fix last commit. Ouch, my bad! 'break' jumps out of the 'for' loop, not out of the 'switch' group. :o) git-svn-id: svn://tug.org/texlive/trunk/Build/source@67649 c570f23f-e606-0410-a88d-b1316a301751 --- texk/web2c/cwebdir/ctwill-mini.ch | 10 +--------- texk/web2c/cwebdir/ctwill-w2c.ch | 10 +++++----- texk/web2c/cwebdir/cweave.w | 6 +++--- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/texk/web2c/cwebdir/ctwill-mini.ch b/texk/web2c/cwebdir/ctwill-mini.ch index e8617e437d..1fc99dbd0b 100644 --- a/texk/web2c/cwebdir/ctwill-mini.ch +++ b/texk/web2c/cwebdir/ctwill-mini.ch @@ -1947,15 +1947,7 @@ Section 279. @x cur_name=sort_ptr->head; @y - @+cur_name=sort_ptr->head;@/ -@z - -Section 280. - -@x - if (xislower(*j)) { out_str("\\\\");@+ break; } -@y - if (xislower(*j)) { out_str("\\\\");@+ break;@+ } + cur_name=sort_ptr->head;@/ @z Section 285. diff --git a/texk/web2c/cwebdir/ctwill-w2c.ch b/texk/web2c/cwebdir/ctwill-w2c.ch index c7acb53960..8b57b77ae9 100644 --- a/texk/web2c/cwebdir/ctwill-w2c.ch +++ b/texk/web2c/cwebdir/ctwill-w2c.ch @@ -1246,9 +1246,9 @@ switch (cur_name->ilk) { @z @x - else { + else {@+boolean all_caps=true;@+@t}\6{@> @y - else {@+char *j;@+@t}\6{@> + else {@+boolean all_caps=true;@+char *j;@+@t}\6{@> @z @x @@ -1877,10 +1877,10 @@ out_mini( switch (cur_name->ilk) {@+char *j;@+@t}\6{\4@> case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|"); - else { + else {@+boolean all_caps=true;@+@t}\6{@> for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++) - if (xislower(*j)) { out_str("\\\\");@+ break; } - out_str("\\."); /* \.{UPPERCASE} */ + if (xislower(*j)) all_caps=false; + out_str(all_caps ? "\\." : "\\\\"); } break; @.\\|@> diff --git a/texk/web2c/cwebdir/cweave.w b/texk/web2c/cwebdir/cweave.w index c0f14a20d3..3f92f12c82 100644 --- a/texk/web2c/cwebdir/cweave.w +++ b/texk/web2c/cwebdir/cweave.w @@ -4772,10 +4772,10 @@ while (sort_ptr>scrap_info) { switch (cur_name->ilk) {@+char *j;@+@t}\6{\4@> case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|"); - else { + else {@+boolean all_caps=true;@+@t}\6{@> for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++) - if (xislower(*j)) { out_str("\\\\");@+ break; } - out_str("\\."); /* \.{UPPERCASE} */ + if (xislower(*j)) all_caps=false; + out_str(all_caps ? "\\." : "\\\\"); } break; @.\\|@>