texlive[61138] Build/source/texk/web2c/cwebdir: [CWEB] Reshuffle code
commits+ascherer at tug.org
commits+ascherer at tug.org
Wed Nov 24 15:38:47 CET 2021
Revision: 61138
http://tug.org/svn/texlive?view=revision&revision=61138
Author: ascherer
Date: 2021-11-24 15:38:46 +0100 (Wed, 24 Nov 2021)
Log Message:
-----------
[CWEB] Reshuffle code in CWEAVE.
The 'mathness' stuff can be factored out from the 'big_app' stuff.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/cwebdir/ChangeLog
trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
trunk/Build/source/texk/web2c/cwebdir/cweave.w
Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2021-11-24 00:49:03 UTC (rev 61137)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2021-11-24 14:38:46 UTC (rev 61138)
@@ -1,3 +1,8 @@
+2021-11-24 Andreas Scherer <https://ascherer.github.io>
+
+ * ctwill-mini.ch,
+ * cweave.w: Reshuffle code in CWEAVE.
+
2021-11-22 Andreas Scherer <https://ascherer.github.io>
* Makefile,
Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch 2021-11-24 00:49:03 UTC (rev 61137)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch 2021-11-24 14:38:46 UTC (rev 61138)
@@ -1018,12 +1018,9 @@
Section 133.
@x
-The code below is an exact translation of the production rules into
+@ The |mathness| is an attribute of scraps that says whether they are
@y
-@ The code below is an exact translation of the production rules into
- at -a@>
- at -c@>
- at -p@>
+ at r @ The |mathness| is an attribute of scraps that says whether they are
@z
Section 136--137.
Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w 2021-11-24 00:49:03 UTC (rev 61137)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w 2021-11-24 14:38:46 UTC (rev 61138)
@@ -2316,7 +2316,18 @@
tokens, and intercalates a `\.{\$}' token if necessary. When in
doubt what to use, use |big_app|.
-The |mathness| is an attribute of scraps that says whether they are
+ at d app(a) *(tok_ptr++)=(token)(a)
+ at d big_app2(a) big_app1(a);@+big_app1(a+1)
+ at d big_app3(a) big_app2(a);@+big_app1(a+2)
+ at d big_app4(a) big_app3(a);@+big_app1(a+3)
+ at d big_app1_insert(p,c) big_app1(p);@+big_app(c);@+big_app1(p+1)
+
+@<Predecl...@>=
+static void app_str(const char *);@/
+static void big_app(token);@/
+static void big_app1(scrap_pointer);
+
+@ The |mathness| is an attribute of scraps that says whether they are
to be printed in a math mode context or not. It is separate from the
``part of speech'' (the |cat|) because to make each |cat| have
a fixed |mathness| (as in the original \.{WEAVE}) would multiply the
@@ -2333,29 +2344,19 @@
or followed by a~\.{\$}. The left boundary is |maybe_math| if and
only if the right boundary is.
-The code below is an exact translation of the production rules into
-\CEE/, using such macros, and the reader should have no difficulty
-understanding the format by comparing the code with the symbolic
-productions as they were listed earlier.
-
@d no_math 2 /* should be in horizontal mode */
@d yes_math 1 /* should be in math mode */
@d maybe_math 0 /* works in either horizontal or math mode */
- at d big_app2(a) big_app1(a);@+big_app1(a+1)
- at d big_app3(a) big_app2(a);@+big_app1(a+2)
- at d big_app4(a) big_app3(a);@+big_app1(a+3)
- at d big_app1_insert(p,c) big_app1(p);@+big_app(c);@+big_app1(p+1)
- at d app(a) *(tok_ptr++)=(token)(a)
@<Private...@>=
static int cur_mathness, init_mathness;
-@ @<Predecl...@>=
-static void app_str(const char *);@/
-static void big_app(token);@/
-static void big_app1(scrap_pointer);
+@ The code below is an exact translation of the production rules into
+\CEE/, using such macros, and the reader should have no difficulty
+understanding the format by comparing the code with the symbolic
+productions as they were listed earlier.
-@ @c
+ at c
static void
app_str(
const char *s)
More information about the tex-live-commits
mailing list.