summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2023-06-26 22:06:12 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2023-06-26 22:06:12 +0000
commit9b5645c4903964037bd7ebfa2f46fd7015aa128a (patch)
treefe47ba4976b4f0b7b7392dbffbc4f463d58d3ab0 /Build/source
parente92e6687f984158bc9a7cccd93ef88d0f522ac8b (diff)
[CWEB] Use 'ctwill-hint.ch' stand-alone.
This is a slim twin of 'ctwill-mini.ch' with the section numbers of CWEAVE up to section 271. HiTeX's dynamic page layout permits very long sections. git-svn-id: svn://tug.org/texlive/trunk@67487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog8
-rw-r--r--Build/source/texk/web2c/cwebdir/ctwill-hint.ch942
-rwxr-xr-xBuild/source/texk/web2c/cwebdir/ctwill-proofsort6
-rwxr-xr-xBuild/source/texk/web2c/cwebdir/ctwill.test8
4 files changed, 945 insertions, 19 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index 1abc626f3dd..0eeb9a4d470 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,9 +1,15 @@
+2023-06-23 Andreas Scherer <https://ascherer.github.io>
+
+ * ctwill-hint.ch: Stand-alone twin of ctwill-mini.ch.
+ * ctwill-proofsort: Don't print bare '$0'.
+ * ctwill.test: Test ctwill-proofsort last.
+
2023-06-26 Karl Berry <karl@freefriends.org>
* ctwill-proofsort: Unicode::Collate is required but may not be
available.
* ctwill.test: exit 0 if Unicode::Collate is not available,
- so we don't fail in environments without it.
+ so we don't fail in environments without it.
2023-06-23 Andreas Scherer <https://ascherer.github.io>
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-hint.ch b/Build/source/texk/web2c/cwebdir/ctwill-hint.ch
index 8e784c899ed..f387fd6a50c 100644
--- a/Build/source/texk/web2c/cwebdir/ctwill-hint.ch
+++ b/Build/source/texk/web2c/cwebdir/ctwill-hint.ch
@@ -1,17 +1,935 @@
-Section 328.
+@x
+The ``banner line'' defined here should be changed whenever \.{CTWILL} is
+@y
+The ``banner line'' defined here should be changed whenever \.{CTWILL} is
+@-banner@>
+@$banner {CTWILL}1 =\.{"This\ is\ CTWILL"}@>
+@z
+
+Section 2.
+
+@x
+@ \.{CWEAVE} has a fairly straightforward outline. It operates in
+@y
+@ \.{CWEAVE} has a fairly straightforward outline. It operates in
+@%
+@$show_banner {CTWILL}14 =\\{flags}[\.{'b'}]@>
+@$show_progress {CTWILL}14 =\\{flags}[\.{'p'}]@>
+@z
+
+Section 4.
+
+@x
+@d _(s) gettext(s)
+@y
+@d _(s) gettext(s)
+@-s@>
+@-a@>
+@-HAVE_GETTEXT@>
+@z
+
+Section 5.
+
+@x
+@d compress(c) if (loc++<=limit) return c
+@y
+@d compress(c) if (loc++<=limit) return c
+@-c@>
+@z
+
+Section 6.
+
+@x
+@ Code related to input routines:
+@y
+@ Code related to input routines:
+@-c@>
+@z
+
+Section 7.
+
+@x
+@d cur_line line[include_depth] /* number of current line in current file */
+@y
+@d cur_line line[include_depth] /* number of current line in current file */
+@-cur_file@>
+@-cur_file_name@>
+@-cur_line@>
+@$cur_file {CTWILL}7 =\\{file}[\\{include\_depth}]@>
+@$cur_file_name {CTWILL}7 =\hfil\break\\{file\_name}[\\{include\_depth}]@>
+@$cur_line {CTWILL}7 =\\{line}[\\{include\_depth}]@>
+@z
+
+Section 10.
+
+@x
+@ Code related to identifier and section name storage:
+@y
+@ Code related to identifier and section name storage:
+@-c@>
+@-llink@>
+@-rlink@>
+@-root@>
+@$llink {CTWILL}10 =\\{link}@>
+@$rlink {CTWILL}10 =\\{dummy}.\\{Rlink}@>
+@$root {CTWILL}10 =\\{name\_dir}$\MG$\\{rlink}@>
+@z
+
+Section 12.
+
+@x
+@ Code related to error handling:
+@y
+@ Code related to error handling:
+@-s@>
+@z
+
+Section 14.
+
+@x
+extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */
+@y
+extern const char *use_language; /* prefix to \.{ctwimac.tex} in \TEX/ output */
+@-show_banner@>
+@-show_progress@>
+@-show_happiness@>
+@-show_stats@>
+@-make_xrefs@>
+@-check_for_change@>
+@$show_banner {CTWILL}14 =\\{flags}[\.{'b'}]@>
+@$show_progress {CTWILL}14 =\\{flags}[\.{'p'}]@>
+@$show_happiness {CTWILL}14 =\\{flags}[\.{'h'}]@>
+@$show_stats {CTWILL}14 =\\{flags}[\.{'s'}]@>
+@$make_xrefs {CTWILL}14 =\\{flags}[\.{'x'}]@>
+@$check_for_change {CTWILL}14 =\\{flags}[\.{'c'}]@>
+@z
+
+Section 15.
+
+@x
+@ Code related to output:
+@y
+@ Code related to output:
+@-a@>
+@-b@>
+@-c@>
+@-update_terminal@>
+@-new_line@>
+@$update_terminal {CTWILL}15 =\\{fflush}(\\{stdout})@>
+@$new_line {CTWILL}15 =\\{putchar}(\.{'\\n'})@>
+@z
+
+Section 17.
@x
-}@+else fatal(_("! Filename too long\n"), found_filename);
+@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
@y
-}@+else fatal(_("! Filename too long\n"), found_filename);
+@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
+@-long_buf_size@>
+@$long_buf_size {CTWILL}17 =$\\{buf\_size}+\\{longest\_name}$@>
+@z
+
+Section 20.
+
+@x
+@* Data structures exclusive to {\tt CWEAVE}.
+@y
+@* Data structures exclusive to {\tt CWEAVE}.
+@-a@>
+@-ilk@>
+@$ilk {CTWILL}20 =\\{dummy}.\\{Ilk}@>
+@z
+
+Section 22.
-@** Index.
-If you have read and understood the code for Phase III above, you know what
-is in this index and how it got here. All sections in which an identifier is
-used are listed with that identifier, except that reserved words are
-indexed only when they appear in format definitions, and the appearances
-of identifiers in section names are not indexed. Underlined entries
-correspond to where the identifier was declared. Error messages, control
-sequences put into the output, and a few
-other things like ``recursion'' are indexed here too.
+@x
+@ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
+@y
+@ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
+@-p@>
+@-x@>
+@z
+
+Section 24.
+
+@x
+@d file_flag (3*cite_flag)
+@y
+@-file_flag@>
+@-def_flag@>
+@-xref@>
+@$file_flag {CTWILL}24 =$\T{3}*\\{cite\_flag}{}$@>
+@$def_flag {CTWILL}24 =$\T{2}*\\{cite\_flag}{}$@>
+@$xref {CTWILL}24 =\\{equiv\_or\_xref}@>
+@d file_flag (3*cite_flag)
+@z
+
+Section 25.
+
+@x
+@ A new cross-reference for an identifier is formed by calling |new_xref|,
+@y
+@ A new cross-reference for an identifier is formed by calling |new_xref|,
+@-a@>
+@-c@>
+@-p@>
+@-no_xref@>
+@$no_xref {CTWILL}25 =$\R\\{make\_xrefs}$@>
+@z
+
+Section 36.
+
+@x
+@d underline '\n' /* this code will be intercepted without confusion */
+@y
+@d underline '\n' /* this code will be intercepted without confusion */
+@-begin_comment@>
+@-underline@>
+@$begin_comment {CTWILL}36 =\.{'\\t'}@>
+@$underline {CTWILL}36 =\.{'\\n'}@>
+@z
+
+Section 42.
+
+CTWILL hickups on comment and produces unmatched '$' in mini-index.
+
+@x l.646
+skip_TeX(void) /* skip past pure \TEX/ code */
+@y
+skip_TeX(void)
+@z
+
+Section 44.
+
+@x
+@ As one might expect, |get_next| consists mostly of a big switch
+@y
+@ As one might expect, |get_next| consists mostly of a big switch
+@-c@>
+@$c {CTWILL}44 \&{eight\_bits}@>
+@z
+
+Section 45.
+
+@x
+@ @<Predecl...@>=@+static eight_bits get_next(void);
+@y
+@ @<Predecl...@>=@+static eight_bits get_next(void);
+@-get_next@>
+@z
+
+Section 46.
+
+@x
+@d left_preproc ord /* begins a preprocessor command */
+@y
+@-left_preproc@>
+@$left_preproc {CTWILL}46 =\\{ord}@>
+@d left_preproc ord /* begins a preprocessor command */
+@z
+
+Section 52.
+
+@x
+ id_first=--loc;
+ do
+ ++loc;
+ while (isalpha((int)*loc) || isdigit((int)*loc) @|
+ || isxalpha(*loc) || ishigh(*loc));
+ id_loc=loc; return identifier;
+@y
+ id_first=--loc;@/
+ do
+ ++loc;
+ while (isalpha((int)*loc) || isdigit((int)*loc) @|
+ || isxalpha(*loc) || ishigh(*loc));@/
+ id_loc=loc;@/
+ return identifier;
+@z
+
+Section 53.
+
+@x
+@d gather_digits_while(t) while ((t) || *loc=='\'')
+@y
+@d gather_digits_while(t) while ((t) || *loc=='\'')
+@-t@>
+@z
+
+Section 65.
+
+@x
+@ @<Predecl...@>=@+static void skip_restricted(void);
+@y
+@ @<Predecl...@>=@+static void skip_restricted(void);
+@-skip_restricted@>
+@z
+
+Section 69.
+
+@x
+@ @<Predecl...@>=@+static void phase_one(void);
+@y
+@ @<Predecl...@>=@+static void phase_one(void);
+@-phase_one@>
+@z
+
+Section 72.
+
+@x
+C_xref( /* makes cross-references for \CEE/ identifiers */
+ eight_bits spec_ctrl)
+@y
+C_xref( /* makes cross-references for \CEE/ identifiers */
+ eight_bits spec_ctrl)
+@-C_xref@>
+@$C_xref {CTWILL}72 \&{static} \&{void} (\,)@>
+@z
+
+Section 86.
+
+@x
+@ The |flush_buffer| routine empties the buffer up to a given breakpoint,
+@y
+@ The |flush_buffer| routine empties the buffer up to a given breakpoint,
+@-b@>
+@-c@>
+@-tex_new_line@>
+@$tex_new_line {CTWILL}86 =$\\{putc}(\.{'\\n'},\39\\{active\_file})$@>
+@z
+
+Section 89.
+
+@x
+@d proofing flags['P']
+@y
+@d proofing flags['P']
+@-proofing@>
+@$proofing {CTWILL}89 =\\{flags}[\.{'P'}]@>
+@z
+
+Section 90.
+
+@x
+@ When we wish to append one character |c| to the output buffer, we write
+@y
+@ When we wish to append one character |c| to the output buffer, we write
+@-c@>
+@-s@>
+@z
+
+Section 91.
+
+@x
+out_str( /* output characters from |s| to end of string */
+const char*s)
+@y
+out_str( /* output characters from |s| to end of string */
+const char*s)
+@-out_str@>
+@$out_str {CTWILL}91 \&{static} \&{void} (\,)@>
+@z
+
+Section 101.
+
+@x
+@ The |copy_comment| function issues a warning if more braces are opened than
+@y
+@ The |copy_comment| function issues a warning if more braces are opened than
+@-c@>
+@-t@>
+@-copy_comment@>
+@$copy_comment {CTWILL}101 \&{static} \&{int} (\,)@>
+@z
+
+Section 108.
+
+@x
+@d print_cat(c) fputs(cat_name[c],stdout) /* symbolic printout of a category */
+@y
+@d print_cat(c) fputs(cat_name[c],stdout) /* symbolic printout of a category */
+@-c@>
+@z
+
+Section 109.
+
+@x
+@ The token lists for translated \TEX/ output contain some special control
+@y
+@ The token lists for translated \TEX/ output contain some special control
+@-n@>
+@z
+
+@x
+\yskip\noindent All of these tokens are removed from the \TEX/ output that
+@y
+\yskip\noindent All of these tokens are removed from the \TEX/ output that
+@-n@>
+@z
+
+Section 110.
+
+@x
+@ The raw input is converted into scraps according to the following table,
+@y
+@* From raw input to scraps.
+@-c@>
+The raw input is converted into scraps according to the following table,
+@z
+
+Sections 111.
+
+@x l.7 line numbers refer to 'prod.w'
+@ Here is a table of all the productions. Each production that
+@y
+@* Table of all productions. Each production that
+@-time@>
+@-in@>@-f@>@-x@>@-y@>
+@-any@>@-z@>@-g@>@-a@>
+@-any_other@>@-p@>
+@-deprecated@>
+@-fallthrough@>
+@-likely@>
+@-nodiscard@>
+@-unlikely@>
+@-s@>
+@z
+
+Section 113.
+
+@x
+@ @d trans trans_plus.Trans /* translation texts of scraps */
+@y
+@ @d trans trans_plus.Trans /* translation texts of scraps */
+@-trans@>
+@$trans {CTWILL}113 =\\{trans\_plus}.\\{Trans}@>
+@z
+
+Section 115.
+
+@x
+@ Token lists in |@!tok_mem| are composed of the following kinds of
+@y
+@ Token lists in |@!tok_mem| are composed of the following kinds of
+@-p@>
+@-res_flag@>
+@-section_flag@>
+@-tok_flag@>
+@-inner_tok_flag@>
+@$res_flag {CTWILL}115 =$\T{2}*\\{id\_flag}$@>
+@$section_flag {CTWILL}115 =$\T{3}*\\{id\_flag}$@>
+@$tok_flag {CTWILL}115 =$\T{3}*\\{id\_flag}$@>
+@$inner_tok_flag {CTWILL}115 =$\T{4}*\\{id\_flag}$@>
+@z
+
+Section 118.
+
+@x
+@ The production rules listed above are embedded directly into \.{CWEAVE},
+@y
+@ The production rules listed above are embedded directly into \.{CWEAVE},
+@-a@>
+@-c@>
+@-d@>
+@-j@>
+@-k@>
+@-n@>
+@-pp@>
+@z
+
+Section 121.
+
+@x
+@ Let us consider the big switch for productions now, before looking
+@y
+@ Let us consider the big switch for productions now, before looking
+@-cat1@>
+@-cat2@>
+@-cat3@>
+@$cat1 {CTWILL}121 =$(\\{pp}+\T{1})\MG\\{cat}$@>
+@$cat2 {CTWILL}121 =$(\\{pp}+\T{2})\MG\\{cat}$@>
+@$cat3 {CTWILL}121 =$(\\{pp}+\T{3})\MG\\{cat}$@>
+@z
+
+Section 122.
+
+@x
+`\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}').
+@y
+`\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}').
+@-find_first_ident@>
+@-make_reserved@>
+@-make_underlined@>
+@-underline_xref@>
+@-no_ident_found@>
+@-case_found@>
+@-operator_found@>
+@$no_ident_found {CTWILL}122 =\hfil\break(\&{token\_pointer}) 0@>
+@$case_found {CTWILL}122 =\hfil\break(\&{token\_pointer}) 1@>
+@$operator_found {CTWILL}122 =\hfil\break(\&{token\_pointer}) 2@>
+@z
+
+Section 124.
+
+@x
+make_reserved( /* make the first identifier in |p->trans| like |int| */
+scrap_pointer p)
+@y
+make_reserved( /* make the first identifier in |p->trans| like |int| */
+scrap_pointer p)
+@-make_reserved@>
+@$make_reserved {CTWILL}124 \&{static} \&{void} (\,)@>
+@z
+
+Section 125.
+
+@x
+make_underlined(
+/* underline the entry for the first identifier in |p->trans| */
+scrap_pointer p)
+@y
+make_underlined(
+/* underline the entry for the first identifier in |p->trans| */
+scrap_pointer p)
+@-make_underlined@>
+@$make_underlined {CTWILL}125 \&{static} \&{void} (\,)@>
+@z
+
+@x
+ return; /* this happens, for example, in |case found:| */
+@y
+ return; /* this happens, for example, in \&{case} \\{found}: */
+@z
+
+Section 155.
+
+@x
+@d force_lines flags['f'] /* should each statement be on its own line? */
+@y
+@d force_lines flags['f'] /* should each statement be on its own line? */
+@-force_lines@>
+@$force_lines {CTWILL}155 =\\{flags}[\.{'f'}]@>
+@z
+
+Section 187.
+
+@x
+@ @<Print a snapsh...@>=
+@y
+@ @<Print a snapsh...@>=
+@-n@>
+@%
+@$n {CTWILL}182 \&{short}@>
+@$n {CTWILL}183 \&{short}@>
+@z
+
+Section 189.
+
+@x
+@ @<Predecl...@>=@+static text_pointer translate(void);
+@y
+@ @<Predecl...@>=@+static text_pointer translate(void);
+@-translate@>
+@z
+
+Section 193.
+
+@x
+ if (next_control=='|' || next_control==begin_comment ||
+ next_control==begin_short_comment) return;
+@y
+@-C_parse@>
+@$C_parse {CTWILL}193 \&{static} \&{void} (\,)@>
+ if (next_control=='|' || next_control==begin_comment @| ||
+ next_control==begin_short_comment) return;
+@z
+
+Section 194.
+
+@x
+@ @<Predecl...@>=@+static void C_parse(eight_bits);
+@y
+@ @<Predecl...@>=@+static void C_parse(eight_bits);
+@-C_parse@>
+@z
+
+Section 195.
+
+@x
+@ The following macro is used to append a scrap whose tokens have just
+@y
+@ The following macro is used to append a scrap whose tokens have just
+@-b@>
+@-c@>
+@z
+
+Section 204.
+
+@x
+@d make_pb flags['e']
+@y
+@d make_pb flags['e']
+@-make_pb@>
+@$make_pb {CTWILL}204 =\\{flags}[\.{'e'}]@>
+@z
+
+Section 208.
+
+@x
+@d cur_mode cur_state.mode_field /* current mode of interpretation */
+@y
+@d cur_mode cur_state.mode_field /* current mode of interpretation */
+@-cur_end@>
+@-cur_tok@>
+@-cur_mode@>
+@$cur_end {CTWILL}208 =\\{cur\_state}.\\{end\_field}]@>
+@$cur_tok {CTWILL}208 =\\{cur\_state}.\\{tok\_field}]@>
+@$cur_mode {CTWILL}208 =\\{cur\_state}.\\{mode\_field}]@>
+@z
+
+Section 211.
+
+@x
+push_level( /* suspends the current level */
+text_pointer p)
+@y
+push_level( /* suspends the current level */
+text_pointer p)
+@-push_level@>
+@$push_level {CTWILL}211 \&{static} \&{void} (\,)@>
+@z
+
+Section 228.
+
+@x
+@ @<Predecl...@>=@+static void phase_two(void);
+@y
+@ @<Predecl...@>=@+static void phase_two(void);
+@-phase_two@>
+@z
+
+Section 230.
+
+@x
+@ @d usage_sentinel (struct perm_meaning *)1
+@y
+@ @d usage_sentinel (struct perm_meaning *)1
+@-usage_sentinel@>
+@$usage_sentinel {CTWILL}230 =(\&{struct} \&{perm\_meaning} ${}{*}{}$) \T{1}@>
+@z
+
+Section 234.
+
+@x
+finish_C( /* finishes a definition or a \CEE/ part */
+ boolean visible) /* |true| if we should produce \TeX\ output */
+@y
+finish_C( /* finishes a definition or a \CEE/ part */
+ boolean visible) /* |true| if we should produce \TeX\ output */
+@-finish_C@>
+@$finish_C {CTWILL}234 \&{static} \&{void} (\,)@>
+@z
+
+Section 235.
+
+@x
+@ @<Predecl...@>=@+static void finish_C(boolean);
+@y
+@ @<Predecl...@>=@+static void finish_C(boolean);
+@-finish_C@>
+@z
+
+Section 243.
+
+@x
+footnote( /* outputs section cross-references */
+sixteen_bits flag)
+@y
+footnote( /* outputs section cross-references */
+sixteen_bits flag)
+@-footnote@>
+@$footnote {CTWILL}243 \&{static} \&{void} (\,)@>
+@z
+
+Section 244.
+
+@x
+@ @<Predecl...@>=@+static void footnote(sixteen_bits);
+@y
+@ @<Predecl...@>=@+static void footnote(sixteen_bits);
+@-footnote@>
+@z
+
+Section 248.
+
+@x
+@ @<Predecl...@>=@+static void phase_three(void);
+@y
+@ @<Predecl...@>=@+static void phase_three(void);
+@-phase_three@>
+@z
+
+Section 251.
+
+@x
+@ A left-to-right radix sorting method is used, since this makes it easy to
+@y
+@ A left-to-right radix sorting method is used, since this makes it easy to
+@-c@>
+@z
+
+Section 253.
+
+@x
+@<Rest of |trans_plus| union@>=
+@y
+@<Rest of |trans_plus| union@>=
+@-j@>
+@-k@>
+@z
+
+Section 254.
+
+@x
+@ @d depth cat /* reclaims memory that is no longer needed for parsing */
+@y
+@ @d depth cat /* reclaims memory that is no longer needed for parsing */
+@-depth@>
+@-head@>
+@-sort_ptr@>
+@-max_sorts@>
+@$depth {CTWILL}254 =\\{cat}@>
+@$head {CTWILL}254 =\\{trans\_plus}.\\{Head}@>
+@$sort_ptr {CTWILL}254 =\\{scrap\_ptr}@>
+@z
+
+Section 258.
+
+@x
+@ Procedure |unbucket| goes through the buckets and adds nonempty lists
+@y
+@ Procedure |unbucket| goes through the buckets and adds nonempty lists
+@-unbucket@>
+@$unbucket {CTWILL}258 \&{static} \&{void} (\,)@>
+@z
+
+Section 259.
+
+@x
+@ @<Predecl...@>=@+static void unbucket(eight_bits);
+@y
+@ @<Predecl...@>=@+static void unbucket(eight_bits);
+@-unbucket@>
+@z
+
+Section 261.
+
+@x
+ next_name=sort_ptr->head;
+@y
+ next_name=sort_ptr->head;@/
+@z
+
+Section 262.
+
+@x
+ cur_name=sort_ptr->head;
+@y
+ cur_name=sort_ptr->head;@/
+@z
+
+Section 268.
+
+@x
+@ @<Predecl...@>=@+static void section_print(name_pointer);
+@y
+@ @<Predecl...@>=@+static void section_print(name_pointer);
+@-section_print@>
+@z
+
+Section 270.
+
+@x
+ puts(_("\nMemory usage statistics:"));
+@.Memory usage statistics:@>
+ printf(_("%td names (out of %ld)\n"),
+ (ptrdiff_t)(name_ptr-name_dir),(long)max_names);
+ printf(_("%td cross-references (out of %ld)\n"),
+ (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);
+ printf(_("%td bytes (out of %ld)\n"),
+ (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
+ printf(_("%td temp meanings (out of %ld)\n"),
+ (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),
+ (long)max_meanings);
+ printf(_("%td titles (out of %ld)\n"),
+ (ptrdiff_t)(title_code_ptr-title_code),(long)max_titles);
+ puts(_("Parsing:"));
+ printf(_("%td scraps (out of %ld)\n"),
+ (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps);
+ printf(_("%td texts (out of %ld)\n"),
+ (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts);
+ printf(_("%td tokens (out of %ld)\n"),
+ (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks);
+ printf(_("%td levels (out of %ld)\n"),
+ (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size);
+ puts(_("Sorting:"));
+ printf(_("%td levels (out of %ld)\n"),
+ (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps);
+@y
+ puts(_("\nMemory usage statistics:"));@/
+@.Memory usage statistics:@>
+ printf(_("%td names (out of %ld)\n"),
+ (ptrdiff_t)(name_ptr-name_dir),@/
+ @t\5\5\5\5@>(long)max_names);@/
+ printf(_("%td cross-references (out of %ld)\n"),
+ (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);@/
+ printf(_("%td bytes (out of %ld)\n"),
+ (ptrdiff_t)(byte_ptr-byte_mem),@/
+ @t\5\5\5\5@>(long)max_bytes);@/
+ printf(_("%td temp meanings (out of %ld)\n"),
+ (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),@/
+ @t\5\5\5\5@>(long)max_meanings);@/
+ printf(_("%td titles (out of %ld)\n"),
+ (ptrdiff_t)(title_code_ptr-title_code),@/
+ @t\5\5\5\5@>(long)max_titles);@/
+ puts(_("Parsing:"));@/
+ printf(_("%td scraps (out of %ld)\n"),
+ (ptrdiff_t)(max_scr_ptr-scrap_info),@/
+ @t\5\5\5\5@>(long)max_scraps);@/
+ printf(_("%td texts (out of %ld)\n"),
+ (ptrdiff_t)(max_text_ptr-tok_start),@/
+ @t\5\5\5\5@>(long)max_texts);@/
+ printf(_("%td tokens (out of %ld)\n"),
+ (ptrdiff_t)(max_tok_ptr-tok_mem),@/
+ @t\5\5\5\5@>(long)max_toks);@/
+ printf(_("%td levels (out of %ld)\n"),
+ (ptrdiff_t)(max_stack_ptr-stack),@/
+ @t\5\5\5\5@>(long)stack_size);@/
+ puts(_("Sorting:"));@/
+ printf(_("%td levels (out of %ld)\n"),
+ (ptrdiff_t)(max_sort_ptr-scrap_info),@/
+ @t\5\5\5\5@>(long)max_scraps);
+@z
+
+Section 272.
+
+@x
+@q Section 2->272. @>
+@* {\tentex CTWILL} user manual.
+@y
+@* {\tentex CTWILL} user manual.
+@-s@>
+@-f@>
+@-x@>
+@-printf@>
+@z
+
+Section 274.
+
+@x
+static struct perm_meaning {
+@y
+static struct perm_meaning {
+@-perm_meaning@>
+@$perm_meaning {CTWILL}274 \&{static} \&{struct}@>
+@z
+
+Section 283.
+
+@x
+@ @<Predec...@>=@+static boolean app_supp(text_pointer);
+@y
+@ @<Predec...@>=@+static boolean app_supp(text_pointer);
+@-app_supp@>
+@z
+
+Section 284.
+
+@x
+@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|,
+@y
+@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|,
+@-a@>
+@-b@>
+@-c@>
+@-l@>
+@-make_ministring@>
+@$make_ministring {CTWILL}284 \&{static} \&{void} (\,)@>
+@z
+
+Section 285.
+
+@x
+@ @<Predec...@>=@+static void make_ministring(scrap_pointer);
+@y
+@ @<Predec...@>=@+static void make_ministring(scrap_pointer);
+@-make_ministring@>
+@z
+
+Section 293.
+
+@x
+@ @<Write the new meaning to the \.{.aux} file@>=
+@y
+@ @<Write the new meaning to the \.{.aux} file@>=
+@%
+@$p {CTWILL}277 \&{name\_pointer}@>
+@$q {CTWILL}277 \&{struct perm\_meaning} ${}{*}{}$@>
+@z
+
+Section 294.
+
+@x
+@<Flag the usage of this identifier, for the mini-index@>=
+@y
+@<Flag the usage of this identifier, for the mini-index@>=
+@%
+@$p {CTWILL}202 \&{name\_pointer}@>
+@z
+
+Section 297.
+
+@x
+@ @<Predec...@>=@+static void out_mini(meaning_struct *);
+@y
+@ @<Predec...@>=@+static void out_mini(meaning_struct *);
+@-out_mini@>
+@z
+
+Section 300.
+
+@x
+@ @<Predec...@>=@+static sixteen_bits title_lookup(void);
+@y
+@ @<Predec...@>=@+static sixteen_bits title_lookup(void);
+@-title_lookup@>
+@z
+
+Section 303.
+
+@x
+@d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
+@y
+@d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
+@-indent_param_decl@>
+@$indent_param_decl {CTWILL}303 =\\{flags}[\.{'i'}]@>
+@z
+
+Section 304.
+
+@x
+@d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
+@y
+@d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
+@-order_decl_stmt@>
+@$order_decl_stmt {CTWILL}304 =\\{flags}[\.{'o'}]@>
+@z
+
+Section 310.
+
+@x l.116 of CTWILL-TEXLIVE.CH
+@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
+@y
+@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
+@-name@>
@z
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-proofsort b/Build/source/texk/web2c/cwebdir/ctwill-proofsort
index 17a14dbd0e8..356abfb4939 100755
--- a/Build/source/texk/web2c/cwebdir/ctwill-proofsort
+++ b/Build/source/texk/web2c/cwebdir/ctwill-proofsort
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
# $Id$
+# $Id$
# Public domain. Originally written by Andreas Scherer, 2023.
use strict;
@@ -9,15 +10,16 @@ use File::Basename;
use Getopt::Long qw(:config no_ignore_case bundling);
use Pod::Usage;
+my $progname = basename $0;
+
BEGIN {
# Unicode::Collate has been around a long time,
# but it's not part of core Perl.
my $rc = eval { require Unicode::Collate; };
- die "$0: the Unicode::Collate module is required\n" unless $rc;
+ die "$progname: the Unicode::Collate module is required\n" unless $rc;
}
# We expect a TeX file as the single command-line parameter.
-my $progname = basename $0;
my $usage = "Usage: $progname input_file\n";
if (@ARGV > 1) {
my $first = shift @ARGV;
diff --git a/Build/source/texk/web2c/cwebdir/ctwill.test b/Build/source/texk/web2c/cwebdir/ctwill.test
index 42c0a6a9a72..7d6139af2fd 100755
--- a/Build/source/texk/web2c/cwebdir/ctwill.test
+++ b/Build/source/texk/web2c/cwebdir/ctwill.test
@@ -14,6 +14,10 @@ diff ham.tex $testdir/ham.tex || exit 1
./ctwill-refsort < $testdir/ham.ref > ham.sref || exit 1
diff ham.sref $testdir/ham.sref || exit 1
+# Test CTWILL-TWINX
+./ctwill-twinx ham.tex > index.tex
+diff index.tex $testdir/index.tex || exit 1
+
# Test CTWILL-PROOFSORT
# Perl script not available in builddir, and requires Unicode::Collate;
# if that module is not available, just quit testing.
@@ -21,8 +25,4 @@ perl -e 'use Unicode::Collate;' 2>/dev/null || exit 0
$testdir/../ctwill-proofsort ham.tex > ham-sorted.tex || exit 1
diff ham-sorted.tex $testdir/ham-sorted.tex || exit 1
-# Test CTWILL-TWINX
-./ctwill-twinx ham.tex > index.tex
-diff index.tex $testdir/index.tex || exit 1
-
exit 0