texlive[63435] Build/source/texk/web2c/cwebdir: [CWEB] DRY up
commits+ascherer at tug.org
commits+ascherer at tug.org
Sun May 29 12:40:24 CEST 2022
Revision: 63435
http://tug.org/svn/texlive?view=revision&revision=63435
Author: ascherer
Date: 2022-05-29 12:40:23 +0200 (Sun, 29 May 2022)
Log Message:
-----------
[CWEB] DRY up CWEAVE{U+00A7}120.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/cwebdir/ChangeLog
trunk/Build/source/texk/web2c/cwebdir/cweave.w
Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2022-05-29 00:45:45 UTC (rev 63434)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2022-05-29 10:40:23 UTC (rev 63435)
@@ -1,3 +1,7 @@
+2022-05-29 Andreas Scherer <https://ascherer.github.io>
+
+ * cweave.w: DRY up section 120.
+
2022-05-28 Andreas Scherer <https://ascherer.github.io>
* ctwill-w2c.ch,
Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w 2022-05-29 00:45:45 UTC (rev 63434)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w 2022-05-29 10:40:23 UTC (rev 63435)
@@ -2317,9 +2317,11 @@
doubt what to use, use |big_app|.
@d app(a) *(tok_ptr++)=(token)(a)
+@#
@d big_app2(a) big_app1(a);@+big_app1(a+1)
@d big_app3(a) big_app2(a);@+big_app1(a+2)
@d big_app4(a) big_app3(a);@+big_app1(a+3)
+@#
@d big_app1_insert(p,c) big_app1(p);@+big_app(c);@+big_app1(p+1)
@d big_app1_insert_str(p,s) big_app1(p);@+app_str(s);@+big_app1(p+1)
@d big_app2_insert(p,c) big_app2(p);@+big_app(c);@+big_app2(p+2)
@@ -2358,6 +2360,11 @@
understanding the format by comparing the code with the symbolic
productions as they were listed earlier.
+ at d begin_math if (cur_mathness==maybe_math) init_mathness=yes_math;
+ else if (cur_mathness==no_math) app_str("${}")
+ at d end_math if (cur_mathness==maybe_math) init_mathness=no_math;
+ else if (cur_mathness==yes_math) app_str("{}$")
+
@c
static void
app_str(
@@ -2372,12 +2379,10 @@
{
if (a==' ' || (a>=big_cancel && a<=big_force) || a==dindent)
/* non-math token */ {
- if (cur_mathness==maybe_math) init_mathness=no_math;
- else if (cur_mathness==yes_math) app_str("{}$");
+ end_math;
cur_mathness=no_math;
} else {
- if (cur_mathness==maybe_math) init_mathness=yes_math;
- else if (cur_mathness==no_math) app_str("${}");
+ begin_math;
cur_mathness=yes_math;
}
app(a);
@@ -2389,13 +2394,11 @@
{
switch (a->mathness % 4) { /* left boundary */
case (no_math):
- if (cur_mathness==maybe_math) init_mathness=no_math;
- else if (cur_mathness==yes_math) app_str("{}$");
+ end_math;
cur_mathness=a->mathness / 4; /* right boundary */
break;
case (yes_math):
- if (cur_mathness==maybe_math) init_mathness=yes_math;
- else if (cur_mathness==no_math) app_str("${}");
+ begin_math;
cur_mathness=a->mathness / 4; /* right boundary */
break;
case (maybe_math): /* no changes */ break;
More information about the tex-live-commits
mailing list.