summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2023-07-14 15:52:29 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2023-07-14 15:52:29 +0000
commit9f11a1027fe8613be28f9c6f94bd25858e0f9279 (patch)
tree10dddd45333c982aea30316e2b19a21660707c86
parent22f74e2d05a3585ede8da9ef8dee02024ec41128 (diff)
[CWEB] Finally make use of type 'mode' -- C-style.
'typedef int mode' was never actually used in CWEB 2.7 and up (and, most likely, down). However, 'boolean' and the two @definitions isn't quite correct either. See line 3907 of WEAVE.WEB for the original intent. The new 'typedef enum' restores the classic code in C-style. git-svn-id: svn://tug.org/texlive/trunk@67627 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/cwebdir/ctwill.bux3
-rw-r--r--Build/source/texk/web2c/cwebdir/cweave.w10
3 files changed, 14 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index bfec99e0f19..7538f8d3a19 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,3 +1,8 @@
+2023-07-14 Andreas Scherer <https://ascherer.github.io>
+
+ * ctwill.bux,
+ * cweave.w: Finally make use of type 'mode' -- C-style.
+
2023-07-13 Andreas Scherer <https://ascherer.github.io>
* ctang-{bs,w2c}.ch,
diff --git a/Build/source/texk/web2c/cwebdir/ctwill.bux b/Build/source/texk/web2c/cwebdir/ctwill.bux
index 55800109202..02834b70374 100644
--- a/Build/source/texk/web2c/cwebdir/ctwill.bux
+++ b/Build/source/texk/web2c/cwebdir/ctwill.bux
@@ -87,6 +87,9 @@
@$cb_show_banner {COMMON.W}99 \&{void} (\,)@>
+@$inner {CTWILL}227 =$0$@>
+@$outer {CTWILL}227 =$1$@>
+
@$kpse_cweb_format "<kpathsea/types.h>" \zip@>
@$kpse_find_file "<kpathsea/tex-file.h>" \zip@>
@$versionstring "<lib/lib.h>" \zip@>
diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w
index 9affe225013..3f4eecf5352 100644
--- a/Build/source/texk/web2c/cwebdir/cweave.w
+++ b/Build/source/texk/web2c/cwebdir/cweave.w
@@ -3763,14 +3763,16 @@ currently in progress. The end of output occurs when an |end_translation|
token is found, so the stack is never empty except when we first begin the
output process.
-@d inner false /* mode value for \CEE/ texts within \TEX/ texts */
-@d outer true /* mode value for \CEE/ texts in sections */
-
+@s mode int
@<Typed...@>=
+typedef enum {
+ @!inner, /* value of |mode| for \CEE/ texts within \TEX/ texts */
+ @!outer /* value of |mode| for \CEE/ texts in sections */
+} mode;
typedef struct {
token_pointer end_field; /* ending location of token list */
token_pointer tok_field; /* present location within token list */
- boolean mode_field; /* interpretation of control tokens */
+ mode mode_field; /* interpretation of control tokens */
} output_state;
typedef output_state *stack_pointer;