From cbd721a93e857c65e4e12e99f4b654cdbc437725 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Mon, 27 Apr 2020 14:41:41 +0000 Subject: [CTIE] Editorial modifications of ctie.w. Reading ctie.pdf results in some CWEB hackery. git-svn-id: svn://tug.org/texlive/trunk@54907 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ctiedir/ChangeLog | 4 ++ Build/source/texk/web2c/ctiedir/ctie-k.ch | 80 +++++++++++++++++++++++++++---- 2 files changed, 75 insertions(+), 9 deletions(-) (limited to 'Build/source/texk/web2c/ctiedir') diff --git a/Build/source/texk/web2c/ctiedir/ChangeLog b/Build/source/texk/web2c/ctiedir/ChangeLog index 357fa3aca8c..90d6054b00f 100644 --- a/Build/source/texk/web2c/ctiedir/ChangeLog +++ b/Build/source/texk/web2c/ctiedir/ChangeLog @@ -1,3 +1,7 @@ +2020-04-27 Andreas Scherer + + * ctie-k.ch: Editorial modifications for ctie.w. + 2020-04-26 Andreas Scherer * ctie-k.ch: Fix several typos in ctie.w. diff --git a/Build/source/texk/web2c/ctiedir/ctie-k.ch b/Build/source/texk/web2c/ctiedir/ctie-k.ch index 07d6bf9bc82..50a95d178d1 100644 --- a/Build/source/texk/web2c/ctiedir/ctie-k.ch +++ b/Build/source/texk/web2c/ctiedir/ctie-k.ch @@ -35,8 +35,14 @@ int main (int argc, string *argv) @x l.105 Set up kpathsea stuff @; @y - @; - @; + @@; + @@; +@z + +@x l.107 + @; +@y + @@; @z boolean and string are defined by kpathsea. @@ -58,9 +64,9 @@ replaces the complex \.{TIE} character set handling (based on that of the original \.{WEB} system) with the standard \.{CWEB} behaviour, and so uses the |char| type for input and output. -The |kpathsea| library (version 3.4.5 and higher) defines the |true|, |false|, -|boolean| and |string| types in \.{kpathsea/types.h}, so we do not actually -need to define them here. +The \.{kpathsea} library (version 3.4.5 and higher) defines the |true|, +|false|, |boolean| and |string| types in \.{kpathsea/types.h}, so we do not +actually need to define them here. @s boolean int @s string int @@ -96,11 +102,17 @@ This variable must be initialized. This variable must be initialised. @z -@x l.173 The kpathsea include files must be first. +@x l.170 The kpathsea include files must be first. +predefined as we include the \.{stdio.h} definitions. + +@= #include @y +predefined as we include the \.{stdio.h} definitions +through the \.{kpathsea} interface. + +@= #include -#include @z @x l.176 And this. @@ -128,6 +140,42 @@ files) are treated the same way. To organize the files) are treated the same way. To organise the @z +Sections 10 and 11: use enum as requested in ctie.w + +@x l.212 +#define search 0 +#define test 1 +#define reading 2 +#define ignore 3 +typedef int in_file_modes; /* should be |enum(search, test, reading, ignore)| */ +#define unknown 0 +#define master 1 +#define chf 2 +typedef int file_types; /* should be |enum(unknown, master, chf)| */ +@y +typedef enum { + search, + test, + reading, + ignore } in_file_modes; +typedef enum { + unknown, + master, + chf } file_types; +@z + +@x l.230 dito +#define normal 0 +#define pre 1 +#define post 2 +typedef int out_md_type; /* should be |enum(normal, pre, post)| */ +@y +typedef enum { + normal, + pre, + post } out_md_type; +@z + @x l.284 way too short! @d max_file_name_length 60 @y @@ -439,6 +487,20 @@ printf("%s\n", banner); /* print a ``banner line'' */ } @z +Section 63: use 'none' more than once. + +@x l.1169 +(which is the case if |no_ch==(-1)|) or if the next element of +@y +(which is the case if |no_ch==none|) or if the next element of +@z + +@x l.1174 + if (no_ch==(-1)) { +@y + if (no_ch==none) { +@z + @x l.1218 string CTIEHELP[] = { "Usage: ctie -[mc] outfile master changefile(s)", @@ -517,7 +579,7 @@ inserted here; then only the index itself will get a new module number. @^system dependencies@> @y -@* System-dependent changes. +@* System-dependent changes.@^system dependencies@> The \.{ctie} program from the original \.{CTIE} package uses the compile-time default directory or the value of the environment variable \.{CWEBINPUTS} as an alternative place to be searched for @@ -547,6 +609,6 @@ in the environment) its value will be used as the search path for filenames. This allows different flavors of \.{CTIE} to have different search paths. -@= +@= kpse_set_program_name(argv[0], "ctie"); @z -- cgit v1.2.3