From 9f11a1027fe8613be28f9c6f94bd25858e0f9279 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Fri, 14 Jul 2023 15:52:29 +0000 Subject: [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 --- Build/source/texk/web2c/cwebdir/ChangeLog | 5 +++++ Build/source/texk/web2c/cwebdir/ctwill.bux | 3 +++ Build/source/texk/web2c/cwebdir/cweave.w | 10 ++++++---- 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 + + * ctwill.bux, + * cweave.w: Finally make use of type 'mode' -- C-style. + 2023-07-13 Andreas Scherer * 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 "" \zip@> @$kpse_find_file "" \zip@> @$versionstring "" \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 @= +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; -- cgit v1.2.3