summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/cwebdir
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2020-04-27 07:00:56 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2020-04-27 07:00:56 +0000
commiteb7619b5d439ebec55c6db4ef4ee2d8629c0a472 (patch)
tree2e24e2594b61b583572a79fa752eb069617ee88b /Build/source/texk/web2c/cwebdir
parent6c8d51ce2934a68461466169469be2ce0ec40f9b (diff)
[CWEB] Use enum'erated program identifiers.
git-svn-id: svn://tug.org/texlive/trunk@54904 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebdir')
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/cwebdir/comm-w2c.ch8
-rw-r--r--Build/source/texk/web2c/cwebdir/comm-w2c.h8
3 files changed, 13 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index 3f134d9de11..2d09fae7f0c 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-27 Andreas Scherer <https://ascherer.github.io>
+
+ * comm-w2c.ch,
+ * comm-w2c.h: Use enum'erated program identifiers.
+
2020-04-16 Andreas Scherer <https://ascherer.github.io>
* cweav-w2c.ch,
diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch
index 236d8a95c8e..c0d66bb2c9c 100644
--- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch
@@ -44,16 +44,16 @@
@y
|program|. And \.{CTWILL} adds some extra twists.
-@d ctangle 0
-@d cweave 1
-@d ctwill 2
@z
@x
typedef short boolean;
boolean program; /* \.{CWEAVE} or \.{CTANGLE}? */
@y
-int program; /* \.{CWEAVE} or \.{CTANGLE} or \.{CTWILL}? */
+typedef enum {
+ ctangle, cweave, ctwill
+} cweb;
+cweb program; /* \.{CTANGLE} or \.{CWEAVE} or \.{CTWILL}? */
@z
@x
diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.h b/Build/source/texk/web2c/cwebdir/comm-w2c.h
index e03516f2bb0..e8a251f61e8 100644
--- a/Build/source/texk/web2c/cwebdir/comm-w2c.h
+++ b/Build/source/texk/web2c/cwebdir/comm-w2c.h
@@ -26,9 +26,6 @@
First comes general stuff:
-@d ctangle 0
-@d cweave 1
-@d ctwill 2
@s boolean int
@s uint8_t int
@@ -38,7 +35,10 @@ First comes general stuff:
typedef bool boolean;
typedef uint8_t eight_bits;
typedef uint16_t sixteen_bits;
-extern int program; /* \.{CWEAVE} or \.{CTANGLE} or \.{CTWILL}? */
+typedef enum {
+ ctangle, cweave, ctwill
+} cweb;
+extern cweb program; /* \.{CTANGLE} or \.{CWEAVE} or \.{CTWILL}? */
extern int phase; /* which phase are we in? */
@ You may have noticed that almost all \.{"strings"} in the \.{CWEB} sources