diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/ctangleboot.cin | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebboot.cin | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/comm-w2c.ch | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/comm-w2c.h | 8 |
6 files changed, 28 insertions, 20 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index f79873dc700..fec79642406 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,8 @@ +2020-04-27 Andreas Scherer <https://ascherer.github.io> + + * ctangleboot.cin, + * cwebboot.cin: Use enum'erated program identifiers. + 2020-04-23 Tomas Rokicki <rokicki@gmail.com> and Karl Berry <karl@freefriends.org> diff --git a/Build/source/texk/web2c/ctangleboot.cin b/Build/source/texk/web2c/ctangleboot.cin index e5fdf4dcb34..0bae9ddc675 100644 --- a/Build/source/texk/web2c/ctangleboot.cin +++ b/Build/source/texk/web2c/ctangleboot.cin @@ -47,10 +47,6 @@ #define stack_size 50 #define buf_size 1000 \ -#define ctangle 0 -#define cweave 1 -#define ctwill 2 \ - #define _(STRING) gettext(STRING) \ #define and_and 04 @@ -166,12 +162,15 @@ #line 66 "cwebdir/ctangle.w" /*5:*/ -#line 37 "cwebdir/comm-w2c.h" +#line 34 "cwebdir/comm-w2c.h" typedef bool boolean; typedef uint8_t eight_bits; typedef uint16_t sixteen_bits; -extern int program; +typedef enum{ +ctangle,cweave,ctwill +}cweb; +extern cweb program; extern int phase; /*:5*//*7:*/ diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin index 069fa1c3a34..c3df99cb815 100644 --- a/Build/source/texk/web2c/cwebboot.cin +++ b/Build/source/texk/web2c/cwebboot.cin @@ -62,10 +62,6 @@ typedef bool boolean; /*:90*/ #line 59 "cwebdir/common.w" -#define ctangle 0 -#define cweave 1 -#define ctwill 2 \ - #define and_and 04 #define lt_lt 020 #define gt_gt 021 @@ -188,8 +184,11 @@ err_print(_("! Include file name too long") ) ;goto restart;} \ /*2:*/ #line 73 "cwebdir/common.w" -#line 56 "cwebdir/comm-w2c.ch" -int program; +#line 53 "cwebdir/comm-w2c.ch" +typedef enum{ +ctangle,cweave,ctwill +}cweb; +cweb program; #line 76 "cwebdir/common.w" /*:2*//*6:*/ 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 |