From a2f71a3a31f777d019a495c0479bff6a69bff5bb Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Wed, 15 Jul 2020 12:32:35 +0000 Subject: [CWEB] Clearer exposition re external type definitions. A few underlined index entries added and one index entry removed. git-svn-id: svn://tug.org/texlive/trunk@55841 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ChangeLog | 5 ++++ Build/source/texk/web2c/ctangleboot.cin | 2 +- Build/source/texk/web2c/cwebboot.cin | 35 ++++++++++++++------------ Build/source/texk/web2c/cwebdir/ChangeLog | 6 +++++ Build/source/texk/web2c/cwebdir/comm-w2c.ch | 33 +++++++++++++----------- Build/source/texk/web2c/cwebdir/comm-w2c.h | 2 +- Build/source/texk/web2c/cwebdir/ctwill-mini.ch | 2 +- 7 files changed, 51 insertions(+), 34 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 084c0cfac8e..377ae17e312 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,8 @@ +2020-07-15 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: Recreate CWEB boot modules. + 2020-07-08 Andreas Scherer * cwebboot.cin, diff --git a/Build/source/texk/web2c/ctangleboot.cin b/Build/source/texk/web2c/ctangleboot.cin index ac8fa68fe20..4e7bd9043c3 100644 --- a/Build/source/texk/web2c/ctangleboot.cin +++ b/Build/source/texk/web2c/ctangleboot.cin @@ -47,7 +47,7 @@ #define stack_size 50 #define buf_size 1000 \ -#define _(STRING) gettext(STRING) \ +#define _(S) gettext(S) \ #define and_and 04 #define lt_lt 020 diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin index fc7685e2749..11fb195954b 100644 --- a/Build/source/texk/web2c/cwebboot.cin +++ b/Build/source/texk/web2c/cwebboot.cin @@ -8,14 +8,14 @@ #include /*:85*//*88:*/ -#line 1290 "cwebdir/comm-w2c.ch" +#line 1288 "cwebdir/comm-w2c.ch" #ifndef HAVE_GETTEXT #define HAVE_GETTEXT 0 #endif #if HAVE_GETTEXT -#include +#include #include #else #define setlocale(A,B) "" @@ -25,19 +25,22 @@ #endif /*:88*//*90:*/ -#line 1381 "cwebdir/comm-w2c.ch" +#line 1382 "cwebdir/comm-w2c.ch" typedef bool boolean; #define HAVE_BOOLEAN -#include +#include #include #include +/*:90*//*93:*/ +#line 1421 "cwebdir/comm-w2c.ch" + #define CWEB -#include "help.h" +#include "help.h" -/*:90*/ +/*:93*/ #line 59 "cwebdir/common.w" #define and_and 04 @@ -153,7 +156,7 @@ err_print(_("! Include file name too long") ) ;goto restart;} \ #define DIR_SEPARATOR separators[1] #define DEVICE_SEPARATOR separators[2] \ -#define _(STRING) gettext(STRING) \ +#define _(S) gettext(S) \ #define kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) \ @@ -317,7 +320,7 @@ char change_buffer[buf_size]; char*change_limit; /*:11*//*86:*/ -#line 1264 "cwebdir/comm-w2c.ch" +#line 1262 "cwebdir/comm-w2c.ch" char cb_banner[max_banner]; string texmf_locale; @@ -412,7 +415,7 @@ static void check_change(void); static void prime_the_change_buffer(void); /*:84*//*98:*/ -#line 1484 "cwebdir/comm-w2c.ch" +#line 1487 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str); static void cb_usagehelp(const_string*message,const_string bug_email); @@ -452,7 +455,7 @@ root= NULL; #line 103 "cwebdir/comm-w2c.ch" /*91:*/ -#line 1398 "cwebdir/comm-w2c.ch" +#line 1396 "cwebdir/comm-w2c.ch" kpse_set_program_name(argv[0],"cweb"); @@ -460,7 +463,7 @@ kpse_set_program_name(argv[0],"cweb"); #line 104 "cwebdir/comm-w2c.ch" /*89:*/ -#line 1346 "cwebdir/comm-w2c.ch" +#line 1344 "cwebdir/comm-w2c.ch" setlocale(LC_MESSAGES,setlocale(LC_CTYPE,"")); texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}"); @@ -1343,7 +1346,7 @@ puts(_("(That was a fatal error, my friend.)")); #line 844 "cwebdir/comm-w2c.ch" /*87:*/ -#line 1275 "cwebdir/comm-w2c.ch" +#line 1273 "cwebdir/comm-w2c.ch" if(C_file)fclose(C_file); if(tex_file)fclose(tex_file); @@ -1427,7 +1430,7 @@ if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/ if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0) /*94:*/ -#line 1423 "cwebdir/comm-w2c.ch" +#line 1425 "cwebdir/comm-w2c.ch" cb_usagehelp(program==ctangle?CTANGLEHELP: program==cweave?CWEAVEHELP:CTWILLHELP,NULL); @@ -1439,7 +1442,7 @@ program==cweave?CWEAVEHELP:CTWILLHELP,NULL); if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0) /*96:*/ -#line 1465 "cwebdir/comm-w2c.ch" +#line 1468 "cwebdir/comm-w2c.ch" printversionandexit(cb_banner, program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth", @@ -1629,7 +1632,7 @@ cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); #line 1030 "cwebdir/comm-w2c.ch" /*:70*//*95:*/ -#line 1431 "cwebdir/comm-w2c.ch" +#line 1434 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str) { @@ -1662,7 +1665,7 @@ history= spotless;exit(wrap_up()); } /*:95*//*97:*/ -#line 1473 "cwebdir/comm-w2c.ch" +#line 1476 "cwebdir/comm-w2c.ch" void cb_show_banner(void) { diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index b5855c33653..132c4a6f651 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,9 @@ +2020-07-15 Andreas Scherer + + * comm-w2c.ch, + * comm-w2c.hch, + * ctwill-mini.ch: Clearer exposition re external type definitions. + 2020-07-08 Andreas Scherer * cwebman-w2c.ch, diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch index 732f55a5e9e..292b790a8a7 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch @@ -1244,7 +1244,7 @@ static void prime_the_change_buffer(void);@/ @* Standard C library interfaces. This updated version of \.{CWEB} uses standard C types for boolean values, pointers, and objects with fixed sizes -(already in \Kpathsea/). +(|@!uint8_t|, |@!uint16_t|; already in \Kpathsea/). @= #include /* type definition of |bool| */ @@ -1253,8 +1253,6 @@ standard C types for boolean values, pointers, and objects with fixed sizes @ The |scan_args| and |cb_show_banner| routines and the |bindtextdomain| argument string need a few extra variables. -@s string int - @d max_banner 50 @d PATH_SEPARATOR separators[0] @@ -1285,7 +1283,7 @@ This is just a shortcut for the `|@!gettext|' function from the ``GNU~gettext utilities.'' For systems that do not have this library installed, we wrap things for neutral behavior without internationalization. -@d _(STRING) gettext(STRING) +@d _(S) gettext(S) @= #ifndef HAVE_GETTEXT @@ -1293,7 +1291,7 @@ things for neutral behavior without internationalization. #endif @# #if HAVE_GETTEXT -#include +#include /* |@!LC_MESSAGES|, |@!LC_CTYPE| */ #include #else #define setlocale(A,B) "" @@ -1376,18 +1374,18 @@ The directories to be searched for come from three sources: i.e., \.{\$TEXMFDOTDIR:\$TEXMF/texmf/cweb//}.\par} @.CWEBINPUTS@> +@s const_string int +@s string int + @d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) @= typedef bool boolean; #define HAVE_BOOLEAN -#include - /* include every \Kpathsea/ header; |@!kpathsea_debug| */ +#include /* include every \Kpathsea/ header; + |@!kpathsea_debug|, |@!const_string|, |@!string| */ #include /* \&{integer} */ #include /* |@!versionstring| */ -@# -#define CWEB -#include "help.h" @ We set |kpse_program_name| to `\.{cweb}'. This means if the variable \.{CWEBINPUTS.cweb} is present in \.{texmf.cnf} (or \.{CWEBINPUTS\_cweb} @@ -1418,16 +1416,21 @@ Debugging output is always written to |stderr|, and begins with the string @* System dependent changes. The most volatile stuff comes at the very end. -@ Modules for dealing with help messages and version info. +Modules for dealing with help messages and version info. + +@= +#define CWEB +#include "help.h" /* |@!CTANGLEHELP|, |@!CWEAVEHELP|, |@!CTWILLHELP| */ -@= +@ @= cb_usagehelp(program==ctangle ? CTANGLEHELP : program==cweave ? CWEAVEHELP : CTWILLHELP, NULL); @.--help@> -@ Special variants from Web2c's `\.{lib/usage.c}', adapted for \.{i18n}/\.{t10n}. -We simply filter the strings through the catalogs (if available). -@s const_string int +@ Special variants from Web2c's `\.{lib/usage.c}', adapted for +\.{i18n}/\.{t10n}. We simply filter the strings through the catalogs +(if available). + @c static void cb_usage (const_string str) { diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.h b/Build/source/texk/web2c/cwebdir/comm-w2c.h index d1fd950bf49..a772d1190a4 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.h +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.h @@ -47,7 +47,7 @@ are placed in the context of the `|_|'~macro. This is just a shortcut for the not have this library installed, we wrap things for neutral behavior without internationalization. -@d _(STRING) gettext(STRING) +@d _(S) gettext(S) @= #ifndef HAVE_GETTEXT diff --git a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch index 8a90004904b..ccb04efb43a 100644 --- a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch +++ b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch @@ -104,7 +104,7 @@ internationalization. internationalization. @-A@> @-HAVE_GETTEXT@> -@-STRING@> +@-S@> @z Section 11. -- cgit v1.2.3