From commits+karl at tug.org Thu Apr 1 22:52:50 2021 From: commits+karl at tug.org (commits+karl at tug.org) Date: Thu, 1 Apr 2021 22:52:50 +0200 Subject: pdftex[850] branches/stable/source/src: sync with tl r58693 for tl21 Message-ID: <202104012052.131KqoZP022376@tug.org> Revision: 850 http://tug.org/svn/pdftex?view=revision&revision=850 Author: karl Date: 2021-04-01 22:52:49 +0200 (Thu, 01 Apr 2021) Log Message: ----------- sync with tl r58693 for tl21 Revision Links: -------------- http://tug.org/svn/pdftex?view=revision&revision=58693 Modified Paths: -------------- branches/stable/source/src/build-aux/config.sub branches/stable/source/src/build-aux/texinfo.tex branches/stable/source/src/configure branches/stable/source/src/doc/tlbuild-incl/install-tl.texi branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi branches/stable/source/src/doc/tlbuild.info branches/stable/source/src/tardate.ac branches/stable/source/src/texk/README branches/stable/source/src/texk/kpathsea/ChangeLog branches/stable/source/src/texk/kpathsea/NEWS branches/stable/source/src/texk/kpathsea/tests/cnfline/texmf.cnf branches/stable/source/src/texk/kpathsea/tests/cnfline.test branches/stable/source/src/texk/kpathsea/texmf.cnf branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm branches/stable/source/src/texk/web2c/ChangeLog branches/stable/source/src/texk/web2c/NEWS branches/stable/source/src/texk/web2c/ctangleboot.cin branches/stable/source/src/texk/web2c/cwebboot.cin branches/stable/source/src/texk/web2c/cwebdir/ChangeLog branches/stable/source/src/texk/web2c/cwebdir/Makefile branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h branches/stable/source/src/texk/web2c/cwebdir/common.c branches/stable/source/src/texk/web2c/cwebdir/common.h branches/stable/source/src/texk/web2c/cwebdir/common.w branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch branches/stable/source/src/texk/web2c/cwebdir/ctangle.c branches/stable/source/src/texk/web2c/cwebdir/ctangle.w branches/stable/source/src/texk/web2c/cwebdir/ctwill-mini.ch branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch branches/stable/source/src/texk/web2c/cwebdir/cweave.w branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex branches/stable/source/src/texk/web2c/cwebdir/po/cweb-tl.pot branches/stable/source/src/texk/web2c/cwebdir/po/cweb.pot branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb-tl.po branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb.po branches/stable/source/src/texk/web2c/cwebdir/po/it/cweb.po branches/stable/source/src/texk/web2c/doc/web2c.info branches/stable/source/src/texk/web2c/doc/web2c.texi branches/stable/source/src/texk/web2c/etexdir/ChangeLog branches/stable/source/src/texk/web2c/etexdir/etex.ch branches/stable/source/src/texk/web2c/lib/ChangeLog branches/stable/source/src/texk/web2c/lib/texmfmp.c branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog branches/stable/source/src/texk/web2c/pdftexdir/NEWS branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web branches/stable/source/src/texk/web2c/pdftexdir/writefont.c branches/stable/source/src/texk/web2c/synctexdir/ChangeLog branches/stable/source/src/texk/web2c/synctexdir/synctex_parser.c branches/stable/source/src/texk/web2c/web2c/ChangeLog branches/stable/source/src/utils/README Added Paths: ----------- branches/stable/source/src/texk/web2c/doc/glue.web branches/stable/source/src/texk/web2c/doc/webman.tex Modified: branches/stable/source/src/build-aux/config.sub =================================================================== --- branches/stable/source/src/build-aux/config.sub 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/build-aux/config.sub 2021-04-01 20:52:49 UTC (rev 850) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2021-01-08' +timestamp='2021-03-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1712,7 +1712,7 @@ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ Modified: branches/stable/source/src/build-aux/texinfo.tex =================================================================== --- branches/stable/source/src/build-aux/texinfo.tex 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/build-aux/texinfo.tex 2021-04-01 20:52:49 UTC (rev 850) @@ -3,9 +3,9 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2020-11-25.18} +\def\texinfoversion{2021-02-20.11} % -% Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -8931,7 +8931,7 @@ \else \ifhavexrefs % We (should) know the real title if we have the xref values. - \def\printedrefname{\refx{#1-title}{}}% + \def\printedrefname{\refx{#1-title}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% @@ -9025,7 +9025,7 @@ % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt - \refx{#1-snt}{}% + \refx{#1-snt}% \else \printedrefname \fi @@ -9060,9 +9060,9 @@ \else % Reference within this manual. % - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + % Only output a following space if the -snt ref is nonempty, as the ref + % will be empty for @unnumbered and @anchor. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi % % output the `[mynode]' via the macro below so it can be overridden. @@ -9073,7 +9073,7 @@ ,\space % % output the `page 3'. - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \turnoffactive \putwordpage\tie\refx{#1-pg}% % Add a , if xref followed by a space \if\space\noexpand\tokenafterxref ,% \else\ifx\ \tokenafterxref ,% @TAB @@ -9150,9 +9150,8 @@ \fi\fi\fi } -% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX -% is output afterwards if non-empty. -\def\refx#1#2{% +% \refx{NAME} - reference a cross-reference string named NAME. +\def\refx#1{% \requireauxfile {% \indexnofonts @@ -9179,7 +9178,6 @@ % It's defined, so just use it. \thisrefX \fi - #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Define a control @@ -9289,10 +9287,10 @@ \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\<=\other - \catcode`\>=\other + \catcode`\_=\active + \catcode`\|=\active + \catcode`\<=\active + \catcode`\>=\active \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other Modified: branches/stable/source/src/configure =================================================================== --- branches/stable/source/src/configure 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/configure 2021-04-01 20:52:49 UTC (rev 850) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for TeX Live 2020-03-27. +# Generated by GNU Autoconf 2.69 for TeX Live 2021-03-23. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='TeX Live' PACKAGE_TARNAME='tex-live' -PACKAGE_VERSION='2020-03-27' -PACKAGE_STRING='TeX Live 2020-03-27' +PACKAGE_VERSION='2021-03-23' +PACKAGE_STRING='TeX Live 2021-03-23' PACKAGE_BUGREPORT='tex-k at tug.org' PACKAGE_URL='' @@ -1503,7 +1503,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live 2020-03-27 to adapt to many kinds of systems. +\`configure' configures TeX Live 2021-03-23 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1577,7 +1577,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live 2020-03-27:";; + short | recursive ) echo "Configuration of TeX Live 2021-03-23:";; esac cat <<\_ACEOF @@ -1885,7 +1885,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live configure 2020-03-27 +TeX Live configure 2021-03-23 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2662,7 +2662,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live $as_me 2020-03-27, which was +It was created by TeX Live $as_me 2021-03-23, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -10788,7 +10788,7 @@ # Define the identity of the package. PACKAGE='tex-live' - VERSION='2020-03-27' + VERSION='2021-03-23' cat >>confdefs.h <<_ACEOF @@ -22866,7 +22866,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live $as_me 2020-03-27, which was +This file was extended by TeX Live $as_me 2021-03-23, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22923,7 +22923,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -TeX Live config.status 2020-03-27 +TeX Live config.status 2021-03-23 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: branches/stable/source/src/doc/tlbuild-incl/install-tl.texi =================================================================== --- branches/stable/source/src/doc/tlbuild-incl/install-tl.texi 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/doc/tlbuild-incl/install-tl.texi 2021-04-01 20:52:49 UTC (rev 850) @@ -81,47 +81,25 @@ @item @code{text} @anchor{install-tl @code{text}} -The text mode user interface (default on Unix systems). Same as the - at code{-no-gui} option. +The text mode user interface (default on Unix systems, including Macs). +Same as the @code{-no-gui} option. - at item @code{tcl} - at anchor{install-tl @code{tcl}} + at item @code{tcl} (or "perltk" or "wizard" or "expert" or nothing) + at anchor{install-tl @code{tcl} (or "perltk" or "wizard" or "expert" or nothing)} -The Tcl/Tk user interface (default on Macs and Windows). It starts +The Tcl/Tk user interface (default on Windows). It starts with a small number of configuration options, roughly equivalent -to what the wizard option below offers, but a button @code{Advanced} -takes you to a screen with roughly the same options as the @code{perltk} -interface. +to what the former wizard option offers, but a button @code{Advanced} +takes you to a screen with roughly the same options as the former + at code{perltk} interface. - at item @code{wizard} - at anchor{install-tl @code{wizard}} - -The wizard mode user interface, asking only minimal questions before -installing all of TeX Live. - - at item @code{expert} - at anchor{install-tl @code{expert}} - -A generic name for, currently, @code{perltk}; it may select a different GUI -in the future. - - at item @code{perltk} - at anchor{install-tl @code{perltk}} - -The expert GUI installer, providing access to more options. - @end table -The @code{perltk} and @code{wizard} modules require the Perl/Tk module -(@url{https://tug.org/texlive/distro.html#perltk}). if Perl/Tk is not -available, installation continues in text mode, except on Windows, -where all gui options except @code{text} are diverted to the default - at code{tcl} GUI. +The default GUI requires Tcl/Tk. This is standard on Macs (although it +is considered deprecated since Catalina) and is often already installed +on GNU/Linux, or can be easily installed through a distro package +manager. For Windows, TeX Live provides a Tcl/Tk runtime. -The @code{tcl} GUI requires Tcl/Tk. This is standard on Macs and is often -already installed on GNU/Linux. For Windows, TeX Live provides a Tcl/Tk -runtime. - @item @strong{-no-gui} @anchor{install-tl @strong{-no-gui}} @@ -130,10 +108,8 @@ @item @strong{-lang} @emph{llcode} @anchor{install-tl @strong{-lang} @emph{llcode}} -By default, the GUI tries to deduce your language from the -environment. The Tcl GUI uses the language detection built into -Tcl/Tk; the Perl/Tk GUIs use the @code{LC_MESSAGES} environment -variable. If that fails you can select a different language by +By default, the Tcl GUI uses the language detection built into +Tcl/Tk. If that fails you can select a different language by giving this option with a language code (based on ISO 639-1). Currently supported (but not necessarily completely translated) are: English (en, default), Czech (cs), German (de), French (fr), Italian @@ -165,8 +141,8 @@ @anchor{install-tl @strong{-select-repository}} This option allows you to choose a particular mirror from the current -list of active CTAN mirrors. This option is supported in the @code{text}, - at code{wizard} and @code{perltk} installer modes, and will also offer to install +list of active CTAN mirrors. This option is supported in the @code{text} +and @code{gui} installer modes, and will also offer to install from local media if available, or from a repository specified on the command line. It's useful when the (default) automatic redirection does not choose a good host for you. @@ -199,9 +175,10 @@ @item @strong{-debug-translation} @anchor{install-tl @strong{-debug-translation}} -In the Perl/Tk GUI modes, this option reports any missing, or more -likely untranslated, messages to standard error. Helpful for -translators to see what remains to be done. +In the former Perl/Tk GUI modes, this option reported any missing, +or more likely untranslated, messages to standard error. Not yet +implemented for the Tcl interface. Helpful for translators to see +what remains to be done. @item @strong{-force-platform} @emph{platform} @anchor{install-tl @strong{-force-platform} @emph{platform}} @@ -517,8 +494,8 @@ Omit creating the ConTeXt cache. This is useful for redistributors. - at item @code{TEXLIVE_INSTALL_NO_IMPORT} - at anchor{install-tl @code{TEXLIVE_INSTALL_NO_IMPORT}} + at item @code{TEXLIVE_INSTALL_NO_RESUME} + at anchor{install-tl @code{TEXLIVE_INSTALL_NO_RESUME}} Omit check for installing on top of a previous installation and then asking about importing previous settings. @@ -529,6 +506,12 @@ Omit printing the welcome message after successful installation, e.g., when testing. + at item @code{TEXLIVE_INSTALL_PAPER} + at anchor{install-tl @code{TEXLIVE_INSTALL_PAPER}} + +Set the default paper size for all relevant programs; must be either + at code{letter} or @code{a4}. The default is @code{a4}. + @item @code{TEXLIVE_INSTALL_PREFIX} @anchor{install-tl @code{TEXLIVE_INSTALL_PREFIX}} @@ -573,5 +556,5 @@ distribution (@url{https://tug.org/texlive}) and both are licensed under the GNU General Public License Version 2 or later. -$Id: install-tl 54143 2020-03-06 23:51:18Z karl $ +$Id: install-tl 57970 2021-02-27 14:17:34Z siepo $ Modified: branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi =================================================================== --- branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi 2021-04-01 20:52:49 UTC (rev 850) @@ -244,6 +244,14 @@ tlshell shares its message catalog with tlmgr. + at item @strong{--command-logfile} @emph{file} + at anchor{tlmgr @strong{--command-logfile} @emph{file}} + + at code{tlmgr} logs the output of all programs invoked (mktexlr, mtxrun, fmtutil, +updmap) to a separate log file, by default + at code{TEXMFSYSVAR/web2c/tlmgr-commands.log}. This option allows you to specify a +different file for the log. + @item @strong{--debug-translation} @anchor{tlmgr @strong{--debug-translation}} @@ -832,21 +840,36 @@ @anchor{tlmgr @strong{--data @code{item1 at comma{}item2 at comma{}...}}} If the option @code{--data} is given, its argument must be a comma separated -list of field names from: @code{name}, @code{category}, @code{localrev}, @code{remoterev}, - at code{shortdesc}, @code{longdesc}, @code{installed}, @code{size}, @code{relocatable}, @code{depends}, - at code{cat-version}, @code{cat-date}, or @code{cat-license}. In this case the requested -packages' information is listed in CSV format one package per line, and the -column information is given by the @code{itemN}. The @code{depends} column contains -the name of all dependencies separated by @code{:}. +list of field names from: @code{name}, @code{category}, @code{localrev}, + at code{remoterev}, @code{shortdesc}, @code{longdesc}, @code{installed}, @code{size}, + at code{relocatable}, @code{depends}, @code{cat-version}, @code{cat-date}, @code{cat-license}, +plus various @code{cat-contact-*} fields (see below). +The @code{cat-*} fields all come from the TeX Catalogue +(@url{https://ctan.org/pkg/catalogue}). For each, there are two more +variants with prefix @code{l} and @code{r}, e.g., @code{lcat-version} and + at code{rcat-version}, which indicate the local and remote information, +respectively. The variants without @code{l} and @code{r} show the most current +one, which is normally the remote value. + +The requested packages' information is listed in CSV format, one package +per line, and the column information is given by the @code{itemN}. The + at code{depends} column contains the names of all the dependencies separated +by @code{:} characters. + +At this writing, the @code{cat-contact-*} fields include: @code{home}, + at code{repository}, @code{support}, @code{bugs}, @code{announce}, @code{development}. Each +may be empty or a url value. A brief description is on the CTAN upload +page for new packages: @url{https://ctan.org/upload}. + @item @strong{--json} @anchor{tlmgr @strong{--json} 1} -In case @code{--json} is specified, the output is a -JSON encoded array where each array element is the JSON representation of -a single @code{TLPOBJ} but with additional information. For details see - at code{tlpkg/doc/JSON-formats.txt}, format definition: @code{TLPOBJINFO}. -If both @code{--json} and @code{--data} are given, @code{--json} takes precedence. +In case @code{--json} is specified, the output is a JSON encoded array where +each array element is the JSON representation of a single @code{TLPOBJ} but +with additional information. For details see + at code{tlpkg/doc/JSON-formats.txt}, format definition: @code{TLPOBJINFO}. If both + at code{--json} and @code{--data} are given, @code{--json} takes precedence. @end table @@ -1842,12 +1865,12 @@ (e.g., if the selected mirror is out of date), @code{tlmgr} does not downgrade. Also, packages for uninstalled platforms are not installed. - at code{tlmgr} saves a copy of the @code{texlive.tlpdb} file used for an update -with a suffix representing the repository url, as in - at code{tlpkg/texlive.tlpdb.}@emph{long-hash-string}. These can be useful for -fallback information, but if you don't like them accumulating (e.g., - at code{mirror.ctan.org} resolves to many different hosts, each resulting in -a possibly different hash), it's harmless to delete them. + at code{tlmgr} saves one copy of the main @code{texlive.tlpdb} file used for an +update with a suffix representing the repository url, as in + at code{tlpkg/texlive.tlpdb.main.}@emph{long-hash-string}. Thus, even when many +mirrors are used, only one main @code{tlpdb} backup is kept. For non-main +repositories, which do not generally have (m)any mirrors, no pruning of +backups is done. This action does not automatically add or remove new symlinks in system directories; you need to run @code{tlmgr} @ref{tlmgr path,, path} yourself if you are using @@ -1897,6 +1920,9 @@ @item @code{require-verification}, value 0 or 1 (default 0), same as command-line option. @anchor{tlmgr @code{require-verification}@comma{} value 0 or 1 (default 0)@comma{} same as command-line option.} + at item @code{tkfontscale}, value any float. Controls the scaling of fonts in the Tk based frontends. + at anchor{tlmgr @code{tkfontscale}@comma{} value any float. Controls the scaling of fonts in the Tk based frontends.} + @item @code{update-exclude}, value: comma-separated list of packages (no space allowed). Same as the command line option @code{--exclude} for the action @code{update}. @anchor{tlmgr @code{update-exclude}@comma{} value: comma-separated list of packages (no space allowed). Same as the command line option @code{--exclude} for the action @code{update}.} @@ -2738,5 +2764,5 @@ distribution (@url{https://tug.org/texlive}) and both are licensed under the GNU General Public License Version 2 or later. -$Id: tlmgr.pl 54118 2020-03-05 22:27:22Z karl $ +$Id: tlmgr.pl 57970 2021-02-27 14:17:34Z siepo $ Modified: branches/stable/source/src/doc/tlbuild.info =================================================================== --- branches/stable/source/src/doc/tlbuild.info 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/doc/tlbuild.info 2021-04-01 20:52:49 UTC (rev 850) @@ -1,4 +1,4 @@ -This is tlbuild.info, produced by makeinfo version 5.1 from +This is tlbuild.info, produced by makeinfo version 6.7 from tlbuild.texi. This file documents the TeX Live build system and more. @@ -322,8 +322,8 @@ ===================== To build one package, the basic idea is to use the 'configure' option -'--disable-all-pkgs' (*note '--disable-all-pkgs'::). Then all program -and library modules are configured but none are made. However, the +'--disable-all-pkgs' (*note --disable-all-pkgs::). Then all program and +library modules are configured but none are made. However, the 'Makefile's still contain all build rules and dependencies and can be invoked to build an individual program or library, first building any required libraries. @@ -1050,13 +1050,13 @@ * Menu: -* 'png' library:: 'libs/libpng' -* 'zlib' library:: 'libs/zlib' -* 'freetype' library:: 'libs/freetype2' -* 'kpathsea' library:: 'texk/kpathsea' +* png library:: 'libs/libpng' +* zlib library:: 'libs/zlib' +* freetype library:: 'libs/freetype2' +* kpathsea library:: 'texk/kpathsea'  -File: tlbuild.info, Node: 'png' library, Next: 'zlib' library, Up: Library modules +File: tlbuild.info, Node: png library, Next: zlib library, Up: Library modules 6.4.1 The 'png' library in 'libs/libpng' ---------------------------------------- @@ -1112,7 +1112,7 @@ flags required for the system library.  -File: tlbuild.info, Node: 'zlib' library, Next: 'freetype' library, Prev: 'png' library, Up: Library modules +File: tlbuild.info, Node: zlib library, Next: freetype library, Prev: png library, Up: Library modules 6.4.2 The 'zlib' library in 'libs/zlib' --------------------------------------- @@ -1124,7 +1124,7 @@ locations of the 'zlib' headers and/or library.  -File: tlbuild.info, Node: 'freetype' library, Next: 'kpathsea' library, Prev: 'zlib' library, Up: Library modules +File: tlbuild.info, Node: freetype library, Next: kpathsea library, Prev: zlib library, Up: Library modules 6.4.3 The 'freetype' library in 'libs/freetype2' ------------------------------------------------ @@ -1140,7 +1140,7 @@ 'freetype-config'.  -File: tlbuild.info, Node: 'kpathsea' library, Prev: 'freetype' library, Up: Library modules +File: tlbuild.info, Node: kpathsea library, Prev: freetype library, Up: Library modules 6.4.4 The 'kpathsea' library in 'texk/kpathsea' ----------------------------------------------- @@ -1178,13 +1178,13 @@ * Menu: -* 't1utils' package:: 'utils/t1utils' -* 'xindy' package:: 'utils/xindy' -* 'xdvik' package:: 'texk/xdvik' -* 'asymptote':: 'utils/asymptote' +* t1utils package:: 'utils/t1utils' +* xindy package:: 'utils/xindy' +* xdvik package:: 'texk/xdvik' +* asymptote:: 'utils/asymptote'  -File: tlbuild.info, Node: 't1utils' package, Next: 'xindy' package, Up: Program modules +File: tlbuild.info, Node: t1utils package, Next: xindy package, Up: Program modules 6.5.1 The 't1utils' package in 'utils/t1utils' ---------------------------------------------- @@ -1200,7 +1200,7 @@ configure option '--disable-t1utils'.  -File: tlbuild.info, Node: 'xindy' package, Next: 'xdvik' package, Prev: 't1utils' package, Up: Program modules +File: tlbuild.info, Node: xindy package, Next: xdvik package, Prev: t1utils package, Up: Program modules 6.5.2 The 'xindy' package in 'utils/xindy' ------------------------------------------ @@ -1226,7 +1226,7 @@ included by 'configure.ac'.  -File: tlbuild.info, Node: 'xdvik' package, Next: 'asymptote', Prev: 'xindy' package, Up: Program modules +File: tlbuild.info, Node: xdvik package, Next: asymptote, Prev: xindy package, Up: Program modules 6.5.3 The 'xdvik' package in 'texk/xdvik' ----------------------------------------- @@ -1251,7 +1251,7 @@ also seen at the top level.  -File: tlbuild.info, Node: 'asymptote', Prev: 'xdvik' package, Up: Program modules +File: tlbuild.info, Node: asymptote, Prev: xdvik package, Up: Program modules 6.5.4 The subdirectory 'utils/asymptote' ---------------------------------------- @@ -1499,21 +1499,21 @@ * Menu: -* '--disable-native-texlive-build':: -* '--prefix' '--bindir' ...:: -* '--disable-largefile':: -* '--disable-missing':: -* '--enable-compiler-warnings='LEVEL:: -* '--enable-cxx-runtime-hack':: -* '--enable-maintainer-mode':: -* '--enable-multiplatform':: -* '--enable-shared':: -* '--enable-silent-rules':: -* '--without-ln-s':: -* '--without-x':: +* --disable-native-texlive-build:: +* --prefix --bindir ...:: +* --disable-largefile:: +* --disable-missing:: +* --enable-compiler-warnings=LEVEL:: +* --enable-cxx-runtime-hack:: +* --enable-maintainer-mode:: +* --enable-multiplatform:: +* --enable-shared:: +* --enable-silent-rules:: +* --without-ln-s:: +* --without-x::  -File: tlbuild.info, Node: '--disable-native-texlive-build', Next: '--prefix' '--bindir' ..., Up: Global configure options +File: tlbuild.info, Node: --disable-native-texlive-build, Next: --prefix --bindir ..., Up: Global configure options 7.1.1 '--disable-native-texlive-build' -------------------------------------- @@ -1534,7 +1534,7 @@ TL-specific adaptations, such as installation paths.  -File: tlbuild.info, Node: '--prefix' '--bindir' ..., Next: '--disable-largefile', Prev: '--disable-native-texlive-build', Up: Global configure options +File: tlbuild.info, Node: --prefix --bindir ..., Next: --disable-largefile, Prev: --disable-native-texlive-build, Up: Global configure options 7.1.2 '--prefix', '--bindir', ... --------------------------------- @@ -1547,7 +1547,7 @@ location: (automake)Staged Installs.).  -File: tlbuild.info, Node: '--disable-largefile', Next: '--disable-missing', Prev: '--prefix' '--bindir' ..., Up: Global configure options +File: tlbuild.info, Node: --disable-largefile, Next: --disable-missing, Prev: --prefix --bindir ..., Up: Global configure options 7.1.3 '--disable-largefile' --------------------------- @@ -1561,7 +1561,7 @@ 'pdftex' or PostScript files created by 'dvips'.  -File: tlbuild.info, Node: '--disable-missing', Next: '--enable-compiler-warnings='LEVEL, Prev: '--disable-largefile', Up: Global configure options +File: tlbuild.info, Node: --disable-missing, Next: --enable-compiler-warnings=LEVEL, Prev: --disable-largefile, Up: Global configure options 7.1.4 '--disable-missing' ------------------------- @@ -1571,7 +1571,7 @@ when figuring out a specific (sub)set of modules to enable.  -File: tlbuild.info, Node: '--enable-compiler-warnings='LEVEL, Next: '--enable-cxx-runtime-hack', Prev: '--disable-missing', Up: Global configure options +File: tlbuild.info, Node: --enable-compiler-warnings=LEVEL, Next: --enable-cxx-runtime-hack, Prev: --disable-missing, Up: Global configure options 7.1.5 '--enable-compiler-warnings='LEVEL ---------------------------------------- @@ -1584,7 +1584,7 @@ At present, these warning flags assume options from the GNU compilers.  -File: tlbuild.info, Node: '--enable-cxx-runtime-hack', Next: '--enable-maintainer-mode', Prev: '--enable-compiler-warnings='LEVEL, Up: Global configure options +File: tlbuild.info, Node: --enable-cxx-runtime-hack, Next: --enable-maintainer-mode, Prev: --enable-compiler-warnings=LEVEL, Up: Global configure options 7.1.6 '--enable-cxx-runtime-hack' --------------------------------- @@ -1594,7 +1594,7 @@ resulting binary. *Note Macros for compilers::.  -File: tlbuild.info, Node: '--enable-maintainer-mode', Next: '--enable-multiplatform', Prev: '--enable-cxx-runtime-hack', Up: Global configure options +File: tlbuild.info, Node: --enable-maintainer-mode, Next: --enable-multiplatform, Prev: --enable-cxx-runtime-hack, Up: Global configure options 7.1.7 '--enable-maintainer-mode' -------------------------------- @@ -1606,7 +1606,7 @@ 'AM_MAINTAINER_MODE': (automake)maintainer-mode.  -File: tlbuild.info, Node: '--enable-multiplatform', Next: '--enable-shared', Prev: '--enable-maintainer-mode', Up: Global configure options +File: tlbuild.info, Node: --enable-multiplatform, Next: --enable-shared, Prev: --enable-maintainer-mode, Up: Global configure options 7.1.8 '--enable-multiplatform' ------------------------------ @@ -1619,7 +1619,7 @@ subdirectories.  -File: tlbuild.info, Node: '--enable-shared', Next: '--enable-silent-rules', Prev: '--enable-multiplatform', Up: Global configure options +File: tlbuild.info, Node: --enable-shared, Next: --enable-silent-rules, Prev: --enable-multiplatform, Up: Global configure options 7.1.9 '--enable-shared' ----------------------- @@ -1629,7 +1629,7 @@ '--disable-native-texlive-build' must also be specified).  -File: tlbuild.info, Node: '--enable-silent-rules', Next: '--without-ln-s', Prev: '--enable-shared', Up: Global configure options +File: tlbuild.info, Node: --enable-silent-rules, Next: --without-ln-s, Prev: --enable-shared, Up: Global configure options 7.1.10 '--enable-silent-rules' ------------------------------ @@ -1640,7 +1640,7 @@ 'V=0' to get less, regardless of this option.  -File: tlbuild.info, Node: '--without-ln-s', Next: '--without-x', Prev: '--enable-silent-rules', Up: Global configure options +File: tlbuild.info, Node: --without-ln-s, Next: --without-x, Prev: --enable-silent-rules, Up: Global configure options 7.1.11 '--without-ln-s' ----------------------- @@ -1650,7 +1650,7 @@ anything useful, and might fail.  -File: tlbuild.info, Node: '--without-x', Prev: '--without-ln-s', Up: Global configure options +File: tlbuild.info, Node: --without-x, Prev: --without-ln-s, Up: Global configure options 7.1.12 '--without-x' -------------------- @@ -1667,18 +1667,18 @@ * Menu: -* '--enable-PROG' '--disable-PROG':: -* '--disable-all-pkgs':: -* Configure options for 'texk/web2c':: -* Configure options for 'texk/bibtex-x':: -* Configure options for 'texk/dvipdfm-x':: -* Configure options for 'texk/dvisvgm':: -* Configure options for 'texk/texlive':: -* Configure options for 'texk/xdvik':: -* Configure options for 'utils/xindy':: +* --enable-PROG --disable-PROG:: +* --disable-all-pkgs:: +* Configure options for texk/web2c:: +* Configure options for texk/bibtex-x:: +* Configure options for texk/dvipdfm-x:: +* Configure options for texk/dvisvgm:: +* Configure options for texk/texlive:: +* Configure options for texk/xdvik:: +* Configure options for utils/xindy::  -File: tlbuild.info, Node: '--enable-PROG' '--disable-PROG', Next: '--disable-all-pkgs', Up: Program-specific configure options +File: tlbuild.info, Node: --enable-PROG --disable-PROG, Next: --disable-all-pkgs, Up: Program-specific configure options 7.2.1 '--enable-PROG', '--disable-PROG' --------------------------------------- @@ -1686,7 +1686,7 @@ Do or do not build and install the program(s) of module 'PROG'.  -File: tlbuild.info, Node: '--disable-all-pkgs', Next: Configure options for 'texk/web2c', Prev: '--enable-PROG' '--disable-PROG', Up: Program-specific configure options +File: tlbuild.info, Node: --disable-all-pkgs, Next: Configure options for texk/web2c, Prev: --enable-PROG --disable-PROG, Up: Program-specific configure options 7.2.2 '--disable-all-pkgs' -------------------------- @@ -1703,7 +1703,7 @@ fragment.  -File: tlbuild.info, Node: Configure options for 'texk/web2c', Next: Configure options for 'texk/bibtex-x', Prev: '--disable-all-pkgs', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/web2c, Next: Configure options for texk/bibtex-x, Prev: --disable-all-pkgs, Up: Program-specific configure options 7.2.3 Configure options for 'texk/web2c' ---------------------------------------- @@ -1770,7 +1770,7 @@ Do not build the 'SyncTeX' library and tool.  -File: tlbuild.info, Node: Configure options for 'texk/bibtex-x', Next: Configure options for 'texk/dvipdfm-x', Prev: Configure options for 'texk/web2c', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/bibtex-x, Next: Configure options for texk/dvipdfm-x, Prev: Configure options for texk/web2c, Up: Program-specific configure options 7.2.4 Configure options for 'texk/bibtex-x' ------------------------------------------- @@ -1786,7 +1786,7 @@ libraries).  -File: tlbuild.info, Node: Configure options for 'texk/dvipdfm-x', Next: Configure options for 'texk/dvisvgm', Prev: Configure options for 'texk/bibtex-x', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/dvipdfm-x, Next: Configure options for texk/dvisvgm, Prev: Configure options for texk/bibtex-x, Up: Program-specific configure options 7.2.5 Configure options for 'texk/dvipdfm-x' -------------------------------------------- @@ -1804,7 +1804,7 @@ Do not build the 'xdvipdfmx' program.  -File: tlbuild.info, Node: Configure options for 'texk/dvisvgm', Next: Configure options for 'texk/texlive', Prev: Configure options for 'texk/dvipdfm-x', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/dvisvgm, Next: Configure options for texk/texlive, Prev: Configure options for texk/dvipdfm-x, Up: Program-specific configure options 7.2.6 Configure options for 'texk/dvisvgm' ------------------------------------------ @@ -1824,7 +1824,7 @@ Specify non-standard locations of the Ghostscript headers and library.  -File: tlbuild.info, Node: Configure options for 'texk/texlive', Next: Configure options for 'texk/xdvik', Prev: Configure options for 'texk/dvisvgm', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/texlive, Next: Configure options for texk/xdvik, Prev: Configure options for texk/dvisvgm, Up: Program-specific configure options 7.2.7 Configure options for 'texk/texlive' ------------------------------------------ @@ -1834,7 +1834,7 @@ the TL scripts required to run 'texlinks'.  -File: tlbuild.info, Node: Configure options for 'texk/xdvik', Next: Configure options for 'utils/xindy', Prev: Configure options for 'texk/texlive', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for texk/xdvik, Next: Configure options for utils/xindy, Prev: Configure options for texk/texlive, Up: Program-specific configure options 7.2.8 Configure options for 'texk/xdvik' ---------------------------------------- @@ -1851,7 +1851,7 @@ a native TL build).  -File: tlbuild.info, Node: Configure options for 'utils/xindy', Prev: Configure options for 'texk/xdvik', Up: Program-specific configure options +File: tlbuild.info, Node: Configure options for utils/xindy, Prev: Configure options for texk/xdvik, Up: Program-specific configure options 7.2.9 Configure options for 'utils/xindy' ----------------------------------------- @@ -1897,10 +1897,10 @@ * Menu: -* Configure options for 'kpathsea':: +* Configure options for kpathsea::  -File: tlbuild.info, Node: Configure options for 'kpathsea', Up: Library-specific configure options +File: tlbuild.info, Node: Configure options for kpathsea, Up: Library-specific configure options 7.3.1 Configure options for 'kpathsea' -------------------------------------- @@ -1924,7 +1924,7 @@ (TFM file) to generate the specified type of file dynamically. The default can be -overridden by the user in any case (*note 'kpathsea' library::). +overridden by the user in any case (*note kpathsea library::).  File: tlbuild.info, Node: Variables for configure, Prev: Library-specific configure options, Up: Configure options @@ -2300,41 +2300,23 @@ 'text' - The text mode user interface (default on Unix systems). Same - as the '-no-gui' option. + The text mode user interface (default on Unix systems, + including Macs). Same as the '-no-gui' option. - 'tcl' + 'tcl' (or "perltk" or "wizard" or "expert" or nothing) - The Tcl/Tk user interface (default on Macs and Windows). It - starts with a small number of configuration options, roughly - equivalent to what the wizard option below offers, but a + The Tcl/Tk user interface (default on Windows). It starts + with a small number of configuration options, roughly + equivalent to what the former wizard option offers, but a button 'Advanced' takes you to a screen with roughly the same - options as the 'perltk' interface. + options as the former 'perltk' interface. - 'wizard' + The default GUI requires Tcl/Tk. This is standard on Macs + (although it is considered deprecated since Catalina) and is often + already installed on GNU/Linux, or can be easily installed through + a distro package manager. For Windows, TeX Live provides a Tcl/Tk + runtime. - The wizard mode user interface, asking only minimal questions - before installing all of TeX Live. - - 'expert' - - A generic name for, currently, 'perltk'; it may select a - different GUI in the future. - - 'perltk' - - The expert GUI installer, providing access to more options. - - The 'perltk' and 'wizard' modules require the Perl/Tk module - (). if Perl/Tk is not - available, installation continues in text mode, except on Windows, - where all gui options except 'text' are diverted to the default - 'tcl' GUI. - - The 'tcl' GUI requires Tcl/Tk. This is standard on Macs and is - often already installed on GNU/Linux. For Windows, TeX Live - provides a Tcl/Tk runtime. - *-no-gui* Use the text mode installer (default except on Windows and Macs). @@ -2341,10 +2323,8 @@ *-lang* _llcode_ - By default, the GUI tries to deduce your language from the - environment. The Tcl GUI uses the language detection built into - Tcl/Tk; the Perl/Tk GUIs use the 'LC_MESSAGES' environment - variable. If that fails you can select a different language by + By default, the Tcl GUI uses the language detection built into + Tcl/Tk. If that fails you can select a different language by giving this option with a language code (based on ISO 639-1). Currently supported (but not necessarily completely translated) are: English (en, default), Czech (cs), German (de), French (fr), @@ -2375,11 +2355,10 @@ This option allows you to choose a particular mirror from the current list of active CTAN mirrors. This option is supported in - the 'text', 'wizard' and 'perltk' installer modes, and will also - offer to install from local media if available, or from a - repository specified on the command line. It's useful when the - (default) automatic redirection does not choose a good host for - you. + the 'text' and 'gui' installer modes, and will also offer to + install from local media if available, or from a repository + specified on the command line. It's useful when the (default) + automatic redirection does not choose a good host for you. *-all-options* @@ -2406,9 +2385,10 @@ *-debug-translation* - In the Perl/Tk GUI modes, this option reports any missing, or more - likely untranslated, messages to standard error. Helpful for - translators to see what remains to be done. + In the former Perl/Tk GUI modes, this option reported any missing, + or more likely untranslated, messages to standard error. Not yet + implemented for the Tcl interface. Helpful for translators to see + what remains to be done. *-force-platform* _platform_ @@ -2697,7 +2677,7 @@ Omit creating the ConTeXt cache. This is useful for redistributors. -'TEXLIVE_INSTALL_NO_IMPORT' +'TEXLIVE_INSTALL_NO_RESUME' Omit check for installing on top of a previous installation and then asking about importing previous settings. @@ -2707,6 +2687,11 @@ Omit printing the welcome message after successful installation, e.g., when testing. +'TEXLIVE_INSTALL_PAPER' + + Set the default paper size for all relevant programs; must be + either 'letter' or 'a4'. The default is 'a4'. + 'TEXLIVE_INSTALL_PREFIX' 'TEXLIVE_INSTALL_TEXDIR' @@ -2744,7 +2729,7 @@ distribution () and both are licensed under the GNU General Public License Version 2 or later. - $Id: install-tl 54143 2020-03-06 23:51:18Z karl $ + $Id: install-tl 57970 2021-02-27 14:17:34Z siepo $  File: tlbuild.info, Node: tlmgr, Next: Index, Prev: install-tl, Up: Top @@ -2983,6 +2968,13 @@ tlshell shares its message catalog with tlmgr. +*-command-logfile* _file_ + + 'tlmgr' logs the output of all programs invoked (mktexlr, mtxrun, + fmtutil, updmap) to a separate log file, by default + 'TEXMFSYSVAR/web2c/tlmgr-commands.log'. This option allows you to + specify a different file for the log. + *-debug-translation* In GUI mode, this switch tells 'tlmgr' to report any untranslated @@ -3529,11 +3521,27 @@ separated list of field names from: 'name', 'category', 'localrev', 'remoterev', 'shortdesc', 'longdesc', 'installed', 'size', 'relocatable', 'depends', 'cat-version', 'cat-date', - or 'cat-license'. In this case the requested packages' - information is listed in CSV format one package per line, and - the column information is given by the 'itemN'. The 'depends' - column contains the name of all dependencies separated by ':'. + 'cat-license', plus various 'cat-contact-*' fields (see + below). + The 'cat-*' fields all come from the TeX Catalogue + (). For each, there are two + more variants with prefix 'l' and 'r', e.g., 'lcat-version' + and 'rcat-version', which indicate the local and remote + information, respectively. The variants without 'l' and 'r' + show the most current one, which is normally the remote value. + + The requested packages' information is listed in CSV format, + one package per line, and the column information is given by + the 'itemN'. The 'depends' column contains the names of all + the dependencies separated by ':' characters. + + At this writing, the 'cat-contact-*' fields include: 'home', + 'repository', 'support', 'bugs', 'announce', 'development'. + Each may be empty or a url value. A brief description is on + the CTAN upload page for new packages: + . + *-json* In case '--json' is specified, the output is a JSON encoded @@ -4465,12 +4473,12 @@ not downgrade. Also, packages for uninstalled platforms are not installed. - 'tlmgr' saves a copy of the 'texlive.tlpdb' file used for an update -with a suffix representing the repository url, as in -'tlpkg/texlive.tlpdb.'_long-hash-string_. These can be useful for -fallback information, but if you don't like them accumulating (e.g., -'mirror.ctan.org' resolves to many different hosts, each resulting in a -possibly different hash), it's harmless to delete them. + 'tlmgr' saves one copy of the main 'texlive.tlpdb' file used for an +update with a suffix representing the repository url, as in +'tlpkg/texlive.tlpdb.main.'_long-hash-string_. Thus, even when many +mirrors are used, only one main 'tlpdb' backup is kept. For non-main +repositories, which do not generally have (m)any mirrors, no pruning of +backups is done. This action does not automatically add or remove new symlinks in system directories; you need to run 'tlmgr' *note path: tlmgr path. @@ -4513,6 +4521,8 @@ 'require-verification', value 0 or 1 (default 0), same as command-line option. +'tkfontscale', value any float. Controls the scaling of fonts in the Tk based frontends. + 'update-exclude', value: comma-separated list of packages (no space allowed). Same as the command line option '--exclude' for the action 'update'. 'verify-downloads', value 0 or 1 (default 1), same as command-line option. @@ -5097,11 +5107,11 @@ * Menu: -* tlmgr Machine-readable 'update' and 'install' output:: -* tlmgr Machine-readable 'option' output:: +* tlmgr Machine-readable update and install output:: +* tlmgr Machine-readable option output::  -File: tlbuild.info, Node: tlmgr Machine-readable 'update' and 'install' output, Next: tlmgr Machine-readable 'option' output, Up: tlmgr MACHINE-READABLE OUTPUT +File: tlbuild.info, Node: tlmgr Machine-readable update and install output, Next: tlmgr Machine-readable option output, Up: tlmgr MACHINE-READABLE OUTPUT B.12.1 Machine-readable 'update' and 'install' output ----------------------------------------------------- @@ -5219,7 +5229,7 @@ The estimated total time.  -File: tlbuild.info, Node: tlmgr Machine-readable 'option' output, Prev: tlmgr Machine-readable 'update' and 'install' output, Up: tlmgr MACHINE-READABLE OUTPUT +File: tlbuild.info, Node: tlmgr Machine-readable option output, Prev: tlmgr Machine-readable update and install output, Up: tlmgr MACHINE-READABLE OUTPUT B.12.2 Machine-readable 'option' output --------------------------------------- @@ -5329,7 +5339,7 @@ distribution () and both are licensed under the GNU General Public License Version 2 or later. - $Id: tlmgr.pl 54118 2020-03-05 22:27:22Z karl $ + $Id: tlmgr.pl 57970 2021-02-27 14:17:34Z siepo $  File: tlbuild.info, Node: Index, Prev: tlmgr, Up: Top @@ -5340,115 +5350,113 @@ [index] * Menu: -* --bindir configure option: '--prefix' '--bindir' .... +* --bindir configure option: --prefix --bindir .... (line 6) -* --bindir configure option <1>: '--enable-multiplatform'. +* --bindir configure option <1>: --enable-multiplatform. (line 6) * --build=HOST: Cross configuring. (line 6) * --disable-all-packages: Build one package. (line 6) -* --disable-all-pkgs: '--disable-all-pkgs'. - (line 6) -* --disable-bibtex8: Configure options for 'texk/bibtex-x'. +* --disable-all-pkgs: --disable-all-pkgs. (line 6) +* --disable-bibtex8: Configure options for texk/bibtex-x. (line 9) -* --disable-bibtexu: Configure options for 'texk/bibtex-x'. +* --disable-bibtexu: Configure options for texk/bibtex-x. (line 12) -* --disable-dump-share: Configure options for 'texk/web2c'. +* --disable-dump-share: Configure options for texk/web2c. (line 27) -* --disable-dvipdfmx: Configure options for 'texk/dvipdfm-x'. +* --disable-dvipdfmx: Configure options for texk/dvipdfm-x. (line 12) -* --disable-etex-synctex: Configure options for 'texk/web2c'. +* --disable-etex-synctex: Configure options for texk/web2c. (line 59) -* --disable-ipc: Configure options for 'texk/web2c'. +* --disable-ipc: Configure options for texk/web2c. (line 31) -* --disable-largefile: '--disable-largefile'. +* --disable-largefile: --disable-largefile. (line 6) +* --disable-linked-scripts: Configure options for texk/texlive. (line 6) -* --disable-linked-scripts: Configure options for 'texk/texlive'. - (line 6) -* --disable-mf-nowin: Configure options for 'texk/web2c'. +* --disable-mf-nowin: Configure options for texk/web2c. (line 34) -* --disable-missing: '--disable-missing'. (line 6) -* --disable-native-texlive-build: '--disable-native-texlive-build'. +* --disable-missing: --disable-missing. (line 6) +* --disable-native-texlive-build: --disable-native-texlive-build. (line 6) -* --disable-PROG: '--enable-PROG' '--disable-PROG'. +* --disable-PROG: --enable-PROG --disable-PROG. (line 6) -* --disable-synctex: Configure options for 'texk/web2c'. +* --disable-synctex: Configure options for texk/web2c. (line 64) -* --disable-tex: Configure options for 'texk/web2c'. +* --disable-tex: Configure options for texk/web2c. (line 37) -* --disable-web-progs: Configure options for 'texk/web2c'. +* --disable-web-progs: Configure options for texk/web2c. (line 41) -* --disable-xdvipdfmx: Configure options for 'texk/dvipdfm-x'. +* --disable-xdvipdfmx: Configure options for texk/dvipdfm-x. (line 15) -* --enable-*win for Metafont window support: Configure options for 'texk/web2c'. +* --enable-*win for Metafont window support: Configure options for texk/web2c. (line 55) -* --enable-auto-core: Configure options for 'texk/web2c'. +* --enable-auto-core: Configure options for texk/web2c. (line 45) -* --enable-compiler-warnings=LEVEL: '--enable-compiler-warnings='LEVEL. +* --enable-compiler-warnings=LEVEL: --enable-compiler-warnings=LEVEL. (line 6) * --enable-cxx-runtime-hack: Macros for compilers. (line 29) -* --enable-etex: Configure options for 'texk/web2c'. +* --enable-etex: Configure options for texk/web2c. (line 37) -* --enable-libtool-hack: Configure options for 'texk/web2c'. +* --enable-libtool-hack: Configure options for texk/web2c. (line 50) * --enable-maintainer-mode: Build system tools. (line 28) -* --enable-maintainer-mode <1>: '--enable-maintainer-mode'. +* --enable-maintainer-mode <1>: --enable-maintainer-mode. (line 6) * --enable-missing to ignore dependencies: Build one package. (line 71) -* --enable-mktextfm-default: 'kpathsea' library. (line 18) -* --enable-multiplatform: '--enable-multiplatform'. +* --enable-mktextfm-default: kpathsea library. (line 18) +* --enable-multiplatform: --enable-multiplatform. (line 6) -* --enable-PROG: '--enable-PROG' '--disable-PROG'. +* --enable-PROG: --enable-PROG --disable-PROG. (line 6) -* --enable-shared: '--enable-shared'. (line 6) -* --enable-silent-rules: '--enable-silent-rules'. +* --enable-shared: --enable-shared. (line 6) +* --enable-silent-rules: --enable-silent-rules. (line 6) -* --enable-tex-synctex: Configure options for 'texk/web2c'. +* --enable-tex-synctex: Configure options for texk/web2c. (line 59) -* --enable-texlive-build: '--disable-native-texlive-build'. +* --enable-texlive-build: --disable-native-texlive-build. (line 15) -* --enable-xi2-scrolling: Configure options for 'texk/xdvik'. +* --enable-xi2-scrolling: Configure options for texk/xdvik. (line 13) -* --enable-xindy-docs: Configure options for 'utils/xindy'. +* --enable-xindy-docs: Configure options for utils/xindy. (line 10) -* --enable-xindy-rules: Configure options for 'utils/xindy'. +* --enable-xindy-rules: Configure options for utils/xindy. (line 6) * --host=HOST: Cross configuring. (line 6) -* --libdir configure option: '--enable-multiplatform'. +* --libdir configure option: --enable-multiplatform. (line 6) * --no-clean Build option: Build problems. (line 6) -* --prefix configure option: '--prefix' '--bindir' .... +* --prefix configure option: --prefix --bindir .... (line 6) -* --with-banner-add=STR: Configure options for 'texk/web2c'. +* --with-banner-add=STR: Configure options for texk/web2c. (line 6) -* --with-clisp-runtime=FILENAME: Configure options for 'utils/xindy'. +* --with-clisp-runtime=FILENAME: Configure options for utils/xindy. (line 14) -* --with-editor=CMD: Configure options for 'texk/web2c'. +* --with-editor=CMD: Configure options for texk/web2c. (line 11) -* --with-fontconfig-includes=DIR: Configure options for 'texk/web2c'. +* --with-fontconfig-includes=DIR: Configure options for texk/web2c. (line 16) -* --with-fontconfig-libdir=DIR: Configure options for 'texk/web2c'. +* --with-fontconfig-libdir=DIR: Configure options for texk/web2c. (line 16) -* --with-gs=FILENAME: Configure options for 'texk/xdvik'. +* --with-gs=FILENAME: Configure options for texk/xdvik. (line 6) * --with-LIB-includes=DIR, -libdir: Library-specific configure options. (line 16) -* --with-libgs-includes, -libdir: Configure options for 'texk/dvisvgm'. +* --with-libgs-includes, -libdir: Configure options for texk/dvisvgm. (line 17) -* --with-system-kpathsea: 'kpathsea' library. (line 13) +* --with-system-kpathsea: kpathsea library. (line 13) * --with-system-LIB: Adding a new generic library module. (line 34) * --with-system-LIB <1>: Library-specific configure options. (line 9) -* --with-system-libgs: Configure options for 'texk/dvisvgm'. +* --with-system-libgs: Configure options for texk/dvisvgm. (line 6) -* --with-xdvi-x-toolkit: 'xdvik' package. (line 21) -* --with-xdvi-x-toolkit=KIT: Configure options for 'texk/xdvik'. +* --with-xdvi-x-toolkit: xdvik package. (line 21) +* --with-xdvi-x-toolkit=KIT: Configure options for texk/xdvik. (line 9) -* --without-libgs: Configure options for 'texk/dvisvgm'. +* --without-libgs: Configure options for texk/dvisvgm. (line 12) -* --without-ln-s: '--without-ln-s'. (line 6) -* --without-x: '--without-x'. (line 6) +* --without-ln-s: --without-ln-s. (line 6) +* --without-x: --without-x. (line 6) * -C configure option: Build in parallel. (line 11) * -j make option: Build in parallel. (line 6) * ac/withenable.ac: Adding a new program module. @@ -5461,14 +5469,14 @@ * adding a new TeX-specific library: Adding a new TeX-specific library module. (line 6) * adding to TeX Live: Extending TeX Live. (line 6) -* 'am/' top-level directory: Top-level directories. +* am/ top-level directory: Top-level directories. (line 14) * ANSI C: Declarations and definitions. (line 6) -* 'ApplicationServices' Mac framework, required by 'xetex': Prerequisites. +* ApplicationServices Mac framework, required by xetex: Prerequisites. (line 31) * asymptote: Linked scripts. (line 23) -* asymptote <1>: 'asymptote'. (line 6) +* asymptote <1>: asymptote. (line 6) * Autoconf: Overview of build system. (line 6) * autoconf macros: Autoconf macros. (line 6) @@ -5477,11 +5485,11 @@ * autoreconf, for new program: Adding a new program module. (line 76) * biber: Linked scripts. (line 23) -* bibtex-x: Configure options for 'texk/bibtex-x'. +* bibtex-x: Configure options for texk/bibtex-x. (line 6) -* bibtex8: Configure options for 'texk/bibtex-x'. +* bibtex8: Configure options for texk/bibtex-x. (line 6) -* bibtexu: Configure options for 'texk/bibtex-x'. +* bibtexu: Configure options for texk/bibtex-x. (line 6) * BSD distro: Distro builds. (line 6) * build directory, required: Building. (line 17) @@ -5493,7 +5501,7 @@ * Build script: Building. (line 6) * build system, design of: Overview of build system. (line 6) -* 'build-aux/' top-level directory: Top-level directories. +* build-aux/ top-level directory: Top-level directories. (line 30) * BUILDCC, BUILDCFLAGS, ...: Cross configuring. (line 42) * building: Building. (line 6) @@ -5505,8 +5513,8 @@ (line 6) * C99, avoided: Declarations and definitions. (line 6) -* cache file, for 'configure': Build in parallel. (line 11) -* cache for 'configure': Build in parallel. (line 6) +* cache file, for configure: Build in parallel. (line 11) +* cache for configure: Build in parallel. (line 6) * callexe.c: Macros for Windows. (line 32) * CC: Variables for configure. (line 10) @@ -5520,43 +5528,43 @@ (line 18) * CLISP: Variables for configure. (line 17) -* CLISP <1>: Configure options for 'utils/xindy'. +* CLISP <1>: Configure options for utils/xindy. (line 14) -* 'clisp', required by 'xindy': Prerequisites. (line 35) -* 'Cocoa' Mac framework, required by 'xetex': Prerequisites. (line 31) +* clisp, required by xindy: Prerequisites. (line 35) +* Cocoa Mac framework, required by xetex: Prerequisites. (line 31) * coding conventions: Coding conventions. (line 6) * compilers, C and C++11: Prerequisites. (line 6) * config.guess, config.sub, ...: Top-level directories. (line 30) -* 'configure' options: Configure options. (line 6) -* 'configure' options, for 'bibtex-x': Configure options for 'texk/bibtex-x'. +* configure options: Configure options. (line 6) +* configure options, for bibtex-x: Configure options for texk/bibtex-x. (line 6) -* 'configure' options, for 'dvipdfm-x': Configure options for 'texk/dvipdfm-x'. +* configure options, for dvipdfm-x: Configure options for texk/dvipdfm-x. (line 6) -* 'configure' options, for 'dvisvgm': Configure options for 'texk/dvisvgm'. +* configure options, for dvisvgm: Configure options for texk/dvisvgm. (line 6) -* 'configure' options, for 'kpathsea': Configure options for 'kpathsea'. +* configure options, for kpathsea: Configure options for kpathsea. (line 6) -* 'configure' options, for 'texk/texlive': Configure options for 'texk/texlive'. +* configure options, for texk/texlive: Configure options for texk/texlive. (line 6) -* 'configure' options, for 'web2c': Configure options for 'texk/web2c'. +* configure options, for web2c: Configure options for texk/web2c. (line 6) -* 'configure' options, for 'xdvik': Configure options for 'texk/xdvik'. +* configure options, for xdvik: Configure options for texk/xdvik. (line 6) -* 'configure' options, for 'xindy': Configure options for 'utils/xindy'. +* configure options, for xindy: Configure options for utils/xindy. (line 6) -* 'configure' options, global: Global configure options. +* configure options, global: Global configure options. (line 6) -* 'configure' options, library-specific: Library-specific configure options. +* configure options, library-specific: Library-specific configure options. (line 6) -* 'configure' options, program-specific: Program-specific configure options. +* configure options, program-specific: Program-specific configure options. (line 6) -* 'configure' variables: Variables for configure. +* configure variables: Variables for configure. (line 6) * configure.ac: Adding a new program module. (line 45) * configuring, for cross compilation: Cross configuring. (line 6) -* 'const': Const. (line 6) +* const: Const. (line 6) * continuous integration: Continuous integration. (line 6) * conventions, coding: Coding conventions. (line 6) @@ -5565,7 +5573,7 @@ * cross compilation: Cross compilation. (line 6) * cross compilation configuring: Cross configuring. (line 6) * cross compilation problems: Cross problems. (line 6) -* cross compilation, with host binary: 'xdvik' package. (line 14) +* cross compilation, with host binary: xdvik package. (line 14) * ctangle: Cross problems. (line 26) * CXX: Variables for configure. (line 11) @@ -5575,7 +5583,7 @@ * declarations before statements, avoiding: Declarations and definitions. (line 6) * dependencies, with several output files: Build in parallel. (line 6) -* DESTDIR: '--prefix' '--bindir' .... +* DESTDIR: --prefix --bindir .... (line 9) * directories, for installation: Installation directories. (line 6) @@ -5582,33 +5590,32 @@ * directories, top-level: Top-level directories. (line 6) * discards qualifiers warning: Const. (line 30) -* 'dist' and 'distcheck' targets for 'make': Build distribution. - (line 6) +* dist and distcheck targets for make: Build distribution. (line 6) * distribution tarball, making: Build distribution. (line 6) * distro, building for: Distro builds. (line 6) -* dvipdfm-x: Configure options for 'texk/dvipdfm-x'. +* dvipdfm-x: Configure options for texk/dvipdfm-x. (line 6) -* dvipdfmx: Configure options for 'texk/dvipdfm-x'. +* dvipdfmx: Configure options for texk/dvipdfm-x. (line 6) -* dvisvgm: Configure options for 'texk/dvisvgm'. +* dvisvgm: Configure options for texk/dvisvgm. (line 6) * engine, adding new: Adding a new program module. (line 104) * engine, building one: Build one engine. (line 6) -* environment variables, for 'configure': Configure options. (line 16) -* exec_prefix: '--enable-multiplatform'. +* environment variables, for configure: Configure options. (line 16) +* exec_prefix: --enable-multiplatform. (line 6) * extending TeX Live: Extending TeX Live. (line 6) -* 'extern' functions: Declarations and definitions. +* extern functions: Declarations and definitions. (line 41) * failure to build: Build problems. (line 6) * flags, macros for library and header: Macros for library and header flags. (line 6) -* 'fontconfig' library, required by 'xetex': Prerequisites. (line 31) +* fontconfig library, required by xetex: Prerequisites. (line 31) * FreeType: Prerequisites. (line 11) -* 'freetype' cross compiling: Cross problems. (line 13) -* freetype library: 'freetype' library. (line 6) -* freetype-config: 'freetype' library. (line 13) +* freetype cross compiling: Cross problems. (line 13) +* freetype library: freetype library. (line 6) +* freetype-config: freetype library. (line 13) * freetype-config <1>: Variables for configure. (line 24) * FT2_CONFIG: Variables for configure. @@ -5618,14 +5625,14 @@ (line 6) * generic library module, adding: Adding a new generic library module. (line 6) -* Ghostscript location for Xdvik: Configure options for 'texk/xdvik'. +* Ghostscript location for Xdvik: Configure options for texk/xdvik. (line 6) * git-svn: Transfer from Subversion to Github. (line 6) -* global 'configure' options: Global configure options. +* global configure options: Global configure options. (line 6) -* 'gmake', required: Prerequisites. (line 11) -* GNU 'make', required: Prerequisites. (line 11) +* gmake, required: Prerequisites. (line 11) +* GNU make, required: Prerequisites. (line 11) * GNU tools, needed for building: Build system tools. (line 6) * GNU/Linux distro: Distro builds. (line 6) * Gnulib, used for common files: Top-level directories. @@ -5638,23 +5645,23 @@ * ICU_CONFIG: Variables for configure. (line 22) * infrastructure, tools needed for: Build system tools. (line 6) -* 'inst/' top-level directory: Top-level directories. +* inst/ top-level directory: Top-level directories. (line 39) * install-tl, TeX Live installer: Installing. (line 8) * installation directories: Installation directories. (line 6) * installing: Installing. (line 6) -* interprocess communication: Configure options for 'texk/web2c'. +* interprocess communication: Configure options for texk/web2c. (line 31) * introduction: Introduction. (line 6) -* iteration through sources, by 'configure' and 'make': Build iteration. +* iteration through sources, by configure and make: Build iteration. (line 6) -* kpathsea library: 'kpathsea' library. (line 6) -* kpathsea.ac: 'kpathsea' library. (line 18) -* kpse-libpng-flags.m4: 'png' library. (line 46) +* kpathsea library: kpathsea library. (line 6) +* kpathsea.ac: kpathsea library. (line 18) +* kpse-libpng-flags.m4: png library. (line 46) * kpse-pkgs.m4: Overview of build system. (line 30) -* kpse-zlib-flags.m4: 'zlib' library. (line 6) +* kpse-zlib-flags.m4: zlib library. (line 6) * kpsewhich: Variables for configure. (line 30) * KPSEWHICH: Variables for configure. @@ -5693,7 +5700,7 @@ (line 8) * KPSE_LIBPNG_FLAGS: Macros for library and header flags. (line 10) -* KPSE_LIBPNG_FLAGS <1>: 'png' library. (line 46) +* KPSE_LIBPNG_FLAGS <1>: png library. (line 46) * kpse_libs_pkgs: Adding a new generic library module. (line 6) * KPSE_LIB_FLAGS: Macros for library and header flags. @@ -5709,10 +5716,10 @@ (line 6) * kpse_texlibs_pkgs: Adding a new TeX-specific library module. (line 11) -* KPSE_TRY_LIB: 'png' library. (line 18) +* KPSE_TRY_LIB: png library. (line 18) * KPSE_TRY_LIB <1>: Adding a new generic library module. (line 20) -* KPSE_TRY_LIBXX: 'png' library. (line 31) +* KPSE_TRY_LIBXX: png library. (line 31) * KPSE_TRY_LIBXX <1>: Adding a new generic library module. (line 20) * kpse_utils_pkgs: Adding a new program module. @@ -5722,46 +5729,44 @@ (line 11) * KPSE_WITH_TEXLIB: Adding a new TeX-specific library module. (line 14) -* large file support: '--disable-largefile'. - (line 6) +* large file support: --disable-largefile. (line 6) * LATEX: Variables for configure. (line 40) * layout of sources: Layout and infrastructure. (line 6) -* LFS (large file support): '--disable-largefile'. - (line 6) -* libexpat, dependency of 'libfontconfig': Configure options for 'texk/web2c'. +* LFS (large file support): --disable-largefile. (line 6) +* libexpat, dependency of libfontconfig: Configure options for texk/web2c. (line 50) -* libfontconfig, hack for avoiding linking dependencies: Configure options for 'texk/web2c'. +* libfontconfig, hack for avoiding linking dependencies: Configure options for texk/web2c. (line 50) * libfreetype: Variables for configure. (line 24) -* 'libfreetype', and 'const': Const. (line 21) -* libpng library: 'png' library. (line 6) +* libfreetype, and const: Const. (line 21) +* libpng library: png library. (line 6) * library module, generic, adding: Adding a new generic library module. (line 6) * library module, TeX-specific, adding: Adding a new TeX-specific library module. (line 6) * library modules: Library modules. (line 6) -* library-specific 'configure' options: Library-specific configure options. +* library-specific configure options: Library-specific configure options. (line 6) -* 'libsigsegv', required by 'xindy': Prerequisites. (line 35) +* libsigsegv, required by xindy: Prerequisites. (line 35) * libstc++, statically linking: Macros for compilers. (line 29) * Libtool: Overview of build system. (line 6) -* libtool, hack for avoiding excessive linking: Configure options for 'texk/web2c'. +* libtool, hack for avoiding excessive linking: Configure options for texk/web2c. (line 50) -* libXt: Configure options for 'texk/web2c'. +* libXt: Configure options for texk/web2c. (line 22) * linked scripts: Linked scripts. (line 6) * linking C++ libraries statically: Macros for compilers. (line 29) -* lisp.run, lisp.exe: Configure options for 'utils/xindy'. +* lisp.run, lisp.exe: Configure options for utils/xindy. (line 14) -* LittleEndian architectures: Configure options for 'texk/web2c'. +* LittleEndian architectures: Configure options for texk/web2c. (line 27) -* 'm4/' top-level directory: Top-level directories. +* m4/ top-level directory: Top-level directories. (line 14) * macros, for compilers: Macros for compilers. (line 6) @@ -5776,19 +5781,19 @@ * MAKE: Variables for configure. (line 33) * make -t: Build system tools. (line 43) -* 'make' rules, verbose vs. silent: '--enable-silent-rules'. +* make rules, verbose vs. silent: --enable-silent-rules. (line 6) * Makefile.am: Adding a new program module. (line 46) -* mf-nowin: Configure options for 'texk/web2c'. +* mf-nowin: Configure options for texk/web2c. (line 34) -* 'mingw32': Cross configuring. (line 27) +* mingw32: Cross configuring. (line 27) * MINGW32, Automake conditional: Macros for Windows. (line 20) -* mktex.ac: 'kpathsea' library. (line 18) -* mktextfm: 'kpathsea' library. (line 18) +* mktex.ac: kpathsea library. (line 18) +* mktextfm: kpathsea library. (line 18) * modules, for libraries: Library modules. (line 6) * modules, for programs: Program modules. (line 6) -* motif: Configure options for 'texk/xdvik'. +* motif: Configure options for texk/xdvik. (line 9) * native cross compilation: Cross compilation. (line 10) * NEWPROG-SRC, original source subdirectory: Adding a new program module. @@ -5796,7 +5801,7 @@ * OBJCXX=OBJC-COMPILER: Build one package. (line 78) * one engine, building: Build one engine. (line 6) * one package, building: Build one package. (line 6) -* OpenGL, required for Asymptote: 'asymptote'. (line 6) +* OpenGL, required for Asymptote: asymptote. (line 6) * operating system distribution, building for: Distro builds. (line 6) * otangle: Cross problems. (line 26) * overall build process: Building. (line 6) @@ -5803,21 +5808,19 @@ * parallel build: Build in parallel. (line 6) * paths, for installation: Installation directories. (line 6) -* PDF files, size of: '--disable-largefile'. - (line 11) +* PDF files, size of: --disable-largefile. (line 11) * PDFLATEX: Variables for configure. (line 41) * PERL: Variables for configure. (line 39) -* 'perl', required by 'web2c', etc.: Prerequisites. (line 23) +* perl, required by web2c, etc.: Prerequisites. (line 23) * PKG_CONFIG: Variables for configure. (line 23) * plain.tex, not in source tree: Installing. (line 8) -* png library: 'png' library. (line 6) -* PostScript files, size of: '--disable-largefile'. - (line 11) +* png library: png library. (line 6) +* PostScript files, size of: --disable-largefile. (line 11) * Preining, Norbert: Distro builds. (line 54) -* preloaded binaries: Configure options for 'texk/web2c'. +* preloaded binaries: Configure options for texk/web2c. (line 45) * prerequisites for building: Prerequisites. (line 6) * problems with build: Build problems. (line 6) @@ -5824,9 +5827,9 @@ * program module, adding: Adding a new program module. (line 6) * program modules: Program modules. (line 6) -* program-specific 'configure' options: Program-specific configure options. +* program-specific configure options: Program-specific configure options. (line 6) -* proxy build system: 'png' library. (line 36) +* proxy build system: png library. (line 36) * reautoconf: Build system tools. (line 28) * reautoconf, for new program: Adding a new program module. (line 89) @@ -5833,7 +5836,7 @@ * requirements for building: Prerequisites. (line 6) * runscript.exe: Macros for Windows. (line 25) * scripts, linked and not maintained: Linked scripts. (line 6) -* scrolling, smooth: Configure options for 'texk/xdvik'. +* scrolling, smooth: Configure options for texk/xdvik. (line 13) * SED: Variables for configure. (line 34) @@ -5840,8 +5843,7 @@ * setup macros, general: General setup macros. (line 6) * shared libraries, using vs. avoiding: Distro builds. (line 11) -* size of PDF and PS files: '--disable-largefile'. - (line 11) +* size of PDF and PS files: --disable-largefile. (line 11) * size of source tree: Build one package. (line 53) * source code declarations: Declarations and definitions. (line 6) @@ -5849,8 +5851,8 @@ * source tree: Layout and infrastructure. (line 6) * squeeze: Cross problems. (line 13) -* squeeze/configure.ac: 'xdvik' package. (line 14) -* 'static' functions: Declarations and definitions. +* squeeze/configure.ac: xdvik package. (line 14) +* static functions: Declarations and definitions. (line 35) * static linking for C++: Macros for compilers. (line 29) @@ -5859,12 +5861,12 @@ * Subversion repository: Build system tools. (line 38) * support files, separate from build: Installing. (line 8) * symlinks, used for scripts: Linked scripts. (line 6) -* synctex: Configure options for 'texk/web2c'. +* synctex: Configure options for texk/web2c. (line 59) -* synctex <1>: Configure options for 'texk/web2c'. +* synctex <1>: Configure options for texk/web2c. (line 64) * system distribution, building for: Distro builds. (line 6) -* t1utils package: 't1utils' package. (line 6) +* t1utils package: t1utils package. (line 6) * tangle: Cross problems. (line 26) * tests, running: Overview of build system. (line 6) @@ -5889,13 +5891,13 @@ * use-commit-times, Subversion: Build system tools. (line 38) * variable declarations, in source code: Declarations and definitions. (line 52) -* variables for 'configure': Variables for configure. +* variables for configure: Variables for configure. (line 6) * warning, discards qualifiers: Const. (line 30) * WARNING_C[XX]FLAGS: Macros for compilers. (line 9) * web2c program: Cross problems. (line 13) -* web2c.ac: Configure options for 'texk/web2c'. +* web2c.ac: Configure options for texk/web2c. (line 37) * wget: Linked scripts. (line 23) * WIN32, Automake conditional: Macros for Windows. (line 16) @@ -5904,33 +5906,33 @@ * Windows, macros for: Macros for Windows. (line 6) * withenable.ac, for new modules: Adding a new program module. (line 14) -* 'Work/' top-level directory: Top-level directories. +* Work/ top-level directory: Top-level directories. (line 39) * wrapper binary for scripts on Windows: Linked scripts. (line 6) -* wrapper build system: 'freetype' library. (line 6) -* X toolkit: Configure options for 'texk/web2c'. +* wrapper build system: freetype library. (line 6) +* X toolkit: Configure options for texk/web2c. (line 22) * X11 development, required by X clients: Prerequisites. (line 27) -* X11 headers, and 'const': Const. (line 21) -* xasy: 'asymptote'. (line 6) -* xaw: Configure options for 'texk/xdvik'. +* X11 headers, and const: Const. (line 21) +* xasy: asymptote. (line 6) +* xaw: Configure options for texk/xdvik. (line 9) -* xdvik: 'xdvik' package. (line 6) -* xdvik <1>: Configure options for 'texk/xdvik'. +* xdvik: xdvik package. (line 6) +* xdvik <1>: Configure options for texk/xdvik. (line 6) -* xdvipdfmx: Configure options for 'texk/dvipdfm-x'. +* xdvipdfmx: Configure options for texk/dvipdfm-x. (line 6) * xindy: Linked scripts. (line 23) -* xindy <1>: 'xindy' package. (line 6) -* xindy <2>: Configure options for 'utils/xindy'. +* xindy <1>: xindy package. (line 6) +* xindy <2>: Configure options for utils/xindy. (line 6) -* 'xindy' cross compiling requires 'clisp': Cross problems. (line 33) -* XInput: Configure options for 'texk/xdvik'. +* xindy cross compiling requires clisp: Cross problems. (line 33) +* XInput: Configure options for texk/xdvik. (line 13) -* Xlib: Configure options for 'texk/web2c'. +* Xlib: Configure options for texk/web2c. (line 22) * xz: Linked scripts. (line 23) -* zlib library: 'zlib' library. (line 6) +* zlib library: zlib library. (line 6)  @@ -5945,391 +5947,396 @@ Node: Build in parallel11474 Node: Build distribution12078 Node: Build one package12726 -Node: Build one engine16373 -Node: Cross compilation17887 -Node: Cross configuring19167 -Node: Cross problems20844 -Node: Installing22506 -Node: Installation directories23526 -Node: Linked scripts25344 -Node: Distro builds26835 -Node: Layout and infrastructure29211 -Node: Build system tools30042 -Node: Top-level directories32259 -Node: Autoconf macros34495 -Node: General setup macros35257 -Node: Macros for programs36132 -Node: Macros for compilers36933 -Node: Macros for libraries38341 -Node: Macros for library and header flags38767 -Node: Macros for Windows40678 -Node: Library modules42265 -Node: 'png' library42762 -Node: 'zlib' library45114 -Node: 'freetype' library45635 -Node: 'kpathsea' library46337 -Node: Program modules47720 -Node: 't1utils' package48156 -Node: 'xindy' package48705 -Node: 'xdvik' package49825 -Node: 'asymptote'50890 -Node: Extending TeX Live51390 -Node: Adding a new program module52173 -Node: Adding a new generic library module57306 -Node: Adding a new TeX-specific library module59535 -Node: Configure options60233 -Node: Global configure options61614 -Node: '--disable-native-texlive-build'62182 -Node: '--prefix' '--bindir' ...63150 -Node: '--disable-largefile'63698 -Node: '--disable-missing'64248 -Node: '--enable-compiler-warnings='LEVEL64655 -Node: '--enable-cxx-runtime-hack'65317 -Node: '--enable-maintainer-mode'65743 -Node: '--enable-multiplatform'66278 -Node: '--enable-shared'66857 -Node: '--enable-silent-rules'67234 -Node: '--without-ln-s'67692 -Node: '--without-x'68045 -Node: Program-specific configure options68237 -Node: '--enable-PROG' '--disable-PROG'68900 -Node: '--disable-all-pkgs'69179 -Node: Configure options for 'texk/web2c'69970 -Node: Configure options for 'texk/bibtex-x'72514 -Node: Configure options for 'texk/dvipdfm-x'73063 -Node: Configure options for 'texk/dvisvgm'73845 -Node: Configure options for 'texk/texlive'74732 -Node: Configure options for 'texk/xdvik'75159 -Node: Configure options for 'utils/xindy'75786 -Node: Library-specific configure options76680 -Node: Configure options for 'kpathsea'77643 -Node: Variables for configure78351 -Node: Coding conventions79777 -Node: Declarations and definitions80492 -Node: Const82666 -Node: Continuous integration84530 -Node: Transfer from Subversion to Github85194 -Node: Automatic update of the Git mirror87356 -Node: CI testing on Travis-CI87938 -Node: Releases on Github88647 -Node: install-tl89087 -Node: install-tl NAME89456 -Node: install-tl SYNOPSIS89614 -Node: install-tl DESCRIPTION89872 -Node: install-tl REFERENCES90932 -Node: install-tl OPTIONS91456 -Ref: install-tl *-gui* [[=]_module_]91797 -Ref: install-tl 'text'92005 -Ref: install-tl 'tcl'92125 -Ref: install-tl 'wizard'92467 -Ref: install-tl 'expert'92600 -Ref: install-tl 'perltk'92722 -Ref: install-tl *-no-gui*93268 -Ref: install-tl *-lang* _llcode_93358 -Ref: install-tl *-repository* _url|path_94114 -Ref: install-tl *-select-repository*95002 -Ref: install-tl *-all-options*95438 -Ref: install-tl *-custom-bin* _path_95693 -Ref: install-tl *-debug-translation*96527 -Ref: install-tl *-force-platform* _platform_96746 -Ref: install-tl *-help*, *--help*, *-?*96990 -Ref: install-tl *-in-place*97403 -Ref: install-tl *-init-from-profile* _profile_file_97948 -Ref: install-tl *-logfile* _file_98217 -Ref: install-tl *-no-cls*98568 -Ref: install-tl *-no-persistent-downloads*98716 -Ref: install-tl *-persistent-downloads*98741 -Ref: install-tl *-no-verify-downloads*99359 -Ref: install-tl *-non-admin*99722 -Ref: install-tl *-portable*99815 -Ref: install-tl *-print-platform*99954 -Ref: install-tl *-profile* _profile_file_100152 -Ref: install-tl *-q*100373 -Ref: install-tl *-scheme* _scheme_100435 -Ref: install-tl *-v*100909 -Ref: install-tl *-version*, *--version*101064 -Node: install-tl PROFILES101198 -Ref: install-tl 'instopt_adjustpath' (default 0 on Unix, 1 on Windows)104064 -Ref: install-tl 'instopt_adjustrepo' (default 1)104140 -Ref: install-tl 'instopt_letter' (default 0)104277 -Ref: install-tl 'instopt_portable' (default 0)104368 -Ref: install-tl 'instopt_write18_restricted' (default 1)104464 -Node: install-tl ENVIRONMENT VARIABLES105803 -Ref: install-tl 'TEXLIVE_DOWNLOADER'106181 -Ref: install-tl 'TL_DOWNLOAD_PROGRAM'106204 -Ref: install-tl 'TL_DOWNLOAD_ARGS'106224 -Ref: install-tl 'TEXLIVE_INSTALL_ENV_NOCHECK'106428 -Ref: install-tl 'TEXLIVE_INSTALL_NO_CONTEXT_CACHE'106630 -Ref: install-tl 'TEXLIVE_INSTALL_NO_IMPORT'106739 -Ref: install-tl 'TEXLIVE_INSTALL_NO_WELCOME'106891 -Ref: install-tl 'TEXLIVE_INSTALL_PREFIX'107013 -Ref: install-tl 'TEXLIVE_INSTALL_TEXDIR'107039 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFCONFIG'107070 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFVAR'107098 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFHOME'107127 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFLOCAL'107157 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFSYSCONFIG'107191 -Ref: install-tl 'TEXLIVE_INSTALL_TEXMFSYSVAR'107222 -Ref: install-tl 'NOPERLDOC'107593 -Node: install-tl AUTHORS AND COPYRIGHT107657 -Node: tlmgr108070 -Node: tlmgr NAME108555 -Node: tlmgr SYNOPSIS108687 -Node: tlmgr DESCRIPTION108877 -Node: tlmgr EXAMPLES109976 -Ref: tlmgr 'tlmgr option repository ctan'110227 -Ref: tlmgr 'tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet'110299 -Ref: tlmgr 'tlmgr update --list'110904 -Ref: tlmgr 'tlmgr update --all'110997 -Ref: tlmgr 'tlmgr info' _what_111154 -Node: tlmgr OPTIONS111416 -Ref: tlmgr *--repository* _url|path_111936 -Ref: tlmgr '/some/local/dir'113122 -Ref: tlmgr 'file:/some/local/dir'113151 -Ref: tlmgr 'ctan'113224 -Ref: tlmgr 'http://mirror.ctan.org/systems/texlive/tlnet'113277 -Ref: tlmgr 'http://server/path/to/tlnet'113618 -Ref: tlmgr 'https://server/path/to/tlnet'113999 -Ref: tlmgr 'ftp://server/path/to/tlnet'114467 -Ref: tlmgr 'user at machine:/path/to/tlnet'114599 -Ref: tlmgr 'scp://user at machine/path/to/tlnet'114640 -Ref: tlmgr 'ssh://user at machine/path/to/tlnet'114681 -Ref: tlmgr *--gui* [_action_]115074 -Ref: tlmgr *--gui-lang* _llcode_115887 -Ref: tlmgr *--debug-translation*116623 -Ref: tlmgr *--machine-readable*116826 -Ref: tlmgr *--no-execute-actions*117094 -Ref: tlmgr *--package-logfile* _file_117287 -Ref: tlmgr *--pause*117541 -Ref: tlmgr *--persistent-downloads*117696 -Ref: tlmgr *--no-persistent-downloads*117724 -Ref: tlmgr *--pin-file*118218 -Ref: tlmgr *--usermode*118436 -Ref: tlmgr *--usertree* _dir_118556 -Ref: tlmgr *--verify-repo=[none|main|all]*118682 -Node: tlmgr ACTIONS119581 -Node: tlmgr help120442 -Node: tlmgr version120919 -Node: tlmgr backup121182 -Ref: tlmgr *backup [_option_...] --all*121353 -Ref: tlmgr *backup [_option_...] _pkg_...*121386 -Ref: tlmgr *--backupdir* _directory_122452 -Ref: tlmgr *--all*122669 -Ref: tlmgr *--clean*[=_N_]122921 -Ref: tlmgr *--dry-run*123248 -Node: tlmgr candidates _pkg_123378 -Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]123733 -Ref: tlmgr *depends*124247 -Ref: tlmgr *executes*124589 -Ref: tlmgr *files*124704 -Ref: tlmgr *runfiles*124840 -Ref: tlmgr *texmfdbs*124977 -Ref: tlmgr - all items in 'TEXMFDBS' have the '!!' prefix.125207 -Ref: tlmgr - all items in 'TEXMFBDS' have an 'ls-R' file (if they exist at all).125283 -Ref: tlmgr - all items in 'TEXMF' with '!!' are listed in 'TEXMFDBS'.125348 -Ref: tlmgr - all items in 'TEXMF' with an 'ls-R' file are listed in 'TEXMFDBS'.125423 -Ref: tlmgr *--use-svn*125448 -Node: tlmgr conf125589 -Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*125877 -Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*125941 -Node: tlmgr dump-tlpdb [_option_...] [--json]128356 -Ref: tlmgr *--local*128789 -Ref: tlmgr *--remote*128828 -Ref: tlmgr *--json*128866 -Node: tlmgr generate129437 -Ref: tlmgr *generate [_option_...] language*129633 -Ref: tlmgr *generate [_option_...] language.dat*129672 -Ref: tlmgr *generate [_option_...] language.def*129711 -Ref: tlmgr *generate [_option_...] language.dat.lua*129754 -Ref: tlmgr *--dest* _output_file_132081 -Ref: tlmgr *--localcfg* _local_conf_file_132657 -Ref: tlmgr *--rebuild-sys*132780 -Node: tlmgr gui133595 -Node: tlmgr info133773 -Ref: tlmgr *info [_option_...] _pkg_...*133935 -Ref: tlmgr *info [_option_...] collections*133969 -Ref: tlmgr *info [_option_...] schemes*133999 -Ref: tlmgr *--list*135529 -Ref: tlmgr *--only-installed*135843 -Ref: tlmgr *--only-remote*136031 -Ref: tlmgr *--data 'item1,item2,...'*136335 -Ref: tlmgr *--json* 1136916 -Node: tlmgr init-usertree137299 -Node: tlmgr install [_option_...] _pkg_...137680 -Ref: tlmgr *--dry-run* 1138188 -Ref: tlmgr *--file*138305 -Ref: tlmgr *--force*138527 -Ref: tlmgr *--no-depends*138747 -Ref: tlmgr *--no-depends-at-all*138906 -Ref: tlmgr *--reinstall*139306 -Ref: tlmgr *--with-doc*139684 -Ref: tlmgr *--with-src*139697 -Node: tlmgr key140425 -Ref: tlmgr *key list*140583 -Ref: tlmgr *key add _file_*140601 -Ref: tlmgr *key remove _keyid_*140623 -Node: tlmgr list141217 -Node: tlmgr option141379 -Ref: tlmgr *option [--json] [show]*141534 -Ref: tlmgr *option [--json] showall|help*141565 -Ref: tlmgr *option _key_ [_value_]*141591 -Node: tlmgr paper146169 -Ref: tlmgr *paper [a4|letter]*146318 -Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>146394 -Ref: tlmgr *paper --json*146409 -Node: tlmgr path147624 -Ref: tlmgr *path [--w32mode=user|admin] add*147785 -Ref: tlmgr *path [--w32mode=user|admin] remove*147822 -Node: tlmgr pinning149307 -Ref: tlmgr 'pinning show'149548 -Ref: tlmgr 'pinning add' _repo_ _pkgglob_...149621 -Ref: tlmgr 'pinning remove' _repo_ _pkgglob_...149740 -Ref: tlmgr 'pinning remove _repo_ --all'149893 -Node: tlmgr platform149947 -Ref: tlmgr *platform list|add|remove _platform_...*150133 -Ref: tlmgr *platform set _platform_*150160 -Ref: tlmgr *platform set auto*150181 -Ref: tlmgr *--dry-run* 2151058 -Node: tlmgr postaction151177 -Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*151407 -Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*151481 -Ref: tlmgr *--w32mode=[user|admin]*151796 -Ref: tlmgr *--fileassocmode=[1|2]*152212 -Ref: tlmgr *--all* 1152497 -Node: tlmgr print-platform152552 -Node: tlmgr print-platform-info152883 -Node: tlmgr remove [_option_...] _pkg_...153183 -Ref: tlmgr *--all* 2153667 -Ref: tlmgr *--backup*153777 -Ref: tlmgr *--backupdir* _directory_ 1153803 -Ref: tlmgr *--no-depends* 1154208 -Ref: tlmgr *--no-depends-at-all* 1154270 -Ref: tlmgr *--force* 1154373 -Ref: tlmgr *--dry-run* 3154846 -Node: tlmgr repository155182 -Ref: tlmgr *repository list*155370 -Ref: tlmgr *repository list _path|url|tag_*155404 -Ref: tlmgr *repository add _path_ [_tag_]*155437 -Ref: tlmgr *repository remove _path|tag_*155469 -Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*155523 -Ref: tlmgr *repository status*155544 -Ref: tlmgr The tag (which can be the same as the url);156771 -Node: tlmgr restore157249 -Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*157428 -Ref: tlmgr *restore [_option_...] --all*157458 -Ref: tlmgr *--all* 3158158 -Ref: tlmgr *--backupdir* _directory_ 2158372 -Ref: tlmgr *--dry-run* 4158553 -Ref: tlmgr *--force* 2158685 -Ref: tlmgr *--json* 2158731 -Node: tlmgr search159058 -Ref: tlmgr *search [_option_...] _what_*159222 -Ref: tlmgr *search [_option_...] --file _what_*159259 -Ref: tlmgr *search [_option_...] --all _what_*159295 -Ref: tlmgr *--file* 1159515 -Ref: tlmgr *--all* 4159577 -Ref: tlmgr *--global*159666 -Ref: tlmgr *--word*159793 -Node: tlmgr shell160108 -Ref: tlmgr protocol160843 -Ref: tlmgr help 1160907 -Ref: tlmgr version 1160960 -Ref: tlmgr quit, end, bye, byebye, EOF161028 -Ref: tlmgr restart161049 -Ref: tlmgr load [local|remote]161172 -Ref: tlmgr save161242 -Ref: tlmgr get [_var_] =item set [_var_ [_val_]]161365 -Node: tlmgr show161966 -Node: tlmgr uninstall162133 -Node: tlmgr update [_option_...] [_pkg_...]162363 -Ref: tlmgr *--all* 5162734 -Ref: tlmgr *--self*164913 -Ref: tlmgr *--dry-run* 5165677 -Ref: tlmgr *--list* [_pkg_]165854 -Ref: tlmgr *--exclude* _pkg_166543 -Ref: tlmgr *--no-auto-remove* [_pkg_...]167343 -Ref: tlmgr *--no-auto-install* [_pkg_...]167827 -Ref: tlmgr *--reinstall-forcibly-removed*168589 -Ref: tlmgr *--backup* 1169124 -Ref: tlmgr *--backupdir* _directory_ 3169150 -Ref: tlmgr *--no-depends* 2170316 -Ref: tlmgr *--no-depends-at-all* 2170519 -Ref: tlmgr *--force* 3170622 -Node: tlmgr CONFIGURATION FILE FOR TLMGR171642 -Ref: tlmgr 'auto-remove', value 0 or 1 (default 1), same as command-line option.172649 -Ref: tlmgr 'gui-expertmode', value 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.172786 -Ref: tlmgr 'gui-lang' _llcode_, with a language code value as with the command-line option.172868 -Ref: tlmgr 'no-checksums', value 0 or 1 (default 0, see below).172922 -Ref: tlmgr 'persistent-downloads', value 0 or 1 (default 1), same as command-line option.173002 -Ref: tlmgr 'require-verification', value 0 or 1 (default 0), same as command-line option.173082 -Ref: tlmgr 'update-exclude', value: comma-separated list of packages (no space allowed). Same as the command line option '--exclude' for the action 'update'.173230 -Ref: tlmgr 'verify-downloads', value 0 or 1 (default 1), same as command-line option.173306 -Ref: tlmgr 'allowed-actions' _action1_ [,_action_,...] The value is a comma-separated list of 'tlmgr' actions which are allowed to be executed when 'tlmgr' is invoked in system mode (that is, without '--usermode').173575 -Node: tlmgr CRYPTOGRAPHIC VERIFICATION174663 -Node: tlmgr Configuration of GnuPG invocation176836 -Node: tlmgr USER MODE177474 -Node: tlmgr User mode install180320 -Node: tlmgr User mode backup, restore, remove, update181464 -Node: tlmgr User mode generate, option, paper181906 -Node: tlmgr MULTIPLE REPOSITORIES182282 -Node: tlmgr Pinning184011 -Node: tlmgr GUI FOR TLMGR185934 -Node: tlmgr Main display187583 -Node: tlmgr Display configuration area187835 -Ref: tlmgr Status188196 -Ref: tlmgr Category188360 -Ref: tlmgr Match188546 -Ref: tlmgr Selection188727 -Ref: tlmgr Display configuration buttons188931 -Node: tlmgr Package list area189114 -Ref: tlmgr a checkbox189698 -Ref: tlmgr package name189834 -Ref: tlmgr local revision (and version)189933 -Ref: tlmgr remote revision (and version)190308 -Ref: tlmgr short description190605 -Node: tlmgr Main display action buttons190650 -Ref: tlmgr Update all installed190916 -Ref: tlmgr Update191288 -Ref: tlmgr Install191338 -Ref: tlmgr Remove191524 -Ref: tlmgr Backup191702 -Node: tlmgr Menu bar191859 -Ref: tlmgr 'tlmgr' menu192082 -Ref: tlmgr 'Options menu'192390 -Ref: tlmgr 'Actions menu'193473 -Ref: tlmgr 'Help menu'193901 -Node: tlmgr GUI options194035 -Ref: tlmgr '-background' _color_194281 -Ref: tlmgr '-font "' _fontname_ _fontsize_ '"'194346 -Ref: tlmgr '-foreground' _color_194504 -Ref: tlmgr '-geometry' _geomspec_194556 -Ref: tlmgr '-xrm' _xresource_194748 -Node: tlmgr MACHINE-READABLE OUTPUT195017 -Node: tlmgr Machine-readable 'update' and 'install' output195833 -Ref: tlmgr 'location-url' _location_197115 -Ref: tlmgr 'total-bytes' _count_197331 -Ref: tlmgr _pkgname_197741 -Ref: tlmgr _status_197951 -Ref: tlmgr 'd'198029 -Ref: tlmgr 'f'198089 -Ref: tlmgr 'u'198268 -Ref: tlmgr 'r'198314 -Ref: tlmgr 'a'198437 -Ref: tlmgr 'i'198615 -Ref: tlmgr 'I'198734 -Ref: tlmgr _localrev_198836 -Ref: tlmgr _serverrev_198943 -Ref: tlmgr _size_199055 -Ref: tlmgr _runtime_199224 -Ref: tlmgr _esttot_199294 -Node: tlmgr Machine-readable 'option' output199327 -Node: tlmgr ENVIRONMENT VARIABLES199845 -Ref: tlmgr 'TEXLIVE_COMPRESSOR'200356 -Ref: tlmgr 'TEXLIVE_DOWNLOADER'201204 -Ref: tlmgr 'TL_DOWNLOAD_PROGRAM'201227 -Ref: tlmgr 'TL_DOWNLOAD_ARGS'201247 -Ref: tlmgr 'TEXLIVE_PREFER_OWN'202273 -Node: tlmgr AUTHORS AND COPYRIGHT203097 -Node: Index203495 +Node: Build one engine16371 +Node: Cross compilation17885 +Node: Cross configuring19165 +Node: Cross problems20842 +Node: Installing22504 +Node: Installation directories23524 +Node: Linked scripts25342 +Node: Distro builds26833 +Node: Layout and infrastructure29209 +Node: Build system tools30040 +Node: Top-level directories32257 +Node: Autoconf macros34493 +Node: General setup macros35255 +Node: Macros for programs36130 +Node: Macros for compilers36931 +Node: Macros for libraries38339 +Node: Macros for library and header flags38765 +Node: Macros for Windows40676 +Node: Library modules42263 +Node: png library42752 +Node: zlib library45100 +Node: freetype library45615 +Node: kpathsea library46311 +Node: Program modules47690 +Node: t1utils package48118 +Node: xindy package48663 +Node: xdvik package49777 +Node: asymptote50836 +Node: Extending TeX Live51332 +Node: Adding a new program module52115 +Node: Adding a new generic library module57248 +Node: Adding a new TeX-specific library module59477 +Node: Configure options60175 +Node: Global configure options61556 +Node: --disable-native-texlive-build62098 +Node: --prefix --bindir ...63060 +Node: --disable-largefile63600 +Node: --disable-missing64142 +Node: --enable-compiler-warnings=LEVEL64543 +Node: --enable-cxx-runtime-hack65199 +Node: --enable-maintainer-mode65619 +Node: --enable-multiplatform66148 +Node: --enable-shared66721 +Node: --enable-silent-rules67092 +Node: --without-ln-s67544 +Node: --without-x67891 +Node: Program-specific configure options68079 +Node: --enable-PROG --disable-PROG68722 +Node: --disable-all-pkgs68995 +Node: Configure options for texk/web2c69778 +Node: Configure options for texk/bibtex-x72316 +Node: Configure options for texk/dvipdfm-x72859 +Node: Configure options for texk/dvisvgm73635 +Node: Configure options for texk/texlive74516 +Node: Configure options for texk/xdvik74937 +Node: Configure options for utils/xindy75558 +Node: Library-specific configure options76448 +Node: Configure options for kpathsea77409 +Node: Variables for configure78113 +Node: Coding conventions79539 +Node: Declarations and definitions80254 +Node: Const82428 +Node: Continuous integration84292 +Node: Transfer from Subversion to Github84956 +Node: Automatic update of the Git mirror87118 +Node: CI testing on Travis-CI87700 +Node: Releases on Github88409 +Node: install-tl88849 +Node: install-tl NAME89218 +Node: install-tl SYNOPSIS89376 +Node: install-tl DESCRIPTION89634 +Node: install-tl REFERENCES90694 +Node: install-tl OPTIONS91218 +Ref: install-tl *-gui* [[=]_module_]91559 +Ref: install-tl text91767 +Ref: install-tl tcl (or "perltk" or "wizard" or "expert" or nothing)91952 +Ref: install-tl *-no-gui*92584 +Ref: install-tl *-lang* _llcode_92674 +Ref: install-tl *-repository* _url|path_93298 +Ref: install-tl *-select-repository*94186 +Ref: install-tl *-all-options*94604 +Ref: install-tl *-custom-bin* _path_94859 +Ref: install-tl *-debug-translation*95693 +Ref: install-tl *-force-platform* _platform_95969 +Ref: install-tl *-help*, *--help*, *-?*96213 +Ref: install-tl *-in-place*96626 +Ref: install-tl *-init-from-profile* _profile_file_97171 +Ref: install-tl *-logfile* _file_97440 +Ref: install-tl *-no-cls*97791 +Ref: install-tl *-no-persistent-downloads*97939 +Ref: install-tl *-persistent-downloads*97964 +Ref: install-tl *-no-verify-downloads*98582 +Ref: install-tl *-non-admin*98945 +Ref: install-tl *-portable*99038 +Ref: install-tl *-print-platform*99177 +Ref: install-tl *-profile* _profile_file_99375 +Ref: install-tl *-q*99596 +Ref: install-tl *-scheme* _scheme_99658 +Ref: install-tl *-v*100132 +Ref: install-tl *-version*, *--version*100287 +Node: install-tl PROFILES100421 +Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)103287 +Ref: install-tl instopt_adjustrepo (default 1)103363 +Ref: install-tl instopt_letter (default 0)103500 +Ref: install-tl instopt_portable (default 0)103591 +Ref: install-tl instopt_write18_restricted (default 1)103687 +Node: install-tl ENVIRONMENT VARIABLES105026 +Ref: install-tl TEXLIVE_DOWNLOADER105404 +Ref: install-tl TL_DOWNLOAD_PROGRAM105427 +Ref: install-tl TL_DOWNLOAD_ARGS105447 +Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK105651 +Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE105853 +Ref: install-tl TEXLIVE_INSTALL_NO_RESUME105962 +Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME106114 +Ref: install-tl TEXLIVE_INSTALL_PAPER106235 +Ref: install-tl TEXLIVE_INSTALL_PREFIX106381 +Ref: install-tl TEXLIVE_INSTALL_TEXDIR106407 +Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG106438 +Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR106466 +Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME106495 +Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL106525 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG106559 +Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR106590 +Ref: install-tl NOPERLDOC106961 +Node: install-tl AUTHORS AND COPYRIGHT107025 +Node: tlmgr107439 +Node: tlmgr NAME107924 +Node: tlmgr SYNOPSIS108056 +Node: tlmgr DESCRIPTION108246 +Node: tlmgr EXAMPLES109345 +Ref: tlmgr tlmgr option repository ctan109596 +Ref: tlmgr tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet109668 +Ref: tlmgr tlmgr update --list110273 +Ref: tlmgr tlmgr update --all110366 +Ref: tlmgr tlmgr info _what_110523 +Node: tlmgr OPTIONS110785 +Ref: tlmgr *--repository* _url|path_111305 +Ref: tlmgr /some/local/dir112491 +Ref: tlmgr file:/some/local/dir112520 +Ref: tlmgr ctan112593 +Ref: tlmgr http://mirror.ctan.org/systems/texlive/tlnet112646 +Ref: tlmgr http://server/path/to/tlnet112987 +Ref: tlmgr https://server/path/to/tlnet113368 +Ref: tlmgr ftp://server/path/to/tlnet113836 +Ref: tlmgr user at machine:/path/to/tlnet113968 +Ref: tlmgr scp://user at machine/path/to/tlnet114009 +Ref: tlmgr ssh://user at machine/path/to/tlnet114050 +Ref: tlmgr *--gui* [_action_]114443 +Ref: tlmgr *--gui-lang* _llcode_115256 +Ref: tlmgr *--command-logfile* _file_115997 +Ref: tlmgr *--debug-translation*116263 +Ref: tlmgr *--machine-readable*116466 +Ref: tlmgr *--no-execute-actions*116734 +Ref: tlmgr *--package-logfile* _file_116927 +Ref: tlmgr *--pause*117181 +Ref: tlmgr *--persistent-downloads*117336 +Ref: tlmgr *--no-persistent-downloads*117364 +Ref: tlmgr *--pin-file*117858 +Ref: tlmgr *--usermode*118076 +Ref: tlmgr *--usertree* _dir_118196 +Ref: tlmgr *--verify-repo=[none|main|all]*118322 +Node: tlmgr ACTIONS119221 +Node: tlmgr help120082 +Node: tlmgr version120559 +Node: tlmgr backup120822 +Ref: tlmgr *backup [_option_...] --all*120993 +Ref: tlmgr *backup [_option_...] _pkg_...*121026 +Ref: tlmgr *--backupdir* _directory_122092 +Ref: tlmgr *--all*122309 +Ref: tlmgr *--clean*[=_N_]122561 +Ref: tlmgr *--dry-run*122888 +Node: tlmgr candidates _pkg_123018 +Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]123373 +Ref: tlmgr *depends*123887 +Ref: tlmgr *executes*124229 +Ref: tlmgr *files*124344 +Ref: tlmgr *runfiles*124480 +Ref: tlmgr *texmfdbs*124617 +Ref: tlmgr - all items in TEXMFDBS have the !! prefix.124847 +Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).124923 +Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.124988 +Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.125063 +Ref: tlmgr *--use-svn*125088 +Node: tlmgr conf125229 +Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*125517 +Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*125581 +Node: tlmgr dump-tlpdb [_option_...] [--json]127996 +Ref: tlmgr *--local*128429 +Ref: tlmgr *--remote*128468 +Ref: tlmgr *--json*128506 +Node: tlmgr generate129077 +Ref: tlmgr *generate [_option_...] language*129273 +Ref: tlmgr *generate [_option_...] language.dat*129312 +Ref: tlmgr *generate [_option_...] language.def*129351 +Ref: tlmgr *generate [_option_...] language.dat.lua*129394 +Ref: tlmgr *--dest* _output_file_131721 +Ref: tlmgr *--localcfg* _local_conf_file_132297 +Ref: tlmgr *--rebuild-sys*132420 +Node: tlmgr gui133235 +Node: tlmgr info133413 +Ref: tlmgr *info [_option_...] _pkg_...*133575 +Ref: tlmgr *info [_option_...] collections*133609 +Ref: tlmgr *info [_option_...] schemes*133639 +Ref: tlmgr *--list*135169 +Ref: tlmgr *--only-installed*135483 +Ref: tlmgr *--only-remote*135671 +Ref: tlmgr *--data item1,item2,...*135975 +Ref: tlmgr *--json* 1137338 +Node: tlmgr init-usertree137721 +Node: tlmgr install [_option_...] _pkg_...138102 +Ref: tlmgr *--dry-run* 1138610 +Ref: tlmgr *--file*138727 +Ref: tlmgr *--force*138949 +Ref: tlmgr *--no-depends*139169 +Ref: tlmgr *--no-depends-at-all*139328 +Ref: tlmgr *--reinstall*139728 +Ref: tlmgr *--with-doc*140106 +Ref: tlmgr *--with-src*140119 +Node: tlmgr key140847 +Ref: tlmgr *key list*141005 +Ref: tlmgr *key add _file_*141023 +Ref: tlmgr *key remove _keyid_*141045 +Node: tlmgr list141639 +Node: tlmgr option141801 +Ref: tlmgr *option [--json] [show]*141956 +Ref: tlmgr *option [--json] showall|help*141987 +Ref: tlmgr *option _key_ [_value_]*142013 +Node: tlmgr paper146591 +Ref: tlmgr *paper [a4|letter]*146740 +Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>146816 +Ref: tlmgr *paper --json*146831 +Node: tlmgr path148046 +Ref: tlmgr *path [--w32mode=user|admin] add*148207 +Ref: tlmgr *path [--w32mode=user|admin] remove*148244 +Node: tlmgr pinning149729 +Ref: tlmgr pinning show149970 +Ref: tlmgr pinning add _repo_ _pkgglob_...150043 +Ref: tlmgr pinning remove _repo_ _pkgglob_...150162 +Ref: tlmgr pinning remove _repo_ --all150315 +Node: tlmgr platform150369 +Ref: tlmgr *platform list|add|remove _platform_...*150555 +Ref: tlmgr *platform set _platform_*150582 +Ref: tlmgr *platform set auto*150603 +Ref: tlmgr *--dry-run* 2151480 +Node: tlmgr postaction151599 +Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*151829 +Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*151903 +Ref: tlmgr *--w32mode=[user|admin]*152218 +Ref: tlmgr *--fileassocmode=[1|2]*152634 +Ref: tlmgr *--all* 1152919 +Node: tlmgr print-platform152974 +Node: tlmgr print-platform-info153305 +Node: tlmgr remove [_option_...] _pkg_...153605 +Ref: tlmgr *--all* 2154089 +Ref: tlmgr *--backup*154199 +Ref: tlmgr *--backupdir* _directory_ 1154225 +Ref: tlmgr *--no-depends* 1154630 +Ref: tlmgr *--no-depends-at-all* 1154692 +Ref: tlmgr *--force* 1154795 +Ref: tlmgr *--dry-run* 3155268 +Node: tlmgr repository155604 +Ref: tlmgr *repository list*155792 +Ref: tlmgr *repository list _path|url|tag_*155826 +Ref: tlmgr *repository add _path_ [_tag_]*155859 +Ref: tlmgr *repository remove _path|tag_*155891 +Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*155945 +Ref: tlmgr *repository status*155966 +Ref: tlmgr The tag (which can be the same as the url);157193 +Node: tlmgr restore157671 +Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*157850 +Ref: tlmgr *restore [_option_...] --all*157880 +Ref: tlmgr *--all* 3158580 +Ref: tlmgr *--backupdir* _directory_ 2158794 +Ref: tlmgr *--dry-run* 4158975 +Ref: tlmgr *--force* 2159107 +Ref: tlmgr *--json* 2159153 +Node: tlmgr search159480 +Ref: tlmgr *search [_option_...] _what_*159644 +Ref: tlmgr *search [_option_...] --file _what_*159681 +Ref: tlmgr *search [_option_...] --all _what_*159717 +Ref: tlmgr *--file* 1159937 +Ref: tlmgr *--all* 4159999 +Ref: tlmgr *--global*160088 +Ref: tlmgr *--word*160215 +Node: tlmgr shell160530 +Ref: tlmgr protocol161265 +Ref: tlmgr help 1161329 +Ref: tlmgr version 1161382 +Ref: tlmgr quit, end, bye, byebye, EOF161450 +Ref: tlmgr restart161471 +Ref: tlmgr load [local|remote]161594 +Ref: tlmgr save161664 +Ref: tlmgr get [_var_] =item set [_var_ [_val_]]161787 +Node: tlmgr show162388 +Node: tlmgr uninstall162555 +Node: tlmgr update [_option_...] [_pkg_...]162785 +Ref: tlmgr *--all* 5163156 +Ref: tlmgr *--self*165335 +Ref: tlmgr *--dry-run* 5166099 +Ref: tlmgr *--list* [_pkg_]166276 +Ref: tlmgr *--exclude* _pkg_166965 +Ref: tlmgr *--no-auto-remove* [_pkg_...]167765 +Ref: tlmgr *--no-auto-install* [_pkg_...]168249 +Ref: tlmgr *--reinstall-forcibly-removed*169011 +Ref: tlmgr *--backup* 1169546 +Ref: tlmgr *--backupdir* _directory_ 3169572 +Ref: tlmgr *--no-depends* 2170738 +Ref: tlmgr *--no-depends-at-all* 2170941 +Ref: tlmgr *--force* 3171044 +Node: tlmgr CONFIGURATION FILE FOR TLMGR172035 +Ref: tlmgr auto-remove, value 0 or 1 (default 1), same as command-line option.173042 +Ref: tlmgr gui-expertmode, value 0 or 1 (default 1). This switches between the full GUI and a simplified GUI with only the most common settings.173179 +Ref: tlmgr gui-lang _llcode_, with a language code value as with the command-line option.173261 +Ref: tlmgr no-checksums, value 0 or 1 (default 0, see below).173315 +Ref: tlmgr persistent-downloads, value 0 or 1 (default 1), same as command-line option.173395 +Ref: tlmgr require-verification, value 0 or 1 (default 0), same as command-line option.173475 +Ref: tlmgr tkfontscale, value any float. Controls the scaling of fonts in the Tk based frontends.173565 +Ref: tlmgr update-exclude, value: comma-separated list of packages (no space allowed). Same as the command line option --exclude for the action update.173713 +Ref: tlmgr verify-downloads, value 0 or 1 (default 1), same as command-line option.173789 +Ref: tlmgr allowed-actions _action1_ [,_action_,...] The value is a comma-separated list of tlmgr actions which are allowed to be executed when tlmgr is invoked in system mode (that is, without --usermode).174058 +Node: tlmgr CRYPTOGRAPHIC VERIFICATION175146 +Node: tlmgr Configuration of GnuPG invocation177319 +Node: tlmgr USER MODE177957 +Node: tlmgr User mode install180803 +Node: tlmgr User mode backup, restore, remove, update181947 +Node: tlmgr User mode generate, option, paper182389 +Node: tlmgr MULTIPLE REPOSITORIES182765 +Node: tlmgr Pinning184494 +Node: tlmgr GUI FOR TLMGR186417 +Node: tlmgr Main display188066 +Node: tlmgr Display configuration area188318 +Ref: tlmgr Status188679 +Ref: tlmgr Category188843 +Ref: tlmgr Match189029 +Ref: tlmgr Selection189210 +Ref: tlmgr Display configuration buttons189414 +Node: tlmgr Package list area189597 +Ref: tlmgr a checkbox190181 +Ref: tlmgr package name190317 +Ref: tlmgr local revision (and version)190416 +Ref: tlmgr remote revision (and version)190791 +Ref: tlmgr short description191088 +Node: tlmgr Main display action buttons191133 +Ref: tlmgr Update all installed191399 +Ref: tlmgr Update191771 +Ref: tlmgr Install191821 +Ref: tlmgr Remove192007 +Ref: tlmgr Backup192185 +Node: tlmgr Menu bar192342 +Ref: tlmgr tlmgr menu192565 +Ref: tlmgr Options menu192873 +Ref: tlmgr Actions menu193956 +Ref: tlmgr Help menu194384 +Node: tlmgr GUI options194518 +Ref: tlmgr -background _color_194764 +Ref: tlmgr -font " _fontname_ _fontsize_ "194829 +Ref: tlmgr -foreground _color_194987 +Ref: tlmgr -geometry _geomspec_195039 +Ref: tlmgr -xrm _xresource_195231 +Node: tlmgr MACHINE-READABLE OUTPUT195500 +Node: tlmgr Machine-readable update and install output196310 +Ref: tlmgr location-url _location_197586 +Ref: tlmgr total-bytes _count_197802 +Ref: tlmgr _pkgname_198212 +Ref: tlmgr _status_198422 +Ref: tlmgr d198500 +Ref: tlmgr f198560 +Ref: tlmgr u198739 +Ref: tlmgr r198785 +Ref: tlmgr a198908 +Ref: tlmgr i199086 +Ref: tlmgr I199205 +Ref: tlmgr _localrev_199307 +Ref: tlmgr _serverrev_199414 +Ref: tlmgr _size_199526 +Ref: tlmgr _runtime_199695 +Ref: tlmgr _esttot_199765 +Node: tlmgr Machine-readable option output199798 +Node: tlmgr ENVIRONMENT VARIABLES200310 +Ref: tlmgr TEXLIVE_COMPRESSOR200821 +Ref: tlmgr TEXLIVE_DOWNLOADER201669 +Ref: tlmgr TL_DOWNLOAD_PROGRAM201692 +Ref: tlmgr TL_DOWNLOAD_ARGS201712 +Ref: tlmgr TEXLIVE_PREFER_OWN202738 +Node: tlmgr AUTHORS AND COPYRIGHT203562 +Node: Index203961  End Tag Table + + +Local Variables: +coding: utf-8 +End: Modified: branches/stable/source/src/tardate.ac =================================================================== --- branches/stable/source/src/tardate.ac 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/tardate.ac 2021-04-01 20:52:49 UTC (rev 850) @@ -1,5 +1,5 @@ -dnl $Id: tardate.ac 54578 2020-03-27 00:29:26Z karl $ -dnl Copyright 2016-2020 Karl Berry +dnl $Id: tardate.ac 58686 2021-03-24 21:28:22Z karl $ +dnl Copyright 2016-2021 Karl Berry dnl Copyright 2010-2015 Peter Breitenlohner dnl dnl This file is free software; the copyright holder @@ -9,4 +9,4 @@ dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current TeX Live tarball version -m4_define([tex_live_tardate], [2020-03-27]) +m4_define([tex_live_tardate], [2021-03-23]) Modified: branches/stable/source/src/texk/README =================================================================== --- branches/stable/source/src/texk/README 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/README 2021-04-01 20:52:49 UTC (rev 850) @@ -1,4 +1,4 @@ -$Id: README 57560 2021-01-30 06:39:57Z takuji $ +$Id: README 58117 2021-03-04 19:00:28Z karl $ Copyright 2006-2021 TeX Users Group. You may freely use, modify and/or distribute this file. @@ -34,7 +34,7 @@ cjkutils 4.8.4 - checked 18apr15 http://cjk.ffii.org/cjk-4.8.4.tar.gz -detex 2.8.9 - checked 03dec20 +detex 2.8.9 - checked 4mar21 https://github.com/pkubowicz/opendetex/releases old info: http://www.cs.purdue.edu/homes/trinkle/detex/ Modified: branches/stable/source/src/texk/kpathsea/ChangeLog =================================================================== --- branches/stable/source/src/texk/kpathsea/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/kpathsea/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,22 @@ +2021-03-23 Karl Berry + + * TL'21. + +2021-03-18 Karl Berry + + * texmf.cnf (save_size): reset to 80000 since that is what + sup_save_size is set to in tex.ch. Found by Christian Schenk, + tex-live 18 Mar 2021 18:39:04. + +2021-03-08 Karl Berry + + * tests/cnfline/texmf.cnf (maxpr.lt-kpsewhich): set this, + for --enable-shared builds. + https://tug.org/pipermail/tex-k/2021-March/003490.html + * tests/cnfline.test: unset maxpr othervar, just in case + they are set in the environment. Maybe unset on an unset variable + is portable enough nowadays? + 2021-02-17 Karl Berry * doc/kpathsea.texi, Modified: branches/stable/source/src/texk/kpathsea/NEWS =================================================================== --- branches/stable/source/src/texk/kpathsea/NEWS 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/kpathsea/NEWS 2021-04-01 20:52:49 UTC (rev 850) @@ -1,7 +1,7 @@ -$Id: NEWS 57769 2021-02-17 03:03:54Z karl $ +$Id: NEWS 58655 2021-03-23 17:39:18Z karl $ This file records noteworthy changes. (Public domain.) -6.3.3 (for TeX Live 2021) +6.3.3 (for TeX Live 2021, 23 March 2021) * The library does not emit warnings for unrecognized filenames, leaving it up to the caller. * Double save_size limit to 200,000 for tex4ht, l3regex, etc. Modified: branches/stable/source/src/texk/kpathsea/tests/cnfline/texmf.cnf =================================================================== --- branches/stable/source/src/texk/kpathsea/tests/cnfline/texmf.cnf 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/kpathsea/tests/cnfline/texmf.cnf 2021-04-01 20:52:49 UTC (rev 850) @@ -1,5 +1,14 @@ -# $Id: texmf.cnf 51830 2019-08-06 23:33:17Z karl $ +# $Id: texmf.cnf 58227 2021-03-08 18:40:56Z karl $ # Public domain. This tiny texmf.cnf is for kpathsea/tests/cnfline.test. maxpr=100 + +# static build: maxpr.kpsewhich=200 + +# with --enable-shared (libtool) build, the binary has a different name. +# although we could also work around this by specifying --progname in +# cnfline.test, one goal of the test is to check what happens when +# --progname is not specified. +maxpr.lt-kpsewhich=200 + othervar=300 Modified: branches/stable/source/src/texk/kpathsea/tests/cnfline.test =================================================================== --- branches/stable/source/src/texk/kpathsea/tests/cnfline.test 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/kpathsea/tests/cnfline.test 2021-04-01 20:52:49 UTC (rev 850) @@ -1,10 +1,14 @@ #!/bin/sh -vx -# $Id: cnfline.test 51830 2019-08-06 23:33:17Z karl $ +# $Id: cnfline.test 58227 2021-03-08 18:40:56Z karl $ # Copyright 2019 Karl Berry # You may freely use, modify and/or distribute this file. cnf_dir=$srcdir/tests/cnfline +# just in case they are set in the environment +unset maxpr +unset othervar + # Just for fun, let's first try the --cnf-line feature to set TEXMFCNF. val=`./kpsewhich "--cnf-line=TEXMFCNF=$cnf_dir" --var-value=othervar` test x"$val" = x300 || exit 1 Modified: branches/stable/source/src/texk/kpathsea/texmf.cnf =================================================================== --- branches/stable/source/src/texk/kpathsea/texmf.cnf 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/kpathsea/texmf.cnf 2021-04-01 20:52:49 UTC (rev 850) @@ -823,7 +823,7 @@ % for all known free hyphenation patterns to be loaded simultaneously % (as TeX Live does). % -trie_size = 1000000 +trie_size = 1100000 hyph_size = 8191 % prime number of hyphenation exceptions, >610, <65535 % http://primes.utm.edu/curios/page.php/8191.html @@ -832,7 +832,7 @@ max_in_open = 15 % simultaneous input files and error insertions, % also applies to MetaPost param_size = 10000 % simultaneous macro parameters, also applies to MP -save_size = 200000 % for saving values outside current group +save_size = 80000 % for saving values outside current group stack_size = 5000 % simultaneous input sources % Limit on recursive expansion calls so TeX has a chance to quit nicely Modified: branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm =================================================================== --- branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm 2021-04-01 20:52:49 UTC (rev 850) @@ -1,11 +1,11 @@ # TeXLive::TLConfig.pm - module exporting configuration values -# Copyright 2007-2020 Norbert Preining +# Copyright 2007-2021 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. package TeXLive::TLConfig; -my $svnrev = '$Revision: 54123 $'; +my $svnrev = '$Revision: 57875 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -58,7 +58,7 @@ # the year of our release, will be used in the location of the # network packages, and in menu names, and other places. -$ReleaseYear = 2020; +$ReleaseYear = 2021; # users can upgrade from this year to the current year; might be the # same as the release year, or any number of releases earlier. Modified: branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm =================================================================== --- branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm 2021-04-01 20:52:49 UTC (rev 850) @@ -1,11 +1,12 @@ +# $Id: TLUtils.pm 58139 2021-03-05 00:26:37Z preining $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. -# Copyright 2007-2020 Norbert Preining, Reinhard Kotucha +# Copyright 2007-2021 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 # or any later version. package TeXLive::TLUtils; -my $svnrev = '$Revision: 57421 $'; +my $svnrev = '$Revision: 58139 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -339,15 +340,15 @@ if ($OS eq "darwin") { # We have two versions of Mac binary sets. - # 10.x and newer -> x86_64-darwin [MacTeX] - # 10.6/Snow Leopard through 10.x -> x86_64-darwinlegacy, if 64-bit - # x changes every year. In 2020 (Big Sur) Apple started with 11.x. + # 10.x and newer -> universal-darwin [MacTeX] + # 10.6/Snow Leopard through 10.x -> x86_64-darwinlegacy, if 64-bit. + # x changes every year. As of TL 2021 (Big Sur) Apple started with 11.x. # # (BTW, uname -r numbers are larger by 4 than the Mac minor version. # We don't use uname numbers here.) # # this changes each year, per above: - my $mactex_darwin = 13; # lowest minor rev supported by x86_64-darwin. + my $mactex_darwin = 14; # lowest minor rev supported by x86_64-darwin. # # Most robust approach is apparently to check sw_vers (os version, # returns "10.x" values), and sysctl (processor hardware). @@ -358,12 +359,11 @@ . " (from sw_vers -productVersion: $sw_vers)\n"; return "unknownmac-unknownmac"; } - if ($os_major >= 11) { - $CPU = "x86_64"; + # have to refine after all 10.x become "legacy". + if ($os_major >= 11 || $os_minor >= $mactex_darwin) { + $CPU = "universal"; $OS = "darwin"; - } elsif ($os_minor >= $mactex_darwin) { - ; # sufficiently new 10.x, default is ok (x86_64-darwin). - } elsif ($os_minor >= 6 && $os_minor < $mactex_darwin) { + } elsif ($os_major == 10 && 6 <= $os_minor && $os_minor < $mactex_darwin){ # in between, x86 hardware only. On 10.6 only, must check if 64-bit, # since if later than that, always 64-bit. my $is64 = $os_minor == 6 @@ -424,10 +424,9 @@ 'powerpc-linux' => 'GNU/Linux on PowerPC', 'sparc-linux' => 'GNU/Linux on Sparc', 'sparc-solaris' => 'Solaris on Sparc', - 'universal-darwin' => 'MacOSX universal binaries', + 'universal-darwin' => 'MacOSX current (10.14-) on ARM/x86_64', 'win32' => 'Windows', 'x86_64-cygwin' => 'Cygwin on x86_64', - 'x86_64-darwin' => 'MacOSX current (10.13-) on x86_64', 'x86_64-darwinlegacy' => 'MacOSX legacy (10.6-) on x86_64', 'x86_64-dragonfly' => 'DragonFlyBSD on x86_64', 'x86_64-linux' => 'GNU/Linux on x86_64', @@ -1580,9 +1579,11 @@ $donesize += $tlpsizes{$package}; } my $totaltime = time() - $starttime; - my $totmin = int ($totaltime/60); + my $tothour = int ($totaltime/3600); + my $totmin = (int ($totaltime/60)) % 60; my $totsec = $totaltime % 60; - info(sprintf("Time used for installing the packages: %02d:%02d\n", + my $hrstr = ($tothour > 0 ? "$tothour:" : ""); + info(sprintf("Time used for installing the packages: $hrstr%02d:%02d\n", $totmin, $totsec)); $totlpdb->save; return 1; Modified: branches/stable/source/src/texk/web2c/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,48 @@ +2021-03-23 Karl Berry + + * TL'21. + +2021-03-08 Karl Berry + + * doc/glue.web, + * doc/webman.tex: add these Knuth files here, since nowhere + else seems better. PDF output for them is in the knuth-pdf package. + +2021-02-25 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: CWEB release 4.2. + +2021-02-24 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: Code review. + +2021-02-22 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: Code review. + +2021-02-20 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: CWEB release 4.1. + +2021-02-19 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: Replace 'boolean' values upstream. + +2021-02-18 Karl Berry + + * doc/web2c.texi (Common options): mention -cnf-line. + Also, use https instead of http for most urls, + update for 2021, etc. + +2021-02-18 Andreas Scherer + + * ctangleboot.cin: Reshuffle a few variables (upstream). + 2021-02-16 Andreas Scherer * Makefile.in, Modified: branches/stable/source/src/texk/web2c/NEWS =================================================================== --- branches/stable/source/src/texk/web2c/NEWS 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/NEWS 2021-04-01 20:52:49 UTC (rev 850) @@ -1,7 +1,7 @@ This file records noteworthy changes. (Public domain.) -2021 (for TeX Live 2021) +2021 (for TeX Live 2021, 23 March 2021) * Knuth 2021 tune-up, with fixes to all of his *.web files. Overview: https://tug.org/TUGboat/42-1/tb130knuth-tuneup21.pdf New TeX version is 3.141592653, MF 2.71828182. Modified: branches/stable/source/src/texk/web2c/ctangleboot.cin =================================================================== --- branches/stable/source/src/texk/web2c/ctangleboot.cin 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/ctangleboot.cin 2021-04-01 20:52:49 UTC (rev 850) @@ -25,7 +25,7 @@ /*:4*/ #line 67 "cwebdir/ctangle.w" -#define banner "This is CTANGLE, Version 4.0" \ +#define banner "This is CTANGLE, Version 4.2" \ \ #define _(S) gettext(S) \ @@ -53,14 +53,22 @@ #define xisupper(c) (isupper((eight_bits) c) &&((eight_bits) c<0200) ) #define xisxdigit(c) (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \ +#define max_include_depth 10 \ + +#define max_file_name_length 1024 +#define cur_file file[include_depth] +#define cur_file_name file_name[include_depth] +#define cur_line line[include_depth] +#define web_file file[0] +#define web_file_name file_name[0] \ + #define length(c) (size_t) ((c+1) ->byte_start-(c) ->byte_start) #define print_id(c) term_write((c) ->byte_start,length((c) ) ) #define llink link #define rlink dummy.Rlink #define root name_dir->rlink \ + \ -#define chunk_marker 0 \ - #define spotless 0 #define harmless_message 1 #define error_message 2 @@ -70,15 +78,6 @@ #define confusion(s) fatal(_("! This can't happen: ") ,s) \ \ -#define max_include_depth 10 \ - -#define max_file_name_length 1024 -#define cur_file file[include_depth] -#define cur_file_name file_name[include_depth] -#define cur_line line[include_depth] -#define web_file file[0] -#define web_file_name file_name[0] \ - #define show_banner flags['b'] #define show_progress flags['p'] #define show_stats flags['s'] @@ -149,7 +148,7 @@ #define ishigh(c) ((eight_bits) (c) > 0177) \ \ -#define compress(c) if(loc++<=limit) return(c) \ +#define compress(c) if(loc++<=limit) return c \ #define macro 0 #define app_repl(c) {if(tok_ptr==tok_mem_end) overflow(_("token") ) ;*tok_ptr++= c;} \ @@ -188,8 +187,33 @@ extern char*limit; /*:6*//*7:*/ -#line 120 "cwebdir/comm-w2c.h" +#line 122 "cwebdir/comm-w2c.h" +extern int include_depth; +extern FILE*file[]; +extern FILE*change_file; +extern char file_name[][max_file_name_length]; + +extern char change_file_name[]; +extern char check_file_name[]; +extern int line[]; +extern int change_line; +extern int change_depth; +extern boolean input_has_ended; +extern boolean changing; +extern boolean web_file_open; + +/*:7*//*9:*/ +#line 143 "cwebdir/comm-w2c.h" + +extern sixteen_bits section_count; +extern boolean changed_section[]; +extern boolean change_pending; +extern boolean print_where; + +/*:9*//*10:*/ +#line 157 "cwebdir/comm-w2c.h" + typedef struct name_info{ char*byte_start; struct name_info*link; @@ -212,50 +236,25 @@ extern hash_pointer hash_end; extern hash_pointer h; -/*:7*//*9:*/ -#line 164 "cwebdir/comm-w2c.h" +/*:10*//*12:*/ +#line 201 "cwebdir/comm-w2c.h" extern int history; -/*:9*//*11:*/ -#line 184 "cwebdir/comm-w2c.h" +/*:12*//*14:*/ +#line 218 "cwebdir/comm-w2c.h" -extern int include_depth; -extern FILE*file[]; -extern FILE*change_file; +extern int argc; +extern char**argv; extern char C_file_name[]; extern char tex_file_name[]; extern char idx_file_name[]; extern char scn_file_name[]; -extern char file_name[][max_file_name_length]; - -extern char change_file_name[]; -extern char check_file_name[]; -extern int line[]; -extern int change_line; -extern int change_depth; -extern boolean input_has_ended; -extern boolean changing; -extern boolean web_file_open; - -/*:11*//*13:*/ -#line 209 "cwebdir/comm-w2c.h" - -extern sixteen_bits section_count; -extern boolean changed_section[]; -extern boolean change_pending; -extern boolean print_where; - -/*:13*//*14:*/ -#line 223 "cwebdir/comm-w2c.h" - -extern int argc; -extern char**argv; extern boolean flags[]; extern const char*use_language; /*:14*//*15:*/ -#line 236 "cwebdir/comm-w2c.h" +#line 235 "cwebdir/comm-w2c.h" extern FILE*C_file; extern FILE*tex_file; @@ -264,12 +263,12 @@ extern FILE*active_file; extern FILE*check_file; -/*:15*//*116:*/ +/*:15*//*115:*/ #line 473 "cwebdir/ctang-w2c.ch" extern char cb_banner[]; -/*:116*/ +/*:115*/ #line 69 "cwebdir/ctangle.w" /*19:*/ @@ -282,7 +281,7 @@ typedef text*text_pointer; /*:19*//*31:*/ -#line 270 "cwebdir/ctangle.w" +#line 269 "cwebdir/ctangle.w" typedef struct{ eight_bits*end_field; @@ -299,89 +298,91 @@ /*20:*/ #line 129 "cwebdir/ctangle.w" -text text_info[max_texts]; -text_pointer text_info_end= text_info+max_texts-1; -text_pointer text_ptr; -eight_bits tok_mem[max_toks]; -eight_bits*tok_mem_end= tok_mem+max_toks-1; -eight_bits*tok_ptr; +static text text_info[max_texts]; +static text_pointer text_info_end= text_info+max_texts-1; +static text_pointer text_ptr; +static eight_bits tok_mem[max_toks]; +static eight_bits*tok_mem_end= tok_mem+max_toks-1; +static eight_bits*tok_ptr; /*:20*//*26:*/ #line 198 "cwebdir/ctangle.w" -text_pointer last_unnamed; +static text_pointer last_unnamed; /*:26*//*32:*/ -#line 286 "cwebdir/ctangle.w" +#line 285 "cwebdir/ctangle.w" -output_state cur_state; +static output_state cur_state; -output_state stack[stack_size+1]; -stack_pointer stack_ptr; -stack_pointer stack_end= stack+stack_size; +static output_state stack[stack_size+1]; +static stack_pointer stack_end= stack+stack_size; +static stack_pointer stack_ptr; /*:32*//*37:*/ -#line 362 "cwebdir/ctangle.w" +#line 361 "cwebdir/ctangle.w" -int cur_val; +static int cur_val; /*:37*//*42:*/ -#line 454 "cwebdir/ctangle.w" +#line 452 "cwebdir/ctangle.w" -eight_bits out_state; -boolean protect; +static eight_bits out_state; +static boolean protect; /*:42*//*45:*/ -#line 486 "cwebdir/ctangle.w" +#line 483 "cwebdir/ctangle.w" -name_pointer output_files[max_files]; -name_pointer*cur_out_file,*end_output_files,*an_output_file; -char cur_section_name_char; -char output_file_name[longest_name+1]; +static name_pointer output_files[max_files]; +static name_pointer*cur_out_file,*end_output_files,*an_output_file; +static char cur_section_name_char; +static char output_file_name[longest_name+1]; /*:45*//*52:*/ -#line 586 "cwebdir/ctangle.w" +#line 582 "cwebdir/ctangle.w" -boolean output_defs_seen= 0; +static boolean output_defs_seen= false; /*:52*//*57:*/ -#line 695 "cwebdir/ctangle.w" +#line 691 "cwebdir/ctangle.w" -char translit[128][translit_length]; +static char translit[128][translit_length]; /*:57*//*62:*/ -#line 774 "cwebdir/ctangle.w" +#line 770 "cwebdir/ctangle.w" -eight_bits ccode[256]; +static eight_bits ccode[256]; /*:62*//*66:*/ -#line 834 "cwebdir/ctangle.w" +#line 830 "cwebdir/ctangle.w" -boolean comment_continues= 0; +static boolean comment_continues= false; /*:66*//*68:*/ -#line 873 "cwebdir/ctangle.w" +#line 869 "cwebdir/ctangle.w" -name_pointer cur_section_name; -int no_where; +static name_pointer cur_section_name; +static boolean no_where; /*:68*//*82:*/ -#line 1187 "cwebdir/ctangle.w" +#line 1182 "cwebdir/ctangle.w" -text_pointer cur_text; -eight_bits next_control; +static text_pointer cur_text; +static eight_bits next_control; -/*:82*//*90:*/ -#line 1348 "cwebdir/ctangle.w" - -extern sixteen_bits section_count; - -/*:90*/ +/*:82*/ #line 71 "cwebdir/ctangle.w" /*8:*/ -#line 143 "cwebdir/comm-w2c.h" +#line 137 "cwebdir/comm-w2c.h" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); + +/*:8*//*11:*/ +#line 180 "cwebdir/comm-w2c.h" + extern boolean names_match(name_pointer,const char*,size_t,eight_bits); extern name_pointer id_lookup(const char*,const char*,char); @@ -392,8 +393,8 @@ extern void print_section_name(name_pointer); extern void sprint_section_name(char*,name_pointer); -/*:8*//*10:*/ -#line 167 "cwebdir/comm-w2c.h" +/*:11*//*13:*/ +#line 204 "cwebdir/comm-w2c.h" extern int wrap_up(void); extern void err_print(const char*); @@ -400,81 +401,65 @@ extern void fatal(const char*,const char*); extern void overflow(const char*); -/*:10*//*12:*/ -#line 203 "cwebdir/comm-w2c.h" +/*:13*//*16:*/ +#line 244 "cwebdir/comm-w2c.h" -extern boolean get_line(void); -extern void check_complete(void); -extern void reset_input(void); - -/*:12*//*16:*/ -#line 245 "cwebdir/comm-w2c.h" - extern void common_init(void); extern void print_stats(void); extern void cb_show_banner(void); -/*:16*//*29:*/ -#line 231 "cwebdir/ctangle.w" - +/*:16*//*30:*/ +#line 241 "cwebdir/ctangle.w" static void store_two_bytes(sixteen_bits); -/*:29*//*34:*/ -#line 310 "cwebdir/ctangle.w" +/*:30*//*35:*/ +#line 324 "cwebdir/ctangle.w" static void push_level(name_pointer); -static void pop_level(int); +static void pop_level(boolean); -/*:34*//*38:*/ -#line 369 "cwebdir/ctangle.w" - +/*:35*//*39:*/ +#line 397 "cwebdir/ctangle.w" static void get_output(void); -/*:38*//*43:*/ -#line 462 "cwebdir/ctangle.w" - +/*:39*//*44:*/ +#line 473 "cwebdir/ctangle.w" static void flush_buffer(void); -/*:43*//*48:*/ -#line 517 "cwebdir/ctangle.w" - +/*:44*//*49:*/ +#line 549 "cwebdir/ctangle.w" static void phase_two(void); -/*:48*//*53:*/ -#line 589 "cwebdir/ctangle.w" +/*:49*//*53:*/ +#line 585 "cwebdir/ctangle.w" static void output_defs(void); static void out_char(eight_bits); -/*:53*//*64:*/ -#line 798 "cwebdir/ctangle.w" +/*:53*//*65:*/ +#line 810 "cwebdir/ctangle.w" static eight_bits skip_ahead(void); static boolean skip_comment(boolean); -/*:64*//*69:*/ -#line 885 "cwebdir/ctangle.w" - +/*:65*//*70:*/ +#line 924 "cwebdir/ctangle.w" static eight_bits get_next(void); -/*:69*//*83:*/ -#line 1191 "cwebdir/ctangle.w" - +/*:70*//*84:*/ +#line 1208 "cwebdir/ctangle.w" static void scan_repl(eight_bits); -/*:83*//*91:*/ -#line 1355 "cwebdir/ctangle.w" - +/*:84*//*91:*/ +#line 1379 "cwebdir/ctangle.w" static void scan_section(void); /*:91*//*99:*/ -#line 1458 "cwebdir/ctangle.w" - +#line 1460 "cwebdir/ctangle.w" static void phase_one(void); /*:99*//*101:*/ -#line 1476 "cwebdir/ctangle.w" - +#line 1494 "cwebdir/ctangle.w" static void skip_limbo(void); /*:101*/ @@ -507,12 +492,12 @@ last_unnamed= text_info;text_info->text_link= 0; /*:27*//*46:*/ -#line 496 "cwebdir/ctangle.w" +#line 493 "cwebdir/ctangle.w" cur_out_file= end_output_files= output_files+max_files; /*:46*//*58:*/ -#line 698 "cwebdir/ctangle.w" +#line 694 "cwebdir/ctangle.w" { int i; @@ -520,7 +505,7 @@ } /*:58*//*63:*/ -#line 777 "cwebdir/ctangle.w" +#line 773 "cwebdir/ctangle.w" { int c; for(c= 0;c<256;c++)ccode[c]= ignore; @@ -540,15 +525,15 @@ } /*:63*//*78:*/ -#line 1108 "cwebdir/ctangle.w" +#line 1103 "cwebdir/ctangle.w" section_text[0]= ' '; -/*:78*//*117:*/ +/*:78*//*116:*/ #line 476 "cwebdir/ctang-w2c.ch" strncpy(cb_banner,banner,max_banner-1); -/*:117*/ +/*:116*/ #line 88 "cwebdir/ctangle.w" common_init(); @@ -569,7 +554,7 @@ size_t l, eight_bits t) {(void)t; -if(length(p)!=l)return 0; +if(length(p)!=l)return false; return!strncmp(first,p->byte_start,l); } @@ -585,22 +570,22 @@ void init_p(name_pointer p,eight_bits t){(void)p;(void)t;} -/*:25*//*30:*/ -#line 234 "cwebdir/ctangle.w" +/*:25*//*29:*/ +#line 231 "cwebdir/ctangle.w" -void +static void store_two_bytes( sixteen_bits x) { #line 65 "cwebdir/ctang-w2c.ch" if(tok_ptr+2> tok_mem_end)overflow(_("token")); -#line 240 "cwebdir/ctangle.w" +#line 237 "cwebdir/ctangle.w" *tok_ptr++= x>>8; *tok_ptr++= x&0377; } -/*:30*//*35:*/ -#line 314 "cwebdir/ctangle.w" +/*:29*//*34:*/ +#line 309 "cwebdir/ctangle.w" static void push_level( @@ -608,7 +593,7 @@ { #line 71 "cwebdir/ctang-w2c.ch" if(stack_ptr==stack_end)overflow(_("stack")); -#line 320 "cwebdir/ctangle.w" +#line 315 "cwebdir/ctangle.w" *stack_ptr= cur_state; stack_ptr++; if(p!=NULL){ @@ -618,12 +603,12 @@ } } -/*:35*//*36:*/ -#line 333 "cwebdir/ctangle.w" +/*:34*//*36:*/ +#line 332 "cwebdir/ctangle.w" static void pop_level( -int flag) +boolean flag) { if(flag&&cur_repl->text_linktext_link+text_info; @@ -634,8 +619,8 @@ if(stack_ptr> stack)cur_state= *stack_ptr; } -/*:36*//*39:*/ -#line 372 "cwebdir/ctangle.w" +/*:36*//*38:*/ +#line 368 "cwebdir/ctangle.w" static void get_output(void) @@ -644,7 +629,7 @@ restart:if(stack_ptr==stack)return; if(cur_byte==cur_end){ cur_val= -((int)cur_section); -pop_level(1); +pop_level(true); if(cur_val==0)goto restart; out_char(section_number);return; } @@ -658,7 +643,7 @@ case 0:cur_val= a;out_char(identifier);break; case 1:if(a==output_defs_flag)output_defs(); else/*40:*/ -#line 404 "cwebdir/ctangle.w" +#line 402 "cwebdir/ctangle.w" { a-= 024000; @@ -666,7 +651,7 @@ else if(a!=0){ #line 77 "cwebdir/ctang-w2c.ch" fputs(_("\n! Not present: <"),stdout); -#line 410 "cwebdir/ctangle.w" +#line 408 "cwebdir/ctangle.w" print_section_name(a+name_dir);err_print(">"); } @@ -674,7 +659,7 @@ } /*:40*/ -#line 393 "cwebdir/ctangle.w" +#line 389 "cwebdir/ctangle.w" break; default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; @@ -683,8 +668,8 @@ } } -/*:39*//*44:*/ -#line 465 "cwebdir/ctangle.w" +/*:38*//*43:*/ +#line 460 "cwebdir/ctangle.w" static void flush_buffer(void) @@ -698,35 +683,35 @@ cur_line++; } -/*:44*//*49:*/ -#line 520 "cwebdir/ctangle.w" +/*:43*//*48:*/ +#line 514 "cwebdir/ctangle.w" static void phase_two(void){ -web_file_open= 0; +web_file_open= false; cur_line= 1; /*33:*/ -#line 299 "cwebdir/ctangle.w" +#line 298 "cwebdir/ctangle.w" stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info; cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0; /*:33*/ -#line 525 "cwebdir/ctangle.w" +#line 519 "cwebdir/ctangle.w" /*51:*/ -#line 582 "cwebdir/ctangle.w" +#line 578 "cwebdir/ctangle.w" if(!output_defs_seen) output_defs(); /*:51*/ -#line 526 "cwebdir/ctangle.w" +#line 520 "cwebdir/ctangle.w" if(text_info->text_link==0&&cur_out_file==end_output_files){ #line 89 "cwebdir/ctang-w2c.ch" fputs(_("\n! No program text was specified."),stdout);mark_harmless; -#line 529 "cwebdir/ctangle.w" +#line 523 "cwebdir/ctangle.w" } else{ @@ -734,13 +719,13 @@ if(show_progress) #line 95 "cwebdir/ctang-w2c.ch" printf(_("\nWriting the output file (%s):"),C_file_name); -#line 535 "cwebdir/ctangle.w" +#line 529 "cwebdir/ctangle.w" } else{ if(show_progress){ #line 101 "cwebdir/ctang-w2c.ch" fputs(_("\nWriting the output files:"),stdout); -#line 539 "cwebdir/ctangle.w" +#line 533 "cwebdir/ctangle.w" printf(" (%s)",C_file_name); update_terminal; @@ -753,11 +738,11 @@ #line 130 "cwebdir/ctang-w2c.ch" fclose(C_file);C_file= NULL; -/*106:*/ +/*105:*/ #line 356 "cwebdir/ctang-w2c.ch" if((C_file= fopen(C_file_name,"r"))!=NULL){ -/*107:*/ +/*106:*/ #line 363 "cwebdir/ctang-w2c.ch" char x[BUFSIZ],y[BUFSIZ]; @@ -767,7 +752,7 @@ fatal(_("! Cannot open output file "),check_file_name); -if(temporary_output)/*108:*/ +if(temporary_output)/*107:*/ #line 378 "cwebdir/ctang-w2c.ch" do{ @@ -777,7 +762,7 @@ if(comparison)comparison= !memcmp(x,y,x_size); }while(comparison&&!feof(C_file)&&!feof(check_file)); -/*:108*/ +/*:107*/ #line 371 "cwebdir/ctang-w2c.ch" @@ -784,10 +769,10 @@ fclose(C_file);C_file= NULL; fclose(check_file);check_file= NULL; -/*:107*/ +/*:106*/ #line 358 "cwebdir/ctang-w2c.ch" -/*109:*/ +/*108:*/ #line 389 "cwebdir/ctang-w2c.ch" if(comparison) @@ -797,13 +782,13 @@ rename(check_file_name,C_file_name); } -/*:109*/ +/*:108*/ #line 359 "cwebdir/ctang-w2c.ch" }else rename(check_file_name,C_file_name); -/*:106*/ +/*:105*/ #line 132 "cwebdir/ctang-w2c.ch" for(an_output_file= end_output_files;an_output_file> cur_out_file;){ @@ -824,14 +809,14 @@ cur_end= (cur_repl+1)->tok_start; while(stack_ptr> stack)get_output(); flush_buffer();fclose(C_file);C_file= NULL; -/*110:*/ +/*109:*/ #line 402 "cwebdir/ctang-w2c.ch" if(0==strcmp("/dev/stdout",output_file_name)) -/*112:*/ +/*111:*/ #line 429 "cwebdir/ctang-w2c.ch" { -/*115:*/ +/*114:*/ #line 460 "cwebdir/ctang-w2c.ch" char in_buf[BUFSIZ+1]; @@ -840,7 +825,7 @@ fatal(_("! Cannot open output file "),check_file_name); -/*:115*/ +/*:114*/ #line 430 "cwebdir/ctang-w2c.ch" do{ @@ -849,7 +834,7 @@ fprintf(stdout,"%s",in_buf); }while(!feof(check_file)); fclose(check_file);check_file= NULL; -/*111:*/ +/*110:*/ #line 419 "cwebdir/ctang-w2c.ch" if(comparison) @@ -859,19 +844,19 @@ rename(check_file_name,output_file_name); } -/*:111*/ +/*:110*/ #line 437 "cwebdir/ctang-w2c.ch" } -/*:112*/ +/*:111*/ #line 404 "cwebdir/ctang-w2c.ch" else if(0==strcmp("/dev/stderr",output_file_name)) -/*113:*/ +/*112:*/ #line 442 "cwebdir/ctang-w2c.ch" { -/*115:*/ +/*114:*/ #line 460 "cwebdir/ctang-w2c.ch" char in_buf[BUFSIZ+1]; @@ -880,7 +865,7 @@ fatal(_("! Cannot open output file "),check_file_name); -/*:115*/ +/*:114*/ #line 443 "cwebdir/ctang-w2c.ch" do{ @@ -889,7 +874,7 @@ fprintf(stderr,"%s",in_buf); }while(!feof(check_file)); fclose(check_file);check_file= NULL; -/*111:*/ +/*110:*/ #line 419 "cwebdir/ctang-w2c.ch" if(comparison) @@ -899,20 +884,20 @@ rename(check_file_name,output_file_name); } -/*:111*/ +/*:110*/ #line 450 "cwebdir/ctang-w2c.ch" } -/*:113*/ +/*:112*/ #line 406 "cwebdir/ctang-w2c.ch" else if(0==strcmp("/dev/null",output_file_name)) -/*114:*/ +/*113:*/ #line 455 "cwebdir/ctang-w2c.ch" { int comparison= true; -/*111:*/ +/*110:*/ #line 419 "cwebdir/ctang-w2c.ch" if(comparison) @@ -922,17 +907,17 @@ rename(check_file_name,output_file_name); } -/*:111*/ +/*:110*/ #line 457 "cwebdir/ctang-w2c.ch" } -/*:114*/ +/*:113*/ #line 408 "cwebdir/ctang-w2c.ch" else{ if((C_file= fopen(output_file_name,"r"))!=NULL){ -/*107:*/ +/*106:*/ #line 363 "cwebdir/ctang-w2c.ch" char x[BUFSIZ],y[BUFSIZ]; @@ -942,7 +927,7 @@ fatal(_("! Cannot open output file "),check_file_name); -if(temporary_output)/*108:*/ +if(temporary_output)/*107:*/ #line 378 "cwebdir/ctang-w2c.ch" do{ @@ -952,7 +937,7 @@ if(comparison)comparison= !memcmp(x,y,x_size); }while(comparison&&!feof(C_file)&&!feof(check_file)); -/*:108*/ +/*:107*/ #line 371 "cwebdir/ctang-w2c.ch" @@ -959,10 +944,10 @@ fclose(C_file);C_file= NULL; fclose(check_file);check_file= NULL; -/*:107*/ +/*:106*/ #line 411 "cwebdir/ctang-w2c.ch" -/*111:*/ +/*110:*/ #line 419 "cwebdir/ctang-w2c.ch" if(comparison) @@ -972,7 +957,7 @@ rename(check_file_name,output_file_name); } -/*:111*/ +/*:110*/ #line 412 "cwebdir/ctang-w2c.ch" }else @@ -979,27 +964,27 @@ rename(check_file_name,output_file_name); } -/*:110*/ +/*:109*/ #line 151 "cwebdir/ctang-w2c.ch" } strcpy(check_file_name,""); -#line 577 "cwebdir/ctangle.w" +#line 573 "cwebdir/ctangle.w" /*:50*/ -#line 547 "cwebdir/ctangle.w" +#line 541 "cwebdir/ctangle.w" if(show_happiness){ if(show_progress)new_line; #line 107 "cwebdir/ctang-w2c.ch" fputs(_("Done."),stdout); -#line 551 "cwebdir/ctangle.w" +#line 545 "cwebdir/ctangle.w" } } } -/*:49*//*54:*/ -#line 593 "cwebdir/ctangle.w" +/*:48*//*54:*/ +#line 589 "cwebdir/ctangle.w" static void output_defs(void) @@ -1012,7 +997,7 @@ cur_end= (cur_text+1)->tok_start; C_printf("%s","#define "); out_state= normal; -protect= 1; +protect= true; while(cur_byte 0)C_printf("/*%d:*/",cur_val); @@ -1099,10 +1084,10 @@ break; /*:60*/ -#line 648 "cwebdir/ctangle.w" +#line 644 "cwebdir/ctangle.w" /*56:*/ -#line 666 "cwebdir/ctangle.w" +#line 662 "cwebdir/ctangle.w" case plus_plus:C_putc('+');C_putc('+');out_state= normal;break; case minus_minus:C_putc('-');C_putc('-');out_state= normal;break; @@ -1123,7 +1108,7 @@ break; /*:56*/ -#line 649 "cwebdir/ctangle.w" +#line 645 "cwebdir/ctangle.w" case'=':case'>':C_putc(cur_char);C_putc(' '); out_state= normal;break; @@ -1141,56 +1126,56 @@ } } -/*:55*//*65:*/ -#line 802 "cwebdir/ctangle.w" +/*:55*//*64:*/ +#line 794 "cwebdir/ctangle.w" static eight_bits skip_ahead(void) { eight_bits c; -while(1){ -if(loc> limit&&(get_line()==0))return(new_section); +while(true){ +if(loc> limit&&(get_line()==false))return new_section; *(limit+1)= '@'; while(*loc!='@')loc++; if(loc<=limit){ loc++;c= ccode[(eight_bits)*loc];loc++; -if(c!=ignore||*(loc-1)=='>')return(c); +if(c!=ignore||*(loc-1)=='>')return c; } } } -/*:65*//*67:*/ -#line 837 "cwebdir/ctangle.w" +/*:64*//*67:*/ +#line 833 "cwebdir/ctangle.w" static boolean skip_comment( boolean is_long_comment) { char c; -while(1){ +while(true){ if(loc> limit){ if(is_long_comment){ -if(get_line())return(comment_continues= 1); +if(get_line())return comment_continues= true; else{ #line 165 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in mid-comment")); -#line 848 "cwebdir/ctangle.w" +#line 844 "cwebdir/ctangle.w" -return(comment_continues= 0); +return comment_continues= false; } } -else return(comment_continues= 0); +else return comment_continues= false; } c= *(loc++); if(is_long_comment&&c=='*'&&*loc=='/'){ -loc++;return(comment_continues= 0); +loc++;return comment_continues= false; } if(c=='@'){ if(ccode[(eight_bits)*loc]==new_section){ #line 171 "cwebdir/ctang-w2c.ch" err_print(_("! Section name ended in mid-comment"));loc--; -#line 861 "cwebdir/ctangle.w" +#line 857 "cwebdir/ctangle.w" -return(comment_continues= 0); +return comment_continues= false; } else loc++; } @@ -1197,8 +1182,8 @@ } } -/*:67*//*70:*/ -#line 888 "cwebdir/ctangle.w" +/*:67*//*69:*/ +#line 881 "cwebdir/ctangle.w" static eight_bits get_next(void) @@ -1205,14 +1190,14 @@ { static int preprocessing= 0; eight_bits c; -while(1){ +while(true){ if(loc> limit){ if(preprocessing&&*(limit-1)!='\\')preprocessing= 0; -if(get_line()==0)return(new_section); +if(get_line()==false)return new_section; else if(print_where&&!no_where){ -print_where= 0; +print_where= false; /*85:*/ -#line 1220 "cwebdir/ctangle.w" +#line 1214 "cwebdir/ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -1227,21 +1212,21 @@ app_repl(a_l%0400);} /*:85*/ -#line 900 "cwebdir/ctangle.w" +#line 893 "cwebdir/ctangle.w" } -else return('\n'); +else return'\n'; } c= *loc; if(comment_continues||(c=='/'&&(*(loc+1)=='*'||*(loc+1)=='/'))){ skip_comment(comment_continues||*(loc+1)=='*'); -if(comment_continues)return('\n'); +if(comment_continues)return'\n'; else continue; } loc++; if(xisdigit(c)||c=='.')/*73:*/ -#line 969 "cwebdir/ctangle.w" +#line 964 "cwebdir/ctangle.w" { id_first= loc-1; if(*id_first=='.'&&!xisdigit(*loc))goto mistake; @@ -1262,17 +1247,17 @@ found:while(*loc=='u'||*loc=='U'||*loc=='l'||*loc=='L' ||*loc=='f'||*loc=='F')loc++; id_loc= loc; -return(constant); +return constant; } /*:73*/ -#line 912 "cwebdir/ctangle.w" +#line 905 "cwebdir/ctangle.w" else if(c=='\''||c=='"' ||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"')) ||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"'))) /*74:*/ -#line 997 "cwebdir/ctangle.w" +#line 992 "cwebdir/ctangle.w" { char delim= c; id_first= section_text+1; @@ -1281,18 +1266,18 @@ if(delim=='u'&&*loc=='8'){*++id_loc= *loc++;} delim= *loc++;*++id_loc= delim; } -while(1){ +while(true){ if(loc>=limit){ if(*(limit-1)!='\\'){ #line 177 "cwebdir/ctang-w2c.ch" err_print(_("! String didn't end"));loc= limit;break; -#line 1009 "cwebdir/ctangle.w" +#line 1004 "cwebdir/ctangle.w" } -if(get_line()==0){ +if(get_line()==false){ #line 183 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in middle of string"));loc= buffer;break; -#line 1013 "cwebdir/ctangle.w" +#line 1008 "cwebdir/ctangle.w" } else if(++id_loc<=section_text_end)*id_loc= '\n'; @@ -1312,33 +1297,33 @@ if(id_loc>=section_text_end){ #line 189 "cwebdir/ctang-w2c.ch" fputs(_("\n! String too long: "),stdout); -#line 1031 "cwebdir/ctangle.w" +#line 1026 "cwebdir/ctangle.w" term_write(section_text+1,25); err_print("..."); } id_loc++; -return(string); +return string; } /*:74*/ -#line 916 "cwebdir/ctangle.w" +#line 909 "cwebdir/ctangle.w" else if(isalpha(c)||isxalpha(c)||ishigh(c)) /*72:*/ -#line 962 "cwebdir/ctangle.w" +#line 957 "cwebdir/ctangle.w" { id_first= --loc; while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc) ||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc)); -id_loc= loc;return(identifier); +id_loc= loc;return identifier; } /*:72*/ -#line 918 "cwebdir/ctangle.w" +#line 911 "cwebdir/ctangle.w" else if(c=='@')/*75:*/ -#line 1042 "cwebdir/ctangle.w" +#line 1037 "cwebdir/ctangle.w" { c= ccode[(eight_bits)*loc++]; switch(c){ @@ -1345,7 +1330,7 @@ case ignore:continue; #line 195 "cwebdir/ctang-w2c.ch" case translit_code:err_print(_("! Use @l in limbo only"));continue; -#line 1047 "cwebdir/ctangle.w" +#line 1042 "cwebdir/ctangle.w" case control_text:while((c= skip_ahead())=='@'); @@ -1352,30 +1337,30 @@ if(*(loc-1)!='>') #line 201 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in control text")); -#line 1052 "cwebdir/ctangle.w" +#line 1047 "cwebdir/ctangle.w" continue; case section_name: cur_section_name_char= *(loc-1); /*77:*/ -#line 1090 "cwebdir/ctangle.w" +#line 1085 "cwebdir/ctangle.w" { char*k; /*79:*/ -#line 1110 "cwebdir/ctangle.w" +#line 1105 "cwebdir/ctangle.w" k= section_text; -while(1){ -if(loc> limit&&get_line()==0){ +while(true){ +if(loc> limit&&get_line()==false){ #line 219 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in section name")); -#line 1115 "cwebdir/ctangle.w" +#line 1110 "cwebdir/ctangle.w" loc= buffer+1;break; } c= *loc; /*80:*/ -#line 1134 "cwebdir/ctangle.w" +#line 1129 "cwebdir/ctangle.w" if(c=='@'){ c= *(loc+1); @@ -1385,13 +1370,13 @@ if(ccode[(eight_bits)c]==new_section){ #line 231 "cwebdir/ctang-w2c.ch" err_print(_("! Section name didn't end"));break; -#line 1142 "cwebdir/ctangle.w" +#line 1137 "cwebdir/ctangle.w" } if(ccode[(eight_bits)c]==section_name){ #line 237 "cwebdir/ctang-w2c.ch" err_print(_("! Nesting of section names not allowed"));break; -#line 1146 "cwebdir/ctangle.w" +#line 1141 "cwebdir/ctangle.w" } *(++k)= '@';loc++; @@ -1398,7 +1383,7 @@ } /*:80*/ -#line 1119 "cwebdir/ctangle.w" +#line 1114 "cwebdir/ctangle.w" loc++;if(k=section_text_end){ #line 225 "cwebdir/ctang-w2c.ch" fputs(_("\n! Section name too long: "),stdout); -#line 1128 "cwebdir/ctangle.w" +#line 1123 "cwebdir/ctangle.w" term_write(section_text+1,25); printf("...");mark_harmless; @@ -1417,7 +1402,7 @@ if(*k==' '&&k> section_text)k--; /*:79*/ -#line 1092 "cwebdir/ctangle.w" +#line 1087 "cwebdir/ctangle.w" if(k-section_text> 3&&strncmp(k-2,"...",3)==0) cur_section_name= section_lookup(section_text+1,k-3,1); @@ -1424,7 +1409,7 @@ else cur_section_name= section_lookup(section_text+1,k,0); if(cur_section_name_char=='(') /*47:*/ -#line 500 "cwebdir/ctangle.w" +#line 497 "cwebdir/ctangle.w" { for(an_output_file= cur_out_file; @@ -1436,38 +1421,38 @@ else{ #line 83 "cwebdir/ctang-w2c.ch" overflow(_("output files")); -#line 510 "cwebdir/ctangle.w" +#line 507 "cwebdir/ctangle.w" } } } /*:47*/ -#line 1098 "cwebdir/ctangle.w" +#line 1093 "cwebdir/ctangle.w" -return(section_name); +return section_name; } /*:77*/ -#line 1056 "cwebdir/ctangle.w" +#line 1051 "cwebdir/ctangle.w" case string:/*81:*/ -#line 1156 "cwebdir/ctangle.w" +#line 1151 "cwebdir/ctangle.w" { id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; while(*loc!='@'||*(loc+1)!='>')loc++; #line 243 "cwebdir/ctang-w2c.ch" if(loc>=limit)err_print(_("! Verbatim string didn't end")); -#line 1160 "cwebdir/ctangle.w" +#line 1155 "cwebdir/ctangle.w" id_loc= loc;loc+= 2; -return(string); +return string; } /*:81*/ -#line 1057 "cwebdir/ctangle.w" +#line 1052 "cwebdir/ctangle.w" case ord:/*76:*/ -#line 1069 "cwebdir/ctangle.w" +#line 1064 "cwebdir/ctangle.w" id_first= loc; if(*loc=='\\'){ @@ -1478,7 +1463,7 @@ if(*(loc+1)!='@') #line 207 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in ASCII constant")); -#line 1078 "cwebdir/ctangle.w" +#line 1073 "cwebdir/ctangle.w" else loc++; } @@ -1486,31 +1471,31 @@ if(loc> limit){ #line 213 "cwebdir/ctang-w2c.ch" err_print(_("! String didn't end"));loc= limit-1;break; -#line 1084 "cwebdir/ctangle.w" +#line 1079 "cwebdir/ctangle.w" } } loc++; -return(ord); +return ord; /*:76*/ -#line 1058 "cwebdir/ctangle.w" +#line 1053 "cwebdir/ctangle.w" -default:return(c); +default:return c; } } /*:75*/ -#line 919 "cwebdir/ctangle.w" +#line 912 "cwebdir/ctangle.w" else if(xisspace(c)){ if(!preprocessing||loc> limit)continue; -else return(' '); +else return' '; } else if(c=='#'&&loc==buffer+1)preprocessing= 1; mistake:/*71:*/ -#line 940 "cwebdir/ctangle.w" +#line 935 "cwebdir/ctangle.w" switch(c){ case'+':if(*loc=='+')compress(plus_plus);break; @@ -1534,14 +1519,14 @@ } /*:71*/ -#line 926 "cwebdir/ctangle.w" +#line 919 "cwebdir/ctangle.w" -return(c); +return c; } } -/*:70*//*84:*/ -#line 1194 "cwebdir/ctangle.w" +/*:69*//*83:*/ +#line 1186 "cwebdir/ctangle.w" static void scan_repl( @@ -1549,7 +1534,7 @@ { sixteen_bits a; if(t==section_name){/*85:*/ -#line 1220 "cwebdir/ctangle.w" +#line 1214 "cwebdir/ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -1564,11 +1549,11 @@ app_repl(a_l%0400);} /*:85*/ -#line 1200 "cwebdir/ctangle.w" +#line 1192 "cwebdir/ctangle.w" } -while(1)switch(a= get_next()){ +while(true)switch(a= get_next()){ /*86:*/ -#line 1233 "cwebdir/ctangle.w" +#line 1227 "cwebdir/ctangle.w" case identifier:a= id_lookup(id_first,id_loc,0)-name_dir; app_repl((a/0400)+0200); @@ -1576,7 +1561,7 @@ case section_name:if(t!=section_name)goto done; else{ /*87:*/ -#line 1266 "cwebdir/ctangle.w" +#line 1260 "cwebdir/ctangle.w" { char*try_loc= loc; while(*try_loc==' '&&try_loc text_info_end)overflow(_("text")); -#line 1213 "cwebdir/ctangle.w" +#line 1205 "cwebdir/ctangle.w" cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; } -/*:84*//*92:*/ -#line 1358 "cwebdir/ctangle.w" +/*:83*//*90:*/ +#line 1346 "cwebdir/ctangle.w" static void scan_section(void) @@ -1754,14 +1739,14 @@ name_pointer p; text_pointer q; sixteen_bits a; -section_count++;no_where= 1; +section_count++;no_where= true; if(*(loc-1)=='*'&&show_progress){ printf("*%d",section_count);update_terminal; } next_control= 0; -while(1){ -/*93:*/ -#line 1397 "cwebdir/ctangle.w" +while(true){ +/*92:*/ +#line 1387 "cwebdir/ctangle.w" while(next_controltext_link= 0; +cur_text->text_link= macro; } -/*:94*/ -#line 1374 "cwebdir/ctangle.w" +/*:93*/ +#line 1362 "cwebdir/ctangle.w" continue; } @@ -1804,36 +1789,36 @@ } if(next_control==section_name){ p= cur_section_name; -/*95:*/ -#line 1429 "cwebdir/ctangle.w" +/*94:*/ +#line 1419 "cwebdir/ctangle.w" while((next_control= get_next())=='+'); if(next_control!='='&&next_control!=eq_eq) continue; -/*:95*/ -#line 1382 "cwebdir/ctangle.w" +/*:94*/ +#line 1370 "cwebdir/ctangle.w" break; } return; } -no_where= print_where= 0; +no_where= print_where= false; +/*95:*/ +#line 1424 "cwebdir/ctangle.w" + /*96:*/ -#line 1434 "cwebdir/ctangle.w" +#line 1429 "cwebdir/ctangle.w" -/*97:*/ -#line 1439 "cwebdir/ctangle.w" - store_two_bytes((sixteen_bits)(0150000+section_count)); -/*:97*/ -#line 1435 "cwebdir/ctangle.w" +/*:96*/ +#line 1425 "cwebdir/ctangle.w" scan_repl(section_name); -/*98:*/ -#line 1443 "cwebdir/ctangle.w" +/*97:*/ +#line 1433 "cwebdir/ctangle.w" if(p==name_dir||p==0){ (last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text; @@ -1849,17 +1834,17 @@ cur_text->text_link= section_flag; -/*:98*/ -#line 1437 "cwebdir/ctangle.w" +/*:97*/ +#line 1427 "cwebdir/ctangle.w" -/*:96*/ -#line 1388 "cwebdir/ctangle.w" +/*:95*/ +#line 1376 "cwebdir/ctangle.w" } -/*:92*//*100:*/ -#line 1461 "cwebdir/ctangle.w" +/*:90*//*98:*/ +#line 1448 "cwebdir/ctangle.w" static void phase_one(void){ @@ -1872,15 +1857,15 @@ phase= 2; } -/*:100*//*102:*/ -#line 1479 "cwebdir/ctangle.w" +/*:98*//*100:*/ +#line 1465 "cwebdir/ctangle.w" static void skip_limbo(void) { char c; -while(1){ -if(loc> limit&&get_line()==0)return; +while(true){ +if(loc> limit&&get_line()==false)return; *(limit+1)= '@'; while(*loc!='@')loc++; if(loc++<=limit){ @@ -1887,8 +1872,8 @@ c= *loc++; if(ccode[(eight_bits)c]==new_section)break; switch(ccode[(eight_bits)c]){ -case translit_code:/*103:*/ -#line 1508 "cwebdir/ctangle.w" +case translit_code:/*102:*/ +#line 1496 "cwebdir/ctangle.w" while(xisspace(*loc)&&loc='0'&&*(loc-3)<='7')||!xisspace(*(loc-1))) #line 309 "cwebdir/ctang-w2c.ch" err_print(_("! Improper hex number following @l")); -#line 1514 "cwebdir/ctangle.w" +#line 1502 "cwebdir/ctangle.w" else{ unsigned int i; @@ -1908,7 +1893,7 @@ if(loc-beg>=translit_length) #line 315 "cwebdir/ctang-w2c.ch" err_print(_("! Replacement string in @l too long")); -#line 1524 "cwebdir/ctangle.w" +#line 1512 "cwebdir/ctangle.w" else{ strncpy(translit[i-0200],beg,(size_t)(loc-beg)); @@ -1916,8 +1901,8 @@ } } -/*:103*/ -#line 1492 "cwebdir/ctangle.w" +/*:102*/ +#line 1478 "cwebdir/ctangle.w" break; case format_code:case'@':break; case control_text:if(c=='q'||c=='Q'){ @@ -1925,13 +1910,13 @@ if(*(loc-1)!='>') #line 297 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in control text")); -#line 1498 "cwebdir/ctangle.w" +#line 1484 "cwebdir/ctangle.w" break; } #line 303 "cwebdir/ctang-w2c.ch" default:err_print(_("! Double @ should be used in limbo")); -#line 1502 "cwebdir/ctangle.w" +#line 1488 "cwebdir/ctangle.w" } } @@ -1938,8 +1923,8 @@ } } -/*:102*//*104:*/ -#line 1534 "cwebdir/ctangle.w" +/*:100*//*103:*/ +#line 1522 "cwebdir/ctangle.w" void print_stats(void){ @@ -1952,9 +1937,9 @@ printf(_("%ld bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); printf(_("%ld tokens (out of %ld)\n"), -#line 1545 "cwebdir/ctangle.w" +#line 1533 "cwebdir/ctangle.w" (ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } #line 341 "cwebdir/ctang-w2c.ch" -/*:104*/ +/*:103*/ Modified: branches/stable/source/src/texk/web2c/cwebboot.cin =================================================================== --- branches/stable/source/src/texk/web2c/cwebboot.cin 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebboot.cin 2021-04-01 20:52:49 UTC (rev 850) @@ -23,7 +23,7 @@ #include /*:3*//*89:*/ -#line 710 "cwebdir/comm-w2c.ch" +#line 709 "cwebdir/comm-w2c.ch" #if HAVE_GETTEXT #include @@ -34,7 +34,7 @@ #endif /*:89*//*91:*/ -#line 757 "cwebdir/comm-w2c.ch" +#line 756 "cwebdir/comm-w2c.ch" typedef bool boolean; #define HAVE_BOOLEAN @@ -44,7 +44,7 @@ #include /*:91*//*94:*/ -#line 796 "cwebdir/comm-w2c.ch" +#line 795 "cwebdir/comm-w2c.ch" #define CWEB #include "help.h" @@ -77,14 +77,22 @@ #define xisupper(c) (isupper((eight_bits) c) &&((eight_bits) c<0200) ) #define xisxdigit(c) (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \ +#define max_include_depth 10 \ + +#define max_file_name_length 1024 +#define cur_file file[include_depth] +#define cur_file_name file_name[include_depth] +#define cur_line line[include_depth] +#define web_file file[0] +#define web_file_name file_name[0] \ + #define length(c) (size_t) ((c+1) ->byte_start-(c) ->byte_start) #define print_id(c) term_write((c) ->byte_start,length((c) ) ) #define llink link #define rlink dummy.Rlink #define root name_dir->rlink \ + \ -#define chunk_marker 0 \ - #define spotless 0 #define harmless_message 1 #define error_message 2 @@ -94,15 +102,6 @@ #define confusion(s) fatal(_("! This can't happen: ") ,s) \ \ -#define max_include_depth 10 \ - -#define max_file_name_length 1024 -#define cur_file file[include_depth] -#define cur_file_name file_name[include_depth] -#define cur_line line[include_depth] -#define web_file file[0] -#define web_file_name file_name[0] \ - #define show_banner flags['b'] #define show_progress flags['p'] #define show_stats flags['s'] @@ -203,8 +202,33 @@ extern char*limit; /*:5*//*6:*/ -#line 120 "cwebdir/comm-w2c.h" +#line 122 "cwebdir/comm-w2c.h" +extern int include_depth; +extern FILE*file[]; +extern FILE*change_file; +extern char file_name[][max_file_name_length]; + +extern char change_file_name[]; +extern char check_file_name[]; +extern int line[]; +extern int change_line; +extern int change_depth; +extern boolean input_has_ended; +extern boolean changing; +extern boolean web_file_open; + +/*:6*//*8:*/ +#line 143 "cwebdir/comm-w2c.h" + +extern sixteen_bits section_count; +extern boolean changed_section[]; +extern boolean change_pending; +extern boolean print_where; + +/*:8*//*9:*/ +#line 157 "cwebdir/comm-w2c.h" + typedef struct name_info{ char*byte_start; struct name_info*link; @@ -227,50 +251,25 @@ extern hash_pointer hash_end; extern hash_pointer h; -/*:6*//*8:*/ -#line 164 "cwebdir/comm-w2c.h" +/*:9*//*11:*/ +#line 201 "cwebdir/comm-w2c.h" extern int history; -/*:8*//*10:*/ -#line 184 "cwebdir/comm-w2c.h" +/*:11*//*13:*/ +#line 218 "cwebdir/comm-w2c.h" -extern int include_depth; -extern FILE*file[]; -extern FILE*change_file; +extern int argc; +extern char**argv; extern char C_file_name[]; extern char tex_file_name[]; extern char idx_file_name[]; extern char scn_file_name[]; -extern char file_name[][max_file_name_length]; - -extern char change_file_name[]; -extern char check_file_name[]; -extern int line[]; -extern int change_line; -extern int change_depth; -extern boolean input_has_ended; -extern boolean changing; -extern boolean web_file_open; - -/*:10*//*12:*/ -#line 209 "cwebdir/comm-w2c.h" - -extern sixteen_bits section_count; -extern boolean changed_section[]; -extern boolean change_pending; -extern boolean print_where; - -/*:12*//*13:*/ -#line 223 "cwebdir/comm-w2c.h" - -extern int argc; -extern char**argv; extern boolean flags[]; extern const char*use_language; /*:13*//*14:*/ -#line 236 "cwebdir/comm-w2c.h" +#line 235 "cwebdir/comm-w2c.h" extern FILE*C_file; extern FILE*tex_file; @@ -291,10 +290,11 @@ /*:18*//*19:*/ #line 92 "cwebdir/common.w" + int phase; /*:19*//*21:*/ -#line 129 "cwebdir/common.w" +#line 130 "cwebdir/common.w" char section_text[longest_name+1]; char*section_text_end= section_text+longest_name; @@ -302,12 +302,12 @@ char*id_loc; /*:21*//*22:*/ -#line 149 "cwebdir/common.w" +#line 150 "cwebdir/common.w" char buffer[long_buf_size]; char*buffer_end= buffer+buf_size-2; +char*loc= buffer; char*limit= buffer; -char*loc= buffer; /*:22*//*25:*/ #line 194 "cwebdir/common.w" @@ -324,25 +324,25 @@ int change_depth; boolean input_has_ended; boolean changing; -boolean web_file_open= 0; +boolean web_file_open= false; /*:25*//*26:*/ #line 220 "cwebdir/common.w" -char change_buffer[buf_size]; -char*change_limit; +static char change_buffer[buf_size]; +static char*change_limit; /*:26*//*37:*/ -#line 401 "cwebdir/common.w" +#line 399 "cwebdir/common.w" sixteen_bits section_count; boolean changed_section[max_sections]; boolean change_pending; -boolean print_where= 0; +boolean print_where= false; /*:37*//*43:*/ -#line 598 "cwebdir/common.w" +#line 596 "cwebdir/common.w" char byte_mem[max_bytes]; char*byte_mem_end= byte_mem+max_bytes-1; @@ -350,13 +350,13 @@ name_pointer name_dir_end= name_dir+max_names-1; /*:43*//*44:*/ -#line 609 "cwebdir/common.w" +#line 607 "cwebdir/common.w" +char*byte_ptr; name_pointer name_ptr; -char*byte_ptr; /*:44*//*46:*/ -#line 629 "cwebdir/common.w" +#line 627 "cwebdir/common.w" name_pointer hash[hash_size]; hash_pointer hash_end= hash+hash_size-1; @@ -363,12 +363,12 @@ hash_pointer h; /*:46*//*65:*/ -#line 1017 "cwebdir/common.w" +#line 1014 "cwebdir/common.w" int history= spotless; /*:65*//*73:*/ -#line 1138 "cwebdir/common.w" +#line 1135 "cwebdir/common.w" int argc; char**argv; @@ -378,11 +378,11 @@ #line 431 "cwebdir/comm-w2c.ch" char scn_file_name[max_file_name_length]; char check_file_name[max_file_name_length]; -#line 1145 "cwebdir/common.w" +#line 1142 "cwebdir/common.w" boolean flags[128]; /*:73*//*83:*/ -#line 1286 "cwebdir/common.w" +#line 1282 "cwebdir/common.w" FILE*C_file; FILE*tex_file; @@ -393,7 +393,7 @@ #line 576 "cwebdir/comm-w2c.ch" FILE*active_file; char*found_filename; -#line 1292 "cwebdir/common.w" +#line 1288 "cwebdir/common.w" #line 593 "cwebdir/comm-w2c.ch" /*:83*//*86:*/ @@ -416,8 +416,15 @@ #line 70 "cwebdir/common.w" /*7:*/ -#line 143 "cwebdir/comm-w2c.h" +#line 137 "cwebdir/comm-w2c.h" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); + +/*:7*//*10:*/ +#line 180 "cwebdir/comm-w2c.h" + extern boolean names_match(name_pointer,const char*,size_t,eight_bits); extern name_pointer id_lookup(const char*,const char*,char); @@ -428,8 +435,8 @@ extern void print_section_name(name_pointer); extern void sprint_section_name(char*,name_pointer); -/*:7*//*9:*/ -#line 167 "cwebdir/comm-w2c.h" +/*:10*//*12:*/ +#line 204 "cwebdir/comm-w2c.h" extern int wrap_up(void); extern void err_print(const char*); @@ -436,54 +443,43 @@ extern void fatal(const char*,const char*); extern void overflow(const char*); -/*:9*//*11:*/ -#line 203 "cwebdir/comm-w2c.h" +/*:12*//*15:*/ +#line 244 "cwebdir/comm-w2c.h" -extern boolean get_line(void); -extern void check_complete(void); -extern void reset_input(void); - -/*:11*//*15:*/ -#line 245 "cwebdir/comm-w2c.h" - extern void common_init(void); extern void print_stats(void); extern void cb_show_banner(void); -/*:15*//*23:*/ -#line 159 "cwebdir/common.w" - +/*:15*//*24:*/ +#line 180 "cwebdir/common.w" static boolean input_ln(FILE*); -/*:23*//*27:*/ -#line 231 "cwebdir/common.w" - +/*:24*//*28:*/ +#line 241 "cwebdir/common.w" static void prime_the_change_buffer(void); -/*:27*//*32:*/ -#line 303 "cwebdir/common.w" - +/*:28*//*33:*/ +#line 340 "cwebdir/common.w" static void check_change(void); -/*:32*//*55:*/ -#line 776 "cwebdir/common.w" +/*:33*//*55:*/ +#line 774 "cwebdir/common.w" static int web_strcmp(char*,int,char*,int); static name_pointer add_section_name(name_pointer,int,char*,char*,int); static void extend_section_name(name_pointer,char*,char*,int); -/*:55*//*63:*/ -#line 972 "cwebdir/common.w" - +/*:55*//*64:*/ +#line 1002 "cwebdir/common.w" static int section_name_cmp(char**,int,name_pointer); -/*:63*//*75:*/ -#line 1170 "cwebdir/common.w" - +/*:64*//*76:*/ +#line 1197 "cwebdir/common.w" static void scan_args(void); -/*:75*//*96:*/ -#line 809 "cwebdir/comm-w2c.ch" +#line 496 "cwebdir/comm-w2c.ch" +/*:76*//*96:*/ +#line 808 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str); static void cb_usagehelp(const_string*message,const_string bug_email); @@ -493,7 +489,7 @@ /*:1*//*20:*/ -#line 98 "cwebdir/common.w" +#line 99 "cwebdir/common.w" void common_init(void) @@ -500,7 +496,7 @@ { #line 78 "cwebdir/comm-w2c.ch" /*45:*/ -#line 613 "cwebdir/common.w" +#line 611 "cwebdir/common.w" name_dir->byte_start= byte_ptr= byte_mem; name_ptr= name_dir+1; @@ -508,7 +504,7 @@ root= NULL; /*:45*//*47:*/ -#line 636 "cwebdir/common.w" +#line 634 "cwebdir/common.w" for(h= hash;h<=hash_end;*h++= NULL); @@ -516,7 +512,7 @@ #line 78 "cwebdir/comm-w2c.ch" /*92:*/ -#line 771 "cwebdir/comm-w2c.ch" +#line 770 "cwebdir/comm-w2c.ch" kpse_set_program_name(argv[0],"cweb"); @@ -525,7 +521,7 @@ #line 85 "cwebdir/comm-w2c.ch" /*90:*/ -#line 719 "cwebdir/comm-w2c.ch" +#line 718 "cwebdir/comm-w2c.ch" setlocale(LC_MESSAGES,setlocale(LC_CTYPE,"")); texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}"); @@ -544,18 +540,18 @@ #line 85 "cwebdir/comm-w2c.ch" /*74:*/ -#line 1151 "cwebdir/common.w" +#line 1148 "cwebdir/common.w" #line 438 "cwebdir/comm-w2c.ch" make_xrefs= true; temporary_output= true; -#line 1153 "cwebdir/common.w" +#line 1150 "cwebdir/common.w" show_stats= false; /*:74*/ #line 86 "cwebdir/comm-w2c.ch" -#line 104 "cwebdir/common.w" +#line 105 "cwebdir/common.w" /*84:*/ #line 593 "cwebdir/comm-w2c.ch" @@ -588,16 +584,16 @@ if((tex_file= fopen(check_file_name,"wb"))==NULL) fatal(_("! Cannot open output file "),check_file_name); } -#line 1304 "cwebdir/common.w" +#line 1300 "cwebdir/common.w" #line 628 "cwebdir/comm-w2c.ch" /*:84*/ -#line 104 "cwebdir/common.w" +#line 105 "cwebdir/common.w" } -/*:20*//*24:*/ -#line 162 "cwebdir/common.w" +/*:20*//*23:*/ +#line 160 "cwebdir/common.w" static boolean input_ln( FILE*fp) @@ -604,26 +600,26 @@ { register int c= EOF; register char*k; -if(feof(fp))return(0); +if(feof(fp))return false; limit= k= buffer; while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n') #line 92 "cwebdir/comm-w2c.ch" if((*(k++)= c)!=' '&&c!='\r')limit= k; -#line 172 "cwebdir/common.w" +#line 170 "cwebdir/common.w" if(k> buffer_end) if((c= getc(fp))!=EOF&&c!='\n'){ #line 98 "cwebdir/comm-w2c.ch" ungetc(c,fp);loc= buffer;err_print(_("! Input line too long")); -#line 175 "cwebdir/common.w" +#line 173 "cwebdir/common.w" } -if(c==EOF&&limit==buffer)return(0); +if(c==EOF&&limit==buffer)return false; -return(1); +return true; } -/*:24*//*28:*/ -#line 234 "cwebdir/common.w" +/*:23*//*27:*/ +#line 231 "cwebdir/common.w" static void prime_the_change_buffer(void) @@ -630,9 +626,9 @@ { change_limit= change_buffer; /*29:*/ -#line 248 "cwebdir/common.w" +#line 247 "cwebdir/common.w" -while(1){ +while(true){ change_line++; if(!input_ln(change_file))return; if(limit buffer+1&&buffer[0]=='@'){ char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1]; /*34:*/ -#line 344 "cwebdir/common.w" +#line 342 "cwebdir/common.w" if(xyz_code=='x'||xyz_code=='z'){ #line 133 "cwebdir/comm-w2c.ch" loc= buffer+2;err_print(_("! Where is the matching @y?")); -#line 347 "cwebdir/common.w" +#line 345 "cwebdir/common.w" } else if(xyz_code=='y'){ @@ -721,7 +717,7 @@ printf("\n! Hmm... %d ",n); #line 139 "cwebdir/comm-w2c.ch" err_print(_("of the preceding lines failed to match")); -#line 354 "cwebdir/common.w" +#line 352 "cwebdir/common.w" } change_depth= include_depth; @@ -729,11 +725,11 @@ } /*:34*/ -#line 328 "cwebdir/common.w" +#line 324 "cwebdir/common.w" } /*31:*/ -#line 275 "cwebdir/common.w" +#line 274 "cwebdir/common.w" { change_limit= change_buffer+(ptrdiff_t)(limit-buffer); @@ -741,16 +737,16 @@ } /*:31*/ -#line 330 "cwebdir/common.w" +#line 326 "cwebdir/common.w" -changing= 0;cur_line++; +changing= false;cur_line++; while(!input_ln(cur_file)){ if(include_depth==0){ #line 127 "cwebdir/comm-w2c.ch" err_print(_("! CWEB file ended during a change")); -#line 335 "cwebdir/common.w" +#line 331 "cwebdir/common.w" -input_has_ended= 1;return; +input_has_ended= true;return; } include_depth--;cur_line++; } @@ -758,8 +754,8 @@ } } -/*:33*//*35:*/ -#line 364 "cwebdir/common.w" +/*:32*//*35:*/ +#line 362 "cwebdir/common.w" void reset_input(void) @@ -766,7 +762,7 @@ { limit= buffer;loc= buffer+1;buffer[0]= ' '; /*36:*/ -#line 379 "cwebdir/common.w" +#line 377 "cwebdir/common.w" #line 149 "cwebdir/comm-w2c.ch" if((found_filename= kpse_find_cweb(web_file_name))==NULL|| @@ -779,10 +775,10 @@ ((strncmp(found_filename,"./",2)==0)?2:0)); free(found_filename); }else fatal(_("! Filename too long\n"),found_filename); -#line 385 "cwebdir/common.w" +#line 383 "cwebdir/common.w" -web_file_open= 1; +web_file_open= true; #line 165 "cwebdir/comm-w2c.ch" if((found_filename= kpse_find_cweb(change_file_name))==NULL|| (change_file= fopen(found_filename,"r"))==NULL){ @@ -794,19 +790,19 @@ ((strncmp(found_filename,"./",2)==0)?2:0)); free(found_filename); }else fatal(_("! Filename too long\n"),found_filename); -#line 390 "cwebdir/common.w" +#line 388 "cwebdir/common.w" /*:36*/ -#line 369 "cwebdir/common.w" +#line 367 "cwebdir/common.w" include_depth= 0;cur_line= 0;change_line= 0; change_depth= include_depth; changing= 1;prime_the_change_buffer();changing= !changing; -limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= 0; +limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false; } /*:35*//*38:*/ -#line 408 "cwebdir/common.w" +#line 406 "cwebdir/common.w" boolean get_line(void) { @@ -813,21 +809,21 @@ restart: if(changing&&include_depth==change_depth) /*41:*/ -#line 516 "cwebdir/common.w" +#line 514 "cwebdir/common.w" { change_line++; if(!input_ln(change_file)){ #line 274 "cwebdir/comm-w2c.ch" err_print(_("! Change file ended without @z")); -#line 520 "cwebdir/common.w" +#line 518 "cwebdir/common.w" buffer[0]= '@';buffer[1]= 'z';limit= buffer+2; } if(limit> buffer){ if(change_pending){ -if_section_start_make_pending(0); +if_section_start_make_pending(false); if(change_pending){ -changed_section[section_count]= 1;change_pending= 0; +changed_section[section_count]= true;change_pending= false; } } *limit= ' '; @@ -837,11 +833,11 @@ loc= buffer+2; #line 280 "cwebdir/comm-w2c.ch" err_print(_("! Where is the matching @z?")); -#line 536 "cwebdir/common.w" +#line 534 "cwebdir/common.w" } else if(buffer[1]=='z'){ -prime_the_change_buffer();changing= !changing;print_where= 1; +prime_the_change_buffer();changing= !changing;print_where= true; } } } @@ -848,16 +844,16 @@ } /*:41*/ -#line 413 "cwebdir/common.w" +#line 411 "cwebdir/common.w" if(!changing||include_depth> change_depth){ /*40:*/ -#line 499 "cwebdir/common.w" +#line 497 "cwebdir/common.w" { cur_line++; while(!input_ln(cur_file)){ -print_where= 1; -if(include_depth==0){input_has_ended= 1;break;} +print_where= true; +if(include_depth==0){input_has_ended= true;break;} else{ fclose(cur_file);include_depth--; if(changing&&include_depth==change_depth)break; @@ -871,11 +867,11 @@ } /*:40*/ -#line 415 "cwebdir/common.w" +#line 413 "cwebdir/common.w" if(changing&&include_depth==change_depth)goto restart; } -if(input_has_ended)return 0; +if(input_has_ended)return false; loc= buffer;*limit= ' '; if(buffer[0]=='@'&&(buffer[1]=='i'||buffer[1]=='I')){ loc= buffer+2;*limit= '"'; @@ -883,7 +879,7 @@ if(loc>=limit){ #line 180 "cwebdir/comm-w2c.ch" err_print(_("! Include file name not given")); -#line 425 "cwebdir/common.w" +#line 423 "cwebdir/common.w" goto restart; } @@ -890,18 +886,18 @@ if(include_depth>=max_include_depth-1){ #line 186 "cwebdir/comm-w2c.ch" err_print(_("! Too many nested includes")); -#line 430 "cwebdir/common.w" +#line 428 "cwebdir/common.w" goto restart; } include_depth++; /*39:*/ -#line 453 "cwebdir/common.w" +#line 451 "cwebdir/common.w" { #line 223 "cwebdir/comm-w2c.ch" char*cur_file_name_end= cur_file_name+max_file_name_length-1; char*k= cur_file_name; -#line 458 "cwebdir/common.w" +#line 456 "cwebdir/common.w" if(*loc=='"'){ loc++; @@ -922,25 +918,25 @@ ((strncmp(found_filename,"./",2)==0)?2:0)); free(found_filename); }else fatal(_("! Filename too long\n"),found_filename); -#line 469 "cwebdir/common.w" -cur_line= 0;print_where= 1; +#line 467 "cwebdir/common.w" +cur_line= 0;print_where= true; goto restart; } #line 268 "cwebdir/comm-w2c.ch" include_depth--;err_print(_("! Cannot open include file"));goto restart; -#line 497 "cwebdir/common.w" +#line 495 "cwebdir/common.w" } /*:39*/ -#line 434 "cwebdir/common.w" +#line 432 "cwebdir/common.w" } -return 1; +return true; } #line 201 "cwebdir/comm-w2c.ch" /*:38*//*42:*/ -#line 548 "cwebdir/common.w" +#line 546 "cwebdir/common.w" void check_complete(void){ @@ -947,16 +943,16 @@ if(change_limit!=change_buffer){ strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1)); limit= buffer+(ptrdiff_t)(change_limit-change_buffer); -changing= 1;change_depth= include_depth;loc= buffer; +changing= true;change_depth= include_depth;loc= buffer; #line 286 "cwebdir/comm-w2c.ch" err_print(_("! Change file entry did not match")); -#line 556 "cwebdir/common.w" +#line 554 "cwebdir/common.w" } } /*:42*//*48:*/ -#line 641 "cwebdir/common.w" +#line 639 "cwebdir/common.w" name_pointer id_lookup( @@ -971,7 +967,7 @@ if(last==NULL)for(last= first;*last!='\0';last++); l= (int)(last-first); /*49:*/ -#line 664 "cwebdir/common.w" +#line 662 "cwebdir/common.w" h= (eight_bits)*i; while(++ilink; @@ -991,15 +987,15 @@ } /*:50*/ -#line 655 "cwebdir/common.w" +#line 653 "cwebdir/common.w" if(p==name_ptr)/*51:*/ -#line 683 "cwebdir/common.w" +#line 681 "cwebdir/common.w" { #line 293 "cwebdir/comm-w2c.ch" if(byte_ptr+l> byte_mem_end)overflow(_("byte memory")); if(name_ptr>=name_dir_end)overflow(_("name")); -#line 686 "cwebdir/common.w" +#line 684 "cwebdir/common.w" strncpy(byte_ptr,first,l); (++name_ptr)->byte_start= byte_ptr+= l; init_p(p,t); @@ -1006,13 +1002,13 @@ } /*:51*/ -#line 656 "cwebdir/common.w" +#line 654 "cwebdir/common.w" -return(p); +return p; } /*:48*//*52:*/ -#line 715 "cwebdir/common.w" +#line 713 "cwebdir/common.w" void print_section_name( @@ -1033,7 +1029,7 @@ } /*:52*//*53:*/ -#line 734 "cwebdir/common.w" +#line 732 "cwebdir/common.w" void sprint_section_name( @@ -1056,7 +1052,7 @@ } /*:53*//*54:*/ -#line 755 "cwebdir/common.w" +#line 753 "cwebdir/common.w" void print_prefix_name( @@ -1069,7 +1065,7 @@ } /*:54*//*56:*/ -#line 781 "cwebdir/common.w" +#line 779 "cwebdir/common.w" static int web_strcmp( char*j, @@ -1087,7 +1083,7 @@ } /*:56*//*57:*/ -#line 810 "cwebdir/common.w" +#line 808 "cwebdir/common.w" static name_pointer add_section_name( @@ -1103,7 +1099,7 @@ #line 301 "cwebdir/comm-w2c.ch" if(s+name_len> byte_mem_end)overflow(_("byte memory")); if(name_ptr+1>=name_dir_end)overflow(_("name")); -#line 824 "cwebdir/common.w" +#line 822 "cwebdir/common.w" (++name_ptr)->byte_start= byte_ptr= s+name_len; if(ispref){ *(byte_ptr-1)= ' '; @@ -1120,7 +1116,7 @@ } /*:57*//*58:*/ -#line 839 "cwebdir/common.w" +#line 837 "cwebdir/common.w" static void extend_section_name( @@ -1134,7 +1130,7 @@ int name_len= (int)(last-first)+ispref; #line 308 "cwebdir/comm-w2c.ch" if(name_ptr>=name_dir_end)overflow(_("name")); -#line 851 "cwebdir/common.w" +#line 849 "cwebdir/common.w" while(q->link!=name_dir)q= q->link; q->link= name_ptr; s= name_ptr->byte_start; @@ -1141,7 +1137,7 @@ name_ptr->link= name_dir; #line 314 "cwebdir/comm-w2c.ch" if(s+name_len> byte_mem_end)overflow(_("byte memory")); -#line 856 "cwebdir/common.w" +#line 854 "cwebdir/common.w" (++name_ptr)->byte_start= byte_ptr= s+name_len; strncpy(s,first,name_len); if(ispref)*(byte_ptr-1)= ' '; @@ -1148,7 +1144,7 @@ } /*:58*//*59:*/ -#line 867 "cwebdir/common.w" +#line 865 "cwebdir/common.w" name_pointer section_lookup( @@ -1163,7 +1159,7 @@ int name_len= (int)(last-first)+1; /*60:*/ -#line 891 "cwebdir/common.w" +#line 889 "cwebdir/common.w" while(p){ c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p)); @@ -1175,12 +1171,12 @@ if(r!=NULL){ #line 320 "cwebdir/comm-w2c.ch" fputs(_("\n! Ambiguous prefix: matches <"),stdout); -#line 901 "cwebdir/common.w" +#line 899 "cwebdir/common.w" print_prefix_name(p); #line 326 "cwebdir/comm-w2c.ch" fputs(_(">\n and <"),stdout); -#line 904 "cwebdir/common.w" +#line 902 "cwebdir/common.w" print_prefix_name(r); err_print(">"); return name_dir; @@ -1194,19 +1190,19 @@ } /*:60*/ -#line 881 "cwebdir/common.w" +#line 879 "cwebdir/common.w" /*61:*/ -#line 916 "cwebdir/common.w" +#line 914 "cwebdir/common.w" if(r==NULL) return add_section_name(par,c,first,last+1,ispref); /*:61*/ -#line 882 "cwebdir/common.w" +#line 880 "cwebdir/common.w" /*62:*/ -#line 924 "cwebdir/common.w" +#line 922 "cwebdir/common.w" switch(section_name_cmp(&first,name_len,r)){ @@ -1214,7 +1210,7 @@ if(!ispref){ #line 332 "cwebdir/comm-w2c.ch" fputs(_("\n! New name is a prefix of <"),stdout); -#line 930 "cwebdir/common.w" +#line 928 "cwebdir/common.w" print_section_name(r); err_print(">"); @@ -1228,7 +1224,7 @@ case bad_extension: #line 338 "cwebdir/comm-w2c.ch" fputs(_("\n! New name extends <"),stdout); -#line 942 "cwebdir/common.w" +#line 940 "cwebdir/common.w" print_section_name(r); err_print(">"); @@ -1236,12 +1232,12 @@ default: #line 344 "cwebdir/comm-w2c.ch" fputs(_("\n! Section name incompatible with <"),stdout); -#line 948 "cwebdir/common.w" +#line 946 "cwebdir/common.w" print_prefix_name(r); #line 350 "cwebdir/comm-w2c.ch" fputs(_(">,\n which abbreviates <"),stdout); -#line 951 "cwebdir/common.w" +#line 949 "cwebdir/common.w" print_section_name(r); err_print(">"); return r; @@ -1248,12 +1244,12 @@ } /*:62*/ -#line 883 "cwebdir/common.w" +#line 881 "cwebdir/common.w" } -/*:59*//*64:*/ -#line 975 "cwebdir/common.w" +/*:59*//*63:*/ +#line 970 "cwebdir/common.w" static int section_name_cmp( char**pfirst, @@ -1265,7 +1261,7 @@ char*ss,*s= first_chunk(r); int c; int ispref; -while(1){ +while(true){ ss= (r+1)->byte_start-1; if(*ss==' '&&ss>=r->byte_start)ispref= 1,q= q->link; else ispref= 0,ss++,q= name_dir; @@ -1286,8 +1282,8 @@ } } -/*:64*//*66:*/ -#line 1027 "cwebdir/common.w" +/*:63*//*66:*/ +#line 1024 "cwebdir/common.w" void err_print( @@ -1296,7 +1292,7 @@ char*k,*l; printf(*s=='!'?"\n%s":"%s",s); if(web_file_open)/*67:*/ -#line 1047 "cwebdir/common.w" +#line 1044 "cwebdir/common.w" {if(changing&&include_depth==change_depth) #line 358 "cwebdir/comm-w2c.ch" @@ -1303,7 +1299,7 @@ printf(_(". (l. %d of change file)\n"),change_line); else if(include_depth==0)printf(_(". (l. %d)\n"),cur_line); else printf(_(". (l. %d of include file %s)\n"),cur_line,cur_file_name); -#line 1052 "cwebdir/common.w" +#line 1049 "cwebdir/common.w" l= (loc>=limit?limit:loc); if(l> buffer){ for(k= buffer;k 0){ if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/ #line 510 "cwebdir/comm-w2c.ch" @@ -1428,7 +1424,7 @@ if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0) /*95:*/ -#line 800 "cwebdir/comm-w2c.ch" +#line 799 "cwebdir/comm-w2c.ch" cb_usagehelp(program==ctangle?CTANGLEHELP: program==cweave?CWEAVEHELP:CTWILLHELP,NULL); @@ -1440,7 +1436,7 @@ if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0) /*98:*/ -#line 847 "cwebdir/comm-w2c.ch" +#line 846 "cwebdir/comm-w2c.ch" printversionandexit(cb_banner, program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth", @@ -1458,10 +1454,10 @@ {show_banner= show_progress= show_happiness= 0;continue;} for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++) if(*dot_pos=='v'){ -show_banner= show_progress= show_happiness= 1; +show_banner= show_progress= show_happiness= true; }else if(*dot_pos=='q'){ -show_banner= show_progress= show_happiness= 0; +show_banner= show_progress= show_happiness= false; }else if(*dot_pos=='d'){ if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/ @@ -1469,7 +1465,7 @@ cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); -#line 1279 "cwebdir/common.w" +#line 1275 "cwebdir/common.w" #line 563 "cwebdir/comm-w2c.ch" /*:81*/ @@ -1482,13 +1478,13 @@ use_language= ++dot_pos; break; }else -#line 1265 "cwebdir/common.w" +#line 1261 "cwebdir/common.w" flags[(eight_bits)*dot_pos]= flag_change; } #line 555 "cwebdir/comm-w2c.ch" /*:80*/ -#line 1185 "cwebdir/common.w" +#line 1179 "cwebdir/common.w" else{ s= name_pos= *argv;dot_pos= NULL; @@ -1500,9 +1496,9 @@ else s++; } -#line 1193 "cwebdir/common.w" +#line 1187 "cwebdir/common.w" if(!found_web)/*77:*/ -#line 1210 "cwebdir/common.w" +#line 1206 "cwebdir/common.w" { if(s-*argv> max_file_name_length-5) @@ -1509,11 +1505,11 @@ /*82:*/ #line 563 "cwebdir/comm-w2c.ch" fatal(_("! Filename too long\n"),*argv); -#line 1281 "cwebdir/common.w" +#line 1277 "cwebdir/common.w" /*:82*/ -#line 1213 "cwebdir/common.w" +#line 1209 "cwebdir/common.w" if(dot_pos==NULL) sprintf(web_file_name,"%s.w",*argv); @@ -1521,19 +1517,19 @@ strcpy(web_file_name,*argv); *dot_pos= 0; } -#line 1221 "cwebdir/common.w" +#line 1217 "cwebdir/common.w" sprintf(tex_file_name,"%s.tex",name_pos); sprintf(idx_file_name,"%s.idx",name_pos); sprintf(scn_file_name,"%s.scn",name_pos); sprintf(C_file_name,"%s.c",name_pos); -found_web= 1; +found_web= true; } /*:77*/ -#line 1194 "cwebdir/common.w" +#line 1188 "cwebdir/common.w" else if(!found_change)/*78:*/ -#line 1228 "cwebdir/common.w" +#line 1224 "cwebdir/common.w" { if(strcmp(*argv,"-")!=0){ @@ -1541,24 +1537,24 @@ /*82:*/ #line 563 "cwebdir/comm-w2c.ch" fatal(_("! Filename too long\n"),*argv); -#line 1281 "cwebdir/common.w" +#line 1277 "cwebdir/common.w" /*:82*/ -#line 1232 "cwebdir/common.w" +#line 1228 "cwebdir/common.w" if(dot_pos==NULL) sprintf(change_file_name,"%s.ch",*argv); else strcpy(change_file_name,*argv); } -found_change= 1; +found_change= true; } /*:78*/ -#line 1195 "cwebdir/common.w" +#line 1189 "cwebdir/common.w" else if(!found_out)/*79:*/ -#line 1240 "cwebdir/common.w" +#line 1236 "cwebdir/common.w" { if(s-*argv> max_file_name_length-5) @@ -1565,11 +1561,11 @@ /*82:*/ #line 563 "cwebdir/comm-w2c.ch" fatal(_("! Filename too long\n"),*argv); -#line 1281 "cwebdir/common.w" +#line 1277 "cwebdir/common.w" /*:82*/ -#line 1243 "cwebdir/common.w" +#line 1239 "cwebdir/common.w" if(dot_pos==NULL){ sprintf(tex_file_name,"%s.tex",*argv); @@ -1585,11 +1581,11 @@ sprintf(scn_file_name,"%s.scn",*argv); } } -found_out= 1; +found_out= true; } /*:79*/ -#line 1196 "cwebdir/common.w" +#line 1190 "cwebdir/common.w" else/*81:*/ #line 555 "cwebdir/comm-w2c.ch" @@ -1596,11 +1592,11 @@ cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); -#line 1279 "cwebdir/common.w" +#line 1275 "cwebdir/common.w" #line 563 "cwebdir/comm-w2c.ch" /*:81*/ -#line 1197 "cwebdir/common.w" +#line 1191 "cwebdir/common.w" } } @@ -1609,17 +1605,16 @@ cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); -#line 1279 "cwebdir/common.w" +#line 1275 "cwebdir/common.w" #line 563 "cwebdir/comm-w2c.ch" /*:81*/ -#line 1200 "cwebdir/common.w" +#line 1194 "cwebdir/common.w" } -#line 496 "cwebdir/comm-w2c.ch" -/*:76*//*97:*/ -#line 813 "cwebdir/comm-w2c.ch" +/*:75*//*97:*/ +#line 812 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str) { @@ -1652,7 +1647,7 @@ } /*:97*//*99:*/ -#line 855 "cwebdir/comm-w2c.ch" +#line 854 "cwebdir/comm-w2c.ch" void cb_show_banner(void) { Modified: branches/stable/source/src/texk/web2c/cwebdir/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,10 +1,147 @@ +2021-02-25 Andreas Scherer + + * Makefile, + * comm-{mac,ql,vms,w32}.ch, + * comm-w2c.ch, + * comm-w2c.h, + * common.c, + * common.h, + * common.w, + * ctang-{bs,pc,ql,vms,w32}.ch, + * ctang-w2c.ch, + * ctangle.c, + * ctangle.w, + * ctwill-mini.ch, + * ctwill-w2c.ch, + * cweav-{bs,pc,ql,vms,w32}.ch, + * cweav-man.ch, + * cweav-w2c.ch, + * cweave.w, + * cwebmac.tex, + * cwebman-w2c.ch, + * cwebman.tex, + * po/{cweb,cweb-tl}.pot, + * po/de/{cweb,cweb-tl}.po, + * po/it/cweb.po: CWEB 4.2 and CWEBbin 2021. + +2021-02-24 Andreas Scherer + + * comm-w2c.h, + * common.c, + * common.h + * common.w, + * ctangle.c, + * ctangle.w, + * ctwill-mini.ch, + * ctwill-w2c.ch, + * cweav-w2c.ch, + * cweave.w: Fix spacing for |#include| in TeX comment. + +2021-02-24 Andreas Scherer + + * cweave.w: Fix spacing for |#include| in TeX comment. + +2021-02-24 Andreas Scherer + + * common.w, + * ctangle.w, + * cweave.w: Fine print for single '@' characters in TeX text. + +2021-02-24 Andreas Scherer + + * cweave.w: Fix output format when 'tracing @2'. + +2021-02-23 Andreas Scherer + + * cwebman.tex, + * cwebman-w2c.ch: Minor redactions. + +2021-02-23 Andreas Scherer + + * comm-w2c.ch: Simplify documentation. + +2021-02-22 Andreas Scherer + + * Makefile, + * comm-w2c.ch + * comm-w2c.h + * common.c + * common.h + * common.w + * ctang-bs.ch, + * ctangle.c, + * ctangle.w, + * ctwill-mini.ch, + * ctwill-w2c.ch, + * cweav-bs.ch, + * cweav-man.ch, + * cweave.w: Decouple CTANGLE and CWEAVE from COMMON. + +2021-02-20 Andreas Scherer + + * Makefile, + * comm-{mac,ql,vms,w32}.ch, + * comm-w2c.ch, + * comm-w2c.h, + * common.c, + * common.h, + * common.w, + * ctang-{bs,pc,ql,vms,w32}.ch, + * ctang-w2c.ch, + * ctangle.c, + * ctangle.w, + * ctwill-mini.ch, + * ctwill-w2c.ch, + * cweav-{bs,pc,ql,vms,w32}.ch, + * cweav-man.ch, + * cweav-w2c.ch, + * cweave.w, + * cwebmac.tex, + * cwebman-w2c.ch, + * cwebman.tex, + * po/{cweb,cweb-tl}.pot, + * po/de/{cweb,cweb-tl}.po, + * po/it/cweb.po: CWEB 4.1 and CWEBbin 2021. + +2021-02-19 Andreas Scherer + + * comm-bs.ch, + * comm-mac.ch, + * com-ql.ch, + * comm-w2c.ch, + * comm-w2c.h, + * common.c, + * common.h, + * common.w, + * ctang-bs.ch, + * ctangle.c, + * ctangle.w, + * ctwill-w2c.ch, + * cweav-bs.ch, + * cweave.w, + * cwebman.tex: Replace 'boolean' values upstream. + +2021-02-18 Andreas Scherer + + * cweave.w: Purge unused macro definition. + +2021-02-18 Andreas Scherer + + * ctangle.c, + * ctangle.w, + * cweave.w: Reshuffle a few variables (upstream). + +2021-02-18 Andreas Scherer + + * cweave.w: Fix an 'aspell'ing error and one old macro call. + 2021-02-17 Andreas Scherer - * cweave.w: Fix 'Illegal hardware instruction on MacOS. + * cweave.w: Fix 'Illegal hardware instruction' on MacOS. 2021-02-17 Andreas Scherer - * Makefile: Main CWEB modules depend on COMMON inteface. + * Makefile: Main CWEB modules depend on COMMON interface. 2021-02-16 Andreas Scherer Modified: branches/stable/source/src/texk/web2c/cwebdir/Makefile =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/Makefile 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/Makefile 2021-04-01 20:52:49 UTC (rev 850) @@ -1,6 +1,6 @@ # This file is part of CWEB. # It is distributed WITHOUT ANY WARRANTY, express or implied. -# Version 4.0 --- February 2021 +# Version 4.2 --- February 2021 # Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -63,8 +63,10 @@ CP= /bin/cp # uncomment the second line if you use pdftex to bypass .dvi files +# uncomment the third line if you use xetex to bypass .dvi files PDFTEX = dvipdfm #PDFTEX = pdftex +#PDFTEX = xetex ########## You shouldn't have to change anything after this point ####### @@ -105,6 +107,7 @@ case "$(PDFTEX)" in \ dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \ pdftex ) pdftex $* ;; \ + xetex ) xetex $* ;; \ esac all: ctangle cweave Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -16,7 +16,7 @@ @x Section 6. - at d chunk_marker 0 + for section names */ @= typedef struct name_info { @@ -34,7 +34,7 @@ extern char byte_mem[]; /* characters of names */ extern char *byte_mem_end; /* end of |byte_mem| */ @y - at d chunk_marker 0 + for section names */ @f huge extern Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -4,9 +4,9 @@ (Contributed 13 Oct 2000 by AndPio at aol.com; slightly edited by Don Knuth) @x in limbo, change the title page document to specify Mac version - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} @y - \centerline{(Version 4.0 for MacOS)} + \centerline{(Version 4.2 for MacOS)} @z @x sections 23/24: Make input_ln accept \n, \r, \n\r, or \r\n as line endings @@ -18,12 +18,12 @@ static boolean input_ln(FILE *);@/ @ @c -static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns 0 */ +static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */ FILE *fp at t\2\2@>) /* what file to read from */ { register int c=EOF; /* character read; initialized so some compilers won't complain */ register char *k; /* where next character goes */ - if (feof(fp)) return(0); /* we have hit end-of-file */ + if (feof(fp)) return false; /* we have hit end-of-file */ limit = k = buffer; /* beginning of buffer */ while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n') if ((*(k++) = c) != ' ') limit = k; @@ -32,9 +32,9 @@ ungetc(c,fp); loc=buffer; err_print("! Input line too long"); @.Input line too long@> } - if (c==EOF && limit==buffer) return(0); /* there was nothing after + if (c==EOF && limit==buffer) return false; /* there was nothing after the last newline */ - return(1); + return true; } @y @ In the unlikely event that your standard I/O library does not @@ -45,27 +45,30 @@ \UNIX/, {\mc DOS} or {\mc MAC} format. @^system dependencies@> - at c -static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns 0 */ +@= +static boolean input_ln(FILE *);@/ + +@ @c +static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */ FILE *fp at t\2\2@>) /* what file to read from */ { register int c=EOF; /* character read; initialized so some compilers won't complain */ register char *k; /* where next character goes */ - if (feof(fp)) return(0); /* we have hit end-of-file */ + if (feof(fp)) return false; /* we have hit end-of-file */ limit = k = buffer; /* beginning of buffer */ - while (1) { + while (true) { c = getc(fp); - if (c==EOF) return (limit!=buffer); /* 0, if there was nothing after + if (c==EOF) return limit!=buffer; /* |false|, if there was nothing after the last newline */ else if (c=='\n' || c=='\r') { /* we have hit end-of-line */ int d = getc(fp); if (c+d!='\n'+'\r') /* no combination |"\n\r"| or |"\r\n"| */ ungetc(d,fp); - return (1); + return true; } else if (k>buffer_end) { ungetc(c,fp); loc=buffer; err_print("! Input line too long"); - return (1); + return true; @.Input line too long@> } else Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -10,12 +10,12 @@ @x \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (Version 4.0)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.2)} \def\topofcontents{\null\vfill \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and {\ttitlefont CWEAVE}} \vskip 15pt - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -22,12 +22,12 @@ @y \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.0)} +\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.2)} \def\topofcontents{\null\vfill \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and {\ttitlefont CWEAVE}} \vskip 15pt - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -155,7 +155,7 @@ sprintf(idx_file_name,"%s.idx",name_pos); sprintf(scn_file_name,"%s.scn",name_pos); sprintf(C_file_name,"%s.c",name_pos); - found_web=1; + found_web=true; } @y @= @@ -173,7 +173,7 @@ sprintf(idx_file_name,"%s_idx",name_pos); sprintf(scn_file_name,"%s_scn",name_pos); sprintf(C_file_name,"%s_c",name_pos); - found_web=1; + found_web=true; } @z @@ -188,7 +188,7 @@ sprintf(change_file_name,"%s.ch",*argv); else strcpy(change_file_name,*argv); } - found_change=1; + found_change=true; } @y @ @= @@ -199,7 +199,7 @@ if (dot_pos==NULL) sprintf(change_file_name,"%s_ch",*argv); else strcpy(change_file_name,*argv); - found_change=1; + found_change=true; } } @z @@ -224,7 +224,7 @@ sprintf(scn_file_name,"%s.scn",*argv); } } - found_out=1; + found_out=true; } @y @ @= @@ -245,7 +245,7 @@ sprintf(scn_file_name,"%s_scn",*argv); } } - found_out=1; + found_out=true; } @z Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -45,8 +45,8 @@ @z @x section 68 (1987 BL) (01-FEB-1992 ST) (11-JAN-1993 DEK) - if (history > harmless_message) return(1); - else return(0); + if (history > harmless_message) return EXIT_FAILURE; + else return EXIT_SUCCESS; @y /* VAX/VMS and UNIX have different error status conventions. Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -17,16 +17,16 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{Common code for CTANGLE and CWEAVE (Version 4.0)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.2)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi -\def\title{Common code for CTANGLE and CWEAVE (4.0 [\TeX~Live])} +\def\title{Common code for CTANGLE and CWEAVE (4.2 [\TeX~Live])} @z @x - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} @y - \centerline{(Version 4.0 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -99,7 +99,7 @@ @z @x -char alt_web_file_name[max_file_name_length]; /* alternate name to try */ +static char alt_web_file_name[max_file_name_length]; /* alternate name to try */ @y @z @@ -259,7 +259,7 @@ strcpy(cur_file_name,temp_file_name); cur_file_name[l]='/'; /* \UNIX/ pathname separator */ if ((cur_file=fopen(cur_file_name,"r"))!=NULL) { - cur_line=0; print_where=1; + cur_line=0; print_where=true; goto restart; /* success */ } } @@ -390,8 +390,8 @@ @z @x - if (history > harmless_message) return(1); - else return(0); + if (history > harmless_message) return EXIT_FAILURE; + else return EXIT_SUCCESS; @y switch(history) { case harmless_message: return RETURN_WARN; @@ -523,10 +523,10 @@ { show_banner=show_progress=show_happiness=0; continue; } for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++) if (*dot_pos=='v') { - show_banner=show_progress=show_happiness=1; + show_banner=show_progress=show_happiness=true; } else if (*dot_pos=='q') { - show_banner=show_progress=show_happiness=0; + show_banner=show_progress=show_happiness=false; } else if (*dot_pos=='d') { if (sscanf(++dot_pos,"%u",&kpathsea_debug)!=1) @@; @@ -686,10 +686,9 @@ does \\{not} set |HAVE_GETTEXT| at build-time, so \.{i18n} is ``off'' by default. If you want to create \.{CWEB} executables with NLS support, you have to recompile the \TeX~Live sources with a positive value for -|HAVE_GETTEXT| both in \.{comm-w2c.ch} and \.{comm-w2c.h}. Also you -have to ``compile'' the NLS catalogs provided for \.{CWEB} in the source -tree with \.{msgfmt} and store the resulting \.{.mo} files at an appropriate -place in the file system. +|HAVE_GETTEXT| in \.{comm-w2c.h}. Also you have to ``compile'' the NLS +catalogs provided for \.{CWEB} in the source tree with \.{msgfmt} and store the +resulting \.{.mo} files at an appropriate place in the file system. Plans for \TeX~Live are to store NLS catalogs inside the ``\TeX\ Directory Structure'' (TDS) and look them up with the help of the configuration variable Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h 2021-04-01 20:52:49 UTC (rev 850) @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.0 --- February 2021 (works also with later versions) +% Version 4.2 --- February 2021 (works also with later versions) % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth @@ -108,6 +108,44 @@ extern char *loc; /* points to the next character to be read from the buffer */ extern char *limit; /* points to the last character in the buffer */ +@ Code related to file handling: + at f line x /* make |line| an unreserved word */ + at d max_include_depth 10 /* maximum number of source files open + simultaneously, not counting the change file */ + at d max_file_name_length 1024 + at d cur_file file[include_depth] /* current file */ + at d cur_file_name file_name[include_depth] /* current file name */ + at d cur_line line[include_depth] /* number of current line in current file */ + at d web_file file[0] /* main source file */ + at d web_file_name file_name[0] /* main source file name */ + +@= +extern int include_depth; /* current level of nesting */ +extern FILE *file[]; /* stack of non-change files */ +extern FILE *change_file; /* change file */ +extern char file_name[][max_file_name_length]; + /* stack of non-change file names */ +extern char change_file_name[]; /* name of change file */ +extern char check_file_name[]; /* name of |check_file| */ +extern int line[]; /* number of current line in the stacked files */ +extern int change_line; /* number of current line in change file */ +extern int change_depth; /* where \.{@@y} originated during a change */ +extern boolean input_has_ended; /* if there is no more input */ +extern boolean changing; /* if the current line is from |change_file| */ +extern boolean web_file_open; /* if the web file is being read */ + +@ @= +extern boolean get_line(void); /* inputs the next line */ +extern void check_complete(void); /* checks that all changes were picked up */ +extern void reset_input(void); /* initialize to read the web file and change file */ + +@ Code related to section numbers: +@= +extern sixteen_bits section_count; /* the current section number */ +extern boolean changed_section[]; /* is the section changed? */ +extern boolean change_pending; /* is a decision about change still unclear? */ +extern boolean print_where; /* tells \.{CTANGLE} to print line and file info */ + @ Code related to identifier and section name storage: @d length(c) (size_t)((c+1)->byte_start-(c)->byte_start) /* the length of a name */ @d print_id(c) term_write((c)->byte_start,length((c))) /* print identifier */ @@ -115,7 +153,6 @@ @d rlink dummy.Rlink /* right link in binary search tree for section names */ @d root name_dir->rlink /* the root of the binary search tree for section names */ - at d chunk_marker 0 @= typedef struct name_info { @@ -149,7 +186,7 @@ extern void init_p(name_pointer,eight_bits);@/ extern void print_prefix_name(name_pointer);@/ extern void print_section_name(name_pointer);@/ -extern void sprint_section_name(char *,name_pointer);@/ +extern void sprint_section_name(char *,name_pointer); @ Code related to error handling: @d spotless 0 /* |history| value for normal jobs */ @@ -170,48 +207,6 @@ extern void fatal(const char *,const char *); /* issue error message and die */ extern void overflow(const char *); /* succumb because a table has overflowed */ -@ Code related to file handling: - at f line x /* make |line| an unreserved word */ - at d max_include_depth 10 /* maximum number of source files open - simultaneously, not counting the change file */ - at d max_file_name_length 1024 - at d cur_file file[include_depth] /* current file */ - at d cur_file_name file_name[include_depth] /* current file name */ - at d cur_line line[include_depth] /* number of current line in current file */ - at d web_file file[0] /* main source file */ - at d web_file_name file_name[0] /* main source file name */ - -@= -extern int include_depth; /* current level of nesting */ -extern FILE *file[]; /* stack of non-change files */ -extern FILE *change_file; /* change file */ -extern char C_file_name[]; /* name of |C_file| */ -extern char tex_file_name[]; /* name of |tex_file| */ -extern char idx_file_name[]; /* name of |idx_file| */ -extern char scn_file_name[]; /* name of |scn_file| */ -extern char file_name[][max_file_name_length]; - /* stack of non-change file names */ -extern char change_file_name[]; /* name of change file */ -extern char check_file_name[]; /* name of |check_file| */ -extern int line[]; /* number of current line in the stacked files */ -extern int change_line; /* number of current line in change file */ -extern int change_depth; /* where \.{@@y} originated during a change */ -extern boolean input_has_ended; /* if there is no more input */ -extern boolean changing; /* if the current line is from |change_file| */ -extern boolean web_file_open; /* if the web file is being read */ - -@ @= -extern boolean get_line(void); /* inputs the next line */ -extern void check_complete(void); /* checks that all changes were picked up */ -extern void reset_input(void); /* initialize to read the web file and change file */ - -@ Code related to section numbers: -@= -extern sixteen_bits section_count; /* the current section number */ -extern boolean changed_section[]; /* is the section changed? */ -extern boolean change_pending; /* is a decision about change still unclear? */ -extern boolean print_where; /* tells \.{CTANGLE} to print line and file info */ - @ Code related to command line arguments: @d show_banner flags['b'] /* should the banner line be printed? */ @d show_progress flags['p'] /* should progress reports be printed? */ @@ -223,10 +218,14 @@ @= extern int argc; /* copy of |ac| parameter to |main| */ extern char **argv; /* copy of |av| parameter to |main| */ +extern char C_file_name[]; /* name of |C_file| */ +extern char tex_file_name[]; /* name of |tex_file| */ +extern char idx_file_name[]; /* name of |idx_file| */ +extern char scn_file_name[]; /* name of |scn_file| */ extern boolean flags[]; /* an option for each 7-bit code */ extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */ -@ Code relating to output: +@ Code related to output: @d update_terminal fflush(stdout) /* empty the terminal output buffer */ @d new_line putchar('\n') @d putxchar putchar @d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout) @@ -245,7 +244,7 @@ @= extern void common_init(void);@/ extern void print_stats(void);@/ -extern void cb_show_banner(void);@/ +extern void cb_show_banner(void); @ The following parameters were sufficient in the original \.{WEB} to handle \TEX/, so they should be sufficient for most applications of Modified: branches/stable/source/src/texk/web2c/cwebdir/common.c =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/common.c 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/common.c 2021-04-01 20:52:49 UTC (rev 850) @@ -15,8 +15,8 @@ /*:3*/ #line 67 "common.w" -#define ctangle 0 -#define cweave 1 \ +#define ctangle false +#define cweave true \ #define and_and 04 #define lt_lt 020 @@ -41,14 +41,22 @@ #define xisupper(c) (isupper((eight_bits) c) &&((eight_bits) c<0200) ) #define xisxdigit(c) (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \ +#define max_include_depth 10 \ + +#define max_file_name_length 1024 +#define cur_file file[include_depth] +#define cur_file_name file_name[include_depth] +#define cur_line line[include_depth] +#define web_file file[0] +#define web_file_name file_name[0] \ + #define length(c) (size_t) ((c+1) ->byte_start-(c) ->byte_start) #define print_id(c) term_write((c) ->byte_start,length((c) ) ) #define llink link #define rlink dummy.Rlink #define root name_dir->rlink \ + \ -#define chunk_marker 0 \ - #define spotless 0 #define harmless_message 1 #define error_message 2 @@ -58,15 +66,6 @@ #define confusion(s) fatal("! This can't happen: ",s) \ \ -#define max_include_depth 10 \ - -#define max_file_name_length 1024 -#define cur_file file[include_depth] -#define cur_file_name file_name[include_depth] -#define cur_line line[include_depth] -#define web_file file[0] -#define web_file_name file_name[0] \ - #define show_banner flags['b'] #define show_progress flags['p'] #define show_stats flags['s'] @@ -150,8 +149,32 @@ extern char*limit; /*:5*//*6:*/ -#line 103 "common.h" +#line 105 "common.h" +extern int include_depth; +extern FILE*file[]; +extern FILE*change_file; +extern char file_name[][max_file_name_length]; + +extern char change_file_name[]; +extern int line[]; +extern int change_line; +extern int change_depth; +extern boolean input_has_ended; +extern boolean changing; +extern boolean web_file_open; + +/*:6*//*8:*/ +#line 125 "common.h" + +extern sixteen_bits section_count; +extern boolean changed_section[]; +extern boolean change_pending; +extern boolean print_where; + +/*:8*//*9:*/ +#line 139 "common.h" + typedef struct name_info{ char*byte_start; struct name_info*link; @@ -174,48 +197,24 @@ extern hash_pointer hash_end; extern hash_pointer h; -/*:6*//*8:*/ -#line 147 "common.h" +/*:9*//*11:*/ +#line 183 "common.h" extern int history; -/*:8*//*10:*/ -#line 167 "common.h" +/*:11*//*13:*/ +#line 199 "common.h" -extern int include_depth; -extern FILE*file[]; -extern FILE*change_file; +extern int argc; +extern char**argv; extern char C_file_name[]; extern char tex_file_name[]; extern char idx_file_name[]; extern char scn_file_name[]; -extern char file_name[][max_file_name_length]; - -extern char change_file_name[]; -extern int line[]; -extern int change_line; -extern int change_depth; -extern boolean input_has_ended; -extern boolean changing; -extern boolean web_file_open; - -/*:10*//*12:*/ -#line 191 "common.h" - -extern sixteen_bits section_count; -extern boolean changed_section[]; -extern boolean change_pending; -extern boolean print_where; - -/*:12*//*13:*/ -#line 204 "common.h" - -extern int argc; -extern char**argv; extern boolean flags[]; /*:13*//*14:*/ -#line 216 "common.h" +#line 215 "common.h" extern FILE*C_file; extern FILE*tex_file; @@ -233,10 +232,11 @@ /*:18*//*19:*/ #line 92 "common.w" + int phase; /*:19*//*21:*/ -#line 129 "common.w" +#line 130 "common.w" char section_text[longest_name+1]; char*section_text_end= section_text+longest_name; @@ -244,12 +244,12 @@ char*id_loc; /*:21*//*22:*/ -#line 149 "common.w" +#line 150 "common.w" char buffer[long_buf_size]; char*buffer_end= buffer+buf_size-2; +char*loc= buffer; char*limit= buffer; -char*loc= buffer; /*:22*//*25:*/ #line 194 "common.w" @@ -260,31 +260,31 @@ char file_name[max_include_depth][max_file_name_length]; char change_file_name[max_file_name_length]; -char alt_web_file_name[max_file_name_length]; +static char alt_web_file_name[max_file_name_length]; int line[max_include_depth]; int change_line; int change_depth; boolean input_has_ended; boolean changing; -boolean web_file_open= 0; +boolean web_file_open= false; /*:25*//*26:*/ #line 220 "common.w" -char change_buffer[buf_size]; -char*change_limit; +static char change_buffer[buf_size]; +static char*change_limit; /*:26*//*37:*/ -#line 401 "common.w" +#line 399 "common.w" sixteen_bits section_count; boolean changed_section[max_sections]; boolean change_pending; -boolean print_where= 0; +boolean print_where= false; /*:37*//*43:*/ -#line 598 "common.w" +#line 596 "common.w" char byte_mem[max_bytes]; char*byte_mem_end= byte_mem+max_bytes-1; @@ -292,13 +292,13 @@ name_pointer name_dir_end= name_dir+max_names-1; /*:43*//*44:*/ -#line 609 "common.w" +#line 607 "common.w" +char*byte_ptr; name_pointer name_ptr; -char*byte_ptr; /*:44*//*46:*/ -#line 629 "common.w" +#line 627 "common.w" name_pointer hash[hash_size]; hash_pointer hash_end= hash+hash_size-1; @@ -305,12 +305,12 @@ hash_pointer h; /*:46*//*65:*/ -#line 1017 "common.w" +#line 1014 "common.w" int history= spotless; /*:65*//*73:*/ -#line 1138 "common.w" +#line 1135 "common.w" int argc; char**argv; @@ -321,7 +321,7 @@ boolean flags[128]; /*:73*//*83:*/ -#line 1286 "common.w" +#line 1282 "common.w" FILE*C_file; FILE*tex_file; @@ -333,8 +333,15 @@ #line 70 "common.w" /*7:*/ -#line 126 "common.h" +#line 119 "common.h" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); + +/*:7*//*10:*/ +#line 162 "common.h" + extern boolean names_match(name_pointer,const char*,size_t,eight_bits); extern name_pointer id_lookup(const char*,const char*,char); @@ -345,8 +352,8 @@ extern void print_section_name(name_pointer); extern void sprint_section_name(char*,name_pointer); -/*:7*//*9:*/ -#line 150 "common.h" +/*:10*//*12:*/ +#line 186 "common.h" extern int wrap_up(void); extern void err_print(const char*); @@ -353,63 +360,51 @@ extern void fatal(const char*,const char*); extern void overflow(const char*); -/*:9*//*11:*/ -#line 185 "common.h" +/*:12*//*15:*/ +#line 223 "common.h" -extern boolean get_line(void); -extern void check_complete(void); -extern void reset_input(void); - -/*:11*//*15:*/ -#line 224 "common.h" - extern void common_init(void); extern void print_stats(void); -/*:15*//*23:*/ -#line 159 "common.w" - +/*:15*//*24:*/ +#line 180 "common.w" static boolean input_ln(FILE*); -/*:23*//*27:*/ -#line 231 "common.w" - +/*:24*//*28:*/ +#line 241 "common.w" static void prime_the_change_buffer(void); -/*:27*//*32:*/ -#line 303 "common.w" - +/*:28*//*33:*/ +#line 340 "common.w" static void check_change(void); -/*:32*//*55:*/ -#line 776 "common.w" +/*:33*//*55:*/ +#line 774 "common.w" static int web_strcmp(char*,int,char*,int); static name_pointer add_section_name(name_pointer,int,char*,char*,int); static void extend_section_name(name_pointer,char*,char*,int); -/*:55*//*63:*/ -#line 972 "common.w" - +/*:55*//*64:*/ +#line 1002 "common.w" static int section_name_cmp(char**,int,name_pointer); -/*:63*//*75:*/ -#line 1170 "common.w" - +/*:64*//*76:*/ +#line 1197 "common.w" static void scan_args(void); -/*:75*/ +/*:76*/ #line 71 "common.w" /*:1*//*20:*/ -#line 98 "common.w" +#line 99 "common.w" void common_init(void) { /*45:*/ -#line 613 "common.w" +#line 611 "common.w" name_dir->byte_start= byte_ptr= byte_mem; name_ptr= name_dir+1; @@ -417,24 +412,24 @@ root= NULL; /*:45*//*47:*/ -#line 636 "common.w" +#line 634 "common.w" for(h= hash;h<=hash_end;*h++= NULL); /*:47*/ -#line 102 "common.w" +#line 103 "common.w" /*74:*/ -#line 1151 "common.w" +#line 1148 "common.w" show_banner= show_happiness= show_progress= make_xrefs= true; show_stats= false; /*:74*/ -#line 103 "common.w" +#line 104 "common.w" /*84:*/ -#line 1293 "common.w" +#line 1289 "common.w" scan_args(); if(program==ctangle){ @@ -448,12 +443,12 @@ } /*:84*/ -#line 104 "common.w" +#line 105 "common.w" } -/*:20*//*24:*/ -#line 162 "common.w" +/*:20*//*23:*/ +#line 160 "common.w" static boolean input_ln( FILE*fp) @@ -460,7 +455,7 @@ { register int c= EOF; register char*k; -if(feof(fp))return(0); +if(feof(fp))return false; limit= k= buffer; while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n') if((*(k++)= c)!=' ')limit= k; @@ -469,13 +464,13 @@ ungetc(c,fp);loc= buffer;err_print("! Input line too long"); } -if(c==EOF&&limit==buffer)return(0); +if(c==EOF&&limit==buffer)return false; -return(1); +return true; } -/*:24*//*28:*/ -#line 234 "common.w" +/*:23*//*27:*/ +#line 231 "common.w" static void prime_the_change_buffer(void) @@ -482,9 +477,9 @@ { change_limit= change_buffer; /*29:*/ -#line 248 "common.w" +#line 247 "common.w" -while(1){ +while(true){ change_line++; if(!input_ln(change_file))return; if(limit buffer+1&&buffer[0]=='@'){ char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1]; /*34:*/ -#line 344 "common.w" +#line 342 "common.w" if(xyz_code=='x'||xyz_code=='z'){ loc= buffer+2;err_print("! Where is the matching @y?"); @@ -571,11 +566,11 @@ } /*:34*/ -#line 328 "common.w" +#line 324 "common.w" } /*31:*/ -#line 275 "common.w" +#line 274 "common.w" { change_limit= change_buffer+(ptrdiff_t)(limit-buffer); @@ -583,14 +578,14 @@ } /*:31*/ -#line 330 "common.w" +#line 326 "common.w" -changing= 0;cur_line++; +changing= false;cur_line++; while(!input_ln(cur_file)){ if(include_depth==0){ err_print("! CWEB file ended during a change"); -input_has_ended= 1;return; +input_has_ended= true;return; } include_depth--;cur_line++; } @@ -598,8 +593,8 @@ } } -/*:33*//*35:*/ -#line 364 "common.w" +/*:32*//*35:*/ +#line 362 "common.w" void reset_input(void) @@ -606,7 +601,7 @@ { limit= buffer;loc= buffer+1;buffer[0]= ' '; /*36:*/ -#line 379 "common.w" +#line 377 "common.w" if((web_file= fopen(web_file_name,"r"))==NULL){ strcpy(web_file_name,alt_web_file_name); @@ -615,21 +610,21 @@ } -web_file_open= 1; +web_file_open= true; if((change_file= fopen(change_file_name,"r"))==NULL) fatal("! Cannot open change file ",change_file_name); /*:36*/ -#line 369 "common.w" +#line 367 "common.w" include_depth= 0;cur_line= 0;change_line= 0; change_depth= include_depth; changing= 1;prime_the_change_buffer();changing= !changing; -limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= 0; +limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false; } /*:35*//*38:*/ -#line 408 "common.w" +#line 406 "common.w" boolean get_line(void) { @@ -636,7 +631,7 @@ restart: if(changing&&include_depth==change_depth) /*41:*/ -#line 516 "common.w" +#line 514 "common.w" { change_line++; if(!input_ln(change_file)){ @@ -646,9 +641,9 @@ } if(limit> buffer){ if(change_pending){ -if_section_start_make_pending(0); +if_section_start_make_pending(false); if(change_pending){ -changed_section[section_count]= 1;change_pending= 0; +changed_section[section_count]= true;change_pending= false; } } *limit= ' '; @@ -660,7 +655,7 @@ } else if(buffer[1]=='z'){ -prime_the_change_buffer();changing= !changing;print_where= 1; +prime_the_change_buffer();changing= !changing;print_where= true; } } } @@ -667,16 +662,16 @@ } /*:41*/ -#line 413 "common.w" +#line 411 "common.w" if(!changing||include_depth> change_depth){ /*40:*/ -#line 499 "common.w" +#line 497 "common.w" { cur_line++; while(!input_ln(cur_file)){ -print_where= 1; -if(include_depth==0){input_has_ended= 1;break;} +print_where= true; +if(include_depth==0){input_has_ended= true;break;} else{ fclose(cur_file);include_depth--; if(changing&&include_depth==change_depth)break; @@ -690,11 +685,11 @@ } /*:40*/ -#line 415 "common.w" +#line 413 "common.w" if(changing&&include_depth==change_depth)goto restart; } -if(input_has_ended)return 0; +if(input_has_ended)return false; loc= buffer;*limit= ' '; if(buffer[0]=='@'&&(buffer[1]=='i'||buffer[1]=='I')){ loc= buffer+2;*limit= '"'; @@ -711,7 +706,7 @@ } include_depth++; /*39:*/ -#line 453 "common.w" +#line 451 "common.w" { char temp_file_name[max_file_name_length]; char*cur_file_name_end= cur_file_name+max_file_name_length-1; @@ -728,7 +723,7 @@ *k= '\0'; if((cur_file= fopen(cur_file_name,"r"))!=NULL){ -cur_line= 0;print_where= 1; +cur_line= 0;print_where= true; goto restart; } kk= getenv("CWEBINPUTS"); @@ -751,7 +746,7 @@ strcpy(cur_file_name,temp_file_name); cur_file_name[l]= '/'; if((cur_file= fopen(cur_file_name,"r"))!=NULL){ -cur_line= 0;print_where= 1; +cur_line= 0;print_where= true; goto restart; } } @@ -759,14 +754,14 @@ } /*:39*/ -#line 434 "common.w" +#line 432 "common.w" } -return 1; +return true; } /*:38*//*42:*/ -#line 548 "common.w" +#line 546 "common.w" void check_complete(void){ @@ -773,7 +768,7 @@ if(change_limit!=change_buffer){ strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1)); limit= buffer+(ptrdiff_t)(change_limit-change_buffer); -changing= 1;change_depth= include_depth;loc= buffer; +changing= true;change_depth= include_depth;loc= buffer; err_print("! Change file entry did not match"); } @@ -780,7 +775,7 @@ } /*:42*//*48:*/ -#line 641 "common.w" +#line 639 "common.w" name_pointer id_lookup( @@ -795,7 +790,7 @@ if(last==NULL)for(last= first;*last!='\0';last++); l= (int)(last-first); /*49:*/ -#line 664 "common.w" +#line 662 "common.w" h= (eight_bits)*i; while(++ilink; @@ -815,10 +810,10 @@ } /*:50*/ -#line 655 "common.w" +#line 653 "common.w" if(p==name_ptr)/*51:*/ -#line 683 "common.w" +#line 681 "common.w" { if(byte_ptr+l> byte_mem_end)overflow("byte memory"); if(name_ptr>=name_dir_end)overflow("name"); @@ -828,13 +823,13 @@ } /*:51*/ -#line 656 "common.w" +#line 654 "common.w" -return(p); +return p; } /*:48*//*52:*/ -#line 715 "common.w" +#line 713 "common.w" void print_section_name( @@ -855,7 +850,7 @@ } /*:52*//*53:*/ -#line 734 "common.w" +#line 732 "common.w" void sprint_section_name( @@ -878,7 +873,7 @@ } /*:53*//*54:*/ -#line 755 "common.w" +#line 753 "common.w" void print_prefix_name( @@ -891,7 +886,7 @@ } /*:54*//*56:*/ -#line 781 "common.w" +#line 779 "common.w" static int web_strcmp( char*j, @@ -909,7 +904,7 @@ } /*:56*//*57:*/ -#line 810 "common.w" +#line 808 "common.w" static name_pointer add_section_name( @@ -940,7 +935,7 @@ } /*:57*//*58:*/ -#line 839 "common.w" +#line 837 "common.w" static void extend_section_name( @@ -964,7 +959,7 @@ } /*:58*//*59:*/ -#line 867 "common.w" +#line 865 "common.w" name_pointer section_lookup( @@ -979,7 +974,7 @@ int name_len= (int)(last-first)+1; /*60:*/ -#line 891 "common.w" +#line 889 "common.w" while(p){ c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p)); @@ -1006,19 +1001,19 @@ } /*:60*/ -#line 881 "common.w" +#line 879 "common.w" /*61:*/ -#line 916 "common.w" +#line 914 "common.w" if(r==NULL) return add_section_name(par,c,first,last+1,ispref); /*:61*/ -#line 882 "common.w" +#line 880 "common.w" /*62:*/ -#line 924 "common.w" +#line 922 "common.w" switch(section_name_cmp(&first,name_len,r)){ @@ -1052,12 +1047,12 @@ } /*:62*/ -#line 883 "common.w" +#line 881 "common.w" } -/*:59*//*64:*/ -#line 975 "common.w" +/*:59*//*63:*/ +#line 970 "common.w" static int section_name_cmp( char**pfirst, @@ -1069,7 +1064,7 @@ char*ss,*s= first_chunk(r); int c; int ispref; -while(1){ +while(true){ ss= (r+1)->byte_start-1; if(*ss==' '&&ss>=r->byte_start)ispref= 1,q= q->link; else ispref= 0,ss++,q= name_dir; @@ -1090,8 +1085,8 @@ } } -/*:64*//*66:*/ -#line 1027 "common.w" +/*:63*//*66:*/ +#line 1024 "common.w" void err_print( @@ -1100,7 +1095,7 @@ char*k,*l; printf(*s=='!'?"\n%s":"%s",s); if(web_file_open)/*67:*/ -#line 1047 "common.w" +#line 1044 "common.w" {if(changing&&include_depth==change_depth) printf(". (l. %d of change file)\n",change_line); @@ -1120,13 +1115,13 @@ } /*:67*/ -#line 1034 "common.w" +#line 1031 "common.w" update_terminal;mark_error; } /*:66*//*68:*/ -#line 1079 "common.w" +#line 1076 "common.w" int wrap_up(void){ if(show_progress)new_line; @@ -1133,7 +1128,7 @@ if(show_stats) print_stats(); /*69:*/ -#line 1089 "common.w" +#line 1086 "common.w" switch(history){ case spotless:if(show_happiness)puts("(No errors were found.)");break; @@ -1145,14 +1140,14 @@ } /*:69*/ -#line 1084 "common.w" +#line 1081 "common.w" -if(history> harmless_message)return(1); -else return(0); +if(history> harmless_message)return EXIT_FAILURE; +else return EXIT_SUCCESS; } /*:68*//*70:*/ -#line 1105 "common.w" +#line 1102 "common.w" void fatal( const char*s,const char*t) @@ -1163,7 +1158,7 @@ } /*:70*//*71:*/ -#line 1116 "common.w" +#line 1113 "common.w" void overflow( const char*t) @@ -1172,8 +1167,8 @@ } -/*:71*//*76:*/ -#line 1173 "common.w" +/*:71*//*75:*/ +#line 1167 "common.w" static void scan_args(void) @@ -1181,13 +1176,13 @@ char*dot_pos; char*name_pos; register char*s; -boolean found_web= 0,found_change= 0,found_out= 0; +boolean found_web= false,found_change= false,found_out= false; strcpy(change_file_name,"/dev/null"); while(--argc> 0){ if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/ -#line 1262 "common.w" +#line 1258 "common.w" { for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++) @@ -1195,7 +1190,7 @@ } /*:80*/ -#line 1185 "common.w" +#line 1179 "common.w" else{ s= name_pos= *argv;dot_pos= NULL; @@ -1205,17 +1200,17 @@ else s++; } if(!found_web)/*77:*/ -#line 1210 "common.w" +#line 1206 "common.w" { if(s-*argv> max_file_name_length-5) /*82:*/ -#line 1280 "common.w" +#line 1276 "common.w" fatal("! Filename too long\n",*argv); /*:82*/ -#line 1213 "common.w" +#line 1209 "common.w" if(dot_pos==NULL) sprintf(web_file_name,"%s.w",*argv); @@ -1228,48 +1223,48 @@ sprintf(idx_file_name,"%s.idx",name_pos); sprintf(scn_file_name,"%s.scn",name_pos); sprintf(C_file_name,"%s.c",name_pos); -found_web= 1; +found_web= true; } /*:77*/ -#line 1194 "common.w" +#line 1188 "common.w" else if(!found_change)/*78:*/ -#line 1228 "common.w" +#line 1224 "common.w" { if(strcmp(*argv,"-")!=0){ if(s-*argv> max_file_name_length-4) /*82:*/ -#line 1280 "common.w" +#line 1276 "common.w" fatal("! Filename too long\n",*argv); /*:82*/ -#line 1232 "common.w" +#line 1228 "common.w" if(dot_pos==NULL) sprintf(change_file_name,"%s.ch",*argv); else strcpy(change_file_name,*argv); } -found_change= 1; +found_change= true; } /*:78*/ -#line 1195 "common.w" +#line 1189 "common.w" else if(!found_out)/*79:*/ -#line 1240 "common.w" +#line 1236 "common.w" { if(s-*argv> max_file_name_length-5) /*82:*/ -#line 1280 "common.w" +#line 1276 "common.w" fatal("! Filename too long\n",*argv); /*:82*/ -#line 1243 "common.w" +#line 1239 "common.w" if(dot_pos==NULL){ sprintf(tex_file_name,"%s.tex",*argv); @@ -1285,14 +1280,14 @@ sprintf(scn_file_name,"%s.scn",*argv); } } -found_out= 1; +found_out= true; } /*:79*/ -#line 1196 "common.w" +#line 1190 "common.w" else/*81:*/ -#line 1268 "common.w" +#line 1264 "common.w" { if(program==ctangle) @@ -1306,12 +1301,12 @@ } /*:81*/ -#line 1197 "common.w" +#line 1191 "common.w" } } if(!found_web)/*81:*/ -#line 1268 "common.w" +#line 1264 "common.w" { if(program==ctangle) @@ -1325,8 +1320,8 @@ } /*:81*/ -#line 1200 "common.w" +#line 1194 "common.w" } -/*:76*/ +/*:75*/ Modified: branches/stable/source/src/texk/web2c/cwebdir/common.h =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/common.h 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/common.h 2021-04-01 20:52:49 UTC (rev 850) @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.0 --- February 2021 (works also with later versions) +% Version 4.2 --- February 2021 (works also with later versions) % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth @@ -31,8 +31,8 @@ @s uint8_t int @s uint16_t int - at d ctangle 0 - at d cweave 1 + at d ctangle false + at d cweave true @= typedef bool boolean; @@ -91,6 +91,43 @@ extern char *loc; /* points to the next character to be read from the buffer */ extern char *limit; /* points to the last character in the buffer */ +@ Code related to file handling: + at f line x /* make |line| an unreserved word */ + at d max_include_depth 10 /* maximum number of source files open + simultaneously, not counting the change file */ + at d max_file_name_length 1024 + at d cur_file file[include_depth] /* current file */ + at d cur_file_name file_name[include_depth] /* current file name */ + at d cur_line line[include_depth] /* number of current line in current file */ + at d web_file file[0] /* main source file */ + at d web_file_name file_name[0] /* main source file name */ + +@= +extern int include_depth; /* current level of nesting */ +extern FILE *file[]; /* stack of non-change files */ +extern FILE *change_file; /* change file */ +extern char file_name[][max_file_name_length]; + /* stack of non-change file names */ +extern char change_file_name[]; /* name of change file */ +extern int line[]; /* number of current line in the stacked files */ +extern int change_line; /* number of current line in change file */ +extern int change_depth; /* where \.{@@y} originated during a change */ +extern boolean input_has_ended; /* if there is no more input */ +extern boolean changing; /* if the current line is from |change_file| */ +extern boolean web_file_open; /* if the web file is being read */ + +@ @= +extern boolean get_line(void); /* inputs the next line */ +extern void check_complete(void); /* checks that all changes were picked up */ +extern void reset_input(void); /* initialize to read the web file and change file */ + +@ Code related to section numbers: +@= +extern sixteen_bits section_count; /* the current section number */ +extern boolean changed_section[]; /* is the section changed? */ +extern boolean change_pending; /* is a decision about change still unclear? */ +extern boolean print_where; /* tells \.{CTANGLE} to print line and file info */ + @ Code related to identifier and section name storage: @d length(c) (size_t)((c+1)->byte_start-(c)->byte_start) /* the length of a name */ @d print_id(c) term_write((c)->byte_start,length((c))) /* print identifier */ @@ -98,7 +135,6 @@ @d rlink dummy.Rlink /* right link in binary search tree for section names */ @d root name_dir->rlink /* the root of the binary search tree for section names */ - at d chunk_marker 0 @= typedef struct name_info { @@ -132,7 +168,7 @@ extern void init_p(name_pointer,eight_bits);@/ extern void print_prefix_name(name_pointer);@/ extern void print_section_name(name_pointer);@/ -extern void sprint_section_name(char *,name_pointer);@/ +extern void sprint_section_name(char *,name_pointer); @ Code related to error handling: @d spotless 0 /* |history| value for normal jobs */ @@ -153,47 +189,6 @@ extern void fatal(const char *,const char *); /* issue error message and die */ extern void overflow(const char *); /* succumb because a table has overflowed */ -@ Code related to file handling: - at f line x /* make |line| an unreserved word */ - at d max_include_depth 10 /* maximum number of source files open - simultaneously, not counting the change file */ - at d max_file_name_length 1024 - at d cur_file file[include_depth] /* current file */ - at d cur_file_name file_name[include_depth] /* current file name */ - at d cur_line line[include_depth] /* number of current line in current file */ - at d web_file file[0] /* main source file */ - at d web_file_name file_name[0] /* main source file name */ - -@= -extern int include_depth; /* current level of nesting */ -extern FILE *file[]; /* stack of non-change files */ -extern FILE *change_file; /* change file */ -extern char C_file_name[]; /* name of |C_file| */ -extern char tex_file_name[]; /* name of |tex_file| */ -extern char idx_file_name[]; /* name of |idx_file| */ -extern char scn_file_name[]; /* name of |scn_file| */ -extern char file_name[][max_file_name_length]; - /* stack of non-change file names */ -extern char change_file_name[]; /* name of change file */ -extern int line[]; /* number of current line in the stacked files */ -extern int change_line; /* number of current line in change file */ -extern int change_depth; /* where \.{@@y} originated during a change */ -extern boolean input_has_ended; /* if there is no more input */ -extern boolean changing; /* if the current line is from |change_file| */ -extern boolean web_file_open; /* if the web file is being read */ - -@ @= -extern boolean get_line(void); /* inputs the next line */ -extern void check_complete(void); /* checks that all changes were picked up */ -extern void reset_input(void); /* initialize to read the web file and change file */ - -@ Code related to section numbers: -@= -extern sixteen_bits section_count; /* the current section number */ -extern boolean changed_section[]; /* is the section changed? */ -extern boolean change_pending; /* is a decision about change still unclear? */ -extern boolean print_where; /* tells \.{CTANGLE} to print line and file info */ - @ Code related to command line arguments: @d show_banner flags['b'] /* should the banner line be printed? */ @d show_progress flags['p'] /* should progress reports be printed? */ @@ -204,9 +199,13 @@ @= extern int argc; /* copy of |ac| parameter to |main| */ extern char **argv; /* copy of |av| parameter to |main| */ +extern char C_file_name[]; /* name of |C_file| */ +extern char tex_file_name[]; /* name of |tex_file| */ +extern char idx_file_name[]; /* name of |idx_file| */ +extern char scn_file_name[]; /* name of |scn_file| */ extern boolean flags[]; /* an option for each 7-bit code */ -@ Code relating to output: +@ Code related to output: @d update_terminal fflush(stdout) /* empty the terminal output buffer */ @d new_line putchar('\n') @d putxchar putchar @d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout) @@ -223,7 +222,7 @@ @ The procedure that gets everything rolling: @= extern void common_init(void);@/ -extern void print_stats(void);@/ +extern void print_stats(void); @ The following parameters were sufficient in the original \.{WEB} to handle \TEX/, so they should be sufficient for most applications of Modified: branches/stable/source/src/texk/web2c/cwebdir/common.w =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/common.w 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/common.w 2021-04-01 20:52:49 UTC (rev 850) @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.0 --- February 2021 +% Version 4.2 --- February 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -22,12 +22,12 @@ \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (Version 4.0)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.2)} \def\topofcontents{\null\vfill \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and {\ttitlefont CWEAVE}} \vskip 15pt - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -68,7 +68,7 @@ @h @@/ @@/ -@@/ +@ @ The details will be filled in due course. The interface of this module is included first. It is also used by the main programs. @@ -89,7 +89,8 @@ Similarly, \.{CTANGLE} operates in two phases. The global variable |phase| tells which phase we are in. -@= int phase; /* which phase are we in? */ +@= +int phase; /* which phase are we in? */ @ There's an initialization procedure that gets both \.{CTANGLE} and \.{CWEAVE} off to a good start. We will fill in the details of this @@ -134,8 +135,8 @@ @** Input routines. The lowest level of input to the \.{CWEB} programs is performed by |input_ln|, which must be told which file to read from. -The return value of |input_ln| is 1 if the read is successful and 0 if -not (generally this means the file has ended). The conventions +The return value of |input_ln| is |true| if the read is successful and +|false| if not (generally this means the file has ended). The conventions of \TEX/ are followed; i.e., the characters of the next line of the file are copied into the |buffer| array, and the global variable |limit| is set to the first unoccupied position. @@ -149,23 +150,20 @@ @= char buffer[long_buf_size]; /* where each line of input goes */ char *buffer_end=buffer+buf_size-2; /* end of |buffer| */ +char *loc=buffer; /* points to the next character to be read from the buffer */ char *limit=buffer; /* points to the last character in the buffer */ -char *loc=buffer; /* points to the next character to be read from the buffer */ @ In the unlikely event that your standard I/O library does not support |feof|, |getc|, and |ungetc| you may have to change things here. @^system dependencies@> -@= -static boolean input_ln(FILE *);@/ - -@ @c -static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns 0 */ + at c +static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */ FILE *fp at t\2\2@>) /* what file to read from */ { register int c=EOF; /* character read; initialized so some compilers won't complain */ register char *k; /* where next character goes */ - if (feof(fp)) return(0); /* we have hit end-of-file */ + if (feof(fp)) return false; /* we have hit end-of-file */ limit = k = buffer; /* beginning of buffer */ while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n') if ((*(k++) = c) != ' ') limit = k; @@ -174,11 +172,13 @@ ungetc(c,fp); loc=buffer; err_print("! Input line too long"); @.Input line too long@> } - if (c==EOF && limit==buffer) return(0); /* there was nothing after + if (c==EOF && limit==buffer) return false; /* there was nothing after the last newline */ - return(1); + return true; } +@ @=@+static boolean input_ln(FILE *); + @ Now comes the problem of deciding which file to read from next. Recall that the actual text that \.{CWEB} should process comes from two streams: a |web_file|, which can contain possibly nested include @@ -198,15 +198,15 @@ char file_name[max_include_depth][max_file_name_length]; /* stack of non-change file names */ char change_file_name[max_file_name_length]; /* name of change file */ -char alt_web_file_name[max_file_name_length]; /* alternate name to try */ +static char alt_web_file_name[max_file_name_length]; /* alternate name to try */ int line[max_include_depth]; /* number of current line in the stacked files */ int change_line; /* number of current line in change file */ int change_depth; /* where \.{@@y} originated during a change */ boolean input_has_ended; /* if there is no more input */ boolean changing; /* if the current line is from |change_file| */ -boolean web_file_open=0; /* if the web file is being read */ +boolean web_file_open=false; /* if the web file is being read */ -@ When |changing==0|, the next line of |change_file| is kept in +@ When |changing==false|, the next line of |change_file| is kept in |change_buffer|, for purposes of comparison with the next line of |cur_file|. After the change file has been completely input, we set |change_limit=change_buffer|, @@ -218,8 +218,8 @@ strncmp(buffer, change_buffer, (size_t)(limit-buffer))) @= -char change_buffer[buf_size]; /* next line of |change_file| */ -char *change_limit; /* points to the last character in |change_buffer| */ +static char change_buffer[buf_size]; /* next line of |change_file| */ +static char *change_limit; /* points to the last character in |change_buffer| */ @ Procedure |prime_the_change_buffer| sets |change_buffer| in preparation for the next matching operation. @@ -226,12 +226,9 @@ Since blank lines in the change file are not used for matching, we have |(change_limit==change_buffer && !changing)| if and only if the change file is exhausted. This procedure is called only when -|changing| is 1; hence error messages will be reported correctly. +|changing| is |true|; hence error messages will be reported correctly. -@= -static void prime_the_change_buffer(void);@/ - -@ @c + at c static void prime_the_change_buffer(void) { @@ -241,12 +238,14 @@ @@; } +@ @=@+static void prime_the_change_buffer(void); + @ While looking for a line that begins with \.{@@x} in the change file, we allow lines that begin with \.{@@}, as long as they don't begin with \.{@@y}, \.{@@z}, or \.{@@i} (which would probably mean that the change file is fouled up). @= -while(1) { +while(true) { change_line++; if (!input_ln(change_file)) return; if (limit= -static void check_change(void);@/ - -@ @c + at c static void check_change(void) /* switches to |change_file| if the buffers match */ { int n=0; /* the number of discrepancies found */ if (lines_dont_match) return; - change_pending=0; + change_pending=false; if (!changed_section[section_count]) { - if_section_start_make_pending(1); - if (!change_pending) changed_section[section_count]=1; + if_section_start_make_pending(true); + if (!change_pending) changed_section[section_count]=true; } - while (1) { - changing=1; print_where=1; change_line++; + while (true) { + changing=true; print_where=true; change_line++; if (!input_ln(change_file)) { err_print("! Change file ended before @@y"); @.Change file ended...@> - change_limit=change_buffer; changing=0; + change_limit=change_buffer; changing=false; return; } if (limit>buffer+1 && buffer[0]=='@@') { @@ -328,12 +324,12 @@ report any discrepancies and |return|@>@; } @@; - changing=0; cur_line++; + changing=false; cur_line++; while (!input_ln(cur_file)) { /* pop the stack or quit */ if (include_depth==0) { err_print("! CWEB file ended during a change"); @.CWEB file ended...@> - input_has_ended=1; return; + input_has_ended=true; return; } include_depth--; cur_line++; } @@ -341,6 +337,8 @@ } } +@ @=@+static void check_change(void); + @ @= if (xyz_code=='x' || xyz_code=='z') { loc=buffer+2; err_print("! Where is the matching @@y?"); @@ -370,7 +368,7 @@ include_depth=0; cur_line=0; change_line=0; change_depth=include_depth; changing=1; prime_the_change_buffer(); changing=!changing; - limit=buffer; loc=buffer+1; buffer[0]=' '; input_has_ended=0; + limit=buffer; loc=buffer+1; buffer[0]=' '; input_has_ended=false; } @ The following code opens the input files. @@ -384,7 +382,7 @@ } @.Cannot open input file@> @.Cannot open change file@> -web_file_open=1; +web_file_open=true; if ((change_file=fopen(change_file_name,"r"))==NULL) fatal("! Cannot open change file ", change_file_name); @@ -403,7 +401,7 @@ boolean changed_section[max_sections]; /* is the section changed? */ boolean change_pending; /* if the current change is not yet recorded in |changed_section[section_count]| */ -boolean print_where=0; /* should \.{CTANGLE} print line and file info? */ +boolean print_where=false; /* should \.{CTANGLE} print line and file info? */ @ @c boolean get_line(void) /* inputs the next line */ @@ -415,7 +413,7 @@ @@; if (changing && include_depth==change_depth) goto restart; } - if (input_has_ended) return 0; + if (input_has_ended) return false; loc=buffer; *limit=' '; if (buffer[0]=='@@' && (buffer[1]=='i' || buffer[1]=='I')) { loc=buffer+2; *limit='"'; @@ -433,7 +431,7 @@ include_depth++; /* push input stack */ @@; } - return 1; + return true; } @ When an \.{@@i} line is found in the |cur_file|, we must temporarily @@ -466,7 +464,7 @@ @.Include file name ...@> *k='\0'; if ((cur_file=fopen(cur_file_name,"r"))!=NULL) { - cur_line=0; print_where=1; + cur_line=0; print_where=true; goto restart; /* success */ } kk=getenv("CWEBINPUTS"); @@ -489,7 +487,7 @@ strcpy(cur_file_name,temp_file_name); cur_file_name[l]='/'; /* \UNIX/ pathname separator */ if ((cur_file=fopen(cur_file_name,"r"))!=NULL) { - cur_line=0; print_where=1; + cur_line=0; print_where=true; goto restart; /* success */ } } @@ -499,8 +497,8 @@ @ @= { cur_line++; while (!input_ln(cur_file)) { /* pop the stack or quit */ - print_where=1; - if (include_depth==0) {input_has_ended=1; break;} + print_where=true; + if (include_depth==0) {input_has_ended=true; break;} else { fclose(cur_file); include_depth--; if (changing && include_depth==change_depth) break; @@ -522,9 +520,9 @@ } if (limit>buffer) { /* check if the change has ended */ if (change_pending) { - if_section_start_make_pending(0); + if_section_start_make_pending(false); if (change_pending) { - changed_section[section_count]=1; change_pending=0; + changed_section[section_count]=true; change_pending=false; } } *limit=' '; @@ -536,7 +534,7 @@ @.Where is the match...@> } else if (buffer[1]=='z') { - prime_the_change_buffer(); changing=!changing; print_where=1; + prime_the_change_buffer(); changing=!changing; print_where=true; } } } @@ -548,10 +546,10 @@ @c void check_complete(void) { - if (change_limit!=change_buffer) { /* |changing| is 0 */ + if (change_limit!=change_buffer) { /* |changing| is |false| */ strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1)); limit=buffer+(ptrdiff_t)(change_limit-change_buffer); - changing=1; change_depth=include_depth; loc=buffer; + changing=true; change_depth=include_depth; loc=buffer; err_print("! Change file entry did not match"); @.Change file entry did not match@> } @@ -607,8 +605,8 @@ we want to keep |name_ptr<=name_dir_end| and |byte_ptr<=byte_mem_end|. @= +char *byte_ptr; /* first unused position in |byte_mem| */ name_pointer name_ptr; /* first unused position in |name_dir| */ -char *byte_ptr; /* first unused position in |byte_mem| */ @ @= name_dir->byte_start=byte_ptr=byte_mem; /* position zero in both arrays */ @@ -654,7 +652,7 @@ @@; @@; if (p==name_ptr) @@; - return(p); + return p; } @ A simple hash code is used: If the sequence of @@ -776,7 +774,7 @@ @= static int web_strcmp(char *,int,char *,int);@/ static name_pointer add_section_name(name_pointer,int,char *,char *,int);@/ -static void extend_section_name(name_pointer,char *,char *,int);@/ +static void extend_section_name(name_pointer,char *,char *,int); @ @c static int web_strcmp(@t\1\1@> /* fuller comparison than |strcmp| */ @@ -969,10 +967,7 @@ @d bad_extension 5 -@= -static int section_name_cmp(char **,int,name_pointer);@/ - -@ @c + at c static int section_name_cmp(@t\1\1@> char **pfirst, /* pointer to beginning of comparison string */ int len, /* length of string */ @@ -983,7 +978,7 @@ char *ss, *s=first_chunk(r); int c; /* comparison */ int ispref; /* is chunk |r| a prefix? */ - while (1) { + while (true) { ss=(r+1)->byte_start-1; if (*ss==' ' && ss>=r->byte_start) ispref=1,q=q->link; else ispref=0,ss++,q=name_dir; @@ -1004,6 +999,8 @@ } } +@ @=@+static int section_name_cmp(char **,int,name_pointer); + @** Reporting errors to the user. A global variable called |history| will contain one of four values at the end of every run: |spotless| means that no unusual messages were @@ -1082,8 +1079,8 @@ if (show_stats) print_stats(); /* print statistics about memory usage */ @@; - if (history > harmless_message) return(1); - else return(0); + if (history > harmless_message) return EXIT_FAILURE; + else return EXIT_SUCCESS; } @ @= @@ -1144,13 +1141,13 @@ char scn_file_name[max_file_name_length]; /* name of |scn_file| */ boolean flags[128]; /* an option for each 7-bit code */ -@ The |flags| will be initially zero. Some of them are set to~1 before -scanning the arguments; if additional flags are 1 by default they +@ The |flags| will be initially |false|. Some of them are set to~|true| before +scanning the arguments; if additional flags are |true| by default they should be set before calling |common_init|. @= show_banner=show_happiness=show_progress=make_xrefs=true;@/ -show_stats=false;@/ +show_stats=false; @ We now must look at the command line arguments and set the file names accordingly. At least one file name must be present: the \.{CWEB} @@ -1167,10 +1164,7 @@ If there's a third file name, it will be the output file. -@= -static void scan_args(void);@/ - -@ @c + at c static void scan_args(void) { @@ -1177,7 +1171,7 @@ char *dot_pos; /* position of |'.'| in the argument */ char *name_pos; /* file name beginning, sans directory */ register char *s; /* register for scanning strings */ - boolean found_web=0,found_change=0,found_out=0; + boolean found_web=false,found_change=false,found_out=false; /* have these names been seen? */ strcpy(change_file_name,"/dev/null"); @@ -1200,6 +1194,8 @@ if (!found_web) @@; } +@ @=@+static void scan_args(void); + @ We use all of |*argv| for the |web_file_name| if there is a |'.'| in it, otherwise we add |".w"|. If this file can't be opened, we prepare an |alt_web_file_name| by adding |"web"| after the dot. @@ -1222,7 +1218,7 @@ sprintf(idx_file_name,"%s.idx",name_pos); sprintf(scn_file_name,"%s.scn",name_pos); sprintf(C_file_name,"%s.c",name_pos); - found_web=1; + found_web=true; } @ @= @@ -1234,7 +1230,7 @@ sprintf(change_file_name,"%s.ch",*argv); else strcpy(change_file_name,*argv); } - found_change=1; + found_change=true; } @ @= @@ -1255,7 +1251,7 @@ sprintf(scn_file_name,"%s.scn",*argv); } } - found_out=1; + found_out=true; } @ @d flag_change (**argv!='-') Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -17,17 +17,17 @@ The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. - at d banner "This is CTANGLE (Version 4.0)" + at d banner "This is CTANGLE (Version 4.2)" @y The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. - at d banner "This is CTANGLE (Version 4.0pc/big)" + at d banner "This is CTANGLE (Version 4.2pc/big)" @z @x Section 9. - at d chunk_marker 0 + for section names */ @= typedef struct name_info { @@ -44,15 +44,15 @@ typedef name_pointer *hash_pointer; extern char byte_mem[]; /* characters of names */ extern char *byte_mem_end; /* end of |byte_mem| */ +extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ extern name_pointer name_ptr; /* first unused position in |name_dir| */ -extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ extern hash_pointer h; /* index into hash-head array */ @y - at d chunk_marker 0 + for section names */ @f huge extern @@ -98,7 +98,7 @@ @d max_texts 10239 /* number of replacement texts, must be less than 10240 */ @d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */ @d stack_size 500 /* number of simultaneous levels of macro expansion */ - at d buf_size 1000 /* for \.{CWEAVE} */ + at d buf_size 1000 /* maximum length of input line, plus one */ @y @ The following parameters were sufficient in the original \.{WEB} to handle \TEX/, so they should be sufficient for most applications of @@ -141,13 +141,13 @@ @x Section 17. -eight_bits tok_mem[max_toks]; -eight_bits *tok_mem_end=tok_mem+max_toks-1; -eight_bits *tok_ptr; /* first unused position in |tok_mem| */ +static eight_bits tok_mem[max_toks]; +static eight_bits *tok_mem_end=tok_mem+max_toks-1; +static eight_bits *tok_ptr; /* first unused position in |tok_mem| */ @y -eight_bits huge tok_mem[max_toks]; -eight_bits huge* tok_mem_end; -eight_bits huge* tok_ptr; /* first unused position in |tok_mem| */ +static eight_bits huge tok_mem[max_toks]; +static eight_bits huge* tok_mem_end; +static eight_bits huge* tok_ptr; /* first unused position in |tok_mem| */ @z Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -9,9 +9,9 @@ alternate change files with -bs suffix instead of -pc. @x section 1 - at d banner "This is CTANGLE (Version 4.0)" + at d banner "This is CTANGLE (Version 4.2)" @y - at d banner "This is CTANGLE (Version 4.0pc)" + at d banner "This is CTANGLE (Version 4.2pc)" @z @x section 4 @d max_bytes 1000000 /* the number of bytes in identifiers, Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -7,15 +7,15 @@ @x -\def\title{CTANGLE (Version 4.0)} +\def\title{CTANGLE (Version 4.2)} @y -\def\title{CTANGLE (QL Version 4.0)} +\def\title{CTANGLE (QL Version 4.2)} @z @x section 1 - at d banner "This is CTANGLE (Version 4.0)" + at d banner "This is CTANGLE (Version 4.2)" @y - at d banner "This is CTANGLE (QL Version 4.0)" + at d banner "This is CTANGLE (QL Version 4.2)" @z @x Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -10,9 +10,9 @@ (these changes not necessary for initial bootstrapping) @x section 1 (01-FEB-1992 ST) - at d banner "This is CTANGLE (Version 4.0)" + at d banner "This is CTANGLE (Version 4.2)" @y - at d banner "This is CTANGLE (VAX/VMS Version 4.0)" + at d banner "This is CTANGLE (VAX/VMS Version 4.2)" @z @x section 3 (01-FEB-1992 ST) Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -17,15 +17,15 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CTANGLE (Version 4.0)} +\def\title{CTANGLE (Version 4.2)} @y -\def\title{CTANGLE (Version 4.0 [\TeX~Live])} +\def\title{CTANGLE (Version 4.2 [\TeX~Live])} @z @x - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} @y - \centerline{(Version 4.0 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -41,9 +41,9 @@ @z @x - at d banner "This is CTANGLE (Version 4.0)" + at d banner "This is CTANGLE (Version 4.2)" @y - at d banner "This is CTANGLE, Version 4.0" + at d banner "This is CTANGLE, Version 4.2" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -343,7 +343,7 @@ quarter century. Care has been taken to keep the original section numbering intact, so this new -material should nicely integrate with the original ``\&{105.~Index}.'' +material should nicely integrate with the original ``\&{104.~Index}.'' @* Output file update. Most \CEE/ projects are controlled by a \.{Makefile} that automatically takes care of the temporal dependecies Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -4,9 +4,9 @@ Changes necessary for compiling with Borland C/C++ @x section 1 - at d banner "This is CTANGLE (Version 4.0)" + at d banner "This is CTANGLE (Version 4.2)" @y - at d banner "This is CTANGLE (Version 4.0win32)" + at d banner "This is CTANGLE (Version 4.2win32)" @z @x Modified: branches/stable/source/src/texk/web2c/cwebdir/ctangle.c =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctangle.c 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctangle.c 2021-04-01 20:52:49 UTC (rev 850) @@ -15,10 +15,10 @@ /*:4*/ #line 67 "ctangle.w" -#define banner "This is CTANGLE (Version 4.0)" \ +#define banner "This is CTANGLE (Version 4.2)" \ -#define ctangle 0 -#define cweave 1 \ +#define ctangle false +#define cweave true \ #define and_and 04 #define lt_lt 020 @@ -43,14 +43,22 @@ #define xisupper(c) (isupper((eight_bits) c) &&((eight_bits) c<0200) ) #define xisxdigit(c) (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \ +#define max_include_depth 10 \ + +#define max_file_name_length 1024 +#define cur_file file[include_depth] +#define cur_file_name file_name[include_depth] +#define cur_line line[include_depth] +#define web_file file[0] +#define web_file_name file_name[0] \ + #define length(c) (size_t) ((c+1) ->byte_start-(c) ->byte_start) #define print_id(c) term_write((c) ->byte_start,length((c) ) ) #define llink link #define rlink dummy.Rlink #define root name_dir->rlink \ + \ -#define chunk_marker 0 \ - #define spotless 0 #define harmless_message 1 #define error_message 2 @@ -60,15 +68,6 @@ #define confusion(s) fatal("! This can't happen: ",s) \ \ -#define max_include_depth 10 \ - -#define max_file_name_length 1024 -#define cur_file file[include_depth] -#define cur_file_name file_name[include_depth] -#define cur_line line[include_depth] -#define web_file file[0] -#define web_file_name file_name[0] \ - #define show_banner flags['b'] #define show_progress flags['p'] #define show_stats flags['s'] @@ -138,7 +137,7 @@ #define ishigh(c) ((eight_bits) (c) > 0177) \ \ -#define compress(c) if(loc++<=limit) return(c) \ +#define compress(c) if(loc++<=limit) return c \ #define macro 0 #define app_repl(c) {if(tok_ptr==tok_mem_end) overflow("token") ;*tok_ptr++= c;} \ @@ -172,8 +171,32 @@ extern char*limit; /*:6*//*7:*/ -#line 103 "common.h" +#line 105 "common.h" +extern int include_depth; +extern FILE*file[]; +extern FILE*change_file; +extern char file_name[][max_file_name_length]; + +extern char change_file_name[]; +extern int line[]; +extern int change_line; +extern int change_depth; +extern boolean input_has_ended; +extern boolean changing; +extern boolean web_file_open; + +/*:7*//*9:*/ +#line 125 "common.h" + +extern sixteen_bits section_count; +extern boolean changed_section[]; +extern boolean change_pending; +extern boolean print_where; + +/*:9*//*10:*/ +#line 139 "common.h" + typedef struct name_info{ char*byte_start; struct name_info*link; @@ -196,48 +219,24 @@ extern hash_pointer hash_end; extern hash_pointer h; -/*:7*//*9:*/ -#line 147 "common.h" +/*:10*//*12:*/ +#line 183 "common.h" extern int history; -/*:9*//*11:*/ -#line 167 "common.h" +/*:12*//*14:*/ +#line 199 "common.h" -extern int include_depth; -extern FILE*file[]; -extern FILE*change_file; +extern int argc; +extern char**argv; extern char C_file_name[]; extern char tex_file_name[]; extern char idx_file_name[]; extern char scn_file_name[]; -extern char file_name[][max_file_name_length]; - -extern char change_file_name[]; -extern int line[]; -extern int change_line; -extern int change_depth; -extern boolean input_has_ended; -extern boolean changing; -extern boolean web_file_open; - -/*:11*//*13:*/ -#line 191 "common.h" - -extern sixteen_bits section_count; -extern boolean changed_section[]; -extern boolean change_pending; -extern boolean print_where; - -/*:13*//*14:*/ -#line 204 "common.h" - -extern int argc; -extern char**argv; extern boolean flags[]; /*:14*//*15:*/ -#line 216 "common.h" +#line 215 "common.h" extern FILE*C_file; extern FILE*tex_file; @@ -258,7 +257,7 @@ typedef text*text_pointer; /*:19*//*31:*/ -#line 270 "ctangle.w" +#line 269 "ctangle.w" typedef struct{ eight_bits*end_field; @@ -275,89 +274,91 @@ /*20:*/ #line 129 "ctangle.w" -text text_info[max_texts]; -text_pointer text_info_end= text_info+max_texts-1; -text_pointer text_ptr; -eight_bits tok_mem[max_toks]; -eight_bits*tok_mem_end= tok_mem+max_toks-1; -eight_bits*tok_ptr; +static text text_info[max_texts]; +static text_pointer text_info_end= text_info+max_texts-1; +static text_pointer text_ptr; +static eight_bits tok_mem[max_toks]; +static eight_bits*tok_mem_end= tok_mem+max_toks-1; +static eight_bits*tok_ptr; /*:20*//*26:*/ #line 198 "ctangle.w" -text_pointer last_unnamed; +static text_pointer last_unnamed; /*:26*//*32:*/ -#line 286 "ctangle.w" +#line 285 "ctangle.w" -output_state cur_state; +static output_state cur_state; -output_state stack[stack_size+1]; -stack_pointer stack_ptr; -stack_pointer stack_end= stack+stack_size; +static output_state stack[stack_size+1]; +static stack_pointer stack_end= stack+stack_size; +static stack_pointer stack_ptr; /*:32*//*37:*/ -#line 362 "ctangle.w" +#line 361 "ctangle.w" -int cur_val; +static int cur_val; /*:37*//*42:*/ -#line 454 "ctangle.w" +#line 452 "ctangle.w" -eight_bits out_state; -boolean protect; +static eight_bits out_state; +static boolean protect; /*:42*//*45:*/ -#line 486 "ctangle.w" +#line 483 "ctangle.w" -name_pointer output_files[max_files]; -name_pointer*cur_out_file,*end_output_files,*an_output_file; -char cur_section_name_char; -char output_file_name[longest_name+1]; +static name_pointer output_files[max_files]; +static name_pointer*cur_out_file,*end_output_files,*an_output_file; +static char cur_section_name_char; +static char output_file_name[longest_name+1]; /*:45*//*52:*/ -#line 586 "ctangle.w" +#line 582 "ctangle.w" -boolean output_defs_seen= 0; +static boolean output_defs_seen= false; /*:52*//*57:*/ -#line 695 "ctangle.w" +#line 691 "ctangle.w" -char translit[128][translit_length]; +static char translit[128][translit_length]; /*:57*//*62:*/ -#line 774 "ctangle.w" +#line 770 "ctangle.w" -eight_bits ccode[256]; +static eight_bits ccode[256]; /*:62*//*66:*/ -#line 834 "ctangle.w" +#line 830 "ctangle.w" -boolean comment_continues= 0; +static boolean comment_continues= false; /*:66*//*68:*/ -#line 873 "ctangle.w" +#line 869 "ctangle.w" -name_pointer cur_section_name; -int no_where; +static name_pointer cur_section_name; +static boolean no_where; /*:68*//*82:*/ -#line 1187 "ctangle.w" +#line 1182 "ctangle.w" -text_pointer cur_text; -eight_bits next_control; +static text_pointer cur_text; +static eight_bits next_control; -/*:82*//*90:*/ -#line 1348 "ctangle.w" - -extern sixteen_bits section_count; - -/*:90*/ +/*:82*/ #line 71 "ctangle.w" /*8:*/ -#line 126 "common.h" +#line 119 "common.h" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); + +/*:8*//*11:*/ +#line 162 "common.h" + extern boolean names_match(name_pointer,const char*,size_t,eight_bits); extern name_pointer id_lookup(const char*,const char*,char); @@ -368,8 +369,8 @@ extern void print_section_name(name_pointer); extern void sprint_section_name(char*,name_pointer); -/*:8*//*10:*/ -#line 150 "common.h" +/*:11*//*13:*/ +#line 186 "common.h" extern int wrap_up(void); extern void err_print(const char*); @@ -376,80 +377,64 @@ extern void fatal(const char*,const char*); extern void overflow(const char*); -/*:10*//*12:*/ -#line 185 "common.h" +/*:13*//*16:*/ +#line 223 "common.h" -extern boolean get_line(void); -extern void check_complete(void); -extern void reset_input(void); - -/*:12*//*16:*/ -#line 224 "common.h" - extern void common_init(void); extern void print_stats(void); -/*:16*//*29:*/ -#line 231 "ctangle.w" - +/*:16*//*30:*/ +#line 241 "ctangle.w" static void store_two_bytes(sixteen_bits); -/*:29*//*34:*/ -#line 310 "ctangle.w" +/*:30*//*35:*/ +#line 324 "ctangle.w" static void push_level(name_pointer); -static void pop_level(int); +static void pop_level(boolean); -/*:34*//*38:*/ -#line 369 "ctangle.w" - +/*:35*//*39:*/ +#line 397 "ctangle.w" static void get_output(void); -/*:38*//*43:*/ -#line 462 "ctangle.w" - +/*:39*//*44:*/ +#line 473 "ctangle.w" static void flush_buffer(void); -/*:43*//*48:*/ -#line 517 "ctangle.w" - +/*:44*//*49:*/ +#line 549 "ctangle.w" static void phase_two(void); -/*:48*//*53:*/ -#line 589 "ctangle.w" +/*:49*//*53:*/ +#line 585 "ctangle.w" static void output_defs(void); static void out_char(eight_bits); -/*:53*//*64:*/ -#line 798 "ctangle.w" +/*:53*//*65:*/ +#line 810 "ctangle.w" static eight_bits skip_ahead(void); static boolean skip_comment(boolean); -/*:64*//*69:*/ -#line 885 "ctangle.w" - +/*:65*//*70:*/ +#line 924 "ctangle.w" static eight_bits get_next(void); -/*:69*//*83:*/ -#line 1191 "ctangle.w" - +/*:70*//*84:*/ +#line 1208 "ctangle.w" static void scan_repl(eight_bits); -/*:83*//*91:*/ -#line 1355 "ctangle.w" - +/*:84*//*91:*/ +#line 1379 "ctangle.w" static void scan_section(void); /*:91*//*99:*/ -#line 1458 "ctangle.w" - +#line 1460 "ctangle.w" static void phase_one(void); /*:99*//*101:*/ -#line 1476 "ctangle.w" - +#line 1494 "ctangle.w" static void skip_limbo(void); /*:101*/ @@ -482,12 +467,12 @@ last_unnamed= text_info;text_info->text_link= 0; /*:27*//*46:*/ -#line 496 "ctangle.w" +#line 493 "ctangle.w" cur_out_file= end_output_files= output_files+max_files; /*:46*//*58:*/ -#line 698 "ctangle.w" +#line 694 "ctangle.w" { int i; @@ -495,7 +480,7 @@ } /*:58*//*63:*/ -#line 777 "ctangle.w" +#line 773 "ctangle.w" { int c; for(c= 0;c<256;c++)ccode[c]= ignore; @@ -515,7 +500,7 @@ } /*:63*//*78:*/ -#line 1108 "ctangle.w" +#line 1103 "ctangle.w" section_text[0]= ' '; /*:78*/ @@ -537,7 +522,7 @@ size_t l, eight_bits t) {(void)t; -if(length(p)!=l)return 0; +if(length(p)!=l)return false; return!strncmp(first,p->byte_start,l); } @@ -553,10 +538,10 @@ void init_p(name_pointer p,eight_bits t){(void)p;(void)t;} -/*:25*//*30:*/ -#line 234 "ctangle.w" +/*:25*//*29:*/ +#line 231 "ctangle.w" -void +static void store_two_bytes( sixteen_bits x) { @@ -565,8 +550,8 @@ *tok_ptr++= x&0377; } -/*:30*//*35:*/ -#line 314 "ctangle.w" +/*:29*//*34:*/ +#line 309 "ctangle.w" static void push_level( @@ -582,12 +567,12 @@ } } -/*:35*//*36:*/ -#line 333 "ctangle.w" +/*:34*//*36:*/ +#line 332 "ctangle.w" static void pop_level( -int flag) +boolean flag) { if(flag&&cur_repl->text_linktext_link+text_info; @@ -598,8 +583,8 @@ if(stack_ptr> stack)cur_state= *stack_ptr; } -/*:36*//*39:*/ -#line 372 "ctangle.w" +/*:36*//*38:*/ +#line 368 "ctangle.w" static void get_output(void) @@ -608,7 +593,7 @@ restart:if(stack_ptr==stack)return; if(cur_byte==cur_end){ cur_val= -((int)cur_section); -pop_level(1); +pop_level(true); if(cur_val==0)goto restart; out_char(section_number);return; } @@ -622,7 +607,7 @@ case 0:cur_val= a;out_char(identifier);break; case 1:if(a==output_defs_flag)output_defs(); else/*40:*/ -#line 404 "ctangle.w" +#line 402 "ctangle.w" { a-= 024000; @@ -636,7 +621,7 @@ } /*:40*/ -#line 393 "ctangle.w" +#line 389 "ctangle.w" break; default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; @@ -645,8 +630,8 @@ } } -/*:39*//*44:*/ -#line 465 "ctangle.w" +/*:38*//*43:*/ +#line 460 "ctangle.w" static void flush_buffer(void) @@ -660,30 +645,30 @@ cur_line++; } -/*:44*//*49:*/ -#line 520 "ctangle.w" +/*:43*//*48:*/ +#line 514 "ctangle.w" static void phase_two(void){ -web_file_open= 0; +web_file_open= false; cur_line= 1; /*33:*/ -#line 299 "ctangle.w" +#line 298 "ctangle.w" stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info; cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0; /*:33*/ -#line 525 "ctangle.w" +#line 519 "ctangle.w" /*51:*/ -#line 582 "ctangle.w" +#line 578 "ctangle.w" if(!output_defs_seen) output_defs(); /*:51*/ -#line 526 "ctangle.w" +#line 520 "ctangle.w" if(text_info->text_link==0&&cur_out_file==end_output_files){ fputs("\n! No program text was specified.",stdout);mark_harmless; @@ -706,7 +691,7 @@ while(stack_ptr> stack)get_output(); flush_buffer(); writeloop:/*50:*/ -#line 559 "ctangle.w" +#line 555 "ctangle.w" for(an_output_file= end_output_files;an_output_file> cur_out_file;){ an_output_file--; @@ -727,7 +712,7 @@ } /*:50*/ -#line 547 "ctangle.w" +#line 541 "ctangle.w" if(show_happiness){ if(show_progress)new_line; @@ -736,8 +721,8 @@ } } -/*:49*//*54:*/ -#line 593 "ctangle.w" +/*:48*//*54:*/ +#line 589 "ctangle.w" static void output_defs(void) @@ -750,7 +735,7 @@ cur_end= (cur_text+1)->tok_start; C_printf("%s","#define "); out_state= normal; -protect= 1; +protect= true; while(cur_byte 0)C_printf("/*%d:*/",cur_val); @@ -835,10 +820,10 @@ break; /*:60*/ -#line 648 "ctangle.w" +#line 644 "ctangle.w" /*56:*/ -#line 666 "ctangle.w" +#line 662 "ctangle.w" case plus_plus:C_putc('+');C_putc('+');out_state= normal;break; case minus_minus:C_putc('-');C_putc('-');out_state= normal;break; @@ -859,7 +844,7 @@ break; /*:56*/ -#line 649 "ctangle.w" +#line 645 "ctangle.w" case'=':case'>':C_putc(cur_char);C_putc(' '); out_state= normal;break; @@ -877,52 +862,52 @@ } } -/*:55*//*65:*/ -#line 802 "ctangle.w" +/*:55*//*64:*/ +#line 794 "ctangle.w" static eight_bits skip_ahead(void) { eight_bits c; -while(1){ -if(loc> limit&&(get_line()==0))return(new_section); +while(true){ +if(loc> limit&&(get_line()==false))return new_section; *(limit+1)= '@'; while(*loc!='@')loc++; if(loc<=limit){ loc++;c= ccode[(eight_bits)*loc];loc++; -if(c!=ignore||*(loc-1)=='>')return(c); +if(c!=ignore||*(loc-1)=='>')return c; } } } -/*:65*//*67:*/ -#line 837 "ctangle.w" +/*:64*//*67:*/ +#line 833 "ctangle.w" static boolean skip_comment( boolean is_long_comment) { char c; -while(1){ +while(true){ if(loc> limit){ if(is_long_comment){ -if(get_line())return(comment_continues= 1); +if(get_line())return comment_continues= true; else{ err_print("! Input ended in mid-comment"); -return(comment_continues= 0); +return comment_continues= false; } } -else return(comment_continues= 0); +else return comment_continues= false; } c= *(loc++); if(is_long_comment&&c=='*'&&*loc=='/'){ -loc++;return(comment_continues= 0); +loc++;return comment_continues= false; } if(c=='@'){ if(ccode[(eight_bits)*loc]==new_section){ err_print("! Section name ended in mid-comment");loc--; -return(comment_continues= 0); +return comment_continues= false; } else loc++; } @@ -929,8 +914,8 @@ } } -/*:67*//*70:*/ -#line 888 "ctangle.w" +/*:67*//*69:*/ +#line 881 "ctangle.w" static eight_bits get_next(void) @@ -937,14 +922,14 @@ { static int preprocessing= 0; eight_bits c; -while(1){ +while(true){ if(loc> limit){ if(preprocessing&&*(limit-1)!='\\')preprocessing= 0; -if(get_line()==0)return(new_section); +if(get_line()==false)return new_section; else if(print_where&&!no_where){ -print_where= 0; +print_where= false; /*85:*/ -#line 1220 "ctangle.w" +#line 1214 "ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -959,21 +944,21 @@ app_repl(a_l%0400);} /*:85*/ -#line 900 "ctangle.w" +#line 893 "ctangle.w" } -else return('\n'); +else return'\n'; } c= *loc; if(comment_continues||(c=='/'&&(*(loc+1)=='*'||*(loc+1)=='/'))){ skip_comment(comment_continues||*(loc+1)=='*'); -if(comment_continues)return('\n'); +if(comment_continues)return'\n'; else continue; } loc++; if(xisdigit(c)||c=='.')/*73:*/ -#line 969 "ctangle.w" +#line 964 "ctangle.w" { id_first= loc-1; if(*id_first=='.'&&!xisdigit(*loc))goto mistake; @@ -994,17 +979,17 @@ found:while(*loc=='u'||*loc=='U'||*loc=='l'||*loc=='L' ||*loc=='f'||*loc=='F')loc++; id_loc= loc; -return(constant); +return constant; } /*:73*/ -#line 912 "ctangle.w" +#line 905 "ctangle.w" else if(c=='\''||c=='"' ||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"')) ||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"'))) /*74:*/ -#line 997 "ctangle.w" +#line 992 "ctangle.w" { char delim= c; id_first= section_text+1; @@ -1013,13 +998,13 @@ if(delim=='u'&&*loc=='8'){*++id_loc= *loc++;} delim= *loc++;*++id_loc= delim; } -while(1){ +while(true){ if(loc>=limit){ if(*(limit-1)!='\\'){ err_print("! String didn't end");loc= limit;break; } -if(get_line()==0){ +if(get_line()==false){ err_print("! Input ended in middle of string");loc= buffer;break; } @@ -1044,27 +1029,27 @@ err_print("..."); } id_loc++; -return(string); +return string; } /*:74*/ -#line 916 "ctangle.w" +#line 909 "ctangle.w" else if(isalpha(c)||isxalpha(c)||ishigh(c)) /*72:*/ -#line 962 "ctangle.w" +#line 957 "ctangle.w" { id_first= --loc; while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc) ||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc)); -id_loc= loc;return(identifier); +id_loc= loc;return identifier; } /*:72*/ -#line 918 "ctangle.w" +#line 911 "ctangle.w" else if(c=='@')/*75:*/ -#line 1042 "ctangle.w" +#line 1037 "ctangle.w" { c= ccode[(eight_bits)*loc++]; switch(c){ @@ -1080,15 +1065,15 @@ case section_name: cur_section_name_char= *(loc-1); /*77:*/ -#line 1090 "ctangle.w" +#line 1085 "ctangle.w" { char*k; /*79:*/ -#line 1110 "ctangle.w" +#line 1105 "ctangle.w" k= section_text; -while(1){ -if(loc> limit&&get_line()==0){ +while(true){ +if(loc> limit&&get_line()==false){ err_print("! Input ended in section name"); loc= buffer+1;break; @@ -1095,7 +1080,7 @@ } c= *loc; /*80:*/ -#line 1134 "ctangle.w" +#line 1129 "ctangle.w" if(c=='@'){ c= *(loc+1); @@ -1114,7 +1099,7 @@ } /*:80*/ -#line 1119 "ctangle.w" +#line 1114 "ctangle.w" loc++;if(k section_text)k--; /*:79*/ -#line 1092 "ctangle.w" +#line 1087 "ctangle.w" if(k-section_text> 3&&strncmp(k-2,"...",3)==0) cur_section_name= section_lookup(section_text+1,k-3,1); @@ -1138,7 +1123,7 @@ else cur_section_name= section_lookup(section_text+1,k,0); if(cur_section_name_char=='(') /*47:*/ -#line 500 "ctangle.w" +#line 497 "ctangle.w" { for(an_output_file= cur_out_file; @@ -1154,16 +1139,16 @@ } /*:47*/ -#line 1098 "ctangle.w" +#line 1093 "ctangle.w" -return(section_name); +return section_name; } /*:77*/ -#line 1056 "ctangle.w" +#line 1051 "ctangle.w" case string:/*81:*/ -#line 1156 "ctangle.w" +#line 1151 "ctangle.w" { id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; while(*loc!='@'||*(loc+1)!='>')loc++; @@ -1170,14 +1155,14 @@ if(loc>=limit)err_print("! Verbatim string didn't end"); id_loc= loc;loc+= 2; -return(string); +return string; } /*:81*/ -#line 1057 "ctangle.w" +#line 1052 "ctangle.w" case ord:/*76:*/ -#line 1069 "ctangle.w" +#line 1064 "ctangle.w" id_first= loc; if(*loc=='\\'){ @@ -1197,26 +1182,26 @@ } } loc++; -return(ord); +return ord; /*:76*/ -#line 1058 "ctangle.w" +#line 1053 "ctangle.w" -default:return(c); +default:return c; } } /*:75*/ -#line 919 "ctangle.w" +#line 912 "ctangle.w" else if(xisspace(c)){ if(!preprocessing||loc> limit)continue; -else return(' '); +else return' '; } else if(c=='#'&&loc==buffer+1)preprocessing= 1; mistake:/*71:*/ -#line 940 "ctangle.w" +#line 935 "ctangle.w" switch(c){ case'+':if(*loc=='+')compress(plus_plus);break; @@ -1240,14 +1225,14 @@ } /*:71*/ -#line 926 "ctangle.w" +#line 919 "ctangle.w" -return(c); +return c; } } -/*:70*//*84:*/ -#line 1194 "ctangle.w" +/*:69*//*83:*/ +#line 1186 "ctangle.w" static void scan_repl( @@ -1255,7 +1240,7 @@ { sixteen_bits a; if(t==section_name){/*85:*/ -#line 1220 "ctangle.w" +#line 1214 "ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -1270,11 +1255,11 @@ app_repl(a_l%0400);} /*:85*/ -#line 1200 "ctangle.w" +#line 1192 "ctangle.w" } -while(1)switch(a= get_next()){ +while(true)switch(a= get_next()){ /*86:*/ -#line 1233 "ctangle.w" +#line 1227 "ctangle.w" case identifier:a= id_lookup(id_first,id_loc,0)-name_dir; app_repl((a/0400)+0200); @@ -1282,7 +1267,7 @@ case section_name:if(t!=section_name)goto done; else{ /*87:*/ -#line 1266 "ctangle.w" +#line 1260 "ctangle.w" { char*try_loc= loc; while(*try_loc==' '&&try_loctok_start= tok_ptr; } -/*:84*//*92:*/ -#line 1358 "ctangle.w" +/*:83*//*90:*/ +#line 1346 "ctangle.w" static void scan_section(void) @@ -1448,14 +1433,14 @@ name_pointer p; text_pointer q; sixteen_bits a; -section_count++;no_where= 1; +section_count++;no_where= true; if(*(loc-1)=='*'&&show_progress){ printf("*%d",section_count);update_terminal; } next_control= 0; -while(1){ -/*93:*/ -#line 1397 "ctangle.w" +while(true){ +/*92:*/ +#line 1387 "ctangle.w" while(next_controltext_link= 0; +cur_text->text_link= macro; } -/*:94*/ -#line 1374 "ctangle.w" +/*:93*/ +#line 1362 "ctangle.w" continue; } @@ -1496,36 +1481,36 @@ } if(next_control==section_name){ p= cur_section_name; -/*95:*/ -#line 1429 "ctangle.w" +/*94:*/ +#line 1419 "ctangle.w" while((next_control= get_next())=='+'); if(next_control!='='&&next_control!=eq_eq) continue; -/*:95*/ -#line 1382 "ctangle.w" +/*:94*/ +#line 1370 "ctangle.w" break; } return; } -no_where= print_where= 0; +no_where= print_where= false; +/*95:*/ +#line 1424 "ctangle.w" + /*96:*/ -#line 1434 "ctangle.w" +#line 1429 "ctangle.w" -/*97:*/ -#line 1439 "ctangle.w" - store_two_bytes((sixteen_bits)(0150000+section_count)); -/*:97*/ -#line 1435 "ctangle.w" +/*:96*/ +#line 1425 "ctangle.w" scan_repl(section_name); -/*98:*/ -#line 1443 "ctangle.w" +/*97:*/ +#line 1433 "ctangle.w" if(p==name_dir||p==0){ (last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text; @@ -1541,17 +1526,17 @@ cur_text->text_link= section_flag; -/*:98*/ -#line 1437 "ctangle.w" +/*:97*/ +#line 1427 "ctangle.w" -/*:96*/ -#line 1388 "ctangle.w" +/*:95*/ +#line 1376 "ctangle.w" } -/*:92*//*100:*/ -#line 1461 "ctangle.w" +/*:90*//*98:*/ +#line 1448 "ctangle.w" static void phase_one(void){ @@ -1564,15 +1549,15 @@ phase= 2; } -/*:100*//*102:*/ -#line 1479 "ctangle.w" +/*:98*//*100:*/ +#line 1465 "ctangle.w" static void skip_limbo(void) { char c; -while(1){ -if(loc> limit&&get_line()==0)return; +while(true){ +if(loc> limit&&get_line()==false)return; *(limit+1)= '@'; while(*loc!='@')loc++; if(loc++<=limit){ @@ -1579,8 +1564,8 @@ c= *loc++; if(ccode[(eight_bits)c]==new_section)break; switch(ccode[(eight_bits)c]){ -case translit_code:/*103:*/ -#line 1508 "ctangle.w" +case translit_code:/*102:*/ +#line 1496 "ctangle.w" while(xisspace(*loc)&&loc@/ @@ -68,8 +68,8 @@ @h @@/ @@/ -@@/ -@@/ +@@/ +@ @ \.{CTANGLE} has a fairly straightforward outline. It operates in two phases: First it reads the source file, saving the \CEE/ code in @@ -126,13 +126,13 @@ } text; typedef text *text_pointer; -@ @= -text text_info[max_texts]; -text_pointer text_info_end=text_info+max_texts-1; -text_pointer text_ptr; /* first unused position in |text_info| */ -eight_bits tok_mem[max_toks]; -eight_bits *tok_mem_end=tok_mem+max_toks-1; -eight_bits *tok_ptr; /* first unused position in |tok_mem| */ +@ @= +static text text_info[max_texts]; +static text_pointer text_info_end=text_info+max_texts-1; +static text_pointer text_ptr; /* first unused position in |text_info| */ +static eight_bits tok_mem[max_toks]; +static eight_bits *tok_mem_end=tok_mem+max_toks-1; +static eight_bits *tok_ptr; /* first unused position in |tok_mem| */ @ @= text_info->tok_start=tok_ptr=tok_mem; @@ -157,7 +157,7 @@ size_t l, /* length of identifier */ eight_bits t at t\2\2@>) /* not used by \.{TANGLE} */ {@+(void)t; - if (length(p)!=l) return 0; + if (length(p)!=l) return false; return !strncmp(first,p->byte_start,l); } @@ -195,8 +195,8 @@ @d section_flag max_texts /* final |text_link| in section replacement texts */ -@= -text_pointer last_unnamed; /* most recent replacement text of unnamed section */ +@= +static text_pointer last_unnamed; /* most recent replacement text of unnamed section */ @ @= last_unnamed=text_info; text_info->text_link=0; @@ -228,11 +228,8 @@ @ The following procedure is used to enter a two-byte value into |tok_mem| when a replacement text is being generated. -@= -static void store_two_bytes(sixteen_bits);@/ - -@ @c -void + at c +static void store_two_bytes( sixteen_bits x) { @@ -241,6 +238,8 @@ *tok_ptr++=x&0377; /* store low byte */ } +@ @=@+static void store_two_bytes(sixteen_bits); + @** Stacks for output. The output process uses a stack to keep track of what is going on at different ``levels'' as the sections are being written out. Entries on this stack have five parts: @@ -283,12 +282,12 @@ @d cur_repl cur_state.repl_field /* pointer to current replacement text */ @d cur_section cur_state.section_field /* current section number being expanded */ -@= -output_state cur_state; /* |cur_end|, |cur_byte|, |cur_name|, |cur_repl|, +@= +static output_state cur_state; /* |cur_end|, |cur_byte|, |cur_name|, |cur_repl|, and |cur_section| */ -output_state stack[stack_size+1]; /* info for non-current levels */ -stack_pointer stack_ptr; /* first unused location in the output state stack */ -stack_pointer stack_end=stack+stack_size; /* end of |stack| */ +static output_state stack[stack_size+1]; /* info for non-current levels */ +static stack_pointer stack_end=stack+stack_size; /* end of |stack| */ +static stack_pointer stack_ptr; /* first unused location in the output state stack */ @ To get the output process started, we will perform the following initialization steps. We may assume that |text_info->text_link| is nonzero, @@ -307,11 +306,7 @@ We assume that the \CEE/ compiler can copy structures. @^system dependencies@> -@= -static void push_level(name_pointer);@/ -static void pop_level(int);@/ - -@ @c + at c static void push_level(@t\1\1@> /* suspends the current level */ name_pointer p at t\2\2@>) @@ -326,6 +321,10 @@ } } +@ @= +static void push_level(name_pointer);@/ +static void pop_level(boolean); + @ When we come to the end of a replacement text, the |pop_level| subroutine does the right thing: It either moves to the continuation of this replacement text or returns the state to the most recently stacked level. @@ -333,7 +332,7 @@ @c static void pop_level(@t\1\1@> /* do this when |cur_byte| reaches |cur_end| */ -int flag at t\2\2@>) /* |flag==0| means we are in |output_defs| */ +boolean flag at t\2\2@>) /* |flag==false| means we are in |output_defs| */ { if (flag && cur_repl->text_linktext_link+text_info; /* stay on the same level */ @@ -359,17 +358,14 @@ @d section_number 0201 /* code returned by |get_output| for section numbers */ @d identifier 0202 /* code returned by |get_output| for identifiers */ -@= -int cur_val; /* additional information corresponding to output token */ +@= +static int cur_val; /* additional information corresponding to output token */ @ If |get_output| finds that no more output remains, it returns with |stack_ptr==stack|. @^high-bit character handling@> -@= -static void get_output(void);@/ - -@ @c + at c static void get_output(void) /* sends next token to |out_char| */ { @@ -377,7 +373,7 @@ restart: if (stack_ptr==stack) return; if (cur_byte==cur_end) { cur_val=-((int)cur_section); /* cast needed because of sign extension */ - pop_level(1); + pop_level(true); if (cur_val==0) goto restart; out_char(section_number); return; } @@ -398,6 +394,8 @@ } } +@ @=@+static void get_output(void); + @ The user may have forgotten to give any \CEE/ text for a section name, or the \CEE/ text may have been associated with a different name by mistake. @@ -442,7 +440,7 @@ \yskip\hang |normal| means none of the above. -\yskip\noindent Furthermore, if the variable |protect| is positive, newlines +\yskip\noindent Furthermore, if the variable |protect| is |true|, newlines are preceded by a `\.\\'. @d normal 0 /* non-unusual state */ @@ -451,18 +449,15 @@ @d unbreakable 3 /* state associated with \.{@@\&} */ @d verbatim 4 /* state in the middle of a string */ -@= -eight_bits out_state; /* current status of partial output */ -boolean protect; /* should newline characters be quoted? */ +@= +static eight_bits out_state; /* current status of partial output */ +static boolean protect; /* should newline characters be quoted? */ @ Here is a routine that is invoked when we want to output the current line. During the output process, |cur_line| equals the number of the next line to be output. -@= -static void flush_buffer(void);@/ - -@ @c + at c static void flush_buffer(void) /* writes one line to output file */ { @@ -475,6 +470,8 @@ cur_line++; } +@ @=@+static void flush_buffer(void); + @ Second, we have modified the original \.{TANGLE} so that it will write output on multiple files. If a section name is introduced in at least one place by \.{@@(} @@ -483,11 +480,11 @@ We write them out after we've done the unnamed section. @d max_files 256 -@= -name_pointer output_files[max_files]; -name_pointer *cur_out_file, *end_output_files, *an_output_file; -char cur_section_name_char; /* is it |'<'| or |'('| */ -char output_file_name[longest_name+1]; /* name of the file */ +@= +static name_pointer output_files[max_files]; +static name_pointer *cur_out_file, *end_output_files, *an_output_file; +static char cur_section_name_char; /* is it |'<'| or |'('| */ +static char output_file_name[longest_name+1]; /* name of the file */ @ We make |end_output_files| point just beyond the end of |output_files|. The stack pointer @@ -514,13 +511,10 @@ @* The big output switch. Here then is the routine that does the output. -@= -static void phase_two(void);@/ - -@ @c + at c static void phase_two (void) { - web_file_open=0; + web_file_open=false; cur_line=1; @@; @@; @@ -552,6 +546,8 @@ } } +@ @=@+static void phase_two(void); + @ To write the named output files, we proceed as for the unnamed section. The only subtlety is that we have to open each one. @@ -583,12 +579,12 @@ if (!output_defs_seen) output_defs(); -@ @= -boolean output_defs_seen=0; +@ @= +static boolean output_defs_seen=false; @ @= static void output_defs(void);@/ -static void out_char(eight_bits);@/ +static void out_char(eight_bits); @ @c static void @@ -602,7 +598,7 @@ cur_end=(cur_text+1)->tok_start; C_printf("%s","#define "); out_state=normal; - protect=1; /* newlines should be preceded by |'\\'| */ + protect=true; /* newlines should be preceded by |'\\'| */ while (cur_byte= -char translit[128][translit_length]; +@= +static char translit[128][translit_length]; @ @= { @@ -771,8 +767,8 @@ @d section_name 0311 /* control code for `\.{@@<}' */ @d new_section 0312 /* control code for `\.{@@\ }' and `\.{@@*}' */ -@= -eight_bits ccode[256]; /* meaning of a char following \.{@@} */ +@= +static eight_bits ccode[256]; /* meaning of a char following \.{@@} */ @ @= { int c; /* must be |int| so the |for| loop will end */ @@ -795,26 +791,26 @@ @ The |skip_ahead| procedure reads through the input at fairly high speed until finding the next non-ignorable control code, which it returns. -@= -static eight_bits skip_ahead(void);@/ -static boolean skip_comment(boolean);@/ - -@ @c + at c static eight_bits skip_ahead(void) /* skip to next control code */ { eight_bits c; /* control code found */ - while (1) { - if (loc>limit && (get_line()==0)) return(new_section); + while (true) { + if (loc>limit && (get_line()==false)) return new_section; *(limit+1)='@@'; while (*loc!='@@') loc++; if (loc<=limit) { loc++; c=ccode[(eight_bits)*loc]; loc++; - if (c!=ignore || *(loc-1)=='>') return(c); + if (c!=ignore || *(loc-1)=='>') return c; } } } +@ @= +static eight_bits skip_ahead(void);@/ +static boolean skip_comment(boolean); + @ The |skip_comment| procedure reads through the input at somewhat high speed in order to pass over comments, which \.{CTANGLE} does not transmit to the output. If the comment is introduced by \.{/*}, |skip_comment| @@ -831,8 +827,8 @@ If |skip_comment| comes to the end of the section, it prints an error message. No comment, long or short, is allowed to contain `\.{@@\ }' or `\.{@@*}'. -@= -boolean comment_continues=0; /* are we scanning a comment? */ +@= +static boolean comment_continues=false; /* are we scanning a comment? */ @ @c static boolean skip_comment(@t\1\1@> /* skips over comments */ @@ -839,27 +835,27 @@ boolean is_long_comment at t\2\2@>) { char c; /* current character */ - while (1) { + while (true) { if (loc>limit) { if (is_long_comment) { - if(get_line()) return(comment_continues=1); + if(get_line()) return comment_continues=true; else{ err_print("! Input ended in mid-comment"); @.Input ended in mid-comment@> - return(comment_continues=0); + return comment_continues=false; } } - else return(comment_continues=0); + else return comment_continues=false; } c=*(loc++); if (is_long_comment && c=='*' && *loc=='/') { - loc++; return(comment_continues=0); + loc++; return comment_continues=false; } if (c=='@@') { if (ccode[(eight_bits)*loc]==new_section) { err_print("! Section name ended in mid-comment"); loc--; @.Section name ended in mid-comment@> - return(comment_continues=0); + return comment_continues=false; } else loc++; } @@ -870,9 +866,9 @@ @d constant 03 -@= -name_pointer cur_section_name; /* name of section just scanned */ -int no_where; /* suppress |print_where|? */ +@= +static name_pointer cur_section_name; /* name of section just scanned */ +static boolean no_where; /* suppress |print_where|? */ @ As one might expect, |get_next| consists mostly of a big switch that branches to the various special cases that can arise. @@ -882,30 +878,27 @@ @d ishigh(c) ((eight_bits)(c)>0177) @^high-bit character handling@> -@= -static eight_bits get_next(void);@/ - -@ @c + at c static eight_bits get_next(void) /* produces the next input token */ { static int preprocessing=0; eight_bits c; /* the current character */ - while (1) { + while (true) { if (loc>limit) { if (preprocessing && *(limit-1)!='\\') preprocessing=0; - if (get_line()==0) return(new_section); + if (get_line()==false) return new_section; else if (print_where && !no_where) { - print_where=0; + print_where=false; @@; } - else return ('\n'); + else return '\n'; } c=*loc; if (comment_continues || (c=='/' && (*(loc+1)=='*' || *(loc+1)=='/'))) { skip_comment(comment_continues||*(loc+1)=='*'); /* scan to end of comment or newline */ - if (comment_continues) return('\n'); + if (comment_continues) return '\n'; else continue; } loc++; @@ -920,14 +913,16 @@ else if (xisspace(c)) { if (!preprocessing || loc>limit) continue; /* we don't want a blank after a final backslash */ - else return(' '); /* ignore spaces and tabs, unless preprocessing */ + else return ' '; /* ignore spaces and tabs, unless preprocessing */ } else if (c=='#' && loc==buffer+1) preprocessing=1; mistake: @@; - return(c); + return c; } } +@ @=@+static eight_bits get_next(void); + @ The following code assigns values to the combinations \.{++}, \.{--}, \.{->}, \.{>=}, \.{<=}, \.{==}, \.{<<}, \.{>>}, \.{!=}, \.{||} and \.{\&\&}, and to the \CPLUSPLUS/ @@ -935,7 +930,7 @@ The compound assignment operators (e.g., \.{+=}) are treated as separate tokens. - at d compress(c) if (loc++<=limit) return(c) + at d compress(c) if (loc++<=limit) return c @= switch(c) { @@ -963,7 +958,7 @@ id_first=--loc; while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @| || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); - id_loc=loc; return(identifier); + id_loc=loc; return identifier; } @ @= { @@ -986,7 +981,7 @@ found: while (*loc=='u' || *loc=='U' || *loc=='l' || *loc=='L' || *loc=='f' || *loc=='F') loc++; id_loc=loc; - return(constant); + return constant; } @ \CEE/ strings and character constants, delimited by double and single @@ -1002,13 +997,13 @@ if (delim=='u' && *loc=='8') { *++id_loc=*loc++; } delim=*loc++; *++id_loc=delim; } - while (1) { + while (true) { if (loc>=limit) { if(*(limit-1)!='\\') { err_print("! String didn't end"); loc=limit; break; @.String didn't end@> } - if(get_line()==0) { + if(get_line()==false) { err_print("! Input ended in middle of string"); loc=buffer; break; @.Input ended in middle of string@> } @@ -1033,7 +1028,7 @@ err_print("..."); } id_loc++; - return(string); + return string; } @ After an \.{@@} sign has been scanned, the next character tells us @@ -1056,7 +1051,7 @@ @@; case string: @@; case ord: @@; - default: return(c); + default: return c; } } @@ -1085,7 +1080,7 @@ } } loc++; - return(ord); + return ord; @ @= { char *k; /* pointer into |section_text| */ @@ -1096,7 +1091,7 @@ if (cur_section_name_char=='(') @@; - return(section_name); + return section_name; } @ Section names are placed into the |section_text| array with consecutive spaces, @@ -1109,8 +1104,8 @@ @ @= k=section_text; -while (1) { - if (loc>limit && get_line()==0) { +while (true) { + if (loc>limit && get_line()==false) { err_print("! Input ended in section name"); @.Input ended in section name@> loc=buffer+1; break; @@ -1159,7 +1154,7 @@ if (loc>=limit) err_print("! Verbatim string didn't end"); @.Verbatim string didn't end@> id_loc=loc; loc+=2; - return(string); + return string; } @* Scanning a macro definition. @@ -1184,13 +1179,10 @@ @d macro 0 @d app_repl(c) {if (tok_ptr==tok_mem_end) overflow("token"); *tok_ptr++=c;} -@= -text_pointer cur_text; /* replacement text formed by |scan_repl| */ -eight_bits next_control; +@= +static text_pointer cur_text; /* replacement text formed by |scan_repl| */ +static eight_bits next_control; -@ @= -static void scan_repl(eight_bits);@/ - @ @c static void scan_repl(@t\1\1@> /* creates a replacement text */ @@ -1198,7 +1190,7 @@ { sixteen_bits a; /* the current token */ if (t==section_name) {@@;} - while (1) switch (a=get_next()) { + while (true) switch (a=get_next()) { @tok_start=tok_ptr; } +@ @=@+static void scan_repl(eight_bits); + @ Here is the code for the line number: first a |sixteen_bits| equal to |0150000|; then the numeric line number; then a pointer to the file name. @@ -1236,7 +1230,7 @@ app_repl(a % 0400); break; case section_name: if (t!=section_name) goto done; else { - @@; + @@; a=cur_section_name-name_dir; app_repl((a / 0400)+0250); app_repl(a % 0400); @@ -1245,7 +1239,7 @@ case output_defs_code: if (t!=section_name) err_print("! Misplaced @@h"); @.Misplaced @@h@> else { - output_defs_seen=1; + output_defs_seen=true; a=output_defs_flag; app_repl((a / 0400)+0200); app_repl(a % 0400); @@ -1263,7 +1257,7 @@ } case new_section: goto done; -@ @= { +@ @= { char *try_loc=loc; while (*try_loc==' ' && try_loc= -extern sixteen_bits section_count; /* the current section number */ - -@ The body of |scan_section| is a loop where we look for control codes +The body of |scan_section| is a loop where we look for control codes that are significant to \.{CTANGLE}: those that delimit a definition, the \CEE/ part of a module, or a new module. -@= -static void scan_section(void);@/ - -@ @c + at c static void scan_section(void) { @@ -1362,12 +1350,12 @@ name_pointer p; /* section name for the current section */ text_pointer q; /* text for the current section */ sixteen_bits a; /* token for left-hand side of definition */ - section_count++; @+ no_where=1; + section_count++; @+ no_where=true; if (*(loc-1)=='*' && show_progress) { /* starred section */ printf("*%d",section_count); update_terminal; } next_control=0; - while (1) { + while (true) { @@; if (next_control == definition) { /* \.{@@d} */ @@ -1384,10 +1372,12 @@ } return; /* \.{@@\ } or \.{@@*} */ } - no_where=print_where=0; + no_where=print_where=false; @@; } +@ @=@+static void scan_section(void); + @ At the top of this loop, if |next_control==section_name|, the section name has already been scanned (see |@|). Thus, if we encounter |next_control==section_name| in the @@ -1415,7 +1405,7 @@ app_repl(string); app_repl(' '); app_repl(string); } scan_repl(macro); - cur_text->text_link=0; /* |text_link==0| characterizes a macro */ + cur_text->text_link=macro; } @ If the section name is not followed by \.{=} or \.{+=}, no \CEE/ @@ -1455,9 +1445,6 @@ cur_text->text_link=section_flag; /* mark this replacement text as a nonmacro */ -@ @= -static void phase_one(void);@/ - @ @c static void phase_one(void) { @@ -1470,19 +1457,18 @@ phase=2; } +@ @=@+static void phase_one(void); + @ Only a small subset of the control codes is legal in limbo, so limbo processing is straightforward. -@= -static void skip_limbo(void);@/ - -@ @c + at c static void skip_limbo(void) { char c; - while (1) { - if (loc>limit && get_line()==0) return; + while (true) { + if (loc>limit && get_line()==false) return; *(limit+1)='@@'; while (*loc!='@@') loc++; if (loc++<=limit) { @@ -1505,6 +1491,8 @@ } } +@ @=@+static void skip_limbo(void); + @ @= while(xisspace(*loc)&&loc @z -Section 10. +Section 13. @x @ Code related to identifier and section name storage: @@ -118,7 +118,7 @@ @-c@> @z -Section 12. +Section 15. @x @ Code related to error handling: @@ -127,14 +127,6 @@ @-s@> @z -Section 16. - - at x -@ Code related to section numbers: - at y -@ Code related to section numbers: - at z - Section 17. @x @@ -146,9 +138,9 @@ Section 18. @x -@ Code relating to output: +@ Code related to output: @y -@ Code relating to output: +@ Code related to output: @-a@> @-b@> @-c@> @@ -715,21 +707,21 @@ the category codes |pp->cat|, |(pp+1)->cat|, $\,\ldots\,$ @z -Section 138. +Section 139. @x -@ @= +@ Token lists in |@!tok_mem| are composed of the following kinds of @y - at r @ @= +@ Token lists in |@!tok_mem| are composed of the following kinds of + at -p@> @z -Section 139. +Section 141. @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 - at -p@> + at r @ @= @z Section 142. @@ -941,6 +933,14 @@ @r @ @= @z +Section 173. + + at x +@ @= + at y + at r @ @= + at z + Section 208. @x @@ -949,6 +949,14 @@ @r @ Here's the |squash| procedure, which @z +Section 212. + + at x +@ @= + at y + at r @ @= + at z + Section 220. @x @@ -1071,25 +1079,6 @@ @r @ The |footnote| procedure gives cross-reference information about @z -Section 277. - - at x -@ @= - at y - at r @ @= - at z - -Section 283. - - at x -the index section itself---NOT! - -@= -sixteen_bits k_section; /* runs through the sections */ - at y -the index section itself---NOT! - at z - Section 284. @x @@ -1099,13 +1088,6 @@ @-c@> @z - at x -name_pointer blink[max_names]; /* links in the buckets */ - at y -name_pointer blink[max_names]; /* links in the buckets */ -sixteen_bits k_section; /* runs through the sections */ - at z - Section 286. @x Modified: branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -34,9 +34,9 @@ @z @x -\def\title{CWEAVE (Version 4.0)} +\def\title{CWEAVE (Version 4.2)} @y -\def\title{CTWILL (Version 4.0 [\TeX~Live])} +\def\title{CTWILL (Version 4.2 [\TeX~Live])} @z @x @@ -46,9 +46,9 @@ @z @x - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} @y - \centerline{(Version 4.0 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -75,7 +75,7 @@ The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y This is the \.{CTWILL} program by D. E. Knuth, based on \.{CWEAVE} by Silvio Levy and D.~E. Knuth. It is also based on @@ -94,7 +94,7 @@ The ``banner line'' defined here should be changed whenever \.{CTWILL} is modified. The version number parallels the corresponding version of \.{CWEAVE}. - at d banner "This is CTWILL, Version 4.0" + at d banner "This is CTWILL, Version 4.2" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -285,16 +285,16 @@ @x turned on during the first phase. -@= -boolean change_exists; /* has any section changed? */ +@= +static boolean change_exists; /* has any section changed? */ @y turned on during the first phase---NOT! @z @x -sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */ +static sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */ @y -sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */ +static sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */ @ \.{CTWILL} also has special data structures to keep track of current and temporary meanings. These structures were not designed for maximum @@ -312,26 +312,26 @@ char tex_part[max_tex_chars]; /* \TeX\ part of meaning */ } meaning_struct; -@ @= +@ @= struct perm_meaning { meaning_struct perm; /* current meaning of an identifier */ int stamp; /* last section number in which further output suppressed */ struct perm_meaning *link; /* another meaning to output in this section */ } cur_meaning[max_names]; /* the current ``permanent'' meanings */ -struct perm_meaning *top_usage; /* first meaning to output in this section */ -meaning_struct temp_meaning_stack[max_meanings]; /* the current ``temporary'' meanings */ -meaning_struct *temp_meaning_ptr; /* first available slot in |temp_meaning_stack| */ -meaning_struct *max_temp_meaning_ptr; /* its maximum value so far */ -name_pointer title_code[max_titles]; /* program names seen so far */ -name_pointer *title_code_ptr; /* first available slot in |title_code| */ -char ministring_buf[max_tex_chars]; /* \TeX\ code being generated */ -char *ministring_ptr; /* first available slot in |ministring_buf| */ -boolean ms_mode; /* are we outputting to |ministring_buf|? */ +static struct perm_meaning *top_usage; /* first meaning to output in this section */ +static meaning_struct temp_meaning_stack[max_meanings]; /* the current ``temporary'' meanings */ +static meaning_struct *temp_meaning_ptr; /* first available slot in |temp_meaning_stack| */ +static meaning_struct *max_temp_meaning_ptr; /* its maximum value so far */ +static name_pointer title_code[max_titles]; /* program names seen so far */ +static name_pointer *title_code_ptr; /* first available slot in |title_code| */ +static char ministring_buf[max_tex_chars]; /* \TeX\ code being generated */ +static char *ministring_ptr; /* first available slot in |ministring_buf| */ +static boolean ms_mode; /* are we outputting to |ministring_buf|? */ @ @= max_temp_meaning_ptr=temp_meaning_stack; title_code_ptr=title_code; -ms_mode=0; +ms_mode=false; @ Here's a routine that converts a program title from the buffer into an internal number for the |prog_no| field of a meaning. @@ -383,7 +383,7 @@ name_pointer p) { struct perm_meaning *q=p-name_dir+cur_meaning; - ms_mode=0; + ms_mode=false; if (q->stamp!=section_count) { if (*(ministring_ptr-1)==' ') ministring_ptr--; if (ministring_ptr>=&ministring_buf[max_tex_chars]) @@ -443,8 +443,8 @@ @y id_lookup("make_pair",NULL,func_template); -@ @= -sixteen_bits int_loc, ext_loc; /* locations of special reserved words */ +@ @= +static sixteen_bits int_loc, ext_loc; /* locations of special reserved words */ @z @x @@ -500,11 +500,11 @@ @z @x -static eight_bits skip_TeX(void);@/ +static eight_bits skip_TeX(void); @ @c @y -static eight_bits skip_TeX(void);@/ +static eight_bits skip_TeX(void); @ We look for a clue about the program's title, because this will become part of all meanings. @@ -513,9 +513,9 @@ @z @x - if (loc>limit && get_line()==0) return; + if (loc>limit && get_line()==false) return; @y - if (loc>limit && get_line()==0) return; + if (loc>limit && get_line()==false) return; if (loc==buffer && strncmp(buffer,"\\def\\title{",11)==0) { loc=buffer+10; title_lookup(); /* this program's title will be code zero */ @@ -569,8 +569,8 @@ case underline: xref_switch=def_flag; continue; @y case underline: xref_switch=def_flag; continue; - case temp_meaning: temp_switch=1-temp_switch; continue; - case right_start: right_start_switch=1; continue; + case temp_meaning: temp_switch=true-temp_switch; continue; + case right_start: right_start_switch=true; continue; @z @x @@ -692,7 +692,7 @@ @z @x - skip_limbo(); change_exists=0; + skip_limbo(); change_exists=false; @y skip_limbo(); @; @@ -712,12 +712,12 @@ @x changed_section[section_count]=changing; - /* it will become 1 if any line changes */ + /* it will become |true| if any line changes */ @y @z @x - if (changed_section[section_count]) change_exists=1; + if (changed_section[section_count]) change_exists=true; @y @z @@ -831,7 +831,7 @@ @x default: err_print("! Double @@ should be used in limbo"); @y - case right_start: right_start_switch=1; break; + case right_start: right_start_switch=true; break; default: err_print(_("! Double @@ should be used in limbo")); @z @@ -885,10 +885,10 @@ @z @x -scrap scrap_info[max_scraps]; /* memory array for scraps */ +static scrap scrap_info[max_scraps]; /* memory array for scraps */ @y -scrap scrap_info[max_scraps]; /* memory array for scraps */ -scrap null_scrap; /* a scrap with empty translation */ +static scrap scrap_info[max_scraps]; /* memory array for scraps */ +static scrap null_scrap; /* a scrap with empty translation */ @z @x @@ -899,17 +899,15 @@ @z @x -static void print_text(text_pointer p);@/ - at y -#if 0 -static void print_text(text_pointer p);@/ -#endif - at z + at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ - at x + at c static void print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @y + at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ + + at c #if 0 static void print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @@ -929,6 +927,15 @@ @z @x +@ @=@+static void print_text(text_pointer p); + at y +@ @= +#if 0 +static void print_text(text_pointer p); +#endif + at z + + at x the |for| loop below. @c @@ -964,7 +971,7 @@ @ \.{CTWILL} needs the following procedure, which appends tokens of a translated text until coming to |tok_loc|, then suppresses text that may appear between parentheses or brackets. The calling routine should set -|ident_seen=0| first. (This is admittedly tricky.) +|ident_seen=false| first. (This is admittedly tricky.) @c boolean ident_seen; static boolean app_supp( @@ -982,15 +989,15 @@ } for (j=*p;j<*(p+1);j++) { if (*j=inner_tok_flag) confusion(_("inner")); else if (app_supp(*j-tok_flag+tok_start)) goto catch14;; } - return 0; -catch14: if (*(*(p+1)-1)=='9') return 1; /* production 14 was used */ - else return 0; + return false; +catch14: if (*(*(p+1)-1)=='9') return true; /* production 14 was used */ + else return false; } @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|, @@ -1016,10 +1023,10 @@ /* now we're ready for the mathness that follows (I think) */ /* (without the mod 4 times 5, comments posed a problem) */ /* (namely in cases like |int a(b,c)| followed by comment) */ - ident_seen=0;@+app_supp((pp+l)->trans); + ident_seen=false;@+app_supp((pp+l)->trans); null_scrap.mathness=10; big_app1(&null_scrap); /* now |cur_mathness==no_math| */ - ms_mode=1; ministring_ptr=ministring_buf; + ms_mode=true; ministring_ptr=ministring_buf; if (l==2) *ministring_ptr++='='; make_output(); /* translate the current text into a ministring */ tok_ptr=*(--text_ptr); /* delete that text */ @@ -1041,8 +1048,8 @@ else { q=(pp+l-1)->trans; ast_count=0; - non_ast_seen=0; - while (1) { + non_ast_seen=false; + while (true) { if (*(q+1)==*q+1) { r=q;@+break; /* e.g. \&{struct}; we're doing production 45 or 46 */ } @@ -1051,7 +1058,7 @@ if ((t=*(*(q+1)-2))>=tok_flag && **(t-tok_flag+tok_start)=='*') { /* production 34 */ if (!non_ast_seen) ast_count++; /* count immediately preceding |*|'s */ - } else non_ast_seen=1; + } else non_ast_seen=true; if (*(*q+1)==' ' && *(q+1)==*q+2) break; /* production 27 */ if (*(*q+1)=='{' && *(*q+2)=='}' && *(*q+3)=='$' && *(*q+4)==' '@| && *(q+1)==*q+5) break; /* production 27 in disguise */ @@ -1397,11 +1404,11 @@ @z @x -section_count=0; format_visible=1; copy_limbo(); +section_count=0; format_visible=true; copy_limbo(); @y -temp_switch=0; temp_meaning_ptr=temp_meaning_stack; +temp_switch=false; temp_meaning_ptr=temp_meaning_stack; @; -section_count=0; format_visible=1; right_start_switch=0; copy_limbo(); +section_count=0; format_visible=true; right_start_switch=false; copy_limbo(); @z @x @@ -1412,9 +1419,9 @@ while (!input_has_ended) @@; } -@ @= -FILE *aux_file; -char aux_file_name[max_file_name_length]; /* name of \.{.aux} file */ +@ @= +static FILE *aux_file; +static char aux_file_name[max_file_name_length]; /* name of \.{.aux} file */ @ @= memcpy(aux_file_name,tex_file_name,strlen(tex_file_name)-4); @@ -1439,19 +1446,19 @@ @z @x -boolean group_found=0; /* has a starred section occurred? */ +static boolean group_found=false; /* has a starred section occurred? */ @ @= { section_count++; @y -boolean group_found=0; /* has a starred section occurred? */ -boolean right_start_switch; /* has `\.{@@r}' occurred recently? */ -boolean temp_switch; /* has `\.{@@\%}' occurred recently? */ +static boolean group_found=false; /* has a starred section occurred? */ +static boolean right_start_switch; /* has `\.{@@r}' occurred recently? */ +static boolean temp_switch; /* has `\.{@@\%}' occurred recently? */ @ @d usage_sentinel (struct perm_meaning *)1 @= { section_count++; - temp_switch=0; temp_meaning_ptr=temp_meaning_stack; + temp_switch=false; temp_meaning_ptr=temp_meaning_stack; top_usage=usage_sentinel; @z @@ -1460,7 +1467,7 @@ @y if (*(loc-1)!='*') { if (right_start_switch) { - out_str("\\shortpage\n"); right_start_switch=0; + out_str("\\shortpage\n"); right_start_switch=false; @.\\shortpage@> } out_str("\\M"); @@ -1472,7 +1479,7 @@ @y @.\\N@> if (right_start_switch) { - out_str("N"); right_start_switch=0; + out_str("N"); right_start_switch=false; @.\\NN@> } @z @@ -1481,7 +1488,7 @@ out_str("{");out_section(section_count); out_str("}"); @y out_str("{");out_section(section_count); out_str("}"); -flush_buffer(out_ptr,0,0); +flush_buffer(out_ptr,false,false); @z @x @@ -1488,8 +1495,8 @@ case '@@': out('@@'); break; @y case '@@': out('@@'); break; - case temp_meaning: temp_switch=1-temp_switch; break; - case right_start: right_start_switch=1; break; + case temp_meaning: temp_switch=true-temp_switch; break; + case right_start: right_start_switch=true; break; @z @x @@ -1512,20 +1519,20 @@ @z @x - outer_parse(); finish_C(format_visible); format_visible=1; - doing_format=0; + outer_parse(); finish_C(format_visible); format_visible=true; + doing_format=false; } @y outer_parse(); if (is_macro) @; - finish_C(format_visible); format_visible=1; - doing_format=0; + finish_C(format_visible); format_visible=true; + doing_format=false; } -@ @= -boolean is_macro; /* it's a macro def, not a format def */ -int def_diff; /* 0 iff the current macro has parameters */ -name_pointer id_being_defined; /* the definee */ +@ @= +static boolean is_macro; /* it's a macro def, not a format def */ +static int def_diff; /* 0 iff the current macro has parameters */ +static name_pointer id_being_defined; /* the definee */ @z @x @@ -1532,7 +1539,7 @@ @= { @y @= { - is_macro=1; + is_macro=true; @z @x @@ -1544,12 +1551,12 @@ @x @.Improper macro definition@> else { - app('$'); app_cur_id(0); + app('$'); app_cur_id(false); @y @.Improper macro definition@> else { id_being_defined=id_lookup(id_first,id_loc,normal); - app('$'); app_cur_id(0); + app('$'); app_cur_id(false); def_diff=*loc-'('; @z @@ -1561,11 +1568,11 @@ @x @ @= { - doing_format=1; + doing_format=true; @y @ @= { - ms_mode=1; ministring_ptr=ministring_buf; + ms_mode=true; ministring_ptr=ministring_buf; *ministring_ptr++='='; if (def_diff) { /* parameterless */ scrap_pointer s=scrap_ptr; @@ -1581,8 +1588,8 @@ } @ @= { - doing_format=1; - is_macro=0; + doing_format=true; + is_macro=false; @z @x @@ -1606,7 +1613,7 @@ @x out_str("\\fi"); finish_line(); @.\\fi@> -flush_buffer(out_buf,0,0); /* insert a blank line, it looks nice */ +flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */ @y finish_line(); out_str("\\mini"); finish_line(); @.\\mini@> @@ -1613,7 +1620,7 @@ @; out_str("}\\FI"); finish_line(); @.\\FI@> -flush_buffer(out_buf,0,0); /* insert a blank line, it looks nice */ +flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */ @ The following code is performed for each identifier parsed during a section. Variable |top_usage| is always nonzero; it has the sentinel @@ -1633,7 +1640,7 @@ } @ @= -{@+struct perm_meaning *q; +{ struct perm_meaning *q; while (temp_meaning_ptr>temp_meaning_stack) { out_mini(--temp_meaning_ptr); q=temp_meaning_ptr->id-name_dir+cur_meaning; @@ -1647,9 +1654,6 @@ } } -@ @= -static void out_mini(meaning_struct *);@/ - @ @c static void out_mini( meaning_struct *m) @@ -1669,6 +1673,8 @@ out(' '); out_str(m->tex_part); finish_line(); } +@ @=@+static void out_mini(meaning_struct *); + @ @= switch (cur_name->ilk) { case normal: case func_template: if (length(cur_name)==1) out_str("\\|"); @@ -1696,7 +1702,7 @@ default: out_str("\\&"); @.\\\&@> } -out_name(cur_name,1); +out_name(cur_name,true); name_done: @z @@ -1762,6 +1768,9 @@ @x the index section itself. + +@= +static sixteen_bits k_section; /* runs through the sections */ @y the index section itself---NOT! @z @@ -1813,7 +1822,7 @@ @z @x - case roman: not_an_identifier: out_name(cur_name,0); goto name_done; + case roman: not_an_identifier: out_name(cur_name,false); goto name_done; case custom: {char *j; out_str("$\\"); for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++) out(*j=='_'? 'x': *j=='$'? 'X': *j); @@ -1821,15 +1830,15 @@ goto name_done; } @y -not_an_identifier: out_name(cur_name,0); goto name_done; +not_an_identifier: out_name(cur_name,false); goto name_done; case custom: out_str("\\$"); break; @.\\\$@> @z @x -out_name(cur_name,1); +out_name(cur_name,true); @y -if (proofing) out_name(cur_name,1); +if (proofing) out_name(cur_name,true); else { out('{'); {char *j; Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -20,17 +20,17 @@ The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. - at d banner "This is CWEAVE (Version 4.0pc/big)" + at d banner "This is CWEAVE (Version 4.2pc/big)" @z @x Section 7. - at d chunk_marker 0 + for section names */ @= typedef struct name_info { @@ -47,15 +47,15 @@ typedef name_pointer *hash_pointer; extern char byte_mem[]; /* characters of names */ extern char *byte_mem_end; /* end of |byte_mem| */ +extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ extern name_pointer name_ptr; /* first unused position in |name_dir| */ -extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ extern hash_pointer h; /* index into hash-head array */ @y - at d chunk_marker 0 + for section names */ @f huge extern @@ -103,11 +103,11 @@ @x Section 23. -xref_info xmem[max_refs]; /* contains cross-reference information */ -xref_pointer xmem_end = xmem+max_refs-1; +static xref_info xmem[max_refs]; /* contains cross-reference information */ +static xref_pointer xmem_end = xmem+max_refs-1; @y -xref_info huge xmem[max_refs]; /* contains cross-reference information */ -xref_pointer xmem_end; +static xref_info huge xmem[max_refs]; /* contains cross-reference information */ +static xref_pointer xmem_end; @z @@ -129,21 +129,21 @@ @x Section 30. (to please Borland's C++, version 4.02) -token tok_mem[max_toks]; /* tokens */ -token_pointer tok_mem_end = tok_mem+max_toks-1; /* end of |tok_mem| */ -token_pointer tok_start[max_texts]; /* directory into |tok_mem| */ -token_pointer tok_ptr; /* first unused position in |tok_mem| */ -text_pointer text_ptr; /* first unused position in |tok_start| */ -text_pointer tok_start_end = tok_start+max_texts-1; /* end of |tok_start| */ -token_pointer max_tok_ptr; /* largest value of |tok_ptr| */ +static token tok_mem[max_toks]; /* tokens */ +static token_pointer tok_mem_end = tok_mem+max_toks-1; /* end of |tok_mem| */ +static token_pointer tok_ptr; /* first unused position in |tok_mem| */ +static token_pointer max_tok_ptr; /* largest value of |tok_ptr| */ +static token_pointer tok_start[max_texts]; /* directory into |tok_mem| */ +static text_pointer tok_start_end = tok_start+max_texts-1; /* end of |tok_start| */ +static text_pointer text_ptr; /* first unused position in |tok_start| */ @y -token tok_mem[max_toks]; /* tokens */ -token_pointer tok_mem_end; /* end of |tok_mem| */ -token_pointer tok_start[max_texts]; /* directory into |tok_mem| */ -token_pointer tok_ptr; /* first unused position in |tok_mem| */ -text_pointer text_ptr; /* first unused position in |tok_start| */ -text_pointer tok_start_end; /* end of |tok_start| */ -token_pointer max_tok_ptr; /* largest value of |tok_ptr| */ +static token tok_mem[max_toks]; /* tokens */ +static token_pointer tok_mem_end; /* end of |tok_mem| */ +static token_pointer tok_ptr; /* first unused position in |tok_mem| */ +static token_pointer max_tok_ptr; /* largest value of |tok_ptr| */ +static token_pointer tok_start[max_texts]; /* directory into |tok_mem| */ +static text_pointer tok_start_end; /* end of |tok_start| */ +static text_pointer text_ptr; /* first unused position in |tok_start| */ @z @x Section 31. (goes with the previous change) @@ -212,9 +212,9 @@ @x Section 246. -char *cur_byte; /* index into |byte_mem| */ +static char *cur_byte; /* index into |byte_mem| */ @y -char huge* cur_byte; /* index into |byte_mem| */ +static char huge* cur_byte; /* index into |byte_mem| */ @z Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -11,9 +11,9 @@ change files that have -bs in their name instead of -pc.) @x section 1 - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y - at d banner "This is CWEAVE (Version 4.0pc)" + at d banner "This is CWEAVE (Version 4.2pc)" @z @x section 4 Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -7,15 +7,15 @@ @x -\def\title{CWEAVE (Version 4.0)} +\def\title{CWEAVE (Version 4.2)} @y -\def\title{CWEAVE (QL Version 4.0)} +\def\title{CWEAVE (QL Version 4.2)} @z @x section 1 - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y - at d banner "This is CWEAVE (QL Version 4.0)" + at d banner "This is CWEAVE (QL Version 4.2)" @z @x Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -13,9 +13,9 @@ (also modified by Don Knuth to keep version numbers uptodate) @x section 1 (01-FEB-1992 ST) - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y - at d banner "This is CWEAVE (VAX/VMS Version 4.0)" + at d banner "This is CWEAVE (VAX/VMS Version 4.2)" @z @x section 3 (01-FEB-1992 ST) Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -17,15 +17,15 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CWEAVE (Version 4.0)} +\def\title{CWEAVE (Version 4.2)} @y -\def\title{CWEAVE (Version 4.0 [\TeX~Live])} +\def\title{CWEAVE (Version 4.2 [\TeX~Live])} @z @x - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} @y - \centerline{(Version 4.0 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -41,9 +41,9 @@ @z @x - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y - at d banner "This is CWEAVE, Version 4.0" + at d banner "This is CWEAVE, Version 4.2" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -248,17 +248,15 @@ @z @x -static void print_text(text_pointer p);@/ - at y -#if 0 -static void print_text(text_pointer p);@/ -#endif - at z + at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ - at x + at c static void print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @y + at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ + + at c #if 0 static void print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @@ -272,6 +270,15 @@ @z @x +@ @=@+static void print_text(text_pointer p); + at y +@ @= +#if 0 +static void print_text(text_pointer p); +#endif + at z + + at x @= if (cat1==lbrace || cat1==int_like || cat1==decl) { make_underlined(pp); big_app1(pp); big_app(indent); app(indent); Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -2,9 +2,9 @@ (Contributed by Fabrice Popineau, February 2002) @x section 1 - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @y - at d banner "This is CWEAVE (Version 4.0win32)" + at d banner "This is CWEAVE (Version 4.2win32)" @z @x Modified: branches/stable/source/src/texk/web2c/cwebdir/cweave.w =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cweave.w 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cweave.w 2021-04-01 20:52:49 UTC (rev 850) @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.0--- February 2021 +% Version 4.2 --- February 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -32,11 +32,11 @@ \def\skipxTeX{\\{skip\_\TEX/}} \def\copyxTeX{\\{copy\_\TEX/}} -\def\title{CWEAVE (Version 4.0)} +\def\title{CWEAVE (Version 4.2)} \def\topofcontents{\null\vfill \centerline{\titlefont The {\ttitlefont CWEAVE} processor} \vskip 15pt - \centerline{(Version 4.0)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -67,13 +67,13 @@ The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. - at d banner "This is CWEAVE (Version 4.0)" + at d banner "This is CWEAVE (Version 4.2)" @c @@/ @h @@/ @@/ -@@/ +@@/ @ @ \.{CWEAVE} has a fairly straightforward outline. It operates in @@ -99,6 +99,7 @@ phase_one(); /* read all the user's text and store the cross-references */ phase_two(); /* read all the text again and translate it to \TEX/ form */ phase_three(); /* output the cross-reference index */ + if (tracing==2 && !show_progress) new_line; return wrap_up(); /* and exit gracefully */ } @@ -181,8 +182,8 @@ been altered by a change file entry have their |changed_section| flag turned on during the first phase. -@= -boolean change_exists; /* has any section changed? */ +@= +static boolean change_exists; /* has any section changed? */ @ The other large memory area in \.{CWEAVE} keeps the cross-reference data. All uses of the name |p| are recorded in a linked list beginning at @@ -213,11 +214,11 @@ } xref_info; typedef xref_info *xref_pointer; -@ @= -xref_info xmem[max_refs]; /* contains cross-reference information */ -xref_pointer xmem_end = xmem+max_refs-1; -xref_pointer xref_ptr; /* the largest occupied position in |xmem| */ -sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */ +@ @= +static xref_info xmem[max_refs]; /* contains cross-reference information */ +static xref_pointer xmem_end = xmem+max_refs-1; +static xref_pointer xref_ptr; /* the largest occupied position in |xmem| */ +static sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */ @ A section that is used for multi-file output (with the \.{@@(} feature) has a special first cross-reference whose |num| field is |file_flag|. @@ -250,7 +251,7 @@ @= static void new_xref(name_pointer);@/ static void new_section_xref(name_pointer);@/ -static void set_file_flag(name_pointer);@/ +static void set_file_flag(name_pointer); @ @c static void @@ -332,15 +333,15 @@ unused location of |tok_start| is called |text_ptr|. Thus, we usually have |*text_ptr==tok_ptr|. -@= -token tok_mem[max_toks]; /* tokens */ -token_pointer tok_mem_end = tok_mem+max_toks-1; /* end of |tok_mem| */ -token_pointer tok_start[max_texts]; /* directory into |tok_mem| */ -token_pointer tok_ptr; /* first unused position in |tok_mem| */ -text_pointer text_ptr; /* first unused position in |tok_start| */ -text_pointer tok_start_end = tok_start+max_texts-1; /* end of |tok_start| */ -token_pointer max_tok_ptr; /* largest value of |tok_ptr| */ -text_pointer max_text_ptr; /* largest value of |text_ptr| */ +@= +static token tok_mem[max_toks]; /* tokens */ +static token_pointer tok_mem_end = tok_mem+max_toks-1; /* end of |tok_mem| */ +static token_pointer tok_ptr; /* first unused position in |tok_mem| */ +static token_pointer max_tok_ptr; /* largest value of |tok_ptr| */ +static token_pointer tok_start[max_texts]; /* directory into |tok_mem| */ +static text_pointer tok_start_end = tok_start+max_texts-1; /* end of |tok_start| */ +static text_pointer text_ptr; /* first unused position in |tok_start| */ +static text_pointer max_text_ptr; /* largest value of |text_ptr| */ @ @= tok_ptr=max_tok_ptr=tok_mem+1;@/ @@ -355,8 +356,8 @@ size_t l, /* length of identifier */ eight_bits t at t\2\2@>) /* desired |ilk| */ { - if (length(p)!=l) return 0; - if (p->ilk!=t && !(t==normal && abnormal(p))) return 0; + if (length(p)!=l) return false; + if (p->ilk!=t && !(t==normal && abnormal(p))) return false; return !strncmp(first,p->byte_start,l); } @@ -382,8 +383,7 @@ p->xref=(void *)xref_ptr; } -@ @= -static void update_node(name_pointer p);@/ +@ @=@+static void update_node(name_pointer p); @ We have to get \CEE/'s reserved words into the hash table, and the simplest way to do this is @@ -489,8 +489,7 @@ id_lookup("wchar_t",NULL,raw_int); id_lookup("while",NULL,for_like); id_lookup("xor",NULL,alfop); -id_lookup("xor_eq",NULL,alfop); -res_wd_end=name_ptr; +id_lookup("xor_eq",NULL,alfop);@+ res_wd_end=name_ptr; id_lookup("TeX",NULL,custom); id_lookup("make_pair",NULL,func_template); @@ -546,8 +545,8 @@ @ Control codes are converted to \.{CWEAVE}'s internal representation by means of the table |ccode|. -@= -eight_bits ccode[256]; /* meaning of a char following \.{@@} */ +@= +static eight_bits ccode[256]; /* meaning of a char following \.{@@} */ @ @= {int c; for (c=0; c<256; c++) ccode[c]=0;} @@ -589,15 +588,15 @@ @= static void skip_limbo(void);@/ -static eight_bits skip_TeX(void);@/ +static eight_bits skip_TeX(void); @ @c static void skip_limbo(void) { - while(1) { - if (loc>limit && get_line()==0) return; + while(true) { + if (loc>limit && get_line()==false) return; *(limit+1)='@@'; - while (*loc!='@@') loc++; /* look for '@@', then skip two chars */ + while (*loc!='@@') loc++; /* look for `\.{@@}', then skip two chars */ if (loc++ <=limit) { int c=ccode[(eight_bits)*loc++]; if (c==new_section) return; if (c==noop) skip_restricted(); @@ -617,12 +616,12 @@ static eight_bits skip_TeX(void) /* skip past pure \TEX/ code */ { - while (1) { - if (loc>limit && get_line()==0) return(new_section); + while (true) { + if (loc>limit && get_line()==false) return new_section; *(limit+1)='@@'; while (*loc!='@@' && *loc!='|') loc++; - if (*loc++ =='|') return('|'); - if (loc<=limit) return(ccode[(eight_bits)*(loc++)]); + if (*loc++ =='|') return '|'; + if (loc<=limit) return ccode[(eight_bits)*(loc++)]; } } @@ -666,9 +665,9 @@ @d string 0201 /* \CEE/ string */ @d identifier 0202 /* \CEE/ identifier or reserved word */ -@= -name_pointer cur_section; /* name of section just scanned */ -char cur_section_char; /* the character just before that name */ +@= +static name_pointer cur_section; /* name of section just scanned */ +static char cur_section_char; /* the character just before that name */ @ As one might expect, |get_next| consists mostly of a big switch that branches to the various special cases that can arise. @@ -680,23 +679,20 @@ @d ishigh(c) ((eight_bits)(c)>0177) @^high-bit character handling@> -@= -static eight_bits get_next(void);@/ - -@ @c + at c static eight_bits get_next(void) /* produces the next input token */ { eight_bits c; /* the current character */ - while (1) { + while (true) { @@; - if (loc>limit && get_line()==0) return(new_section); + if (loc>limit && get_line()==false) return new_section; c=*(loc++); if (xisdigit(c) || c=='.') @@; else if (c=='\'' || c=='"'@| || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))@| - || (c=='<' && sharp_include_line==1)) + || (c=='<' && sharp_include_line==true)) @@; else if (xisalpha(c) || isxalpha(c) || ishigh(c)) @@; @@ -704,10 +700,12 @@ else if (xisspace(c)) continue; /* ignore spaces and tabs */ if (c=='#' && loc==buffer+1) @@; mistake: @@; - return(c); + return c; } } +@ @=@+static eight_bits get_next(void); + @ Because preprocessor commands do not fit in with the rest of the syntax of \CEE/, we have to deal with them separately. One solution is to enclose such @@ -721,13 +719,13 @@ @d left_preproc ord /* begins a preprocessor command */ @d right_preproc 0217 /* ends a preprocessor command */ -@= -boolean preprocessing=0; /* are we scanning a preprocessor command? */ +@= +static boolean preprocessing=false; /* are we scanning a preprocessor command? */ @ @= { - preprocessing=1; + preprocessing=true; @@; - return (left_preproc); + return left_preproc; } @ An additional complication is the freakish use of \.< and \.> to delimit @@ -734,12 +732,12 @@ a file name in lines that start with \.{\#include}. We must treat this file name as a string. -@= -boolean sharp_include_line=0; /* are we scanning a |#include| line? */ +@= +static boolean sharp_include_line=false; /* are we scanning a \&{\#include} line? */ @ @= while (loc<=buffer_end-7 && xisspace(*loc)) loc++; -if (loc<=buffer_end-6 && strncmp(loc,"include",7)==0) sharp_include_line=1; +if (loc<=buffer_end-6 && strncmp(loc,"include",7)==0) sharp_include_line=true; @ When we get to the end of a preprocessor line, we lower the flag and send a code |right_preproc|, unless @@ -747,10 +745,10 @@ @= while (loc==limit-1 && preprocessing && *loc=='\\') - if (get_line()==0) return(new_section); /* still in preprocessor mode */ + if (get_line()==false) return new_section; /* still in preprocessor mode */ if (loc>=limit && preprocessing) { - preprocessing=sharp_include_line=0; - return(right_preproc); + preprocessing=sharp_include_line=false; + return right_preproc; } @ The following code assigns values to the combinations \.{++}, @@ -760,7 +758,7 @@ The compound assignment operators (e.g., \.{+=}) are treated as separate tokens. - at d compress(c) if (loc++<=limit) return(c) + at d compress(c) if (loc++<=limit) return c @= switch(c) { @@ -790,7 +788,7 @@ id_first=--loc; while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @| || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); - id_loc=loc; return(identifier); + id_loc=loc; return identifier; } @ Different conventions are followed by \TEX/ and \CEE/ to express octal @@ -826,7 +824,7 @@ || *loc=='f' || *loc=='F') { *id_loc++='$'; *id_loc++=toupper((eight_bits)*loc); loc++; } - return(constant); + return constant; } @ \CEE/ strings and character constants, delimited by double and single @@ -844,14 +842,14 @@ if (delim=='u' && *loc=='8') { *++id_loc=*loc++; } delim=*loc++; *++id_loc=delim; } - if (delim=='<') delim='>'; /* for file names in |#include| lines */ - while (1) { + if (delim=='<') delim='>'; /* for file names in \&{\#include} lines */ + while (true) { if (loc>=limit) { if(*(limit-1)!='\\') { err_print("! String didn't end"); loc=limit; break; @.String didn't end@> } - if(get_line()==0) { + if(get_line()==false) { err_print("! Input ended in middle of string"); loc=buffer; break; @.Input ended in middle of string@> } @@ -873,7 +871,7 @@ printf("..."); mark_error; } id_loc++; - return(string); + return string; } @ After an \.{@@} sign has been scanned, the next character tells us @@ -887,12 +885,12 @@ case underline: xref_switch=def_flag; continue; case trace: tracing=c-'0'; continue; case xref_roman: case xref_wildcard: case xref_typewriter: case noop: - case TeX_string: c=ccode[(eight_bits)c]; skip_restricted(); return(c); + case TeX_string: c=ccode[(eight_bits)c]; skip_restricted(); return c; case section_name: @@; case verbatim: @@; case ord: @@; - default: return(ccode[(eight_bits)c]); + default: return ccode[(eight_bits)c]; } } @@ -906,7 +904,7 @@ if (k-section_text>3 && strncmp(k-2,"...",3)==0) cur_section=section_lookup(section_text+1,k-3,1); /* 1 indicates a prefix */ else cur_section=section_lookup(section_text+1,k,0); - xref_switch=0; return(section_name); + xref_switch=0; return section_name; } @ Section names are placed into the |section_text| array with consecutive spaces, @@ -919,8 +917,8 @@ @ @= k=section_text; -while (1) { - if (loc>limit && get_line()==0) { +while (true) { + if (loc>limit && get_line()==false) { err_print("! Input ended in section name"); @.Input ended in section name@> loc=buffer+1; break; @@ -960,10 +958,7 @@ @ This function skips over a restricted context at relatively high speed. -@= -static void skip_restricted(void);@/ - -@ @c + at c static void skip_restricted(void) { @@ -983,6 +978,8 @@ } } +@ @=@+static void skip_restricted(void); + @ At the present point in the program we have |*(loc-1)==verbatim|; we set |id_first| to the beginning of the string itself, and |id_loc| to its ending-plus-one location in the @@ -994,7 +991,7 @@ if (loc>=limit) err_print("! Verbatim string didn't end"); @.Verbatim string didn't end@> id_loc=loc; loc+=2; - return (verbatim); + return verbatim; } @** Phase one processing. @@ -1007,20 +1004,17 @@ |get_next|; in interesting cases, this will be the control code that ended a section or part of a section. -@= -eight_bits next_control; /* control code waiting to be acting upon */ +@= +static eight_bits next_control; /* control code waiting to be acting upon */ @ The overall processing strategy in phase one has the following straightforward outline. -@= -static void phase_one(void);@/ - -@ @c + at c static void phase_one(void) { phase=1; reset_input(); section_count=0; - skip_limbo(); change_exists=0; + skip_limbo(); change_exists=false; while (!input_has_ended) @@; changed_section[section_count]=change_exists; @@ -1029,11 +1023,13 @@ @@; } +@ @=@+static void phase_one(void); + @ @= { if (++section_count==max_sections) overflow("section number"); changed_section[section_count]=changing; - /* it will become 1 if any line changes */ + /* it will become |true| if any line changes */ if (*(loc-1)=='*' && show_progress) { printf("*%d",section_count); update_terminal; /* print a progress report */ @@ -1041,7 +1037,7 @@ @@; @@; @@; - if (changed_section[section_count]) change_exists=1; + if (changed_section[section_count]) change_exists=true; } @ The |C_xref| subroutine stores references to identifiers in @@ -1067,7 +1063,7 @@ @= static void C_xref(eight_bits);@/ -static void outer_xref(void);@/ +static void outer_xref(void); @ @c static void @@ -1119,7 +1115,7 @@ or \.{@@:}$\,\ldots\,$\.{@@>}. @= -while (1) { +while (true) { switch (next_control=skip_TeX()) { case translit_code: err_print("! Use @@l in limbo only"); continue; @.Use @@l in limbo...@> @@ -1161,9 +1157,9 @@ The variables |lhs| and |rhs| point to the respective identifiers involved in a format definition. -@= -name_pointer lhs, rhs; /* pointers to |byte_start| for format identifiers */ -name_pointer res_wd_end; /* pointer to the first nonreserved identifier */ +@= +static name_pointer lhs, rhs; /* pointers to |byte_start| for format identifiers */ +static name_pointer res_wd_end; /* pointer to the first nonreserved identifier */ @ When we get to the following code we have |next_control>=format_code|. @@ -1245,18 +1241,15 @@ section name was both defined and used. The variable |cur_xref| will point to cross-references for the current section name of interest. -@= -xref_pointer cur_xref; /* temporary cross-reference pointer */ -boolean an_output; /* did |file_flag| precede |cur_xref|? */ +@= +static xref_pointer cur_xref; /* temporary cross-reference pointer */ +static boolean an_output; /* did |file_flag| precede |cur_xref|? */ @ The following recursive procedure walks through the tree of section names and prints out anomalies. @^recursion@> -@= -static void section_check(name_pointer);@/ - -@ @c + at c static void section_check( name_pointer p) /* print anomalies in subtree |p| */ @@ -1264,8 +1257,8 @@ if (p) { section_check(p->llink); cur_xref=(xref_pointer)p->xref; - if (cur_xref->num==file_flag) {an_output=1; cur_xref=cur_xref->xlink;} - else an_output=0; + if (cur_xref->num==file_flag) {an_output=true; cur_xref=cur_xref->xlink;} + else an_output=false; if (cur_xref->num '); mark_harmless; @@ -1281,6 +1274,8 @@ } } +@ @=@+static void section_check(name_pointer); + @ @=section_check(root); @* Low-level output routines. @@ -1289,17 +1284,17 @@ process, |out_line| will hold the current line number of the line about to be output. -@= -char out_buf[line_length+1]; /* assembled characters */ -char *out_ptr; /* last character in |out_buf| */ -char *out_buf_end = out_buf+line_length; /* end of |out_buf| */ -int out_line; /* number of next line to be output */ +@= +static char out_buf[line_length+1]; /* assembled characters */ +static char *out_buf_end = out_buf+line_length; /* end of |out_buf| */ +static char *out_ptr; /* last character in |out_buf| */ +static int out_line; /* number of next line to be output */ @ The |flush_buffer| routine empties the buffer up to a given breakpoint, and moves any remaining characters to the beginning of the next line. -If the |per_cent| parameter is 1, a |'%'| is appended to the line +If the |per_cent| parameter is |true|, a |'%'| is appended to the line that is being output; in this case the breakpoint |b| should be strictly -less than |out_buf_end|. If the |per_cent| parameter is |0|, +less than |out_buf_end|. If the |per_cent| parameter is |false|, trailing blanks are suppressed. The characters emptied from the buffer form a new line of output; if the |carryover| parameter is true, a |"%"| in that line will be @@ -1314,7 +1309,7 @@ @= static void flush_buffer(char *,boolean,boolean);@/ -static void finish_line(void);@/ +static void finish_line(void); @ @c static void @@ -1350,11 +1345,11 @@ finish_line(void) /* do this at the end of a line */ { char *k; /* pointer into |buffer| */ - if (out_ptr>out_buf) flush_buffer(out_ptr,0,0); + if (out_ptr>out_buf) flush_buffer(out_ptr,false,false); else { for (k=buffer; k<=limit; k++) if (!(xisspace(*k))) return; - flush_buffer(out_buf,0,0); + flush_buffer(out_buf,false,false); } } @@ -1379,7 +1374,7 @@ @= static void out_str(const char *);@/ -static void break_out(void);@/ +static void break_out(void); @ @c static void @@ -1405,13 +1400,13 @@ break_out(void) /* finds a way to break the output line */ { char *k=out_ptr; /* pointer into |out_buf| */ - while (1) { + while (true) { if (k==out_buf) @@; if (*k==' ') { - flush_buffer(k,0,1); return; + flush_buffer(k,false,true); return; } if (*(k--)=='\\' && *k!='\\') { /* we've decreased |k| */ - flush_buffer(k,1,1); return; + flush_buffer(k,true,true); return; } } } @@ -1427,7 +1422,7 @@ @.Line had to be broken@> term_write(out_buf+1, out_ptr-out_buf-1); new_line; mark_harmless; - flush_buffer(out_ptr-1,1,1); return; + flush_buffer(out_ptr-1,true,true); return; } @ Here is a macro that outputs a section number in decimal notation. @@ -1437,7 +1432,7 @@ @= static void out_section(sixteen_bits);@/ -static void out_name(name_pointer,boolean);@/ +static void out_name(name_pointer,boolean); @ @c static void @@ -1484,7 +1479,7 @@ @= static void copy_limbo(void);@/ static eight_bits copy_TeX(void);@/ -static int copy_comment(boolean,int);@/ +static int copy_comment(boolean,int); @ @c static void @@ -1491,8 +1486,8 @@ copy_limbo(void) { char c; - while (1) { - if (loc>limit && (finish_line(), get_line()==0)) return; + while (true) { + if (loc>limit && (finish_line(), get_line()==false)) return; *(limit+1)='@@'; while (*loc!='@@') out(*(loc++)); if (loc++<=limit) { @@ -1526,15 +1521,15 @@ copy_TeX(void) { char c; /* current character being copied */ - while (1) { - if (loc>limit && (finish_line(), get_line()==0)) return(new_section); + while (true) { + if (loc>limit && (finish_line(), get_line()==false)) return new_section; *(limit+1)='@@'; while ((c=*(loc++))!='|' && c!='@@') { out(c); if (out_ptr==out_buf+1 && (xisspace(c))) out_ptr--; } - if (c=='|') return('|'); - if (loc<=limit) return(ccode[(eight_bits)*(loc++)]); + if (c=='|') return '|'; + if (loc<=limit) return ccode[(eight_bits)*(loc++)]; } } @@ -1556,10 +1551,10 @@ int bal at t\2\2@>) /* brace balance */ { char c; /* current character being copied */ - while (1) { + while (true) { if (loc>limit) { if (is_long_comment) { - if (get_line()==0) { + if (get_line()==false) { err_print("! Input ended in mid-comment"); @.Input ended in mid-comment@> loc=buffer+1; goto done; @@ -1572,7 +1567,7 @@ } } c=*(loc++); - if (c=='|') return(bal); + if (c=='|') return bal; if (is_long_comment) @@; if (phase==2) { if (ishigh(c)) app_tok(quoted_char); @@ -1615,7 +1610,7 @@ @= if (phase==2) while (bal-- >0) app_tok('}'); -return(0); +return 0; @** Parsing. The most intricate part of \.{CWEAVE} is its mechanism for converting @@ -1716,8 +1711,8 @@ @d begin_arg 61 /* \.{@@[} */ @d end_arg 62 /* \.{@@]} */ -@= -char cat_name[256][12]; +@= +static char cat_name[256][12]; @ @= {int c; for (c=0;c<256;c++) strcpy(cat_name[c],"UNKNOWN");} @@ -1783,10 +1778,7 @@ @ This code allows \.{CWEAVE} to display its parsing steps. -@= -static void print_cat(eight_bits);@/ - -@ @c + at c static void print_cat(@t\1\1@> /* symbolic printout of a category */ eight_bits c at t\2\2@>) @@ -1794,6 +1786,8 @@ fputs(cat_name[c],stdout); } +@ @=@+static void print_cat(eight_bits); + @ The token lists for translated \TEX/ output contain some special control symbols as well as ordinary characters. These control symbols are interpreted by \.{CWEAVE} before they are written to the output file. @@ -2104,15 +2098,15 @@ @ @d trans trans_plus.Trans /* translation texts of scraps */ -@= -scrap scrap_info[max_scraps]; /* memory array for scraps */ -scrap_pointer scrap_info_end=scrap_info+max_scraps -1; /* end of |scrap_info| */ -scrap_pointer pp; /* current position for reducing productions */ -scrap_pointer scrap_base; /* beginning of the current scrap sequence */ -scrap_pointer scrap_ptr; /* ending of the current scrap sequence */ -scrap_pointer lo_ptr; /* last scrap that has been examined */ -scrap_pointer hi_ptr; /* first scrap that has not been examined */ -scrap_pointer max_scr_ptr; /* largest value assumed by |scrap_ptr| */ +@= +static scrap scrap_info[max_scraps]; /* memory array for scraps */ +static scrap_pointer scrap_info_end=scrap_info+max_scraps-1; /* end of |scrap_info| */ +static scrap_pointer scrap_base; /* beginning of the current scrap sequence */ +static scrap_pointer scrap_ptr; /* ending of the current scrap sequence */ +static scrap_pointer max_scr_ptr; /* largest value assumed by |scrap_ptr| */ +static scrap_pointer pp; /* current position for reducing productions */ +static scrap_pointer lo_ptr; /* last scrap that has been examined */ +static scrap_pointer hi_ptr; /* first scrap that has not been examined */ @ @= scrap_base=scrap_info+1; @@ -2141,10 +2135,7 @@ @d tok_flag 4*id_flag /* signifies a token list */ @d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ -@= -static void print_text(text_pointer p);@/ - -@ @c + at c static void print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ text_pointer p at t\2\2@>) @@ -2169,6 +2160,8 @@ update_terminal; } +@ @=@+static void print_text(text_pointer p); + @ @= switch (r) { case math_rel: printf("\\mathrel{"@q}@>); break; @@ -2228,7 +2221,7 @@ reduce(pp,3,exp,-2,3)|'. A couple more words of explanation: -Both |big_app| and |app| append a token (while |big_app1| to |big_app4| +Both |big_app| and |app| append a token (while |big_app1| to |big_app3| append the specified number of scrap translations) to the current token list. The difference between |big_app| and |app| is simply that |big_app| checks whether there can be a conflict between math and non-math @@ -2262,17 +2255,16 @@ @d maybe_math 0 /* works in either horizontal or math mode */ @d big_app2(a) big_app1(a);big_app1(a+1) @d big_app3(a) big_app2(a);big_app1(a+2) - at d big_app4(a) big_app3(a);big_app1(a+3) @d app(a) *(tok_ptr++)=(token)(a) @d app1(a) *(tok_ptr++)=(token)(tok_flag+(int)((a)->trans-tok_start)) -@= -int cur_mathness, init_mathness; +@= +static int cur_mathness, init_mathness; @ @= static void app_str(const char *);@/ static void big_app(token);@/ -static void big_app1(scrap_pointer);@/ +static void big_app1(scrap_pointer); @ @c static void @@ -2418,7 +2410,7 @@ If the first identifier is the keyword `\&{operator}', we give up; users who want to index definitions of overloaded \CPLUSPLUS/ operators should say, for example, `\.{@@!@@\^\\\&\{operator\} \$+\{=\}\$@@>}' (or, -more properly alphebetized, +more properly alpha\-betized, `\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}'). @d no_ident_found (token_pointer)0 /* distinct from any identifier token */ @@ -2429,7 +2421,7 @@ static token_pointer find_first_ident(text_pointer);@/ static void make_reserved(scrap_pointer);@/ static void make_underlined(scrap_pointer);@/ -static void underline_xref(name_pointer);@/ +static void underline_xref(name_pointer); @ @c static token_pointer @@ -3023,7 +3015,7 @@ @= static void reduce(scrap_pointer,short,eight_bits,short,short);@/ -static void squash(scrap_pointer,short,eight_bits,short,short);@/ +static void squash(scrap_pointer,short,eight_bits,short,short); @ @c static void @@ -3083,7 +3075,7 @@ @d safe_scrap_incr 10 @= -while (1) { +while (true) { @@; if (tok_ptr+safe_tok_incr>tok_mem_end) { if (tok_ptr>max_tok_ptr) max_tok_ptr=tok_ptr; @@ -3115,8 +3107,8 @@ a sequence of two or more irreducible scraps will be printed out when |tracing| is set to 1. -@= -int tracing; /* can be used to show parsing details */ +@= +static int tracing; /* can be used to show parsing details */ @ @= { scrap_pointer k_l; /* pointer into |scrap_info| */ @@ -3147,10 +3139,7 @@ since |translate| might add a new text and a new scrap before it checks for overflow. -@= -static text_pointer translate(void);@/ - -@ @c + at c static text_pointer translate(void) /* converts a sequence of scraps */ { @@ -3162,6 +3151,8 @@ @@; } +@ @=@+static text_pointer translate(void); + @ If the initial sequence of scraps does not reduce to a single scrap, we concatenate the translations of all remaining scraps, separated by blank spaces, with dollar signs surrounding the translations of scraps @@ -3176,7 +3167,7 @@ if (j->mathness / 4 == yes_math) app('$'); if (tok_ptr+6>tok_mem_end) overflow("token"); } - freeze_text; return(text_ptr-1); + freeze_text; return text_ptr-1; } @ @= @@ -3215,10 +3206,7 @@ what it reads are appended into the |cat| and |trans| arrays, and |scrap_ptr| is advanced. -@= -static void C_parse(eight_bits);@/ - -@ @c + at c static void C_parse(@t\1\1@> /* creates scraps from \CEE/ tokens */ eight_bits spec_ctrl at t\2\2@>) @@ -3232,6 +3220,8 @@ } } +@ @=@+static void C_parse(eight_bits); + @ The following macro is used to append a scrap whose tokens have just been appended: @@ -3250,7 +3240,7 @@ app_scrap(exp,yes_math);@+break; case string: case constant: case verbatim: @@;@+break; - case identifier: app_cur_id(1);@+break; + case identifier: app_cur_id(true);@+break; case TeX_string: @@;@+break; case '/': case '.': @@ -3448,12 +3438,12 @@ app(@q{@>'}'); @ The function |app_cur_id| appends the current identifier to the -token list; it also builds a new scrap if |scrapping==1|. +token list; it also builds a new scrap if |scrapping==true|. @= static void app_cur_id(boolean);@/ static text_pointer C_translate(void);@/ -static void outer_parse(void);@/ +static void outer_parse(void); @ @c static void @@ -3495,7 +3485,7 @@ p=translate(); /* make the translation */ if (scrap_ptr>max_scr_ptr) max_scr_ptr=scrap_ptr; scrap_ptr=scrap_base-1; scrap_base=save_base; /* scrap the scraps */ - return(p); + return p; } @ The |outer_parse| routine is to |C_parse| as |outer_xref| @@ -3605,12 +3595,12 @@ @d cur_mode cur_state.mode_field /* current mode of interpretation */ @d init_stack stack_ptr=stack;cur_mode=outer /* initialize the stack */ -@= -output_state cur_state; /* |cur_end|, |cur_tok|, |cur_mode| */ -output_state stack[stack_size]; /* info for non-current levels */ -stack_pointer stack_ptr; /* first unused location in the output state stack */ -stack_pointer stack_end=stack+stack_size-1; /* end of |stack| */ -stack_pointer max_stack_ptr; /* largest value assumed by |stack_ptr| */ +@= +static output_state cur_state; /* |cur_end|, |cur_tok|, |cur_mode| */ +static output_state stack[stack_size]; /* info for non-current levels */ +static stack_pointer stack_end=stack+stack_size-1; /* end of |stack| */ +static stack_pointer stack_ptr; /* first unused location in the output state stack */ +static stack_pointer max_stack_ptr; /* largest value assumed by |stack_ptr| */ @ @= max_stack_ptr=stack; @@ -3621,7 +3611,7 @@ @= static void push_level(text_pointer);@/ -static void pop_level(void);@/ +static void pop_level(void); @ @c static void @@ -3659,8 +3649,8 @@ In these cases |cur_name| points to the identifier or section name in question. -@= -name_pointer cur_name; +@= +static name_pointer cur_name; @ @d res_word 0201 /* returned by |get_output| for reserved words */ @d section_code 0200 /* returned by |get_output| for section names */ @@ -3668,7 +3658,7 @@ @= static eight_bits get_output(void);@/ static void output_C(void);@/ -static void make_output(void);@/ +static void make_output(void); @ @c static eight_bits @@ -3680,16 +3670,16 @@ if (a>=0400) { cur_name=a % id_flag + name_dir; switch (a / id_flag) { - case 2: return(res_word); /* |a==res_flag+cur_name| */ - case 3: return(section_code); /* |a==section_flag+cur_name| */ + case 2: return res_word ; /* |a==res_flag+cur_name| */ + case 3: return section_code ; /* |a==section_flag+cur_name| */ case 4: push_level(a % id_flag + tok_start); goto restart; /* |a==tok_flag+cur_name| */ case 5: push_level(a % id_flag + tok_start); cur_mode=inner; goto restart; /* |a==inner_tok_flag+cur_name| */ - default: return(identifier); /* |a==id_flag+cur_name| */ + default: return identifier; /* |a==id_flag+cur_name| */ } } - return((eight_bits)a); + return (eight_bits)a; } @ The real work associated with token output is done by |make_output|. @@ -3747,7 +3737,7 @@ boolean save_mode; /* value of |cur_mode| before a sequence of breaks */ app(end_translation); /* append a sentinel */ freeze_text; push_level(text_ptr-1); - while (1) { + while (true) { a=get_output(); reswitch: switch(a) { case end_translation: return; @@ -3757,7 +3747,7 @@ @.\\MRL@> case noop: case inserted: break; case cancel: case big_cancel: c=0; b=a; - while (1) { + while (true) { a=get_output(); if (a==inserted) continue; if ((abig_force) break; @@ -3810,7 +3800,7 @@ out('\\'); out((cur_name->byte_start)[0]); } -else out_name(cur_name,1); +else out_name(cur_name,true); @ The current mode does not affect the behavior of \.{CWEAVE}'s output routine except when we are outputting control tokens. @@ -3826,7 +3816,7 @@ @.\\8@> if (a==opt) { b=get_output(); /* |opt| is followed by a digit */ - if (b!='0' || force_lines==0) out(b)@; + if (b!='0' || force_lines==false) out(b)@; else out_str("{-1}"); /* |force_lines| encourages more \.{@@\v} breaks */ } } else if (a==opt) b=get_output(); /* ignore digit following |opt| */ @@ -3841,7 +3831,7 @@ @= { b=a; save_mode=cur_mode; c=0; - while (1) { + while (true) { a=get_output(); if (a==inserted) continue; if (a==cancel || a==big_cancel) { @@ -3886,8 +3876,8 @@ out_str("\\X"); @.\\X@> cur_xref=(xref_pointer)cur_name->xref; - if (cur_xref->num==file_flag) {an_output=1; cur_xref=cur_xref->xlink;} - else an_output=0; + if (cur_xref->num==file_flag) {an_output=true; cur_xref=cur_xref->xlink;} + else an_output=false; if (cur_xref->num>=def_flag) { out_section(cur_xref->num-def_flag); if (phase==3) { @@ -3958,7 +3948,7 @@ @= j=limit+1; *j='|'; delim=0; -while (1) { +while (true) { if (k>=k_limit) { fputs("\n! C text in section name didn't end: <",stdout); @.C text...didn't end@> @@ -3991,19 +3981,18 @@ actually output the \TEX/ material instead of merely looking at the \.{CWEB} specifications. -@= -static void phase_two(void);@/ - -@ @c + at c static void phase_two(void) { reset_input(); if (show_progress) fputs("\nWriting the output file...",stdout); @.Writing the output file...@> -section_count=0; format_visible=1; copy_limbo(); -finish_line(); flush_buffer(out_buf,0,0); /* insert a blank line, it looks nice */ +section_count=0; format_visible=true; copy_limbo(); +finish_line(); flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */ while (!input_has_ended) @@; } +@ @=@+static void phase_two(void); + @ The output file will contain the control sequence \.{\\Y} between non-null sections of a section, e.g., between the \TEX/ and definition parts if both are nonempty. This puts a little white space between the parts when they are @@ -4015,17 +4004,17 @@ @d save_position save_line=out_line; save_place=out_ptr @d emit_space_if_needed if (save_line!=out_line || save_place!=out_ptr) out_str("\\Y"); - space_checked=1 + space_checked=true; @.\\Y@> -@= -int save_line; /* former value of |out_line| */ -char *save_place; /* former value of |out_ptr| */ -int sec_depth; /* the integer, if any, following \.{@@*} */ -boolean space_checked; /* have we done |emit_space_if_needed|? */ -boolean format_visible; /* should the next format declaration be output? */ -boolean doing_format=0; /* are we outputting a format declaration? */ -boolean group_found=0; /* has a starred section occurred? */ +@= +static int save_line; /* former value of |out_line| */ +static char *save_place; /* former value of |out_ptr| */ +static int sec_depth; /* the integer, if any, following \.{@@*} */ +static boolean space_checked; /* have we done |emit_space_if_needed|? */ +static boolean format_visible; /* should the next format declaration be output? */ +static boolean doing_format=false; /* are we outputting a format declaration? */ +static boolean group_found=false; /* has a starred section occurred? */ @ @= { section_count++; @@ -4059,7 +4048,7 @@ sec_depth = sec_depth*10 + (*loc) -'0'; } while (*loc == ' ') loc++; /* remove spaces before group title */ - group_found=1; + group_found=true; out_str("\\N"); @.\\N@> {@+ char s[32];@+sprintf(s,"{%d}",sec_depth+1);@+out_str(s);@+} @@ -4095,13 +4084,13 @@ the token memory is in its initial empty state. @= -space_checked=0; +space_checked=false; while (next_control<=definition) { /* |format_code| or |definition| */ init_stack; if (next_control==definition) @@; else @@; - outer_parse(); finish_C(format_visible); format_visible=1; - doing_format=0; + outer_parse(); finish_C(format_visible); format_visible=true; + doing_format=false; } @ The |finish_C| procedure outputs the translation of the current @@ -4114,12 +4103,9 @@ \.{\\7} (the \TEX/ macros for |force| and |big_force|). This \.{\\6} or \.{\\7} is replaced by the concluding \.{\\par} or by \.{\\Y\\par}. -@= -static void finish_C(boolean);@/ - -@ @c + at c static void -finish_C(@t\1\1@> /* finishes a definition or a \Cee\ part */ +finish_C(@t\1\1@> /* finishes a definition or a \CEE/ part */ boolean visible at t\2\2@>) /* nonzero if we should produce \TeX\ output */ { text_pointer p; /* translation of the scraps */ @@ -4146,6 +4132,8 @@ /* forget the tokens and the scraps */ } +@ @=@+static void finish_C(boolean); + @ Keeping in line with the conventions of the \CEE/ preprocessor (and otherwise contrary to the rules of \.{CWEB}) we distinguish here between the case that `\.(' immediately follows an identifier and the @@ -4163,11 +4151,11 @@ err_print("! Improper macro definition"); @.Improper macro definition@> else { - app('$'); app_cur_id(0); + app('$'); app_cur_id(false); if (*loc=='(') reswitch: switch (next_control=get_next()) { case '(': case ',': app(next_control); goto reswitch; - case identifier: app_cur_id(0); goto reswitch; + case identifier: app_cur_id(false); goto reswitch; case ')': app(next_control); next_control=get_next(); break; default: err_print("! Improper macro definition"); break; } @@ -4178,8 +4166,8 @@ } @ @= { - doing_format=1; - if(*(loc-1)=='s' || *(loc-1)=='S') format_visible=0; + doing_format=true; + if(*(loc-1)=='s' || *(loc-1)=='S') format_visible=false; if(!space_checked){emit_space_if_needed;save_position;} app_str("\\F"); /* this will produce `\&{format }' */ @.\\F@> @@ -4203,8 +4191,8 @@ |next_control>=begin_C|. We will make the global variable |this_section| point to the current section name, if it has a name. -@= -name_pointer this_section; /* the current section name, or zero */ +@= +static name_pointer this_section; /* the current section name, or zero */ @ @= this_section=name_dir; @@ -4220,7 +4208,7 @@ outer_parse(); @@; } - finish_C(1); + finish_C(true); } @ The title of the section and an $\E$ or $\mathrel+\E$ are made @@ -4268,8 +4256,8 @@ @= if (this_section>name_dir) { cur_xref=(xref_pointer)this_section->xref; - if (cur_xref->num==file_flag){an_output=1;cur_xref=cur_xref->xlink;} - else an_output=0; + if (cur_xref->num==file_flag){an_output=true;cur_xref=cur_xref->xlink;} + else an_output=false; if (cur_xref->num>def_flag) cur_xref=cur_xref->xlink; /* bypass current section number */ footnote(def_flag); footnote(cite_flag); footnote(0); @@ -4287,10 +4275,7 @@ Note that the output of \.{CWEAVE} is not English-specific; users may supply new definitions for the macros \.{\\A}, \.{\\As}, etc. -@= -static void footnote(sixteen_bits);@/ - -@ @c + at c static void footnote(@t\1\1@> /* outputs section cross-references */ sixteen_bits flag at t\2\2@>) @@ -4306,6 +4291,8 @@ out('.'); } +@ @=@+static void footnote(sixteen_bits); + @ The following code distinguishes three cases, according as the number of cross-references is one, two, or more than two. Variable |q| points to the first cross-reference, and the last link is a zero. @@ -4312,7 +4299,7 @@ @= q=cur_xref; if (q->xlink->num>flag) out('s'); /* plural */ -while (1) { +while (true) { out_section(cur_xref->num-flag); cur_xref=cur_xref->xlink; /* point to the next cross-reference to output */ if (cur_xref->num<=flag) break; @@ -4326,7 +4313,7 @@ @ @= out_str("\\fi"); finish_line(); @.\\fi@> -flush_buffer(out_buf,0,0); /* insert a blank line, it looks nice */ +flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */ @** Phase three processing. We are nearly finished! \.{CWEAVE}'s only remaining task is to write out the @@ -4336,10 +4323,7 @@ just finish off the page, omitting the index, section name list, and table of contents. -@= -static void phase_three(void);@/ - -@ @c + at c static void phase_three(void) { if (no_xref) { @@ -4387,11 +4371,13 @@ check_complete(); /* was all of the change file used? */ } +@ @=@+static void phase_three(void); + @ Just before the index comes a list of all the changed sections, including the index section itself. -@= -sixteen_bits k_section; /* runs through the sections */ +@= +static sixteen_bits k_section; /* runs through the sections */ @ @= { /* remember that the index is already marked as changed */ @@ -4416,10 +4402,10 @@ list for character |c| begins at location |bucket[c]| and continues through the |blink| array. -@= -name_pointer bucket[256]; -name_pointer next_name; /* successor of |cur_name| when sorting */ -name_pointer blink[max_names]; /* links in the buckets */ +@= +static name_pointer bucket[256]; +static name_pointer next_name; /* successor of |cur_name| when sorting */ +static name_pointer blink[max_names]; /* links in the buckets */ @ To begin the sorting, we go through all the hash lists and put each entry having a nonempty cross-reference list into the proper bucket. @@ -4459,11 +4445,11 @@ @d sort_ptr scrap_ptr /* ditto */ @d max_sorts max_scraps /* ditto */ -@= -eight_bits cur_depth; /* depth of current buckets */ -char *cur_byte; /* index into |byte_mem| */ -sixteen_bits cur_val; /* current cross-reference number */ -sort_pointer max_sort_ptr; /* largest value of |sort_ptr| */ +@= +static eight_bits cur_depth; /* depth of current buckets */ +static char *cur_byte; /* index into |byte_mem| */ +static sixteen_bits cur_val; /* current cross-reference number */ +static sort_pointer max_sort_ptr; /* largest value of |sort_ptr| */ @ @= max_sort_ptr=scrap_info; @@ -4471,8 +4457,8 @@ @ The desired alphabetic order is specified by the |collate| array; namely, $|collate|[0]<|collate|[1]<\cdots<|collate|[100]$. -@= -eight_bits collate[101+128]; /* collation order */ +@= +static eight_bits collate[101+128]; /* collation order */ @^high-bit character handling@> @ We use the order $\hbox{null}<\.\ <\hbox{other characters}<{}$\.\_${}< @@ -4531,10 +4517,7 @@ @d infinity 255 /* $\infty$ (approximately) */ -@= -static void unbucket(eight_bits);@/ - -@ @c + at c static void unbucket(@t\1\1@> /* empties buckets having depth |d| */ eight_bits d at t\2\2@>) @@ -4552,6 +4535,8 @@ } } +@ @=@+static void unbucket(eight_bits); + @ @= sort_ptr=scrap_info; unbucket(1); while (sort_ptr>scrap_info) { @@ -4606,7 +4591,7 @@ @.\\9@> case typewriter: out_str("\\."); @.\\.@> - case roman: not_an_identifier: out_name(cur_name,0); goto name_done; + case roman: not_an_identifier: out_name(cur_name,false); goto name_done; case custom: {char *j; out_str("$\\"); for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++) out(*j=='_'? 'x': *j=='$'? 'X': *j); @@ -4616,7 +4601,7 @@ default: out_str("\\&"); @.\\\&@> } -out_name(cur_name,1); +out_name(cur_name,true); name_done:@; @ Section numbers that are to be underlined are enclosed in @@ -4636,8 +4621,8 @@ @ List inversion is best thought of as popping elements off one stack and pushing them onto another. In this case |cur_xref| will be the head of the stack that we push things onto. -@= -xref_pointer next_xref, this_xref; +@= +static xref_pointer next_xref, this_xref; /* pointer variables for rearranging a list */ @ @= @@ -4651,10 +4636,7 @@ prints them. @^recursion@> -@= -static void section_print(name_pointer);@/ - -@ @c + at c static void section_print(@t\1\1@> /* print all section names in subtree |p| */ name_pointer p at t\2\2@>) @@ -4671,6 +4653,8 @@ } } +@ @=@+static void section_print(name_pointer); + @ @=section_print(root); @ Because on some systems the difference between two pointers is a |ptrdiff_t| Modified: branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex 2021-04-01 20:52:49 UTC (rev 850) @@ -1,8 +1,8 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 4.0 --- February 2021 +% Version 4.2 --- February 2021 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros -\xdef\fmtversion{\fmtversion+CWEB4.0} -\chardef\cwebversion=4 \chardef\cwebrevision=0 +\xdef\fmtversion{\fmtversion+CWEB4.2} +\chardef\cwebversion=4 \chardef\cwebrevision=1 \newif\ifpdf \ifx\pdf+\pdftrue\fi % Uncomment the following line if you want PDF goodies to be the default @@ -14,7 +14,7 @@ %\else \pdftextrue \pdfoutput=1 \input pdfcolor \let\setcolor\pdfsetcolor \fi\fi \else \pdftextrue \pdfoutput=1 % changed in 3.69 \def\Black{\pdfliteral{0 g 0 G}} % use rgb colors for direct PDF output too - \def\Blue{\pdfliteral{0 0 1 rg 0 0 1 RG}} + \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}} \fi\fi \newif\ifacro \ifpdf\acrotrue\fi \ifpdftex\acrotrue\fi @@ -282,12 +282,10 @@ \def\stsec{\rightskip=0pt % get out of C mode (cf. \B) \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 \noindent{\let\*=\lapstar\bf\secstar.\quad}% - \ifpdftex\smash{\raise\baselineskip\hbox to0pt{% -% \let\*=\empty\pdfdest num \secstar fith}} % bad space in versions < 3.68 - \let\*=\empty\pdfdest num \secstar fith}}% changed in version 3.68 - \else\ifpdf\smash{\raise\baselineskip\hbox to0pt{% - \let\*=\empty\special{% - pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi\fi} + \ifacro \smash{\raise\baselineskip\hbox to0pt{\let\*=\empty + \ifpdftex \pdfdest num \secstar fith% + \else \special{pdf: dest (\romannumeral\secstar) + [ @thispage /FitH @ypos ]}\fi}}\fi} \let\startsection=\stsec \def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format' \def\A{\note{See also section}} % xref for doubly defined section name Modified: branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -93,17 +93,17 @@ @z @x -\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.0)} +\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.2)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} -\def\runninghead{{\tentt CWEB} USER MANUAL (4.0 [\TeX~Live])} +\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.2 [\TeX~Live])} @z @x -\vskip 18pt\centerline{(Version 4.0 --- February 2021)} +\vskip 18pt\centerline{(Version 4.2 --- February 2021)} @y -\vskip 18pt\centerline{(Version 4.0 --- February 2021)% -\footnote*{This document describes the extended \.{CWEB} (4.0 [\TeX~Live]).}} +\vskip 18pt\centerline{(Version 4.2 --- February 2021)% +\footnote*{This document describes the extended \.{CWEB} (Version 4.2 [\TeX~Live]).}} @z @x @@ -151,6 +151,14 @@ @z @x +except for error messages. + at y +except for error messages.% +\cwebfootnote{\.{CWEB} in \TeX~Live runs `\.{--quiet}ly', i.\,e., +options `\.{b}', `\.{h}', and `\.{p}' are `off' by default.} + at z + + at x output by \.{CWEAVE}. (On by default.) (Has no effect on \.{CTANGLE}.) @y output by \.{CWEAVE}. (On by default.) (Has no effect on \.{CTANGLE}.)% @@ -303,9 +311,9 @@ @z @x - \.{ { }\\vskip 15pt \\centerline\{(Version 4.0)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.2)\}{ }\\vfill\}}\cr}$$ @y - \.{ { }\\vskip 15pt \\centerline\{(Version 4.0)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.2)\}{ }\\vfill\}}\cr}$$ @z @x Modified: branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex =================================================================== --- branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex 2021-04-01 20:52:49 UTC (rev 850) @@ -36,7 +36,7 @@ \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill} \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno} -\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.0)} +\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.2)} % This verbatim mode assumes that ! marks are !! in the text being copied. \def\verbatim{\begingroup @@ -50,7 +50,7 @@ \null\vfill \centerline{\titlefont The {\ttitlefont CWEB} System of Structured Documentation} -\vskip 18pt\centerline{(Version 4.0 --- February 2021)} +\vskip 18pt\centerline{(Version 4.2 --- February 2021)} \vskip 24pt \centerline{\authorfont Donald E. Knuth and Silvio Levy} \vfill @@ -398,15 +398,15 @@ the assignment $\\{pa}\K{\AND}\|a[\T{0}]$ makes \\{pa} point to the zeroth element of \|a.}$$ The \TEX/ text would look like this in your \.{CWEB} file: -$$\lpile{\.{If |pa| is declared as `|int *pa|', the}\cr -\.{assignment |pa=\&a[0]| makes |pa| point -to the zeroth element of |a|.}\cr}$$ -And \.{CWEAVE} translates this into something you are glad you didn't have -to type: -$$\lpile{\.{If \\\\\{pa\} is declared as - `\\\&\{int\} \$\{\}\{*\}\\\\\{pa\}\$',}\cr -\.{the assignment \$\\\\\{pa\}\\K\{\\AND\}\\|a[\\T\{0\}]\$}\cr -\.{makes \\\\\{pa\} point to the zeroth element of \\|a.}\cr}$$ +$$\lpile{\.{If |pa| is declared as `|int *pa|', the assignment}\cr +\.{|pa=\&a[0]| makes |pa| point to the zeroth element of |a|.}\cr}$$ +And \.{CWEAVE} translates this into something +you are glad you didn't have to type: +$$\lpile{\.{If \\PB\{\\\\\{pa\}\} is declared as `\\PB\{\\\&\{int\} + \$\{\}\{*\}\\\\\{pa\}\$\}', the}\cr +\.{assignment \\PB\{\$\\\\\{pa\}\\K\{\\AND\}\\|a[\\T\{0\}]\$\} + makes \\PB\{\\\\\{pa\}\} point}\cr +\.{to the zeroth element of \\PB\{\\|a\}.}\cr}$$ Incidentally, the cross-reference index that \.{CWEAVE} would make, in the presence of a comment like this, would include the current section number as one of the index entries for \\{pa}, @@ -1011,7 +1011,7 @@ \section Running the programs. The \UNIX/ command line for \.{CTANGLE} is -$$\.{ctangle [options] web\_file[.w] [\{change\_file[.ch]|-\} [out\_file]]}$$ +$$\.{ctangle [options] webfile[.w] [\{changefile[.ch]|-\} [outfile[.c]]]}$$ and the same conventions apply to \.{CWEAVE}. If `\.-' or no change file is specified, the change file is null. The extensions \.{.w} and \.{.ch} are appended only if the given file names contain no dot. If the @@ -1042,7 +1042,7 @@ \option e Enclose \CEE/ material formatted by \.{CWEAVE} in brackets \.{\\PB\{...\}}, so that special hooks can be used. -(Off by default; has no effect on \.{CTANGLE}.) +(On by default; has no effect on \.{CTANGLE}.) \option f Force line breaks after each \CEE/ statement formatted by \.{CWEAVE}. (On by default; \.{-f} saves paper but looks less \CEE/-like @@ -1209,7 +1209,7 @@ Since blank lines in the change file are not used for matching, we have |(change_limit==change_buffer && !!changing)| if and only if the change file is exhausted. This procedure is called only when -|changing| is 1; hence error messages will be reported correctly. +|changing| is |true|; hence error messages will be reported correctly. @= static void prime_the_change_buffer(void);@/ @@ -1229,7 +1229,7 @@ \.{@@z}, or \.{@@i} (which would probably mean that the change file is fouled up). @= -while(1) { +while(true) { change_line++; if (!!input_ln(change_file)) return; if (limit + + at p program GLUE(@!input,@!output); + type @@; + var @@; + procedure initialize; {this procedure gets things started} + var @@; + begin @; + end; + +@ Here are two macros for common programming idioms. + + at d incr(#) == #:=#+1 {increase a variable by unity} + at d decr(#) == #:=#-1 {decrease a variable by unity} + +@* The problem and a solution. +We are concerned here with the ``setting of glue'' that occurs when a +\TeX\ box is being packaged. Let $x_1$, \dots,~$x_n$ be integers whose sum +$s=x_1+\cdots+x_n$ is positive, and let $t$ be another positive integer. +These $x_i$ represent scaled amounts of glue in units of sp (scaled +points), where one sp is $2^{-16}$ of a printer's point. The other +quantity $t$ represents the total by which the glue should stretch or +shrink. Following the conventions of \TeX82, we will assume that the +integers we deal with are less than $2^{31}$ in absolute value. + +After the glue has been set, the actual amounts of incremental glue space +(in~sp) will be the integers $f(x_1)$, \dots,~$f(x_n)$, where $f$ is a +function that we wish to compute. We want $f(x)$ to be nearly proportional +to~$x$, and we also want the sum $f(x_1)+\cdots+f(x_n)$ to be nearly +equal to~$t$. If we were using floating-point arithmetic, we would simply +compute $f(x)\equiv(t/s)\cdot x$ and hope for the best; but the goal here +is to compute a suitable~$f$ using only the fixed-point arithmetic operations +of a typical ``16-bit microcomputer.'' + +The solution adopted here is to determine integers $a$, $b$, $c$ such that +$$f(x)=\bigl\lfloor 2^{-b}c\lfloor 2^{-a}x\rfloor\bigr\rfloor$$ +if $x$ is nonnegative. Thus, we take $x$ and shift it right by $a$~bits, +then multiply by~$c$ (which is $2^{15}$ or less), and shift the product +right by $b$~bits. The quantities $a$, $b$, and~$c$ are to be chosen +so that this calculation doesn't cause overflow and so that $f(x_1)+\cdots ++f(x_n)$ is reasonably close to~$t$. + +The following method is used to calculate $a$ and~$b$: +Suppose $$y=\max_{1\le i\le n}\vert x_i\vert\,.$$ +Let $d$ and $e$ be the smallest integers such that $t<2^ds$ and $y<2^e$. +Since $s$ and~$t$ are less than~$2^{31}$, we have $-30\le d\le31$ and +$1\le e\le31$. An error message is given if $d+e\ge31$; in such a case +some $x_m$ has $\vert x_m\vert\ge 2^{e-1}$ and we are trying to change +$\vert x_m\vert$ to $\vert(t/s)x_m\vert\ge2^{d+e-2}\ge2^{30}$~sp, which +\TeX\ does not permit. (Consider, for example, the ``worst case'' situation +$x_1=2^{30}+1$, $x_2=-2^{30}$, $t=2^{31}-1$; surely we need not bother +trying to accommodate such anomalous combinations of values.) On the other +hand if $d+e\le31$, we set $a=e-16$ and $b=31-d-e$. Notice that this choice +of~$a$ guarantees that $\lfloor2^{-a}\vert x_i\vert\rfloor<2^{16}$. We will +choose~$c$ to be at most~$2^{15}$, so that the product will be less +than~$2^{31}$. + +The computation of $c$ is the tricky part. +@^hairy mathematics@> +The ``ideal'' value for $c$ would be $\rho=2^{a+b}t/s$, since $f(x)$ should +be approximately $(t/s)\cdot x$. Furthermore it is better to have $c$ slightly +larger than~$\rho$, instead of slightly smaller, since the other operations +in $f(x)$ have a downward bias. Therefore we shall compute $c=\lceil\rho\rceil$. +Since $2^{a+b}t/s<2^{a+b+d}=2^{15}$, we have $c\le2^{15}$ as desired. + +We want to compute $c=\lceil\rho\rceil$ exactly in all cases. There is no +difficulty if $s<2^{15}$, since $c$ can be computed directly using the +formula $c=\bigl\lfloor(2^{a+b}t+s-1)/s\bigr\rfloor$; overflow will not +occur since $2^{a+b}t<2^{15}s<2^{30}$. + +Otherwise let $s=s_12^l+s_2$, where $2^{14}\le s_1<2^{15}$ and $0\le s_2<2^l$. +We will essentially carry out a long division. Let $t$ be ``normalized'' +so that $2^{30}\le2^ht<2^{31}$ for some~$h$. Then we form the quotient and +remainder of $2^ht$ divided by~$s_1$, +$$ 2^ht=qs_1+r_0, \qquad 0\le r_0-s$ we have +$q=\lceil2^{h+l}t/s\rceil$; otherwise we can replace $(q,r)$ by +$(q\pm1,r\mp s)$ repeatedly until $r$ is in the correct range. It is not +difficult to prove that $q$ needs to be increased at most once and decreased +at most seven times, since $2^lr_0-qs_2<2^ls_1\le s$ and since +$qs_2/s\le(2^ht/s_1)(s_2/2^ls_1)<2^{31}/s_1^2\le8$. Finally, we have +$a+b-h-l=-1$ or~$-2$, since $2^{28+l}\le2^{14}s=2^{a+b+d-1}s\le2^{a+b}t< +2^{a+b+d}s=2^{15}s<2^{30+l}$ and $2^{30}\le2^ht<2^{31}$. Hence +$c=\lceil2^{a+b-h-l}q\rceil=\lceil{1\over2}q\rceil$ or~$\lceil{1\over4}q\rceil$. + +An error analysis shows that these values of $a$, $b$, and $c$ work +satisfactorily, except in unusual cases where we wouldn't expect them to. +@^error analysis@> +When $x\ge0$ we have +$$\eqalign{f(x)&=2^{-b}(2^{a+b}t/s+\theta_0)(2^{-a}x-\theta_1)-\theta_2\cr +&=(t/s)x+\theta_02^{-a-b}x-\theta_12^at/s-2^{-b}\theta_0\theta_1-\theta_2\cr}$$ +where $0\le\theta_0,\theta_1,\theta_2<1$. Now $0\le\theta_02^{-a-b}x +<2^{e-a-b}=2^{d+e-15}$ and $0\le\theta_12^at/s<2^{a+d}=2^{d+e-16}$, and +the other two terms are negligible. Therefore $f(x_1)+\cdots+f(x_n)$ differs +from~$t$ by at most about $2^{d+e-15}n$. Since $2^{d+e}$ is larger than +$(t/s)y$, which is the largest stretching or shrinking of glue after expansion, +the error is at worst about $n/32000$ times as much as this, so it is quite +reasonable. For example, even if fill glue is being used to stretch +20 inches, the error will still be less than $1\over1600$ of an inch. + +@ To sum up: Given the positive integers $s$, $t$, and $y$ as above, we +set $$a\gets\lfloor\lg y\rfloor-15,\qquad b\gets29-\lfloor\lg y\rfloor- +\lfloor\lg t/s\rfloor,\qquad\hbox{and}\qquad c\gets\lceil2^{a+b}t/s\rceil.$$ +The implementation below shows how to do the job in \PASCAL\ without using +large numbers. + +@ \TeX\ wants to have the glue-setting information in a 32-bit data type +called |glue_ratio|. The \PASCAL\ implementation of \TeX82 has |glue_ratio +=real|, but alternative definitions of |glue_ratio| are explicitly allowed. + +For our purposes we shall let |glue_ratio| be a record that is packed with +three fields: The |a_part| will hold the positive integer |a+16|, the +|b_part| will hold the nonnegative integer~|b|, and the |c_part| will hold +the nonnegative integer~|c|. When the formulas above tell us to take +|b>30|, we might as well set |c:=0| instead, because |f(x)| will be +zero in all cases when |b>30|. Note that we have only about 25 bits of +information in all, so it should fit in 32 bits with ease. + +@= +@!glue_ratio=packed record + @!a_part: 1..31; {the quantity |e=a+16| in our derivation} + @!b_part: 0..30; {the quantity |b| in our derivation} + @!c_part: 0..@'100000; {the quantity |c| in our derivation} + end; +@!scaled = integer; {this data type is used for quantities in sp units} + +@ The real problem is to define the procedures that \TeX\ needs to +deal with such |glue_ratio| values: +(a)~Given scaled numbers |s|, |t|, and~|y| as above, to compute the +corresponding |glue_ratio|. +(b)~Given a nonnegative scaled number~|x| and a |glue_ratio|~|g|, to +compute the scaled number~|f(x)|. +(c)~Given a |glue_ratio|~|g|, to print out a decimal equivalent of +|g| for diagnostic purposes. + +The procedures below can be incorporated into \TeX82 via a change file +without great difficulty. A few modifications will be needed, because +\TeX's |glue_ratio| values can be negative in unusual cases---when the +amount of stretchability or shrinkability is less than zero. Negative +values in the |c_part| will handle such problems, if proper care is +taken. The error message below should either become a warning message +or a call to \TeX's |print_err| routine; in the latter case, an +@^error message@> +appropriate help message should be given, stating that glue cannot +stretch to more than 18~feet long, but that it's OK to proceed with +fingers crossed. + +@*Glue multiplication. +The easiest procedure of the three just mentioned is the one that is +needed most often, namely, the computation of~|f(x)|. + +\PASCAL\ doesn't have built-in binary shift commands or built-in exponentiation, +although many computers do have this capability. Therefore our arithmetic +routines use an array called `|two_to_the|', containing powers of~two. +Divisions by powers of two are never done in the programs below when the +dividend is negative, so the operations can safely be replaced by right +shifts on machines for which this is most appropriate. (Contrary to popular +opinion, the operation `|x div 2|' is not the same as shifting |x| +right one binary place, on a machine with two's complement arithmetic, +when |x| is a negative odd integer. But division +{\it is\/} equivalent to shifting when |x| is nonnegative.) + +@= +@!two_to_the: array[0..30] of integer; {$|two_to_the|[k]=2^k$} + +@ @= +@!k:1..30; {an index for initializing |two_to_the|} + +@ @= +two_to_the[0]:=1; +for k:=1 to 30 do two_to_the[k]:=two_to_the[k-1]+two_to_the[k-1]; + +@ We will use the abbreviations |ga|, |gb|, and |gc| as convenient +alternatives to \PASCAL's \&{with} statement. The glue-multiplication +function |f|, which replaces several occurrences of the `|float|' macro +in \TeX82, is now easy to state: + + at d ga==g.a_part + at d gb==g.b_part + at d gc==g.c_part + + at p function glue_mult(@!x:scaled;@!g:glue_ratio):integer; + {returns |f(x)| as above, assuming that |x>=0|} +begin if ga>16 then x:=x div two_to_the[ga-16] {right shift by |a| places} +else x:=x*two_to_the[16-ga]; {left shift by |-a| places} +glue_mult:=(x*gc) div two_to_the[gb]; {right shift by |b| places} +end; {note that |b| may be as large as 30} + +@*Glue setting. +The |glue_fix| procedure computes |a|, |b|, and |c| by the method +explained above. \TeX\ does not normally compute the quantity~|y|, but +it could be made to do so without great difficulty. + +This procedure replaces several occurrences of the `|unfloat|' macro in +\TeX82. It would be written as a function that returns a |glue_ratio|, +if \PASCAL\ would allow functions to produce records as values. + + at p procedure glue_fix(@!s,@!t,@!y:scaled; var@!g:glue_ratio); +var @!a,@!b,@!c:integer; {components of the desired ratio} +@!k,@!h:integer; {$30-\lfloor\lg s\rfloor$, $30-\lfloor\lg t\rfloor$} +@!s0:integer; {original (unnormalized) value of |s|} +@!q,@!r,@!s1:integer; {quotient, remainder, divisor} +@!w:integer; {$2^l$, where $l=16-k$} +begin @; +if t30) then + begin if b<0 then write_ln('! Excessive glue.'); {error message} +@^error message@> + b:=0; c:=0; {make |f(x)| identically zero} + end +else begin if k>=16 then {easy case, $s_0<2^{15}$} + c:=(t div two_to_the[h-a-b]+s0-1) div s0 {here |1<=h-a-b<=k-14<=16|} + else @; + end; +ga:=a+16; gb:=b; gc:=c; +end; + +@ @= +begin a:=15; k:=0; h:=0; s0:=s; +while y<@'10000000000 do {|y| is known to be positive} + begin decr(a); y:=y+y; + end; +while s<@'10000000000 do {|s| is known to be positive} + begin incr(k); s:=s+s; + end; +while t<@'10000000000 do {|t| is known to be positive} + begin incr(h); t:=t+t; + end; +end {now $2^{30}\le t=2^ht_0<2^{31}$ and $2^{30}\le s=2^ks_0<2^{31}$, + hence $d=k-h$ if $t/s<1$} + +@ @= +begin w:=two_to_the[16-k]; +s1:=s0 div w; +q:=t div s1; +r:=((t mod s1)*w)-((s0 mod w)*q); +if r>0 then + begin incr(q); r:=r-s0; + end +else while r<=-s0 do + begin decr(q); r:=r+s0; + end; +if a+b+k-h=15 then c:=(q+1) div 2 @+else c:=(q+3) div 4; +end + +@*Glue-set printing. +The last of the three procedures we need is |print_gr|, which displays a +|glue_ratio| in symbolic decimal form. Before constructing such a procedure, +we shall consider some simpler routines, copying them from an early +draft of the program \TeX82. + + at d unity==@'200000 {$2^{16}$, represents 1.0000} + +@= +@!dig:array[0..15] of 0..9; {for storing digits} + +@ An array of digits is printed out by |print_digs|. + + at p procedure print_digs(@!k:integer); {prints |dig[k-1]| \dots |dig[0]|} +begin while k>0 do + begin decr(k); write(chr(ord('0')+dig[k])); + end; +end; + +@ A nonnegative integer is printed out by |print_int|. + + at p procedure print_int(@!n:integer); {prints an integer in decimal form} +var @!k:0..12; {index to current digit; we assume that $0\le n<10^{12}$} +begin k:=0; +repeat dig[k]:=n mod 10; n:=n div 10; incr(k); +until n=0; +print_digs(k); +end; + +@ And here is a procedure to print a nonnegative |scaled| number. + + at p procedure print_scaled(s:scaled); + {prints a scaled real, truncated to four digits} +var k:0..3; {index to current digit of the fraction part} +begin print_int(s div unity); {print the integer part} +s:=((s mod unity)*10000) div unity; +for k:=0 to 3 do + begin dig[k]:=s mod 10; s:=s div 10; + end; +write('.'); print_digs(4); +end; + +@ Now we're ready to print a |glue_ratio|. Since the effective multiplier +is $2^{-a-b}c$, we will display the scaled integer $2^{16-a-b}c$, taking +care to print something special if this quantity is terribly large. + + at p procedure print_gr(@!g:glue_ratio); {prints a glue multiplier} +var @!j:-29..31; {the amount to shift |c|} +begin j:=32-ga-gb; +while j>15 do + begin write('2x'); decr(j); {indicate multiples of 2 for BIG cases} + end; +if j<0 then print_scaled(gc div two_to_the[-j]) {shift right} +else print_scaled(gc*two_to_the[j]); {shift left} +end; + +@* The driver program. +In order to test these routines, we will assume that the |input| file +contains a sequence of test cases, where each test case consists of the +integer numbers $t$, $x_1$, \dots,~$x_n$, 0. The final test case should +be followed by an additional zero. + +@= +@!x:array[1..1000] of scaled; {the $x_i$} +@!t:scaled; {the desired total} +@!m:integer; {the test case number} + +@ Each case will be processed by the following routine, which assumes +that |t| has already been read. + + at p procedure test; {processes the next data set, given |t| and~|m|} +var @!n: 0..1000; {the number of items} +k:0..1000; {runs through the items} +y:scaled; {$\max_{1\le i\le n}\vert x_i\vert$} +@!g:glue_ratio; {the computed glue multiplier} +@!s:scaled; {the sum $x_1+\cdots+x_n$} +@!ts:scaled; {the sum $f(x_1)+\cdots+f(x_n)$} +begin write_ln('Test data set number ',m:1,':'); +@; +@; +if s<=0 then write_ln('Invalid data (nonpositive sum); this set rejected.') +else begin @; + @; + end; +end; + +@ @= +begin n:=0; +repeat incr(n); read(x[n]); +until x[n]=0; +decr(n); +end + +@ @= +begin s:=0; y:=0; +for k:=1 to n do + begin s:=s+x[k]; + if y= +begin glue_fix(s,t,y,g); {set |g|, perhaps print an error message} +write(' Glue ratio is '); print_gr(g); +write_ln(' (',ga-16:1,',',gb:1,',',gc:1,')'); +end + +@ @= +begin ts:=0; +for k:=1 to n do + begin write(x[k]:20); + if x[k]>=0 then y:=glue_mult(x[k],g) + else y:=-glue_mult(-x[k],g); + write_ln(y:15); + ts:=ts+y; + end; +write_ln(' Totals',s:13,ts:15,' (versus ',t:1,')'); +end + +@ Here is the main program. +@^main program@> + + at p begin initialize; +m:=1; +read(t); +while t>0 do + begin test; + incr(m); read(t); + end; +end. + +@*Index. Here are the section numbers where various identifiers are used in the +program, and where various topics are discussed. + + + + + Property changes on: branches/stable/source/src/texk/web2c/doc/glue.web ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: branches/stable/source/src/texk/web2c/doc/web2c.info =================================================================== --- branches/stable/source/src/texk/web2c/doc/web2c.info 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/doc/web2c.info 2021-04-01 20:52:49 UTC (rev 850) @@ -1,10 +1,10 @@ -This is web2c.info, produced by makeinfo version 5.1 from web2c.texi. +This is web2c.info, produced by makeinfo version 6.7 from web2c.texi. This file documents the installation and use of the programs in Web2c, an implementation of Donald Knuth's TeX system. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -2005, 2007, 2008, 2009, 2010-2020 Karl Berry & Olaf Weber. +2005, 2007, 2008, 2009, 2010-2021 Karl Berry & Olaf Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -439,6 +439,11 @@ TeX, Metafont, and MetaPost have a number of additional options in common: +'-cnf-line=STR' + Parse STR as if it were a line in the 'texmf.cnf' configuration + file, overriding all other settings. *Note (kpathsea)Path + searching options::. + '-file-line-error' '-no-file-line-error' Change (or do not change) the way error messages are printed. The @@ -522,7 +527,8 @@ '-8bit' This option specifies that by default all characters should be considered printable. If '-translate-file' was given as well, then - the TCX file may mark characters as non-printable. + the TCX file may mark characters as non-printable. This is a no-op + in engines natively supporting Unicode.  File: web2c.info, Node: Path searching, Next: Output file location, Prev: Common options, Up: Commonalities @@ -1072,7 +1078,8 @@ '-enc' Enable encTeX extensions, such as '\mubyte'. This can be used to - support Unicode UTF-8 input encoding. See + support the Unicode UTF-8 input encoding, although using an engine + with native Unicode support is more common nowadays. . '-ipc' @@ -1192,22 +1199,18 @@ setting the 'fmts' Make variable; by default, only the 'plain' and 'latex' formats are made. - You can get the latest versions of most of these formats from the -CTAN archives in subdirectories of 'CTAN:/macros' (for CTAN info, *note -(kpathsea)unixtex.ftp::). The archive - (also available from CTAN) contains -most of these formats (although perhaps not the absolute latest -version), among other things. + Nowadays, the formats are generally installed and updated as part of +a larger TeX distribution, such as TeX Live (). latex - The most widely used format. The current release is named 'LaTeX - 2e'; new versions are released approximately every six months, with - patches issued as needed. The old release was called 'LaTeX 2.09', - and is no longer maintained or supported. LaTeX attempts to - provide generic markup instructions, such as "emphasize", instead - of specific typesetting instructions, such as "use the 10pt - Computer Modern italic font". The LaTeX home page: - . + The most widely used format. The current release is named + 'LaTeX2e'; new versions are released approximately every six + months, with patches issued as needed. The old release was called + 'LaTeX 2.09', and is no longer maintained or supported. LaTeX + attempts to provide generic markup instructions, such as + "emphasize", instead of specific typesetting instructions, such as + "use the 10pt Computer Modern italic font". The LaTeX home page: + . context ConTeXt is an independent macro package which has a basic document @@ -1219,10 +1222,10 @@ amstex The official typesetting system of the American Mathematical Society. Like LaTeX, it encourages generic markup commands. The - AMS also provides many LaTeX package for authors who prefer LaTeX. + AMS also provides many LaTeX packages for authors who prefer LaTeX. Taken together, they are used to produce nearly all AMS publications, e.g., 'Mathematical Reviews'. The AMSTeX home page: - . + . texinfo The documentation system developed and maintained by the Free @@ -1229,7 +1232,7 @@ Software Foundation for their software manuals. It can be automatically converted into plain text, a machine-readable on-line format called 'info', HTML, etc. The Texinfo home page: - . + . eplain The "expanded plain" format provides various common features (e.g., @@ -1236,12 +1239,13 @@ symbolic cross-referencing, tables of contents, indexing, citations using BibTeX), for those authors who prefer to handle their own high-level formatting. The Eplain home page: - . + . slitex An obsolete LaTeX 2.09 format for making slides. It is replaced by - the 'slides' document class, along with the 'beamer', 'texpower', - and other packages. + the 'slides' document class, although the 'beamer' package is the + most commonly method for making slides nowadays. The Beamer page + on CTAN: .  File: web2c.info, Node: Languages and hyphenation, Next: Shell escapes, Prev: Formats, Up: TeX @@ -1628,15 +1632,15 @@ LuaTeX Embeds the Lua programming language () and opens up the TeX typesetting engine to control from Lua, starting from the - pdfTeX capabilities as a base. Also natively supports Unicode - input and OpenType- and system fonts. Home page: - . + pdfTeX capabilities as a base. Also natively supports UTF-8 input, + the OpenType and TrueType font formats, and use of system fonts. + Home page: . XeTeX - Combines support for Unicode input and OpenType- and system fonts - with the capabilities of pdfTeX, with the exception of the font - expansion part of micro-typography. Home page: - . + Combines support for Unicode input, the OpenType and TrueType font + formats, and use of system fonts with the capabilities of pdfTeX, + with the exception of the font expansion part of micro-typography. + Home page: . pTeX upTeX @@ -2123,11 +2127,7 @@ implementation. For a complete description of the MetaPost language, see AT&T technical report CSTR-162, generally available in 'TEXMF/doc/metapost/', where TEXMF is the root of TeX directory -structure. See also: - * (the MetaPost - author's home page); - * (papers, packages, and related - information). +structure. The MetaPost home page: . Also, a standard MetaPost package for drawing graphs is documented in AT&T technical report CSTR-164, available as the file 'mpgraph.ps', @@ -2134,7 +2134,7 @@ generally stored alongside 'mpman.ps'. MetaPost processes its command line and determines its memory dump -(mem) file in a way exactly analogous to Metafont and TeX (*note 'tex' +(mem) file in a way analogous to Metafont and TeX (*note 'tex' invocation: tex invocation, and *note Memory dumps::). Synopses: mpost [OPTION]... [MPNAME[.mp]] [MP-COMMANDS] @@ -2419,9 +2419,9 @@ * Menu: -* tangle invocation:: -* weave invocation:: -* pooltype invocation:: +* tangle invocation:: +* weave invocation:: +* pooltype invocation::  File: web2c.info, Node: tangle invocation, Next: weave invocation, Up: WEB @@ -2660,7 +2660,7 @@ * Menu: -* dvitype output example:: +* dvitype output example::  File: web2c.info, Node: dvitype output example, Up: dvitype invocation @@ -3341,12 +3341,8 @@ 'CTAN:/fonts/utilities/ps2pk'. * PostScript Type 1 font format conversion (i.e., between PFA and PFB - formats): . + formats): . - * Scanned image conversion: the (aging) GNU font utilities convert - type specimen images to Metafont, PostScript, etc.: - . - * Tracing bitmaps to fitted outlines: Autotrace (), Potrace (). For Metafont fonts, either of @@ -3354,7 +3350,7 @@ or 'textrace' () make the job easier. - * Virtual font creation: 'CTAN:/fonts/utilities/fontinst'. + * Virtual font creation: .  File: web2c.info, Node: Legalisms, Next: References, Prev: Font utilities, Up: Top @@ -3397,10 +3393,11 @@ 2. Dvips and Afm2tfm: *Note Introduction: (dvips)Top. - 3. The TeX Users Group: . For an introduction to - the TeX system, see . + 3. The TeX Users Group: . For an introduction to the + TeX system, see . - 4. TUGboat: . + 4. TUGboat, the principal journal for the TeX world: + . 5. TeX and computer typesetting in general: . @@ -3495,8 +3492,8 @@ [index] * Menu: -* '"' character, ignored in filenames: \input filenames. (line 22) -* '#define' options: Compile-time options. +* " character, ignored in filenames: \input filenames. (line 22) +* #define options: Compile-time options. (line 6) * $ expansion in filenames: \input filename caveats. (line 17) @@ -3513,7 +3510,7 @@ (line 20) * --enable-hp2627win: Online Metafont graphics. (line 28) -* --enable-ipc configure option: tex invocation. (line 92) +* --enable-ipc configure option: tex invocation. (line 93) * --enable-mftalkwin: Online Metafont graphics. (line 31) * --enable-next: Online Metafont graphics. @@ -3534,35 +3531,36 @@ (line 59) * --with-x: Online Metafont graphics. (line 57) -* -8bit: Common options. (line 105) +* -8bit: Common options. (line 110) * -base=BASE: Determining the memory dump to use. (line 15) -* -base=DUMPNAME: Common options. (line 34) -* -change=CHFILE: mft invocation. (line 62) +* -base=DUMPNAME: Common options. (line 39) +* -change=CHFILE: mft invocation. (line 63) * -charcode-format=TYPE: tftopl invocation. (line 27) * -charcode-format=TYPE <1>: vftovp invocation. (line 30) +* -cnf-line: Common options. (line 25) * -D compiler options: Compile-time options. (line 6) -* -disable-write18: tex invocation. (line 127) +* -disable-write18: tex invocation. (line 128) * -dpi=REAL: dvitype invocation. (line 24) -* -enable-write18: tex invocation. (line 126) +* -enable-write18: tex invocation. (line 127) * -enc: tex invocation. (line 86) -* -file-line-error: Common options. (line 25) -* -file-line-error-style: Common options. (line 26) -* -fmt=DUMPNAME: Common options. (line 34) +* -file-line-error: Common options. (line 30) +* -file-line-error-style: Common options. (line 31) +* -fmt=DUMPNAME: Common options. (line 39) * -fmt=FMT: Determining the memory dump to use. (line 15) * -geometry, supported with Xt: Online Metafont graphics. (line 69) -* -halt-on-error: Common options. (line 41) +* -halt-on-error: Common options. (line 46) * -images: gftype invocation. (line 26) -* -ini: Common options. (line 45) +* -ini: Common options. (line 50) * -ini <1>: Initial and virgin. (line 10) -* -interaction=STRING: Common options. (line 50) -* -ipc: tex invocation. (line 92) -* -ipc-start: tex invocation. (line 92) -* -jobname=STRING: Common options. (line 55) -* -kpathsea-debug=NUMBER: Common options. (line 59) +* -interaction=STRING: Common options. (line 55) +* -ipc: tex invocation. (line 93) +* -ipc-start: tex invocation. (line 93) +* -jobname=STRING: Common options. (line 60) +* -kpathsea-debug=NUMBER: Common options. (line 64) * -length=NUMBER: tangle invocation. (line 27) * -loose: tangle invocation. (line 46) * -lowercase: tangle invocation. (line 35) @@ -3570,20 +3568,20 @@ * -magnification=INTEGER <1>: dvitype invocation. (line 28) * -max-pages=N: dvicopy invocation. (line 25) * -max-pages=N <1>: dvitype invocation. (line 33) -* -mem=DUMPNAME: Common options. (line 34) +* -mem=DUMPNAME: Common options. (line 39) * -min-crossrefs=N: bibtex invocation. (line 31) * -mixedcase: tangle invocation. (line 35) -* -mktex=FILETYPE: tex invocation. (line 102) +* -mktex=FILETYPE: tex invocation. (line 103) * -mktex=FILETYPE <1>: mf invocation. (line 87) -* -mltex: tex invocation. (line 107) +* -mltex: tex invocation. (line 108) * -mnemonics: gftype invocation. (line 29) -* -no-file-line-error: Common options. (line 26) -* -no-mktex=FILETYPE: tex invocation. (line 102) +* -no-file-line-error: Common options. (line 31) +* -no-mktex=FILETYPE: tex invocation. (line 103) * -no-mktex=FILETYPE <1>: mf invocation. (line 87) -* -no-parse-first-line: Common options. (line 72) -* -no-shell-escape: tex invocation. (line 120) -* -output-comment=STRING: tex invocation. (line 112) -* -output-directory: Common options. (line 66) +* -no-parse-first-line: Common options. (line 77) +* -no-shell-escape: tex invocation. (line 121) +* -output-comment=STRING: tex invocation. (line 113) +* -output-directory: Common options. (line 71) * -output-directory <1>: Output file location. (line 15) * -output-level=N: dvitype invocation. (line 36) @@ -3590,21 +3588,21 @@ * -overflow-label-offset=POINTS: gftodvi invocation. (line 59) * -page-start=PAGE-SPEC: dvicopy invocation. (line 28) * -page-start=PAGE-SPEC <1>: dvitype invocation. (line 46) -* -parse-first-line: Common options. (line 71) -* -progname=STRING: Common options. (line 77) +* -parse-first-line: Common options. (line 76) +* -progname=STRING: Common options. (line 82) * -progname=STRING <1>: Determining the memory dump to use. (line 17) -* -recorder: Common options. (line 84) -* -shell-escape: tex invocation. (line 119) -* -shell-restricted: tex invocation. (line 121) +* -recorder: Common options. (line 89) +* -shell-escape: tex invocation. (line 120) +* -shell-restricted: tex invocation. (line 122) * -show-opcodes: dvitype invocation. (line 52) * -strict: tangle invocation. (line 46) -* -style=MFTFILE: mft invocation. (line 66) -* -T: mpost invocation. (line 115) +* -style=MFTFILE: mft invocation. (line 67) +* -T: mpost invocation. (line 111) * -terse: bibtex invocation. (line 28) -* -tex=TEXPROGRAM: mpost invocation. (line 118) -* -translate-file=TCXFILE: Common options. (line 98) -* -troff: mpost invocation. (line 115) +* -tex=TEXPROGRAM: mpost invocation. (line 114) +* -translate-file=TCXFILE: Common options. (line 103) +* -troff: mpost invocation. (line 111) * -underline: tangle invocation. (line 41) * -uppercase: tangle invocation. (line 35) * -x: weave invocation. (line 22) @@ -3618,22 +3616,22 @@ * .blg BibTeX log file: bibtex invocation. (line 14) * .fmt: Initial TeX. (line 6) * .mf: mf invocation. (line 24) -* .mp: mpost invocation. (line 30) -* '.mps' files and PDF: mpost invocation. (line 86) -* .NNN PostScript figures: mpost invocation. (line 35) +* .mp: mpost invocation. (line 26) +* .mps files and PDF: mpost invocation. (line 82) +* .NNN PostScript figures: mpost invocation. (line 31) * .NNNgf generic fonts: mf invocation. (line 34) -* .tcx character translation files: Common options. (line 98) +* .tcx character translation files: Common options. (line 103) * .tcx character translation files <1>: TCX files. (line 6) * .tex: tex invocation. (line 20) * .tfm output: mf invocation. (line 43) -* .tfm output <1>: mpost invocation. (line 35) +* .tfm output <1>: mpost invocation. (line 31) * .Xdefaults: Online Metafont graphics. (line 69) * .Xresources: Online Metafont graphics. (line 69) * 2602gf: mf invocation. (line 48) -* 8 bit clean: Common options. (line 105) -* 8 bit clean output, specifying: Common options. (line 105) +* 8 bit clean: Common options. (line 110) +* 8 bit clean output, specifying: Common options. (line 110) * 8-bit characters: TCX files. (line 6) * \bibliography: bibtex invocation. (line 18) * \bibliographystyle: bibtex invocation. (line 18) @@ -3643,12 +3641,12 @@ * \font and dynamic generation: tex invocation. (line 41) * \fontdimen: tftopl invocation. (line 99) * \immediate\write18: Shell escapes. (line 6) -* '\input' braced (grouped) filename: \input braced filename. +* \input braced (grouped) filename: \input braced filename. (line 6) -* '\input' filename caveats: \input filename caveats. +* \input filename caveats: \input filename caveats. (line 6) * \input filenames: \input filenames. (line 6) -* '\input' quoted filename: \input quoted filename. +* \input quoted filename: \input quoted filename. (line 6) * \input, and pipes: Shell escapes. (line 64) * \mag: dvicopy invocation. (line 20) @@ -3656,9 +3654,9 @@ * \openin, and pipes: Shell escapes. (line 64) * \openout and security: tex invocation. (line 48) * \openout, and pipes: Shell escapes. (line 64) -* \output routine, and '\write': Shell escapes. (line 28) +* \output routine, and \write: Shell escapes. (line 28) * \pdfshellescape: Shell escapes. (line 64) -* \string, and '\input filenames': \input filename caveats. +* \string, and \input filenames: \input filename caveats. (line 29) * \tracingcharsubdef and MLTeX: \tracingcharsubdef. (line 6) * \tracinglostchars and MLTeX: \tracingcharsubdef. (line 11) @@ -3685,8 +3683,8 @@ * aliases for fonts: Path searching. (line 14) * alpha.bst: Basic BibTeX style files. (line 22) -* American Mathematical Society, typesetting system: Formats. (line 39) -* AMSTeX: Formats. (line 39) +* American Mathematical Society, typesetting system: Formats. (line 35) +* AMSTeX: Formats. (line 35) * apalike.bst: Basic BibTeX style files. (line 25) * architecture dependencies: Hardware and memory dumps. @@ -3696,7 +3694,7 @@ * assembly language routines: Compile-time options. (line 21) * autotrace: Font utilities available elsewhere. - (line 46) + (line 42) * Awk, WEB for: WEB. (line 12) * base file, determining: Determining the memory dump to use. (line 6) @@ -3712,7 +3710,8 @@ * batch languages: TeX. (line 9) * BDF and GF conversion: Font utilities available elsewhere. (line 15) -* beginfig: mpost invocation. (line 35) +* beamer, package: Formats. (line 57) +* beginfig: mpost invocation. (line 31) * Berry, Karl: Introduction. (line 43) * BIBINPUTS, search path for bib files: bibtex invocation. (line 18) * bibliographies, creating: BibTeX. (line 6) @@ -3725,15 +3724,15 @@ (line 6) * BigEndian machines: Hardware and memory dumps. (line 6) -* binaries, linking: Common options. (line 77) +* binaries, linking: Common options. (line 82) * blank lines, in TCX files: TCX files. (line 66) * boxes, memory for: Runtime options. (line 20) -* braced filename for '\input': \input braced filename. +* braced filename for \input: \input braced filename. (line 6) * breakpoints, memory for: Runtime options. (line 20) * Breitenlohner, Peter: Introduction. (line 9) * BSTINPUTS, search path for bst files: bibtex invocation. (line 18) -* btex for MetaPost labels: mpost invocation. (line 48) +* btex for MetaPost labels: mpost invocation. (line 44) * btxdoc.bib: bibtex invocation. (line 52) * btxdoc.tex: bibtex invocation. (line 46) * btxhak.tex: bibtex invocation. (line 49) @@ -3742,12 +3741,12 @@ * byte swapping: Hardware and memory dumps. (line 13) * c-sources Makefile target: Additional targets. (line 12) -* caveats for '\input' filenames: \input filename caveats. +* caveats for \input filenames: \input filename caveats. (line 6) -* change files, and MFT: mft invocation. (line 62) +* change files, and MFT: mft invocation. (line 63) * change files, and Tangle: tangle invocation. (line 11) * change files, and Weave: weave invocation. (line 14) -* changing error messages style: Common options. (line 26) +* changing error messages style: Common options. (line 31) * character codes, in GFtype output: gftype invocation. (line 79) * character codes, in PKtype output: pktype invocation. (line 47) * character codes, in TCX files: TCX files. (line 77) @@ -3764,7 +3763,7 @@ (line 69) * cm.base: Initial Metafont. (line 26) * cmbase.mf: Initial Metafont. (line 26) -* cmbase.mft: mft invocation. (line 72) +* cmbase.mft: mft invocation. (line 73) * cmmf.base not recommended: Initial Metafont. (line 26) * color, in DVItoMP: dvitomp invocation. (line 15) * comments, in TCX files: TCX files. (line 70) @@ -3775,9 +3774,9 @@ * compile-time options: configure options. (line 6) * compile-time options <1>: Compile-time options. (line 6) -* Computer Modern fonts, and Troff: mpost invocation. (line 65) +* Computer Modern fonts, and Troff: mpost invocation. (line 61) * Computer Modern macros: Initial Metafont. (line 26) -* 'Computer Modern Typefaces', production of: mft invocation. (line 72) +* Computer Modern Typefaces, production of: mft invocation. (line 73) * configuration: Installation. (line 6) * configuration file reading: Path searching. (line 6) * configuration file values: Runtime options. (line 6) @@ -3784,6 +3783,7 @@ * configuration, compile-time: configure options. (line 6) * configure --with/--enable options: configure options. (line 6) * CONTENTS.tex: weave invocation. (line 22) +* ConTeXt: Formats. (line 28) * conventions for options,: Option conventions. (line 6) * conversion, DVI to plain text: dvitype invocation. (line 6) * conversion, GF to PK: gftopk invocation. (line 6) @@ -3808,7 +3808,7 @@ * date and time, in memory dumps: Hardware and memory dumps. (line 30) * debugging DVI utilities: dvitype invocation. (line 52) -* debugging flags, specifying: Common options. (line 59) +* debugging flags, specifying: Common options. (line 64) * decimal character codes, in TCX files: TCX files. (line 77) * dependencies, hardware: Hardware and memory dumps. (line 6) @@ -3822,12 +3822,12 @@ * dot files, written by TeX programs: tex invocation. (line 48) * double quote character, ignored in filenames: \input filenames. (line 22) -* downloading of fonts for MetaPost labels: mpost invocation. (line 70) +* downloading of fonts for MetaPost labels: mpost invocation. (line 66) * DrawingServant: Online Metafont graphics. (line 35) -* dump file: Common options. (line 34) +* dump file: Common options. (line 39) * dumping memory: Memory dumps. (line 6) -* DVI comment, specifying: tex invocation. (line 112) +* DVI comment, specifying: tex invocation. (line 113) * DVI files, converting to MPX: dvitomp invocation. (line 6) * DVI files, explained: Font file formats. (line 29) * DVI format definition: DVI utilities. (line 14) @@ -3843,12 +3843,12 @@ * dx horizontal escapement <1>: gftype invocation. (line 106) * dy vertical escapement: gftype invocation. (line 106) * dynamic array allocation: Runtime options. (line 45) -* dynamic Metafont mode definitions with 'smode': Modes. (line 28) +* dynamic Metafont mode definitions with smode: Modes. (line 28) * dynamic packing variable: pktype invocation. (line 44) * e response at error prompt: Editor invocation. (line 6) * e-circumflex: \charsubdef. (line 20) * e-TeX: TeX extensions. (line 10) -* e.mft: mft invocation. (line 72) +* e.mft: mft invocation. (line 73) * EC fonts: tex invocation. (line 41) * EC fonts <1>: mf invocation. (line 24) * editing of bitmap fonts: Font utilities available elsewhere. @@ -3860,7 +3860,7 @@ * endian dependencies: Hardware and memory dumps. (line 6) * eoc GF command: gftype invocation. (line 97) -* Eplain: Formats. (line 54) +* Eplain: Formats. (line 50) * epsf: Online Metafont graphics. (line 19) * epTeX: TeX extensions. (line 51) @@ -3868,15 +3868,15 @@ * escapement, horizontal: pktype invocation. (line 57) * escapement, horizontal <1>: gftype invocation. (line 106) * escapement, vertical: gftype invocation. (line 106) -* etex for MetaPost labels: mpost invocation. (line 48) +* etex for MetaPost labels: mpost invocation. (line 44) * etex is pdfTeX: TeX extensions. (line 22) * eupTeX: TeX extensions. (line 51) * executables, shared initial and virgin: Initial and virgin. (line 6) * exit status, of shell escape: Shell escapes. (line 34) -* expanded plain format: Formats. (line 54) +* expanded plain format: Formats. (line 50) * expand_depth: Runtime options. (line 24) * expansion limit, recursive: Runtime options. (line 25) -* expansion, and '\input' filenames: \input filename caveats. +* expansion, and \input filenames: \input filename caveats. (line 6) * extensions to TeX: TeX extensions. (line 6) * extra_mem_bot: Runtime options. (line 19) @@ -3885,10 +3885,10 @@ * FAMILY property <1>: tftopl invocation. (line 99) * Ferguson, Michael: MLTeX. (line 6) * file formats for fonts: Font file formats. (line 6) -* file recorder: Common options. (line 84) +* file recorder: Common options. (line 89) * filename conventions, in input files: \input filenames. (line 6) -* filenames starting with '-': Option conventions. (line 19) -* first line of the main input file: Common options. (line 98) +* filenames starting with -: Option conventions. (line 19) +* first line of the main input file: Common options. (line 103) * fixed-point arithmetic: Compile-time options. (line 21) * FIXPT: Compile-time options. @@ -3907,7 +3907,7 @@ * font aliases: Path searching. (line 14) * font character code, translating: TCX files. (line 101) * font design: Metafont. (line 6) -* font downloading for MetaPost labels: mpost invocation. (line 70) +* font downloading for MetaPost labels: mpost invocation. (line 66) * font file formats: Font file formats. (line 6) * font proofs: gftodvi invocation. (line 6) * font utilities: Font utilities. (line 6) @@ -3916,19 +3916,17 @@ * fontforge: Font utilities available elsewhere. (line 30) * fontinst, for creating virtual fonts: Font utilities available elsewhere. - (line 53) + (line 49) * fonts, basic: Installation. (line 33) -* fontutils: Font utilities available elsewhere. - (line 42) * format files: Initial TeX. (line 13) * formats for TeX: Formats. (line 6) * formats Make target: Additional targets. (line 17) * fraction routines: Compile-time options. (line 21) -* Free Software Foundation documentation system: Formats. (line 47) +* Free Software Foundation documentation system: Formats. (line 43) * freedom of Web2c: Introduction. (line 23) * ftp.math.utah.edu: bibtex invocation. (line 58) -* generating source specials: tex invocation. (line 133) +* generating source specials: tex invocation. (line 134) * geometric designs: Metafont. (line 6) * geometric font scaling: Font file formats. (line 21) * geometry for Metafont: Online Metafont graphics. @@ -3951,7 +3949,7 @@ * glue, memory for: Runtime options. (line 20) * glyph substitutions: MLTeX. (line 6) * gray font: gftodvi invocation. (line 29) -* group-delimited filename for '\input': \input braced filename. +* group-delimited filename for \input: \input braced filename. (line 6) * Gruff, Billy Goat: Triptrap. (line 6) * gsftopk: Font utilities available elsewhere. @@ -3963,7 +3961,6 @@ * headerbyte information: tftopl invocation. (line 95) * height, in pixels: pktype invocation. (line 62) * help, online: Common options. (line 11) -* Henry, Patrick: Introduction. (line 23) * Herberts, Mathias: Online Metafont graphics. (line 20) * hex character codes, in TCX files: TCX files. (line 77) @@ -3993,8 +3990,8 @@ (line 31) * il1-t1.tcx: TCX files. (line 48) * il2-t1.tcx: TCX files. (line 48) -* Info format: Formats. (line 47) -* initial form, enabling: Common options. (line 45) +* Info format: Formats. (line 43) +* initial form, enabling: Common options. (line 50) * initial Metafont: Initial Metafont. (line 6) * initial MetaPost: Initial MetaPost. (line 6) * initial programs: Initial and virgin. (line 19) @@ -4006,8 +4003,8 @@ * install-formats Make target: Additional targets. (line 17) * install-mems Make target: Additional targets. (line 34) * installation: Installation. (line 6) -* interaction between TCX files and '-8bit'.: TCX files. (line 104) -* interaction mode: Common options. (line 50) +* interaction between TCX files and -8bit.: TCX files. (line 104) +* interaction mode: Common options. (line 55) * international characters: TCX files. (line 6) * introduction: Introduction. (line 6) * IPC: IPC and TeX. (line 6) @@ -4014,12 +4011,12 @@ * IPC_DEBUG: Compile-time options. (line 28) * IPC_DEBUG <1>: IPC and TeX. (line 13) -* job name: Common options. (line 55) +* job name: Common options. (line 60) * kerning table, in TFM files: tftopl invocation. (line 101) * keyboard character code, translating: TCX files. (line 101) * Knuth, Donald E.: Introduction. (line 9) * Knuth, Donald E. <1>: mft invocation. (line 56) -* KPATHSEA_DEBUG: Common options. (line 59) +* KPATHSEA_DEBUG: Common options. (line 64) * KRN property: tftopl invocation. (line 101) * label font: gftodvi invocation. (line 36) * LABEL property: tftopl invocation. (line 101) @@ -4026,7 +4023,7 @@ * language support in TeX: Languages and hyphenation. (line 6) * languages, hyphenation rules for: patgen invocation. (line 6) -* LaTeX: Formats. (line 22) +* LaTeX: Formats. (line 18) * Latin Modern: Font utilities available elsewhere. (line 18) * left side bearing: pktype invocation. (line 66) @@ -4037,13 +4034,13 @@ * LIG property: tftopl invocation. (line 101) * ligature table, in TFM files: tftopl invocation. (line 101) * LIGTABLE property: tftopl invocation. (line 101) -* linking binaries: Common options. (line 77) +* linking binaries: Common options. (line 82) * links to binaries: Determining the memory dump to use. (line 30) * literate programming: WEB. (line 6) * LittleEndian machines: Hardware and memory dumps. (line 6) -* location of 'texmf.cnf' in TeX Live: Runtime options. (line 56) +* location of texmf.cnf in TeX Live: Runtime options. (line 56) * log file, BibTeX: bibtex invocation. (line 14) * Lua: TeX extensions. (line 30) * LuaTeX: TeX extensions. (line 30) @@ -4062,7 +4059,7 @@ * main_memory: Runtime options. (line 15) * Make targets, additional: Additional targets. (line 6) * Martin, Rick: Introduction. (line 54) -* Mathematical Reviews: Formats. (line 39) +* Mathematical Reviews: Formats. (line 35) * mathematical typesetting: TeX. (line 6) * mem file, determining: Determining the memory dump to use. (line 6) @@ -4097,9 +4094,9 @@ * MetaPost: MetaPost. (line 6) * MetaPost and plain Metafont compatibility: Initial MetaPost. (line 15) -* MetaPost input files: mpost invocation. (line 30) +* MetaPost input files: mpost invocation. (line 26) * MetaPost invocation: mpost invocation. (line 6) -* MetaPost source, prettyprinting: mft invocation. (line 78) +* MetaPost source, prettyprinting: mft invocation. (line 79) * MetaPost, initial: Initial MetaPost. (line 6) * MetaPost, TeX, and Metafont: Three programs. (line 6) * metatype1: Font utilities available elsewhere. @@ -4119,28 +4116,28 @@ * mktexmf, disabling: mf invocation. (line 24) * mktextfM, disabling: tex invocation. (line 41) * mltex: MLTeX. (line 6) -* MLTeX, enabling: tex invocation. (line 107) +* MLTeX, enabling: tex invocation. (line 108) * mode needed to run Metafont: mf invocation. (line 48) * modes file needed for Metafont: Modes. (line 6) * modes.mf recommended modes file: Modes. (line 10) * mode_def: Modes. (line 15) * mode_setup: Modes. (line 15) -* modifying 'texmf.cnf' in TeX Live: Runtime options. (line 56) +* modifying texmf.cnf in TeX Live: Runtime options. (line 56) * Morgan, Tim: Introduction. (line 43) * Morris, Bob: Introduction. (line 54) * MPEDIT: Editor invocation. (line 10) -* mpgraph.ps: mpost invocation. (line 18) -* mpman.ps: mpost invocation. (line 6) +* mpgraph.pdf: mpost invocation. (line 14) +* mpman.pdf: mpost invocation. (line 6) * mpost: mpost invocation. (line 6) * mpost, reason for name change: Installation. (line 19) -* mpout: mpost invocation. (line 35) -* mproof.tex: mpost invocation. (line 70) +* mpout: mpost invocation. (line 31) +* mproof.tex: mpost invocation. (line 66) * mptrap Make target: Additional targets. (line 41) * mptrap test: Triptrap. (line 6) * mptrap.readme: Triptrap. (line 6) * MPX files, converting from DVI files: dvitomp invocation. (line 6) * Multi-lingual TeX: MLTeX. (line 6) -* multiple spaces, and '\input' filenames: \input filename caveats. +* multiple spaces, and \input filenames: \input filename caveats. (line 6) * N tilde: \charsubdef. (line 36) * new graphics support for Metafont: Online Metafont graphics. @@ -4161,28 +4158,29 @@ * online Metafont graphics: Online Metafont graphics. (line 6) * opcodes, showing DVI: dvitype invocation. (line 52) +* OpenType support: TeX extensions. (line 30) * optical font scaling: Font file formats. (line 21) * option conventions: Option conventions. (line 6) * origin: pktype invocation. (line 66) -* output directory, specifying: Common options. (line 66) +* output directory, specifying: Common options. (line 71) * output directory, specifying <1>: Output file location. (line 15) * output file location: Output file location. (line 6) * output files, written by TeX programs: tex invocation. (line 48) -* output_comment for DVI files: tex invocation. (line 112) +* output_comment for DVI files: tex invocation. (line 113) * overflow label offset: gftodvi invocation. (line 59) * overflow, of runtime stack: Runtime options. (line 25) * packet length: pktype invocation. (line 50) * page, starting: dvicopy invocation. (line 28) * page, starting <1>: dvitype invocation. (line 46) -* parsing the first line: Common options. (line 72) +* parsing the first line: Common options. (line 77) * Pascal, creating from WEB: tangle invocation. (line 6) * patgen: patgen invocation. (line 6) * path searching: Path searching. (line 6) -* path searching debugging: Common options. (line 59) +* path searching debugging: Common options. (line 64) * PDF: TeX extensions. (line 22) -* PDF, and '.mps' files: mpost invocation. (line 86) +* PDF, and .mps files: mpost invocation. (line 82) * pdfTeX: TeX extensions. (line 22) * permissions, legal: Legalisms. (line 6) * PFA and PFB conversion: Font utilities available elsewhere. @@ -4215,7 +4213,7 @@ * plain.bst: Basic BibTeX style files. (line 11) * plain.fmt: Initial TeX. (line 13) -* plain.mft: mft invocation. (line 66) +* plain.mft: mft invocation. (line 67) * pltotf: pltotf invocation. (line 6) * pool file, writing: tangle invocation. (line 16) * Poole, Simon: Online Metafont graphics. @@ -4222,9 +4220,9 @@ (line 50) * pooltype: pooltype invocation. (line 6) * portable filenames: \input filenames. (line 25) -* PostScript fonts, and Troff: mpost invocation. (line 65) +* PostScript fonts, and Troff: mpost invocation. (line 61) * PostScript meets Metafont: MetaPost. (line 6) -* PostScript output: mpost invocation. (line 35) +* PostScript output: mpost invocation. (line 31) * PostScript to PK bitmaps: Font utilities available elsewhere. (line 35) * PostScript Type 1 font conversion: Font utilities available elsewhere. @@ -4231,7 +4229,7 @@ (line 39) * PostScript, and font scaling: Font file formats. (line 21) * potrace: Font utilities available elsewhere. - (line 46) + (line 42) * predefined macros and memory dumps: Memory dumps. (line 6) * prettyprinting Metafont source: mft invocation. (line 6) * prettyprinting WEB programs: weave invocation. (line 6) @@ -4241,11 +4239,11 @@ * production use: Initial and virgin. (line 15) * program name, determines memory dump: Determining the memory dump to use. (line 30) -* program names, special: Common options. (line 45) -* program names, special <1>: Common options. (line 77) -* program names, special <2>: tex invocation. (line 107) -* prologues: mpost invocation. (line 115) -* prologues, and EPSF output: mpost invocation. (line 80) +* program names, special: Common options. (line 50) +* program names, special <1>: Common options. (line 82) +* program names, special <2>: tex invocation. (line 108) +* prologues: mpost invocation. (line 111) +* prologues, and EPSF output: mpost invocation. (line 76) * proof mode: mf invocation. (line 48) * proof sheets, of fonts: gftodvi invocation. (line 6) * property list format: tftopl invocation. (line 43) @@ -4253,12 +4251,12 @@ * property list, converting VF to virtual: vftovp invocation. (line 6) * ps2pk: Font utilities available elsewhere. (line 35) -* psfonts.map, read by MetaPost: mpost invocation. (line 80) +* psfonts.map, read by MetaPost: mpost invocation. (line 76) * pTeX: TeX extensions. (line 44) * PXL files, explained: Font file formats. (line 39) * pxtoch: Font utilities available elsewhere. (line 23) -* quoted filename for '\input': \input quoted filename. +* quoted filename for \input: \input quoted filename. (line 6) * Raichle, Bernd: MLTeX. (line 6) * reading, additional: Introduction. (line 62) @@ -4275,7 +4273,7 @@ (line 39) * Regis graphics support: Online Metafont graphics. (line 40) -* regression testing: tex invocation. (line 112) +* regression testing: tex invocation. (line 113) * repeated rows: pktype invocation. (line 76) * representation of strings: pooltype invocation. (line 30) * restricted shell escapes: Shell escapes. (line 6) @@ -4289,12 +4287,10 @@ * scaled pixels: pktype invocation. (line 57) * scaled pixels <1>: gftype invocation. (line 106) * scaling of fonts: Font file formats. (line 21) -* scanned images of fonts: Font utilities available elsewhere. - (line 42) * security, and output files: tex invocation. (line 48) * security, and shell escapes: Shell escapes. (line 6) -* security, and 'write': mpost invocation. (line 92) -* security, and '\openout': tex invocation. (line 48) +* security, and write: mpost invocation. (line 88) +* security, and \openout: tex invocation. (line 48) * segmentation fault: Runtime options. (line 25) * shapes: Metafont. (line 6) * sharing memory dumps: Hardware and memory dumps. @@ -4308,8 +4304,8 @@ * side bearings <1>: gftype invocation. (line 82) * SIGSEGV: Runtime options. (line 25) * slant font: gftodvi invocation. (line 39) -* slides, producing: Formats. (line 61) -* SliTeX: Formats. (line 61) +* slides, producing: Formats. (line 57) +* SliTeX: Formats. (line 57) * small Metafont memory and modes: Modes. (line 15) * smode and dynamic Metafont mode definition: Modes. (line 28) * sockets: IPC and TeX. (line 6) @@ -4320,13 +4316,13 @@ * starting page <1>: dvitype invocation. (line 46) * Steele Jr., Guy L.: Hardware and memory dumps. (line 34) -* stopping at the first error: Common options. (line 41) +* stopping at the first error: Common options. (line 46) * strategy, overall: Introduction. (line 17) * string numbers, displaying: pooltype invocation. (line 6) * string pool, writing: tangle invocation. (line 16) * string representation: pooltype invocation. (line 30) * style design, for BibTeX: bibtex invocation. (line 49) -* style files: mft invocation. (line 66) +* style files: mft invocation. (line 67) * substitutions of font glyphs: MLTeX. (line 6) * sun: Online Metafont graphics. (line 42) @@ -4342,8 +4338,9 @@ * syntax of TCX files: TCX files. (line 65) * system C library function: Shell escapes. (line 6) * system command: Shell escapes. (line 6) +* system fonts, using: TeX extensions. (line 30) * T1 encoding and ISO input: TCX files. (line 48) -* tabs, and '\input' filenames: \input filename caveats. +* tabs, and \input filenames: \input filename caveats. (line 6) * Tachikawa, Elizabeth: Font file formats. (line 62) * tangle: tangle invocation. (line 6) @@ -4376,7 +4373,7 @@ * TEXBIB, search path for bib files: bibtex invocation. (line 18) * TEXEDIT: Editor invocation. (line 10) * texfonts.map: Path searching. (line 14) -* Texinfo: Formats. (line 47) +* Texinfo: Formats. (line 43) * texmf.cnf: Path searching. (line 6) * texmf.cnf <1>: Runtime options. (line 6) * texmf.cnf for editors: Editor invocation. (line 10) @@ -4385,7 +4382,7 @@ (line 79) * TEXMFOUTPUT, used for reading: Output file location. (line 25) -* TEXMFOUTPUT, used if '.' unwritable: Output file location. +* TEXMFOUTPUT, used if . unwritable: Output file location. (line 19) * texmf_casefold_search: Runtime options. (line 42) * texput: tex invocation. (line 33) @@ -4392,7 +4389,7 @@ * TFM files, converting property lists to: pltotf invocation. (line 6) * TFM files, explained: Font file formats. (line 12) * TFM files, output by Metafont: mf invocation. (line 43) -* TFM files, output by MetaPost: mpost invocation. (line 35) +* TFM files, output by MetaPost: mpost invocation. (line 31) * TFM width of characters: pktype invocation. (line 53) * TFM width of characters <1>: gftype invocation. (line 112) * tftopl: tftopl invocation. (line 6) @@ -4400,12 +4397,12 @@ * time and date, in memory dumps: Hardware and memory dumps. (line 30) * title font: gftodvi invocation. (line 33) -* tokenization, and '\input' filenames: \input filename caveats. +* tokenization, and \input filenames: \input filename caveats. (line 6) * toolkits, X: Online Metafont graphics. (line 59) * torture tests: Triptrap. (line 6) -* translation file for TeX, specifying: Common options. (line 98) +* translation file for TeX, specifying: Common options. (line 103) * translation from WEB to C: Introduction. (line 17) * trap Make target: Additional targets. (line 41) * trap test: Triptrap. (line 6) @@ -4415,10 +4412,11 @@ * trip test: Triptrap. (line 6) * tripman.tex: Triptrap. (line 6) * triptrap Make target: Additional targets. (line 41) -* Troff, and MetaPost: mpost invocation. (line 65) +* Troff, and MetaPost: mpost invocation. (line 61) * troff, supported in MetaPost: MetaPost. (line 12) * Troff, WEB for: WEB. (line 12) * Trojan horses and TeX programs: tex invocation. (line 48) +* TrueType support: TeX extensions. (line 30) * TUGboat bibliography: bibtex invocation. (line 58) * Type 1 conversion: Font utilities available elsewhere. (line 39) @@ -4428,12 +4426,10 @@ * type programs, PK: pktype invocation. (line 6) * type programs, pool: pooltype invocation. (line 6) * typeface families: Metafont. (line 6) -* typeface specimen sheets: Font utilities available elsewhere. - (line 42) * typesetting: TeX. (line 6) * Unicode: TeX extensions. (line 15) -* Unicode <1>: TeX extensions. (line 37) * Unicode input: tex invocation. (line 86) +* Unicode input, native: TeX extensions. (line 37) * uniterm: Online Metafont graphics. (line 50) * unsrt.bst: Basic BibTeX style files. @@ -4440,6 +4436,7 @@ (line 39) * upTeX: TeX extensions. (line 44) * UTF-8 input: tex invocation. (line 86) +* UTF-8 input, native: TeX extensions. (line 30) * validation, of DVI files: dvitype invocation. (line 6) * validation, of GF files: gftype invocation. (line 6) * validation, of PK files: pktype invocation. (line 6) @@ -4453,7 +4450,7 @@ * vftovp: vftovp invocation. (line 6) * virgin programs: Initial and virgin. (line 15) * virtual font creation: Font utilities available elsewhere. - (line 53) + (line 49) * virtual fonts, expanding: dvicopy invocation. (line 6) * virtual-fonts.knuth: Font file formats. (line 56) * virtualfonts.txt: Font file formats. (line 56) @@ -4518,68 +4515,73 @@ Node: Commonalities15122 Node: Option conventions15655 Node: Common options16878 -Node: Path searching21258 -Node: Output file location22230 -Node: Three programs23532 -Node: Runtime options24239 -Node: Initial and virgin27380 -Node: Memory dumps28329 -Node: Creating memory dumps28781 -Node: Determining the memory dump to use29988 -Node: Hardware and memory dumps31565 -Node: Editor invocation34011 -Node: \input filenames34874 -Node: \input quoted filename36427 -Node: \input braced filename37204 -Node: \input filename caveats38134 -Node: TeX39648 -Node: tex invocation40816 -Node: Initial TeX47719 -Node: Formats49083 -Node: Languages and hyphenation52009 -Node: MLTeX52439 -Node: \charsubdef54067 -Node: \tracingcharsubdef56390 -Node: TCX files56965 -Node: patgen invocation62405 -Node: Shell escapes63111 -Node: IPC and TeX66691 -Node: TeX extensions67261 -Node: Metafont69226 -Node: mf invocation70514 -Node: Initial Metafont74351 -Node: Modes75981 -Node: Online Metafont graphics78231 -Node: gftodvi invocation81656 -Node: mft invocation84476 -Node: MetaPost88474 -Node: mpost invocation89310 -Node: Initial MetaPost94486 -Node: dvitomp invocation95408 -Node: BibTeX96073 -Node: bibtex invocation96434 -Node: Basic BibTeX style files98908 -Node: WEB100238 -Node: tangle invocation101479 -Node: weave invocation103602 -Node: pooltype invocation105009 -Node: DVI utilities106139 -Node: dvicopy invocation107073 -Node: dvitype invocation108358 -Node: dvitype output example110695 -Node: Font utilities113748 -Node: Font file formats114928 -Node: gftopk invocation118197 -Node: pktogf invocation119388 -Node: pktype invocation120554 -Node: gftype invocation123377 -Node: tftopl invocation127880 -Node: pltotf invocation132473 -Node: vftovp invocation133524 -Node: vptovf invocation135759 -Node: Font utilities available elsewhere136786 -Node: Legalisms139166 -Node: References140612 -Node: Index144700 +Node: Path searching21496 +Node: Output file location22468 +Node: Three programs23770 +Node: Runtime options24477 +Node: Initial and virgin27618 +Node: Memory dumps28567 +Node: Creating memory dumps29019 +Node: Determining the memory dump to use30226 +Node: Hardware and memory dumps31803 +Node: Editor invocation34249 +Node: \input filenames35112 +Node: \input quoted filename36665 +Node: \input braced filename37442 +Node: \input filename caveats38372 +Node: TeX39886 +Node: tex invocation41054 +Node: Initial TeX48039 +Node: Formats49403 +Node: Languages and hyphenation52220 +Node: MLTeX52650 +Node: \charsubdef54278 +Node: \tracingcharsubdef56601 +Node: TCX files57176 +Node: patgen invocation62616 +Node: Shell escapes63322 +Node: IPC and TeX66902 +Node: TeX extensions67472 +Node: Metafont69501 +Node: mf invocation70789 +Node: Initial Metafont74626 +Node: Modes76256 +Node: Online Metafont graphics78506 +Node: gftodvi invocation81931 +Node: mft invocation84751 +Node: MetaPost88749 +Node: mpost invocation89585 +Node: Initial MetaPost94619 +Node: dvitomp invocation95541 +Node: BibTeX96206 +Node: bibtex invocation96567 +Node: Basic BibTeX style files99041 +Node: WEB100371 +Node: tangle invocation101580 +Node: weave invocation103703 +Node: pooltype invocation105110 +Node: DVI utilities106240 +Node: dvicopy invocation107174 +Node: dvitype invocation108459 +Node: dvitype output example110790 +Node: Font utilities113843 +Node: Font file formats115023 +Node: gftopk invocation118292 +Node: pktogf invocation119483 +Node: pktype invocation120649 +Node: gftype invocation123472 +Node: tftopl invocation127975 +Node: pltotf invocation132568 +Node: vftovp invocation133619 +Node: vptovf invocation135854 +Node: Font utilities available elsewhere136881 +Node: Legalisms139086 +Node: References140532 +Node: Index144665  End Tag Table + + +Local Variables: +coding: utf-8 +End: Modified: branches/stable/source/src/texk/web2c/doc/web2c.texi =================================================================== --- branches/stable/source/src/texk/web2c/doc/web2c.texi 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/doc/web2c.texi 2021-04-01 20:52:49 UTC (rev 850) @@ -63,7 +63,7 @@ an implementation of Donald Knuth's TeX system. Copyright @copyright{} 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -2004, 2005, 2007, 2008, 2009, 2010-2020 Karl Berry & Olaf Weber. +2004, 2005, 2007, 2008, 2009, 2010-2021 Karl Berry & Olaf Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -93,7 +93,7 @@ @subtitle @value{month-year} @author Karl Berry @author Olaf Weber - at author @url{http://tug.org/web2c} + at author @url{https://tug.org/web2c} @page @vskip 0pt plus 1filll @@ -162,7 +162,6 @@ @cindex licensing terms @cindex freedom of Web2c @cindex ice cream - at cindex Henry, Patrick Availability: All of Web2c is freely available---``free'' both in the sense of no cost (free ice cream) and of having the source code to modify and/or redistribute (free speech). @xref{unixtex.ftp,,, @@ -316,6 +315,12 @@ common: @table @samp + at item -cnf-line=@var{str} + at opindex -cnf-line +Parse @var{str} as if it were a line in the @file{texmf.cnf} +configuration file, overriding all other settings. @xref{Path +searching options,,,kpathsea,Kpathsea}. + @item -file-line-error @opindex -file-line-error @itemx -no-file-line-error @@ -438,8 +443,9 @@ @cindex 8 bit clean @flindex 8 bit clean output, specifying This option specifies that by default all characters should be -considered printable. If @samp{-translate-file} was given as well, then the -TCX file may mark characters as non-printable. +considered printable. If @samp{-translate-file} was given as well, +then the TCX file may mark characters as non-printable. This is a +no-op in engines natively supporting Unicode. @end table @@ -1174,7 +1180,8 @@ @cindex Unicode input @cindex UTF-8 input Enable enc at TeX{} extensions, such as @code{\mubyte}. This can be used -to support Unicode UTF-8 input encoding. See +to support the Unicode UTF-8 input encoding, although using an engine +with native Unicode support is more common nowadays. @url{http://www.olsak.net/enctex.html}. @item -ipc @@ -1329,25 +1336,24 @@ automatically built by setting the @code{fmts} Make variable; by default, only the @samp{plain} and @samp{latex} formats are made. -You can get the latest versions of most of these formats from the CTAN -archives in subdirectories of @file{@var{CTAN:}/macros} (for CTAN info, - at pxref{unixtex.ftp,,, kpathsea, Kpathsea}). The archive - at url{ftp://ftp.tug.org/tex/lib.tar.gz} (also available from CTAN) -contains most of these formats (although perhaps not the absolute latest -version), among other things. +Nowadays, the formats are generally installed and updated as part of a +larger @TeX{} distribution, such as @TeX{} Live +(@url{https://tug.org/texlive}). @table @t @item latex @cindex @LaTeX{} -The most widely used format. The current release is named `@LaTeX{} -2e'; new versions are released approximately every six months, with -patches issued as needed. The old release was called `@LaTeX{} 2.09', -and is no longer maintained or supported. @LaTeX{} attempts to provide -generic markup instructions, such as ``emphasize'', instead of specific -typesetting instructions, such as ``use the 10 at dmn{pt} Computer Modern -italic font''. The @LaTeX{} home page: @url{http://www.latex-project.org}. +The most widely used format. The current release is named +`@LaTeX{}2e'; new versions are released approximately every six +months, with patches issued as needed. The old release was called +`@LaTeX{} 2.09', and is no longer maintained or supported. @LaTeX{} +attempts to provide generic markup instructions, such as +``emphasize'', instead of specific typesetting instructions, such as +``use the 10 at dmn{pt} Computer Modern italic font''. The @LaTeX{} home +page: @url{https://www.latex-project.org}. @item context + at cindex Con at TeX{}t Con at TeX{}t is an independent macro package which has a basic document structuring approach similar to @LaTeX{}. It also supports creating interactive PDF files and has integrated MetaPost support, among many @@ -1360,10 +1366,10 @@ @cindex Mathematical Reviews The official typesetting system of the American Mathematical Society. Like @LaTeX{}, it encourages generic markup commands. The AMS also -provides many @LaTeX{} package for authors who prefer @LaTeX{}. Taken +provides many @LaTeX{} packages for authors who prefer @LaTeX{}. Taken together, they are used to produce nearly all AMS publications, e.g., @cite{Mathematical Reviews}. The AMS at TeX{} home page: - at url{http://www.ams.org/tex}. + at url{https://www.ams.org/tex}. @item texinfo @cindex Texinfo @@ -1373,7 +1379,7 @@ Foundation for their software manuals. It can be automatically converted into plain text, a machine-readable on-line format called `info', HTML, etc. The Texinfo home page: - at url{http://www.gnu.org/software/texinfo}. + at url{https://www.gnu.org/software/texinfo}. @item eplain @cindex Eplain @@ -1382,14 +1388,16 @@ symbolic cross-referencing, tables of contents, indexing, citations using Bib at TeX{}), for those authors who prefer to handle their own high-level formatting. The Eplain home page: - at url{http://www.tug.org/eplain}. + at url{https://tug.org/eplain}. @item slitex @cindex Sli at TeX{} @cindex slides, producing + at flindex beamer at r{, package} An obsolete @LaTeX{} 2.09 format for making slides. It is replaced by -the @samp{slides} document class, along with the @samp{beamer}, - at samp{texpower}, and other packages. +the @samp{slides} document class, although the @samp{beamer} package +is the most commonly method for making slides nowadays. The Beamer +page on CTAN: @url{https://ctan.org/pkg/beamer}. @end table @@ -1915,18 +1923,22 @@ @item Lua at TeX{} @cindex Lua at TeX{} @cindex Lua + at cindex UTF-8 input, native + at cindex OpenType support + at cindex TrueType support + at cindex system fonts, using Embeds the Lua programming language (@url{http://lua.org}) and opens up the @TeX{} typesetting engine to control from Lua, starting from -the pdf at TeX{} capabilities as a base. Also natively supports Unicode -input and OpenType- and system fonts. Home page: - at url{http://luatex.org}. +the pdf at TeX{} capabilities as a base. Also natively supports UTF-8 +input, the OpenType and TrueType font formats, and use of system +fonts. Home page: @url{http://luatex.org}. @item Xe at TeX{} @cindex Xe at TeX{} - at cindex Unicode -Combines support for Unicode input and OpenType- and system fonts -with the capabilities of pdf at TeX{}, with the exception of the font -expansion part of micro-typography. + at cindex Unicode input, native +Combines support for Unicode input, the OpenType and TrueType font +formats, and use of system fonts with the capabilities of pdf at TeX{}, +with the exception of the font expansion part of micro-typography. Home page: @url{https://tug.org/xetex}. @item p at TeX{} @@ -2590,7 +2602,7 @@ @pindex mpost @cindex MetaPost invocation - at flindex mpman.ps + at flindex mpman.pdf MetaPost (installed as @code{mpost}) reads a series of pictures specified in the MetaPost programming language, and outputs corresponding PostScript code. This section merely describes the @@ -2597,22 +2609,16 @@ options available in the Web2c implementation. For a complete description of the MetaPost language, see AT&T technical report CSTR-162, generally available in @file{@var{texmf}/doc/metapost/}, -where @var{texmf} is the root of @TeX{} directory structure. See -also: - at itemize @bullet - at item @url{http://cm.bell-labs.com/who/hobby/MetaPost.html} (the - MetaPost author's home page); - at item @url{http://tug.org/metapost} (papers, packages, and - related information). - at end itemize +where @var{texmf} is the root of @TeX{} directory structure. +The MetaPost home page: @url{https://tug.org/metapost}. - at flindex mpgraph.ps + at flindex mpgraph.pdf Also, a standard MetaPost package for drawing graphs is documented in AT&T technical report CSTR-164, available as the file @file{mpgraph.ps}, generally stored alongside @file{mpman.ps}. -MetaPost processes its command line and determines its memory dump (mem) -file in a way exactly analogous to Metafont and @TeX{} (@pxref{tex +MetaPost processes its command line and determines its memory dump +(mem) file in a way analogous to Metafont and @TeX{} (@pxref{tex invocation,, at code{tex} invocation}, and @pxref{Memory dumps}). Synopses: @@ -4253,17 +4259,9 @@ @cindex PFA and PFB conversion @cindex PostScript Type 1 font conversion PostScript Type 1 font format conversion (i.e., between PFA and PFB -formats): @url{http://www.lcdf.org/type}. +formats): @url{https://www.lcdf.org/type}. @item - at cindex scanned images of fonts - at cindex typeface specimen sheets - at pindex fontutils -Scanned image conversion: the (aging) GNU font utilities convert type -specimen images to Metafont, PostScript, etc.: - at url{http://www.gnu.org/software/fontutils/}. - - at item @pindex autotrace @pindex potrace Tracing bitmaps to fitted outlines: Autotrace @@ -4276,7 +4274,7 @@ @item @cindex virtual font creation @pindex fontinst at r{, for creating virtual fonts} -Virtual font creation: @file{@var{CTAN:}/fonts/utilities/fontinst}. +Virtual font creation: @url{https://ctan.org/pkg/fontinst}. @end itemize @@ -4326,11 +4324,12 @@ Dvips and Afm2tfm: @xref{Top, Introduction,, dvips, Dvips}. @item -The @TeX{} Users Group: @url{http://www.tug.org}. For an introduction -to the @TeX{} system, see @url{http://tug.org/begin.html}. +The @TeX{} Users Group: @url{https://tug.org}. For an introduction +to the @TeX{} system, see @url{https://tug.org/begin.html}. @item -TUGboat: @url{http://tug.org/TUGboat}. +TUGboat, the principal journal for the @TeX{} world: + at url{https://tug.org/TUGboat}. @item @TeX{} and computer typesetting in general:@* Added: branches/stable/source/src/texk/web2c/doc/webman.tex =================================================================== --- branches/stable/source/src/texk/web2c/doc/webman.tex (rev 0) +++ branches/stable/source/src/texk/web2c/doc/webman.tex 2021-04-01 20:52:49 UTC (rev 850) @@ -0,0 +1,1674 @@ +% WEB user manual -- last updated by D E Knuth on 4 Dec 89 +\input webmac +\parskip 0pt plus 1pt +\def\RA{\char'31 } % right arrow +\def\hang{\hangindent 4em\ignorespaces} +\font\ninerm=cmr9 +\font\ninett=cmtt9 +\font\eighttt=cmtt8 +\let\mc=\ninerm % medium caps for names like SAIL +\def\PASCAL{Pascal} +\font\quoterm=cmssq8 +\font\quoteit=cmssqi8 +\def\pb{\.{|...|}} +\def\lpile{\def\cr{\hfill\endline}\matrix} % I only use \lpile by itself + +\outer\def\section #1.{\penalty-50\vskip 12pt plus 3pt minus 3pt + \noindent{\bf #1.}\quad\ignorespaces} + +\def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill} +\def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno} +\def\runninghead{{\tentt WEB} USER MANUAL} + +% This verbatim mode assumes that no ? appears in the text being copied. +\def\verbatim{\begingroup + \def\do##1{\catcode`##1=12 } \dospecials + \parskip 0pt \parindent 0pt + \catcode`\ =13 \catcode`\^^M=13 + \tt \catcode`\?=0 \verbatimdefs \verbatimgobble} +{\catcode`\^^M=13{\catcode`\ =13\gdef\verbatimdefs{\def^^M{\ \par}\let =\ }} % + \gdef\verbatimgobble#1^^M{}} + \centerline{\titlefont The {\ttitlefont WEB} System + of Structured Documentation} + +\vskip 15pt plus 3pt minus 3pt +\noindent This memo describes how to write programs in the +\.{WEB} language; and it also includes the full \.{WEB} documentation for +\.{WEAVE} and \.{TANGLE}, the programs that read \.{WEB} input and produce +\TeX\ and \PASCAL\ output, respectively. The philosophy behind \.{WEB} is +that an experienced system programmer, who wants to provide the best +possible documentation of software products, needs two things +simultaneously: a language like \TeX\ for formatting, and a language like +\PASCAL\ for programming. Neither type of language can provide the best +documentation by itself. But when both are appropriately combined, we +obtain a system that is much more useful than either language separately. + +The structure of a software program may be thought of as a ``web'' that is +made up of many interconnected pieces. To document such a program, we want +to explain each individual part of the web and how it relates to its +neighbors. The typographic tools provided by \TeX\ give us an opportunity +to explain the local structure of each part by making that structure +visible, and the programming tools provided by \PASCAL\ make it possible +for us to specify the algorithms formally and unambiguously. By combining +the two, we can develop a style of programming that maximizes our ability +to perceive the structure of a complex piece of software, and at the same +time the documented programs can be mechanically translated into a working +software system that matches the documentation. + +Since \.{WEB} is an experimental system developed for internal use within +the \TeX\ project at Stanford, this report is rather terse, and it assumes +that the reader is an experienced programmer who is highly motivated to +read a detailed description of \.{WEB}'s rules. Furthermore, even if a +less terse manual were to be written, the reader would have to be warned +in advance that \.{WEB} is not for beginners and it never will be: The +user of \.{WEB} must be familiar with both \TeX\ and \PASCAL. When one +writes a \.{WEB} description of a software system, it is possible to make +mistakes by breaking the rules of \.{WEB} and/or the rules of \TeX\ and/or +the rules of \PASCAL. In practice, all three types of errors will occur, +and you will get different error messages from the different language +processors. In compensation for the sophisticated expertise needed to cope +with such a variety of languages, however, experience has shown that +reliable software can be created quite rapidly by working entirely in +\.{WEB} from the beginning; and the documentation of such programs seems +to be better than the documentation obtained by any other known method. +Thus, \.{WEB} users need to be highly qualified, but they can get some +satisfaction and perhaps even a special feeling of accomplishment when +they have successfully created a software system with this method. + +To use \.{WEB}, you prepare a file called \.{COB.WEB} (say), and then you +apply a system program called \.{WEAVE} to this file, obtaining an output +file called \.{COB.TEX}. When \TeX\ processes \.{COB.TEX}, your output +will be a ``pretty printed'' version of \.{COB.WEB} that takes appropriate +care of typographic details like page layout and the use of indentation, +italics, boldface, etc.; this output will contain extensive cross-index +information that is gathered automatically. You can also submit the same +file \.{COB.WEB} to another system program called \.{TANGLE}, which will +produce a file \.{COB.PAS} that contains the \PASCAL\ code of your \.{COB} +program. The \PASCAL\ compiler will convert \.{COB.PAS} into +machine-language instructions corresponding to the algorithms that were so +nicely formatted by \.{WEAVE} and \TeX. Finally, you can (and should) +delete the files \.{COB.TEX} and \.{COB.PAS}, because \.{COB.WEB} contains +the definitive source code. Examples of the behavior of \.{WEAVE} and +\.{TANGLE} are appended to this manual. + +Besides providing a documentation tool, \.{WEB} enhances the \PASCAL\ +language by providing a rudimentary macro capability together with the +ability to permute pieces of the program text, so that a large system can +be understood entirely in terms of small modules and their local +interrelationships. The \.{TANGLE} program is so named because it takes a +given web and moves the modules from their web structure into the order +required by \PASCAL; the advantage of programming in \.{WEB} is that the +algorithms can be expressed in ``untangled'' form, with each module +explained separately. The \.{WEAVE} program is so named because it takes +a given web and intertwines the \TeX\ and \PASCAL\ portions contained in +each module, then it knits the whole fabric into a structured document. +(Get it? Wow.) Perhaps there is some deep connection here with the fact +that the German word for ``weave'' is ``{\it web\/}'', and the +corresponding Latin imperative is ``{\it texe\/}''! + +It is impossible to list all of the related work that has influenced the +design of \.{WEB}, but the key contributions should be mentioned +here.\quad (1)~Myrtle Kellington, as executive editor for ACM +publications, developed excellent typographic standards for the +typesetting of Algol programs during the 1960s, based on the original +designs of Peter Naur; the subtlety and quality of this influential work +can be appreciated only by people who have seen what happens when other +printers try to typeset Algol without the advice of ACM's copy +editors.\quad(2)~Bill McKeeman introduced a program intended to automate +some of this task [Algorithm 268, ``Algol~60 reference language editor,'' +{\sl CACM \bf8} (1965), 667--668]; and a considerable flowering of such +programs has occurred in recent years [see especially Derek Oppen, +``Prettyprinting,'' {\sl ACM TOPLAS \bf2} (1980), 465--483; G.~A. Rose and +J. Welsh, ``Formatted programming languages,'' {\sl SOFTWARE Practice +\char`\&\ Exper.\ \bf11} (1981), 651--669].\quad(3)~The top-down style of +exposition encouraged by \.{WEB} was of course chiefly influenced by Edsger +Dijkstra's essays on structured programming in the late 1960s. The less +well known work of Pierre-Arnoul de Marneffe [``Holon programming: A +survey,'' Univ.\ de Liege, Service Informatique, Liege, Belgium, 1973; 135 +pp.\null] also had a significant influence on the author as \.{WEB} was +being formulated.\quad(4)~Edwin Towster has proposed a similar style of +documentation in which the programmer is supposed to specify the relevant +data structure environment in the name of each submodule [``A convention +for explicit declaration of environments and top-down refinement of +data,'' {\sl IEEE Trans.\ on Software Eng.\ \bf SE--5} (1979), 374--386]; +this requirement seems to make the documentation a bit too verbose, +although experience with \.{WEB} has shown that any unusual control +structure or data structure should definitely be incorporated into the +module names on psychological grounds.\quad(5)~Discussions with Luis +Trabb~Pardo in the spring of 1979 were extremely helpful for setting up a +prototype version of \.{WEB} that was called \.{DOC}.\quad (6)~Ignacio +Zabala's extensive experience with \.{DOC}, in which he created a full +implementation of \TeX\ in \PASCAL\ that was successfully transported to +many different computers, was of immense value while \.{WEB} was taking +its present form.\quad(7)~David~R. Fuchs made several crucial suggestions +about how to make \.{WEB} more portable; he and Arthur~L. Samuel +coordinated the initial installations of \.{WEB} on dozens of computer +systems, making changes to the code so that it would be acceptable to +a wide variety of \PASCAL\ compilers.\quad(8)~The name \.{WEB} itself +was chosen in honor of my wife's mother, Wilda Ernestine Bates. + +The appendices to this report contain complete \.{WEB} programs for the +\.{WEAVE} and \.{TANGLE} processors. A study of these examples, together +with an attempt to write \.{WEB} programs by yourself, is the best way +to understand why \.{WEB} has come to be like it is. + \section General rules. +A \.{WEB} file is a long string of text that has been divided into +individual lines. The exact line boundaries are not terribly crucial, and +a programmer can pretty much chop up the \.{WEB} file in whatever way seems +to look best as the file is being edited; but string constants and control +texts must end on the same line on which they begin, since this convention +helps to keep errors from propagating. The end of a line means +the same thing as a blank space. + +Two kinds of material go into \.{WEB} files: \TeX\ text and \PASCAL\ text. +A programmer writing in \.{WEB} should be thinking both of the +documentation and of the \PASCAL\ program that he or she is creating; +i.e., the programmer should be instinctively aware of the different +actions that \.{WEAVE} and \.{TANGLE} will perform on the \.{WEB} file. +\TeX\ text is essentially copied without change by \.{WEAVE}, and it is +entirely deleted by \.{TANGLE}, since the \TeX\ text is ``pure +documentation.'' \PASCAL\ text, on the other hand, is formatted by +\.{WEAVE} and it is shuffled around by \.{TANGLE}, according to rules that +will become clear later. For now the important point to keep in mind is +that there are two kinds of text. Writing \.{WEB} programs is something +like writing \TeX\ documents, but with an additional ``\PASCAL\ mode'' +that is added to \TeX's horizontal mode, vertical mode, and math mode. + +A \.{WEB} file is built up from units called {\sl modules\/} that are more +or less self-contained. Each module has three parts: + +\yskip\item{1)} A \TeX\ part, containing explanatory material about what +is going on in the module. + +\item{2)} A definition part, containing macro definitions that serve as +abbreviations for \PASCAL\ constructions that would be less comprehensible +if written out in full each time. + +\item{3)} A \PASCAL\ part, containing a piece of the program that +\.{TANGLE} will produce. This \PASCAL\ code should ideally be about a +dozen lines long, so that it is easily comprehensible as a unit and so +that its structure is readily perceived. + +\yskip\noindent The three parts of each module must appear in this order; +i.e., the \TeX\ commentary must come first, then the definitions, and +finally the \PASCAL\ code. Any of the parts may be empty. + +\eject % page break inserted Dec 88 + +A module begins with the pair of symbols `\.{@\ }' or `\.{@*}', where +`\.{\ }' denotes a blank space. A module ends +at the beginning of the next module (i.e., at the next +`\.{@\ }' or `\.{@*}'), or at the end of the file, whichever comes first. +The \.{WEB} file may also contain material that is not part of any module +at all, namely the text (if any) that occurs before the first module. +Such text is said to be ``in limbo''; it is ignored by \.{TANGLE} +and copied essentially verbatim by \.{WEAVE}, so its function is to +provide any additional formatting instructions that may be desired in the +\TeX\ output. Indeed, it is customary to begin a \.{WEB} file with +\TeX\ code in limbo that loads special fonts, defines special macros, +changes the page sizes, and/or produces a title page. + +Modules are numbered consecutively, starting with 1; these numbers appear +at the beginning of each module of the \TeX\ documentation, and they appear +as bracketed comments at the beginning of the code generated by that +module in the \PASCAL\ program. + +Fortunately, you never mention these numbers yourself when you are writing +in \.{WEB}. You just say `\.{@\ }' or `\.{@*}' at the beginning of each +new module, and the numbers are supplied automatically by \.{WEAVE} and +\.{TANGLE}. As far as you are concerned, a module has a +{\sl name\/} instead of a number; such a name is specified by writing +`\.{@<}' followed by \TeX\ text followed by `\.{@>}'. When \.{WEAVE} +outputs a module name, it replaces the `\.{@<}' and `\.{@>}' by +angle brackets and inserts the module number in small type. Thus, when you +read the output of \.{WEAVE} it is easy to locate any module that is +referred to in another module. + +For expository purposes, a module name should be a good description of the +contents of that module; i.e., it should stand for the abstraction +represented by the module. Then the module can be ``plugged into'' one or +more other modules in such a way +that unimportant details of its inner workings +are suppressed. A module name therefore ought to be long enough to convey +the necessary meaning. Unfortunately, however, it is laborious to type +such long names over and over again, and it is also difficult to specify a +long name twice in exactly the same way so that \.{WEAVE} and \.{TANGLE} +will be able to match the names to the modules. To ameliorate this difficulty, +\.{WEAVE} and \.{TANGLE} let you abbreviate a module name +after its first appearance in the \.{WEB} file; you can type simply +`\.{@<$\alpha$...@>}', where $\alpha$ is any string that is a prefix of +exactly one module name appearing in the file. For example, `\.{@}' can be abbreviated to `\.{@}' if no other module +name begins with the five letters `\.{Clear}'. Module names must otherwise +match character for character, except that consecutive blank spaces and/or +tab marks are treated as equivalent to single spaces, and such spaces are +deleted at the beginning and end of the name. Thus, `\.{@< Clear { }the +arrays @>}' will also match the name in the previous example. + +We have said that a module begins with `\.{@\ }' or `\.{@*}', but we +didn't say how it gets divided up into a \TeX\ part, a definition part, +and a \PASCAL\ part. The definition part begins with the first appearance +of `\.{@d}' or `\.{@f}' in the module, and the \PASCAL\ part begins with +the first appearance of `\.{@p}' or `\.{@<}'. The latter option `\.{@<}' +stands for the beginning of a module name, which is the name of the module +itself. An equals sign (\.=) must follow the `\.{@>}' at the end of this +module name; you are saying, in effect, that the module name stands for +the \PASCAL\ text that follows, so you say `$\langle\,$module +name$\,\rangle=\null$\PASCAL\ text'. Alternatively, if the \PASCAL\ part +begins with `\.{@p}' instead of a module name, the current module is said +to be {\sl unnamed}. Note that module names cannot appear in the +definition part of a module, because the first `\.{@<}' in a module +signals the beginning of its \PASCAL\ part. But any number of module names +might appear in the \PASCAL\ part, once it has started. + +The general idea of \.{TANGLE} is to make a \PASCAL\ program out of these +modules in the following way: First all the \PASCAL\ parts of unnamed +modules are copied down, in order; this constitutes the initial +approximation $T_0$ to the text of the program. (There should be at least +one unnamed module, otherwise there will be no program.) Then all module +names that appear in the initial text $T_0$ are replaced by the \PASCAL\ +parts of the corresponding modules, and this substitution process +continues until no module names remain. Then all defined macros are +replaced by their equivalents, according to certain rules that are +explained later. The resulting \PASCAL\ code is ``sanitized'' so that it +will be acceptable to an average garden-variety \PASCAL\ compiler; i.e., +lowercase letters are converted to uppercase, long identifiers are +chopped, and the lines of the output file are constrained to be at most 72 +characters long. All comments will have been removed from this \PASCAL\ +program except for the meta-comments delimited by `\.{@\{}' and +`\.{@\}}', as explained below, and except for the module-number comments +that point to the source location where each piece of the program text +originated in the \.{WEB} file. + +If the same name has been given to more than one module, the \PASCAL\ text +for that name is obtained by putting together all of the \PASCAL\ parts in +the corresponding modules. This feature is useful, for example, in a +module named `Global variables in the outer block', since one can then +declare global variables in whatever modules those variables are +introduced. When several modules have the same name, \.{WEAVE} assigns the +first module number as the number corresponding to that name, and it +inserts a note at the bottom of that module telling the reader to `See +also sections so-and-so'; this footnote gives the numbers of all the other +modules having the same name as the present one. The \PASCAL\ text +corresponding to a module is usually formatted by \.{WEAVE} so that the +output has an equivalence sign in place of the equals sign in the \.{WEB} +file; i.e., the output says `$\langle\,$module +name$\,\rangle\equiv\null$\PASCAL\ text'. However, in the case of the second +and subsequent appearances of a module with the same name, this `$\equiv$' +sign is replaced by `$\mathrel+\equiv$', as an indication that the \PASCAL\ +text that follows is being appended to the \PASCAL\ text of another +module. + +The general idea of \.{WEAVE} is to make a \.{TEX} file from the \.{WEB} +file in the following way: The first line of the \.{TEX} file will be +`\.{\\input webmac}'; this will cause \TeX\ to read in the macros that +define \.{WEB}'s documentation conventions. The next lines of the file +will be copied from whatever \TeX\ text is in limbo before the first +module. Then comes the output for each module in turn, possibly +interspersed with end-of-page marks. Finally, \.{WEAVE} will generate a +cross-reference index that lists each module number in which each \PASCAL\ +identifier appears, and it will also generate an alphabetized list +of the module names, as well as a table of contents that +shows the page and module numbers for each ``starred'' module. + +What is a ``starred'' module, you ask? A module that begins with `\.{@*}' +instead of `\.{@\ }' is slightly special in that it denotes a new major +group of modules. The `\.{@*}' should be followed by the title of this +group, followed by a period. Such modules will always start on a new page +in the \TeX\ output, and the group title will appear as a running headline +on all subsequent pages until the next starred module. The title will also +appear in the table of contents, and in boldface type at the beginning of +its module. Caution: Do not use \TeX\ control sequences in such titles, +unless you know that the \.{webmac} macros will do the right thing with +them. The reason is that these titles are converted to uppercase when +they appear as running heads, and they are converted to boldface when they +appear at the beginning of their modules, and they are also written out to +a table-of-contents file used for temporary storage while \TeX\ is +working; whatever control sequences you use must be meaningful in all +three of these modes. + +The \TeX\ output produced by \.{WEAVE} for each module consists of +the following: First comes the module number (e.g., `\.{\\M123.}' +at the beginning of module 123, except that `\.{\\N}' appears in place of +`\.{\\M}' at the beginning of a starred module). Then comes the +\TeX\ part of the module, copied almost verbatim except as noted +below. Then comes the definition part and the \PASCAL\ part, formatted +so that there will be a little extra space between them if both are +nonempty. The definition and \PASCAL\ parts are obtained by inserting +a bunch of funny looking \TeX\ macros into the \PASCAL\ program; these +macros handle typographic details about fonts and proper math spacing, +as well as line breaks and indentation. + +When you are typing \TeX\ text, you will probably want to make frequent +reference to variables and other quantities in your \PASCAL\ code, and you +will want those variables to have the same typographic treatment +when they appear in your text as when they appear in your +program. Therefore the \.{WEB} language allows you to get the effect of +\PASCAL\ editing within \TeX\ text, if you place `\.|' marks before and +after the \PASCAL\ material. For example, suppose you want to say something +like this: +$$\hbox{The characters are placed into \\{buffer}, which is a +\&{packed} \&{array} $[1\to\|n]$ \&{of} \\{char}.}$$ +The \TeX\ text would look like this in your \.{WEB} file: +$$\.{The characters are placed into |buffer|, which is a |packed +array [1..n] of char|.}$$ +And \.{WEAVE} translates this into something you are glad you didn't have +to type: +$$\lpile{\.{The characters are placed into \\\\\{buffer\},}\cr + \.{which is a \\\&\{packed\}{ }\\\&\{array\}{ }\$ + [1\\to\\|n]\${ }\\\&\{of\}{ }\\\\\{char\}.}\cr}$$ +Incidentally, the cross-reference index that \.{WEAVE} would make, in +the presence of a comment like this, would include +the current module number as one of the index entries for \\{buffer} +\vadjust{\eject}% page break inserted Dec 88 +and \\{char}, even though \\{buffer} and \\{char} +might not appear in the \PASCAL\ part of +this module. Thus, the index covers references to identifiers in +the explanatory comments as well as in the program itself; you will +soon learn to appreciate this feature. However, the identifiers +\&{packed} and \&{array} and \|n\ and \&{of\/} would not be indexed, +because \.{WEAVE} does not make index entries for reserved words or +single-letter identifiers. Such identifiers are felt to be so ubiquitous +that it would be pointless to mention every place where they occur. + +Speaking of identifiers, the author of \.{WEB} thinks that +\\{IdentifiersSeveralWordsLong} look terribly ugly when they mix +uppercase and lowercase letters. He recommends that +\\{identifiers\_several\_words\_long} be written with underline characters +to get a much better effect. The actual identifiers sent to the \PASCAL\ +compiler by \.{TANGLE} will have such underlines removed, and \.{TANGLE} +will check to make sure that two different identifiers do not become +identical when this happens. (In fact, \.{TANGLE} even checks that +the first seven characters of identifiers are unique, when lowercase +letters have been converted to uppercase; the number seven in this +constraint is more strict than \PASCAL's eight, and it can +be changed if desired.) The \.{WEAVE} processor will properly +alphabetize identifiers that have embedded underlines +when it makes the index. + +Although a module begins with \TeX\ text and ends with \PASCAL\ text, we +have noted that the dividing line isn't sharp, since \PASCAL\ text can be +included in \TeX\ text if it is enclosed in `\pb'. Conversely, \TeX\ text +also appears frequently within \PASCAL\ text, because everything in +comments (i.e., between left and right braces) is treated as \TeX\ text. +Furthermore, a module name consists of \TeX\ text; thus, a \.{WEB} file +typically involves constructions like `\.{if} \.x \.= \.0 \.{then} +\.{@}' where we go back and forth +between \PASCAL\ and \TeX\ conventions in a natural way. + \section Macros. +A \.{WEB} programmer can define three kinds of macros to make the programs +shorter and more readable: + +\yskip\hang`\.{@d} \\{identifier} \.= \\{constant}' defines a {\sl numeric\/} +macro, allowing \.{TANGLE} to do rudimentary arithmetic. + +\yskip\hang`\.{@d} \\{identifier} \.{==} \PASCAL\ text' defines a {\sl +simple\/} macro, where the identifier will be replaced by the \PASCAL\ text +when \.{TANGLE} produces its output. + +\yskip\hang`\.{@d} \\{identifier}\.{(\#) ==} \PASCAL\ text' defines a +{\sl parametric\/} macro, where the identifier will be replaced by the \PASCAL\ +text and where occurrences of \.{\#} in that \PASCAL\ text will be +replaced by an argument. + +\yskip\noindent In all three cases, the identifier must have length greater +than one; it must not be a single letter. + +Numeric macros are subject to the following restrictions:\quad +(1)~The identifier must +be making its first appearance in the \.{WEB} file; +a numeric macro must be defined before it is used.\quad +(2)~The right-hand side of the numeric definition must be made entirely from +integer constants, numeric macros, preprocessed strings (see below), and +plus~signs or minus signs. No other operations or symbols are allowed, +not even parentheses, except that \PASCAL-like comments (enclosed in +braces) can appear. Indeed, comments are recommended, since it is usually +wise to give a brief explanation of the significance of each identifier as +it is defined.\quad +(3)~The numeric value must be less than $2^{15}=32768$ in absolute value. +(For larger values, you can use `\.{==}' in place of~`\.=', thus making use +of a simple macro instead of a numeric one. Note, however, that simple +macros sometimes have a different effect. For example, consider the three +definitions `\.{@d n1=2 @d n2=2+n1 @d n3==2+n1}'; then `\.{x-n2}' will +expand into `\.{x-4}', while `\.{x-n3}' will expand into `\.{x-2+2}' which +is quite different! It is wise to include parentheses in non-numeric +macros, e.g., `\.{@d n3==(2+n1)}', to avoid such errors.) + +When constants are connected by plus signs or minus +signs in a \PASCAL\ program, \.{TANGLE} does the arithmetic before putting +the constant into the output file. Therefore it is permissible to say, for +example, `\&{array} $[0\,.\,.\,\\{size}-1]$' if \\{size} has been declared +as a macro; note that \PASCAL\ doesn't allow this kind of compile-time +arithmetic if \\{size} is a \&{constant} quantity in the program. Another +use of \.{TANGLE}'s arithmetic is to make \&{case} statement labels such +as `$\\{flag}+1$' legitimate. Of course, it is improper to change \.{2+2} +into \.4 without looking at the surrounding context; many counterexamples +exist, such as the phrases `\.{-2+2}', `\.{x/2+2}', and `\.{2+2E5}'. The +program for \.{TANGLE}, in the appendix, gives precise details about this +conversion, which \.{TANGLE} does only when it is safe. + +The right-hand sides of simple and parametric macros +are required to have balanced parentheses, and the \PASCAL\ texts of +modules must have balanced parentheses too. Therefore when the argument +to a para\-metric macro appears in parentheses, both parentheses +will belong to the same \PASCAL\ text. + +The appendices to this report contain hundreds of typical examples of the +usefulness of \.{WEB} macros, so it is not necessary to dwell on the +subject here. However, the reader should know that \.{WEB}'s apparently +primitive macro capabilities can actually do a lot of rather surprising +things. Here is a construction that sheds further light on what is +possible: After making the definitions +$$\catcode`\#=12 +\lpile{\.{@d two\_cases(#)==case j of 1:#(1); 2:#(2); end}\cr +\.{@d reset\_file(#)==reset(input\_file@\&#)}\cr}$$ +one can write `\.{two\_cases(reset\_file)}' and the resulting \PASCAL\ +output will be +$$\.{case j of 1:reset(input\_file1); 2:reset(input\_file2); end}$$ +(but in uppercase letters and with \.\_'s removed). +The `\.{@\&}' operation used here joins together two adjacent tokens +into a single token, as explained later; otherwise the \PASCAL\ file would +contain a space between \.{input\_file} and the digit that followed it. +This trick can be used to provide the effect of an array of files, if you +are unfortunate enough to have a \PASCAL\ compiler that doesn't allow such +arrays. Incidentally, the cross-reference index made by \.{WEAVE} from +this example would contain the identifier \\{input\_file} but it would not +contain \\{input\_file1} or \\{input\_file2}. Furthermore, \.{TANGLE} +would not catch the error that \.{INPUTFILE1} and \.{INPUTFILE2} both +begin with the same nine letters; one should be more careful when using +`\.{@\&}'! But such aspects of the construction in this trick are +peripheral to our main point, which is that a parametric macro name without +arguments can be used as an argument to another parametric macro. + +Although \.{WEB}'s macros are allowed to have at most one parameter, the +following example shows that this is not as much of a restriction as it +may seem at first. Let \\{amac} and \\{bmac} be any parametric macros, and +suppose that we want to get the effect of +$$\catcode`\#=12 +\.{@d cmac(#1,#2) == amac(#1) bmac(#2)}$$ +which \.{WEB} doesn't permit. The solution is to make the definitions +$$\catcode`\#=12 +\lpile{\.{@d cmac(#) == amac(#) dmac}\cr +\.{@d dmac(#) == bmac(#)}\cr}$$ +and then to say `\.{cmac(x)(y)}'. + +There is one restriction in the generality of \.{WEB}'s parametric +macros, however: the argument to a para\-metric macro must not come from +the expansion of a macro that has not already been ``started.'' For +example, here is one of the things \.{WEB} cannot handle: +$$\catcode`\#=12 +\lpile{\.{@d arg == (p)}\cr +\.{@d identity(#) == #}\cr +\.{@p identity arg}\cr}$$ +In this case \.{TANGLE} will complain that the \.{identity} macro is not +followed by an argument in parentheses. + +The \.{WEB} language has another feature that is somewhat similar to a +numeric macro. A {\sl preprocessed string\/} is a string that is like +a \PASCAL\ string but delimited by double-quote marks (\.") instead of +single-quotes. Double-quote marks inside of such strings are indicated by +giving two double-quotes in a row. If a preprocessed string is +of length one (e.g., \.{"A"} or \.{""""}), it will be treated by \.{TANGLE} +as equivalent to the corresponding ASCII-code integer (e.g., \.{65} or +\.{34}). And if a preprocessed string is not of length one, it will be +converted into an integer equal to 256 or more. A {\sl string pool\/} +containing all such strings will be written out by the \.{TANGLE} +processor; this string pool file consists of string 256, then string 257, +etc., where each string is followed by an end-of-line and prefixed by two +decimal digits that define its length. Thus, for example, the empty string +\.{""} would be represented in the string pool file by a line containing +the two characters `\.{00}', while the string \.{"""String"""} would be +represented by `\.{08"String"}'. A given string appears at most once in +the string pool; the use of such a pool makes it easier to cope with +\PASCAL's restrictions on string manipulation. The string pool ends with +`\.{*nnnnnnnnn}', where \.{nnnnnnnnn} is a decimal number +called the {\sl string pool check sum}. If any string changes, the check +sum almost surely changes too; thus, the `\.{@\$}' feature +described below makes it possible for a program to assure itself that it +is reading its own string pool. + +Here is a simple example that combines numeric macros with preprocessed +strings of length one: +$$\lpile{\.{@d upper\_case\_Y = "Y"}\cr +\.{@d case\_difference = -"y"+upper\_case\_Y}\cr}$$ +The result is to define +$\\{upper\_case\_Y}=89$, $\\{case\_difference}=-32$. + \section Control codes. +We have seen several magic uses of `\.{@}' signs in \.{WEB} files, and it +is time to make a systematic study of +these special features. A \.{WEB} {\sl control code\/} +is a two-character combination of which the first is `\.@'. + +Here is a complete list of the legal control codes. The letters $L$, $T$, +$P$, $M$, $C$, and/or $S$ following each code indicate whether or not that +code is allowable in limbo, in \TeX\ text, in \PASCAL\ text, in module +names, in comments, and/or in strings. A bar over such a letter means +that the control code terminates the present part of the \.{WEB} file; for +example, $\overline L$ means that this control code ends the limbo material +before the first module. + +\def\@#1[#2] {\yskip\hangindent 2em\noindent\.{@#1\unskip + \spacefactor1000{ }}$[#2]$\quad} +\def\oP{\overline P} +\def\oT{\overline T\mskip1mu} + +\@@ [C,L,M,P,S,T] A double \.@ denotes the single character `\.@'. This is +the only control code that is legal in limbo, in comments, and in strings. + +\@\ [\overline L,\oP,\oT] This denotes the beginning of a new +(unstarred) module. A tab mark or end-of-line (carriage return) +is equivalent to a space when it follows an \.@ sign. + +\@* [\overline L,\oP,\oT] This denotes the beginning of a new starred +module, i.e., a module that begins a new major group. The title of the new +group should appear after the \.{@*}, followed by a period. As explained +above, \TeX\ control sequences should be avoided in such titles unless +they are quite simple. When \.{WEAVE} and \.{TANGLE} read a \.{@*}, they +print an asterisk on the terminal +followed by the current module number, so that the user +can see some indication of progress. The very first module should be starred. + +\@d [\oP,\oT] Macro definitions begin with \.{@d} (or \.{@D}), followed by +the \PASCAL\ text for one of the three kinds of macros, as explained +earlier. + +\@f [\oP,\oT] Format definitions begin with \.{@f} (or \.{@F}); they cause +\.{WEAVE} to treat identifiers in a special way when they appear in +\PASCAL\ text. The general form of a format definition is `\.{@f} \|l \.{==} +\|r', followed by an optional comment enclosed in braces, where \|l and \|r +are identifiers; \.{WEAVE} will subsequently treat identifier \|l as it +currently treats \|r. This feature allows a \.{WEB} programmer to invent +new reserved words and/or to unreserve some of \PASCAL's reserved +identifiers. The definition part of each module consists of any number of +macro definitions (beginning with \.{@d}) and format definitions (beginning +with \.{@f}), intermixed in any order. + +\@p [\oP,\oT] The \PASCAL\ part of an unnamed module begins with \.{@p} +(or \.{@P}). This causes \.{TANGLE} to append the following \PASCAL\ code +to the initial program text $T_0$ as explained above. The \.{WEAVE} +processor does not cause a `\.{@p}' to appear explicitly in the \TeX\ +output, so if you are creating a \.{WEB} file based on a \TeX-printed +\.{WEB} documentation you have to remember to insert \.{@p} in the +appropriate places of the unnamed modules. + +\@< [P,\oT] A module name begins with \.{@<} followed by \TeX\ text followed +by \.{@>}; the \TeX\ text should not contain any \.{WEB} control codes +except \.{@@}, unless these control codes appear in \PASCAL\ text that +is delimited by \pb. The module name may be abbreviated, after its first +appearance in a \.{WEB} file, by giving any unique prefix followed by \.{...}, +where the three dots immediately precede the closing \.{@>}. No module name +should be a prefix of another. Module names may not appear in \PASCAL\ +text that is enclosed in \pb, nor may they appear in the definition part +of a module (since the appearance of a module name ends the definition +part and begins the \PASCAL\ part). + +\@\' [P,T] This denotes an octal constant, to be formed from the +succeeding digits. For example, if the \.{WEB} file contains `\.{@\'100}', +the \.{TANGLE} processor will treat this an equivalent to `\.{64}'; +the constant will be formatted as ``\O{100}'' in the \TeX\ output +produced via \.{WEAVE}. You should use octal notation only for positive +constants; don't try to get, e.g., $-1$ by saying `\.{@\'777777777777}'. + +\@" [P,T] A hexadecimal constant; `\.{@"D0D0}' tangles to \.{53456} and +weaves to `\H{D0D0}'. + +\@\$ [P] This denotes the string pool check sum. + +\@\{ [P] The beginning of a ``meta comment,'' i.e., a comment +that is supposed to appear in the \PASCAL\ code, is indicated by +\.{@\{} in the \.{WEB} file. Such delimiters can be used as +isolated symbols in macros or modules, but they should be properly nested +in the final \PASCAL\ program. The \.{TANGLE} processor will convert +`\.{@\{}' into `\.\{' in the \PASCAL\ output file, unless +the output is already part of a meta-comment; in the latter case +`\.{@\{}' is converted into `\.[', since \PASCAL\ does not allow +nested comments. The \.{WEAVE} processor outputs `\.{@\{}'. +Incidentally, module numbers are automatically inserted +as meta-comments into the \PASCAL\ program, in order to help correlate the +outputs of \.{WEAVE} and \.{TANGLE} (see Appendix~C\null). Meta-comments +can be used to put conditional text into a \PASCAL\ program; this helps to +overcome one of the limitations of \.{WEB}, since the simple macro +processing routines of \.{TANGLE} do not include the dynamic evaluation of +boolean expressions. + +\@\} [P] The end of a ``meta comment'' is indicated by `\.{@\}}'; this is +converted either into `\.\}' or `\.{]}' in the \PASCAL\ output, according +to the conventions explained for \.{@\{} above. +The \.{WEAVE} processor outputs `\.{@\}}'. + +\@\& [P] The \.{@\&} operation causes whatever is on its left to be +adjacent to whatever is on its right, in the \PASCAL\ output. No spaces or +line breaks will separate these two items. However, the thing on the left +should not be a semicolon, since a line break might occur after a semicolon. + +\@\^ [P,T] The ``control text'' that follows, up to the next +`\.{@>}', will be entered into the index together with the identifiers of +the \PASCAL\ program; this text will appear in roman type. For example, to +put the phrase ``system dependencies'' into the index, you can type +`\.{@\^system dependencies@>}' in each module +that you want to index as system dependent. A control text, like a string, +must end on the same line of the \.{WEB} file as it began. Furthermore, +no \.{WEB} control codes are allowed in a control text, not even +\.{@@}. (If you need an \.{@} sign you can get around this restriction by +typing `\.{\\AT!}'.) + +\@. [P,T] The ``control text'' that follows will be entered into the index +in \.{typewriter} \.{type}; see the rules for `\.{@\^}', which is analogous. + +\@: [P,T] The ``control text'' that follows will be entered into the index +in a format controlled by the \TeX\ macro `\.{\\9}', which the user +should define as desired; see the rules for `\.{@\^}', which is analogous. + +\@t [P] The ``control text'' that follows, up to the next `\.{@>}', will +be put into a \TeX\ \.{\\hbox} and formatted along with the neighboring +\PASCAL\ program. This text is ignored by \.{TANGLE}, but it can be used +for various purposes within \.{WEAVE}. For example, you can make comments +that mix \PASCAL\ and classical mathematics, as in `$\\{size}<2^{15}$', by +typing `\.{|size < @t\$2\^\{15\}\$@>|}'. A control text must end on the +same line of the \.{WEB} file as it began, and it may not contain any +\.{WEB} control codes. + +\@= [P] The ``control text'' that follows, up to the next `\.{@>}', will +be passed verbatim to the \PASCAL\ program. + +\@\\ [P] Force end-of-line here in the \PASCAL\ program file. + +\@! [P,T] The module number in an index entry will be underlined if `\.{@!}' +immediately precedes the identifier or control text being indexed. This +convention is used to distinguish the modules where an identifier is +defined, or where it is explained in some special way, from the modules +where it is used. A~reserved word or an identifier of length one will not +be indexed except for underlined entries. An `\.{@!}' is implicitly inserted +by \.{WEAVE} just after the reserved words \&{function}, \&{procedure}, +\&{program}, and \&{var}, and just after \.{@d} and \.{@f}. But you should +insert your own `\.{@!}' before the definitions of types, constants, +variables, parameters, and components of records and enumerated types that +are not covered by this implicit convention, if you want to improve the +quality of the index that you get. + +\@? [P,T] This cancels an implicit (or explicit) `\.{@!}', so that the next +index entry will not be underlined. + +\@, [P] This control code inserts a thin space in \.{WEAVE}'s output; it is +ignored by \.{TANGLE}. Sometimes you need this extra space if you are using +macros in an unusual way, e.g., if two identifiers are adjacent. + +\@/ [P] This control code causes a line break to occur within a \PASCAL\ +program formatted by \.{WEAVE}; it is ignored by \.{TANGLE}. Line breaks +are chosen automatically by \TeX\ according to a scheme that works 99\%\ +of the time, but sometimes you will prefer to force a line break so that +the program is segmented according to logical rather than visual criteria. +Caution: `\.{@/}' should be used only after statements or clauses, not in +the middle of an expression; use \.{@|} in the middle of expressions, in +order to keep \.{WEAVE}'s parser happy. + +\@| [P] This control code specifies an optional line break in the midst of +an expression. For example, if you have a long condition between \&{if} and +\&{then}, or a long expression on the right-hand side of an assignment +statement, you can use `\.{@|}' to specify breakpoints more logical than +the ones that \TeX\ might choose on visual grounds. + +\@\# [P] This control code forces a line break, like \.{@/} does, +and it also causes a little extra white space to appear between the lines at +this break. You might use it, for example, between procedure definitions or +between groups of macro definitions that are logically separate but within +the same module. + +\@+ [P] This control code cancels a line break that might otherwise be +inserted by \.{WEAVE}, e.g., before the word `\&{else}', if you want to +put a short if-then-else construction on a single line. It is ignored by +\.{TANGLE}. + +\@; [P] This control code is treated like a semicolon, for formatting +purposes, except that it is invisible. You can use it, for example, after +a module name when the \PASCAL\ text represented by that module name ends +with a semicolon. + +\yskip\noindent +The last six control codes (namely `\.{@,}', `\.{@/}', `\.{@|}', +`\.{@\#}', `\.{@+}', and `\.{@;}') have no effect on the \PASCAL\ +program output by \.{TANGLE}; they merely help to improve the readability +of the \TeX-formatted \PASCAL\ that is output by \.{WEAVE}, in unusual +circumstances. \.{WEAVE}'s built-in formatting method is fairly good, but +it is incapable of handling all possible cases, because it must deal with +fragments of text involving macros and module names; these fragments do +not necessarily obey \PASCAL's syntax. Although \.{WEB} allows you to +override the automatic formatting, your best strategy is not to worry +about such things until you have seen what \.{WEAVE} produces automatically, +since you will probably need to make only a few corrections when you are +touching up your documentation. + +Because of the rules by which every module is broken into three parts, +the control codes `\.{@d}', `\.{@f}', and `\.{@p}' are not allowed to occur +once the \PASCAL\ part of a module has begun. + \section Additional features and caveats. + +1. The character pairs `\.{(*}', `\.{*)}', `\.{(.}', and `\.{.)}' are +converted automatically in \PASCAL\ text as though they were +`\.{@\{}', `\.{@\}}', `\.[', and `\.]', respectively, except +of course in strings. Furthermore in certain installations of \.{WEB} that +{\def\\#1#2{`{\tentex\char'#1#2}'}% +have an extended character set, the characters \\32, \\34, \\35, \\30, +\\36, \\04, \\37, \\05, and \\06} +can be typed as abbreviations for +`\.{<>}', `\.{<=}', `\.{>=}', `\.{:=}', `\.{==}', `\.{and}', `\.{or}', +`\.{not}', and `\.{in}', respectively. However, the latter abbreviations +are not used in the standard versions of \.{WEAVE.WEB} and \.{TANGLE.WEB} +that are distributed to people who are installing \.{WEB} on other +computers, and the programs are designed to produce only standard ASCII +characters as output if the input consists entirely of ASCII characters. + +2. If you have an extended character set, all of the characters listed +in Appendix C of {\sl The \TeX book\/} can be used in strings. But you should +stick to standard ASCII characters if you want to write programs that will +be useful to all the poor souls out there who don't have extended +character sets. + +3. The \TeX\ file output by \.{WEAVE} is broken into lines having at most +80 characters each. The algorithm that does this line breaking is unaware +of \TeX's convention about comments following `\.\%' signs on a line. When +\TeX\ text is being copied, the existing line breaks are copied as well, +so there is no problem with `\.\%' signs unless the original \.{WEB} file +contains a line more than eighty characters long or a line with \PASCAL\ +text in \pb\ that expands to more than eighty characters long. Such lines +should not have `\.\%' signs. + +4. \PASCAL\ text is translated by a ``bottom up'' procedure that +identifies each token as a ``part of speech'' and combines parts of speech +into larger and larger phrases as much as possible according to a special +grammar that is explained in the documentation of \.{WEAVE}. It is easy to +learn the translation scheme for simple constructions like single +identifiers and short expressions, just by looking at a few examples of +what \.{WEAVE} does, but the general mechanism is somewhat complex because +it must handle much more than \PASCAL\ itself. Furthermore the output +contains embedded codes that cause \TeX\ to indent and break lines as +necessary, depending on the fonts used and the desired page width. For +best results it is wise to adhere to the following restrictions: + +\yskip\itemitem{a)}Comments in \PASCAL\ text should appear only after +statements or clauses; i.e., after semicolons, after reserved words like +\&{then} and \&{do}, or before reserved words like \&{end} and \&{else}. +Otherwise \.{WEAVE}'s parsing method may well get mixed up. + +\itemitem{b)}Don't enclose long \PASCAL\ texts in \pb, since the +indentation and line breaking codes are omitted when the \pb\ text is +translated from \PASCAL\ to \TeX. Stick to simple expressions or +statements. + +\yskip +5. Comments and module names are not permitted in \pb\ text. After a `\.|' +signals the change from \TeX\ text to \PASCAL\ text, the next `\.|' that is +not part of a string or control text ends the \PASCAL\ text. + +6. A comment must have properly nested occurrences of left and right +braces, otherwise \.{WEAVE} and \.{TANGLE} will not know where the comment +ends. However, the character pairs `\.{\\\{}' and `\.{\\\}}' do not count +as left and right braces in comments, and the character pair `\.{\\|}' +does not count as a delimiter that begins \PASCAL\ text. (The actual rule +is that a character after `\.\\' is ignored; hence in `\.{\\\\\{}' the +left brace {\sl does\/} count.) At present, \.{TANGLE} and \.{WEAVE} treat +comments in slightly different ways, and it is necessary to satisfy both +conventions: \.{TANGLE} ignores `\.|' characters entirely, while \.{WEAVE} +uses them to switch between \TeX\ text and \PASCAL\ text. Therefore, a +comment that includes a brace in a string in \pb---e.g., `\.{\{{ }look at +this |"\{"| \}}'---will be handled correctly by \.{WEAVE}, but \.{TANGLE} +will think there is an unmatched left brace. In order to satisfy both +processors, one can write `\.{\{{ }look at this \\leftbrace\\{ }\}}', after +setting up `\.{\\def\\leftbrace\{|"\{"|\}}'. + +7. Reserved words of \PASCAL\ must appear entirely in lowercase letters +in the \.{WEB} file; otherwise their special nature will not be recognized +by \.{WEAVE}. You could, for example, have a macro named \\{END} and it +would not be confused with \PASCAL's \&{end}. + +However, you may not want to capitalize macro names just to distinguish them +from other identifiers. Here is a way to unreserve \PASCAL's reserved word +`\&{type}' and to substitute another word `\&{mtype}' in the \.{WEB} file. +$$\vbox{\halign{\tt #\hfil\cr + at d type(\char'43) == mem[\char'43].t\cr + at d mtype == t \char'100\char'46{} y \char'100\char'46{} p + \char'100\char'46{} e\cr + at f mtype == type\cr + at f type == true\cr}}$$ +In the output of \.{TANGLE}, the macro \.{mtype} now produces `\.{TYPE}' +and the macro \.{type(x)} now produces `\.{MEM[X].T}'. In the output of +\.{WEAVE}, these same inputs produce \&{mtype} and \\{type}(\|x), +respectively. + +8. The \.{@f} feature allows you to define one identifier to act like +another, and these format definitions are carried out sequentially, as the +example above indicates. However, a given identifier has only one printed format +throughout the entire document (and this format will even be used before +the \.{@f} that defines it). The reason is that \.{WEAVE} operates in two +passes; it processes \.{@f}'s and cross-references on the first pass and +it does the output on the second. + +9. You may want some \.{@f} formatting that doesn't correspond to any +existing reserved word. In that case, \.{WEAVE} could be extended in a +fairly obvious way to include new ``reserved words'' in its vocabulary. +The identifier `\&{xclause}' has in fact been included already as a +reserved word, so that it can be used to format the `\&{loop}' macro, +where `\&{loop}' is defined to be equivalent to `\&{while \\{true} do}'. + +10. Sometimes it is desirable to insert spacing into \PASCAL\ code that is +more general than the thin space provided by `\.{@,}'. The \.{@t} feature +can be used for this purpose; e.g., `\.{@t\\hskip 1in@>}' will +leave one inch of blank space. Furthermore, `\.{@t\\4@>}' can be +used to backspace by one unit of indentation, since the control sequence +\.{\\4} is defined in \.{webmac} to be such a backspace. (This +control sequence is used, for example, at the beginning of lines that +contain labeled statements, so that the label will stick out a little at +the left.) + +11. \.{WEAVE} and \.{TANGLE} are designed to work with two input files, +called \\{web\_file} and \\{change\_file}, where \\{change\_file} contains +data that overrides selected portions of \\{web\_file}. The resulting merged +text is actually what has been called the \.{WEB} file elsewhere in this +report. + +Here's how it works: The change file consists of zero or more ``changes,'' +where a change has the form `\.{@x}$\langle$old lines$\rangle$\.{@y}$\langle$% +new lines$\rangle$\.{@z}'. The special control codes \.{@x}, \.{@y}, \.{@z}, +which are allowed only in change files, must appear at the beginning of a line; +the remainder of such a line is ignored. +The $\langle$old lines$\rangle$ represent material that exactly matches +consecutive lines of the \\{web\_file}; the $\langle$new lines$\rangle$ +represent zero or more lines that are supposed to replace the old. Whenever +the first ``old line'' of a change is found to match a line in the +\\{web\_file}, all the other lines in that change must match too. + +Between changes, before the first change, and after the last change, +the change file can have any number of lines that do not begin with +`\.{@x}', `\.{@y}', or~`\.{@z}'. Such lines are bypassed and not used for +matching purposes. + +This dual-input feature is useful when working with a master \.{WEB} file +that has been received from elsewhere (e.g., \.{TANGLE.WEB} or +\.{WEAVE.WEB} or \.{TEX.WEB}), when changes are desirable to customize the +program for your local computer system. You will be able to debug your +system-dependent changes without clobbering the master web file; and once +your changes are working, you will be able to incorporate them readily +into new releases of the master web file that you might receive from time +to time. + \section Appendices. +The basic ideas of \.{WEB} can be understood most easily by looking at +examples of ``real'' programs. Appendix~A shows the \.{WEB} input that +generated modules 55--59 of the \.{WEAVE} program; Appendix~B shows the +corresponding \TeX\ code output by \.{WEAVE}; and Appendix~C shows excerpts +from the corresponding \PASCAL\ code output by \.{TANGLE}. + +The complete webs for \.{WEAVE} and \.{TANGLE} appear as the bulk of this +report, in Appendices D and~E. The reader should first compare Appendix~A +to the corresponding portion of Appendix~D; then the same material should +be compared to Appendices B and~C. Finally, if time permits, the reader may +enjoy studying the complete programs in Appendices D and~E, since \.{WEAVE} +and \.{TANGLE} contain several interesting aspects, and since an attempt +has been made in these appendices to evolve a style of programming that +makes good use of the \.{WEB} language. + +Finally, Appendix F is the `\.{webmac}' file that sets \TeX\ up to accept +the output of \.{WEAVE}; Appendix~G discusses how to use some of its macros +to vary the output formats; and Appendix~H discusses what needs to be done +when \.{WEAVE} and \.{TANGLE} are installed in a new operating environment. + \section Performance statistics. +The programs in Appendices D and E will optionally keep statistics on +how much memory they require. Here is what they once printed out when +processing themselves: + +\def\pstat#1#2#3 +#4{\yskip\noindent\.{#1} applied to \.{#2} (cpu time #3 sec)\par +\halign{\quad\tt##\hfil\cr#4}} + +\pstat{TANGLE}{TANGLE}{15} +{Memory usage statistics:\cr +456 names, 215 replacement texts;\cr +3396+3361 bytes, 6685+7329+5805 tokens.\cr} + +\pstat{TANGLE}{WEAVE}{30} +{Memory usage statistics:\cr +692 names, 339 replacement texts;\cr +4576+4294 bytes, 10184+9875+9150 tokens.\cr} + +\pstat{WEAVE}{TANGLE}{45} +{Memory usage statistics: 478 names, 2045 cross references, 4159+3729 bytes;\cr +parsing required 684 scraps, 1300 texts, 3766 tokens, 119 levels;\cr +sorting required 34 levels.\cr} + +\pstat{WEAVE}{WEAVE}{65} +{Memory usage statistics: 737 names, 3306 cross references, 4896+4962 bytes;\cr +parsing required 684 scraps, 1300 texts, 3766 tokens, 119 levels;\cr +sorting required 73 levels.\cr} + +\yskip\noindent The cpu time for \PASCAL\ to process \.{TANGLE.PAS} was +approximately 13 seconds, and \.{WEAVE.PAS} took approximately 26 seconds; +thus the tangling time was slightly more than the compiling time. The cpu +time for \TeX\ to process \.{TANGLE.TEX} was approximately 500 seconds, +and \.{WEAVE.TEX} took approximately 750 seconds (i.e., about 7 +seconds per printed page, where these pages are substantially larger than +the pages in a normal book). All cpu times quoted are for a DECsystem-10. + +\def\K{{\mc K}} +The file \.{TANGLE.WEB} is about 125\K\ characters long; \.{TANGLE} +reduces it to a file \.{TANGLE.PAS} whose size is about 42\K\ characters, +while \.{WEAVE} expands it to a file \.{TANGLE.TEX} of about 185\K\null. +The corresponding file sizes for \.{WEAVE.WEB}, \.{WEAVE.PAS}, and +\.{WEAVE.TEX} are 180\K, 89\K, and 265\K. + +The much larger file \.{TEX.WEB} led to the following numbers: + +\pstat{TANGLE}{TEX}{110} +{Memory usage statistics:\cr +3750 names, 1768 replacement texts;\cr +41895+41053 bytes, 42378+45074+41091 tokens.\cr} + +\pstat{WEAVE}{TEX}{270} +{Memory usage statistics: 3412 names, 19699 cross references, + 37900+40232 bytes;\cr +parsing required 685 scraps, 1303 texts, 3784 tokens, 104 levels;\cr +sorting required 52 levels.\cr} + +\yskip\noindent +\PASCAL\ did \.{TEX.PAS} in about 75 seconds; \TeX\ did \.{TEX.TEX} +in about 3600. + % Here is a quotation that could not really be omitted + +\vfill + +{\baselineskip9pt +\halign to\hsize{\hfil\quoteit#\tabskip 0pt plus 100pt& + \hfil\quoteit#\tabskip 0pt\cr +O, what a tangled web we weave& + O, what a tangled WEB we weave\cr +When first we practise to deceive!& + When \TeX\ we practise to conceive!\cr +\noalign{\vskip 2pt} +\quoterm ---SIR WALTER SCOTT, {\quoteit Marmion} 6:17 (1808)& + \quoterm ---RICHARD PALAIS (1982)\cr +}} +\eject + \def\runninghead{APPENDIX A --- {\tentt WEB} FILE FORMAT} +\section Appendix A. +This excerpt from \.{WEAVE.WEB} produced modules 55--59 in Appendix~D. +Note that some of the lines are indented to show the program structure. +The indentation is ignored by \.{WEAVE} and \.{TANGLE}, but users find +that \.{WEB} files are quite readable if they have some such indentation. + +\vskip 6pt +\begingroup \def\tt{\eighttt} \baselineskip9pt +% Note to myself: I had to remove SAIL characters from the file here! +% Also tabs replaced by double-space. The changes were made in WEAVE source. +\verbatim +@* Searching for identifiers. +The hash table described above is updated by the |id_lookup| procedure, +which finds a given identifier and returns a pointer to its index in +|byte_start|. The identifier is supposed to match character by character +and it is also supposed to have a given |ilk| code; the same name may be +present more than once if it is supposed to appear in the index with +different typesetting conventions. +If the identifier was not already present, it is inserted into the table. + +Because of the way \.{WEAVE}'s scanning mechanism works, it is most convenient +to let |id_lookup| search for an identifier that is present in the |buffer| +array. Two other global variables specify its position in the buffer: the +first character is |buffer[id_first]|, and the last is |buffer[id_loc-1]|. + +@= +@!id_first:0..long_buf_size; {where the current identifier begins in the buffer} +@!id_loc:0..long_buf_size; {just after the current identifier in the buffer} +@# +@!hash:array [0..hash_size] of sixteen_bits; {heads of hash lists} + +@ Initially all the hash lists are empty. + +@= +@!h:0..hash_size; {index into hash-head array} + +@ @= +for h:=0 to hash_size-1 do hash[h]:=0; + +@ Here now is the main procedure for finding identifiers (and index +entries). The parameter |t| is set to the desired |ilk| code. The +identifier must either have |ilk=t|, or we must have +|t=normal| and the identifier must be a reserved word. + + at p function id_lookup(@!t:eight_bits):name_pointer; {finds current identifier} +label found; +var i:0..long_buf_size; {index into |buffer|} +@!h:0..hash_size; {hash code} +@!k:0..max_bytes; {index into |byte_mem|} +@!w:0..ww-1; {row of |byte_mem|} +@!l:0..long_buf_size; {length of the given identifier} +@!p:name_pointer; {where the identifier is being sought} +begin l:=id_loc-id_first; {compute the length} +@; +@; +if p=name_ptr then @; +id_lookup:=p; +end; + +@ A simple hash code is used: If the sequence of +ASCII codes is $c_1c_2\ldots c_m$, its hash value will be +$$(2^{n-1}c_1+2^{n-2}c_2+\cdots+c_n)\,\bmod\,|hash_size|.$$ + +@= +h:=buffer[id_first]; i:=id_first+1; +while i0 DO BEGIN IF(BYTESTART[P+2]-BYTESTART[P]=L)AND((ILK[P]=T)OR((T +=0)AND(ILK[P]>3)))THEN{61:}BEGIN I:=IDFIRST;K:=BYTESTART[P];W:=P MOD 2; +WHILE(IMAXBYTES THEN BEGIN WRITELN(TERMOUT); +WRITE(TERMOUT,'! Sorry, ','byte memory',' capacity exceeded');ERROR; +HISTORY:=3;JUMPOUT;END; +IF NAMEPTR+2>MAXNAMES THEN BEGIN WRITELN(TERMOUT); +WRITE(TERMOUT,'! Sorry, ','name',' capacity exceeded');ERROR;HISTORY:=3; +JUMPOUT;END;I:=IDFIRST;K:=BYTEPTR[W]; +WHILE I}', the backslash character gets in the way, +and this entry wouldn't appear in the index with the T's. + +The solution is to use the `\.{@:}' feature, declaring a macro that +simply removes a sort key as follows: +$$\.{\\def\\9\#1\{\}}$$ +Now you can say, e.g., `\.{@:TeX\}\{\\TeX@>}' in your \.{WEB} file; \.{WEAVE} +puts it into the index alphabetically, based on the sort key, and +produces the macro call `\.{\\9\{TeX\}\{\\TeX\}}' which will ensure that +the sort key isn't printed. + +A similar idea can be used to insert hidden material into module +names so that they are alphabetized in whatever way you might wish. +Some people call these tricks ``special refinements''; others call +them ``kludges''. + +\point 12. The control sequence \.{\\modno} is set to the number of the +module being typeset. + +\point 13. If you want to list only the modules that have changed, +together with the index, put the command `\.{\\let\\maybe=\\iffalse}' in +the limbo section before the first module of your \.{WEB} file. It's +customary to make this the first change in your change file. + +\point 14. To get output in languages other than English, redefine the +macros \.{\\A}, \.{\\As}, \.{\\ET}, \.{\\ETs}, \.{\\U}, \.{\\Us}, +\.{\\ch}, \.{\\fin}, and \.{\\con}. \.{WEAVE} itself need not be changed. + +\vfill\eject + \def\runninghead{APPENDIX H --- GETTING STARTED} +\section Appendix H: Installing the \.{WEB} system. +Suppose you want to use the \.{WEB} programs on your computer, and suppose +that you can't simply borrow them from somebody else who has the same +kind of machine. Here's what to do: + +\yskip +\def\step(#1){\par\hangindent 2em\noindent\hbox to 2em{\hfil(#1) }\ignorespaces} +\step(1) Get a tape that contains the files \.{WEAVE.WEB}, \.{TANGLE.WEB}, +\.{TANGLE.PAS}, and \.{WEBMAC.TEX}. The tape will probably also contain an +example change file \.{TANGLE.CH}. +\step(2) Look at the sections of \.{TANGLE} that are listed under ``system +dependencies'' in the index of Appendix~E above, and figure out what changes +(if any) will be needed for your system. +\step(3) Make a change file \.{TANGLE.CH} that contains the changes of~(2); +do not change your copy of \.{TANGLE.WEB}, leave it intact. (The +rules for change files are explained at the end of the manual just before +the appendices; you may want to look at the example change file that +arrived with your copy of \.{TANGLE.WEB}. It's also a good idea to +define all the ``switches'' like \&{debug} and \&{gubed} to be null in your +first change files; then you can sure that your compiler will handle +all of the code.) +\step(4) Make the changes of (2) in your copy of \.{TANGLE.PAS}. (If these +changes are extensive, you might be better off finding some computer +that already has \.{TANGLE} running, and making the new \.{TANGLE.PAS} +from \.{TANGLE.WEB} and your \.{TANGLE.CH}.) +\step(5) Use your \PASCAL\ compiler to convert your copy of \.{TANGLE.PAS} +to a running program \.{TANGLE}. +\step(6) Check your changes as follows: Run \.{TANGLE} on \.{TANGLE.WEB} +and your \.{TANGLE.CH}, yielding $\.{TANGLE.PAS}'$; make a running +program $\.{TANGLE}'$ by applying \PASCAL\ to +$\.{TANGLE.PAS}'$; run $\.{TANGLE}'$ on \.{TANGLE.WEB} and +your \.{TANGLE.CH}, yielding $\.{TANGLE.PAS}''$; and check +that $\.{TANGLE.PAS}''$ is identical to +$\.{TANGLE.PAS}'$. Once this test has been passed, you have got a +working \.{TANGLE} program. +\step(7) Make a change file \.{WEAVE.CH} analogous to (3), but this time +consider the system-dependent parts of \.{WEAVE} that are listed in +the index to Appendix~D. +\step(8) Run \.{TANGLE} on \.{WEAVE.WEB} and your \.{WEAVE.CH}, obtaining +\.{WEAVE.PAS}. +\step(9) Use \PASCAL\ on \.{WEAVE.PAS} to make a running \.{WEAVE} program. +\step(10) Run \.{WEAVE} on \.{TANGLE.WEB} and \.{TANGLE.CH} to produce +\.{TANGLE.TEX}. +\step(11) Run \TeX\ on \.{TANGLE.TEX}, obtaining a listing analogous to +Appendix~E. This listing will incorporate your changes. +\step(12) Run \.{WEAVE} on \.{WEAVE.WEB} and your \.{WEAVE.CH} to produce +\.{WEAVE.TEX}. +\step(13) Run \TeX\ on \.{WEAVE.TEX}, obtaining a listing analogous to +Appendix~D that incorporates your changes. + +\yskip\noindent +This description assumes that you already have a working \TeX82 system. +But what if you don't have \TeX82? Then you start with a tape that also +contains \.{TEX.WEB} and \.{plain.tex}, and you refer to a hardcopy +listing of the \TeX82 program corresponding to \.{TEX.WEB}. Between steps +(10) and (11) you do the following: + +\yskip +\def\substep(10.#1){\par\hangindent 4em\noindent + \hbox to 4em{\hfil(10.#1) }\ignorespaces} +\substep(10.1) Make a change file \.{TEX.CH} to fix the system dependent +portions of \.{TEX.WEB}, in a manner analogous to step~(2). Since \TeX\ is +a much more complex program than \.{WEAVE} or \.{TANGLE}, there are more +system-dependent features to think about, but by now you will be good at +making such modifications. Do not make any changes to \.{TEX.WEB}. +\substep(10.2) Make an almost-copy of your \.{TEX.CH} called \.{INITEX.CH}; +this one will have the `\&{init}' and `\&{tini}' macros redefined in order +to make the initialization version of \TeX. It also might have smaller +font memory and dynamic memory areas, since \.{INITEX} doesn't need as +much memory for such things; by setting the memory smaller in \.{INITEX}, +you guarantee that the production system will have a ``cushion.'' +\substep(10.3) Run \.{TANGLE} on \.{TEX.WEB} and \.{INITEX.CH}, obtaining +\.{INITEX.PAS} and \.{TEX.POOL}. +\substep(10.4) Run \PASCAL\ on \.{INITEX.PAS}, obtaining \.{INITEX}. +\substep(10.5) Run \.{INITEX} on \.{TEX.POOL}, during which run you type +`\.{plain}' and `\.{\\dump}'. This will produce a file \.{plain.fmt} +containing the data needed to initialize \TeX's memory. +\substep(10.6) Run \.{TANGLE} on \.{TEX.WEB} and the \.{TEX.CH} of (10.1), +obtaining \.{TEX.PAS}. +\substep(10.7) Run \PASCAL\ on \.{TEX.PAS}, obtaining \.{VIRTEX}. +\substep(10.8) If your operating system supports programs whose core images +have been saved, run \.{VIRTEX}, type `\.{\&plain}', then save the core image +and call it \TeX. Otherwise, \.{VIRTEX} will be your \TeX, and it will +read `\.{plain.fmt}' (or some other \.{fmt} file) each time you run. + +\yskip +This 21-step process may seem long, but it is actually an oversimplification, +since you also need fonts and a way to print the device-independent files +that \TeX\ spews out. On the other hand, the total number of steps is not +quite so large when you consider that \.{TANGLE}-followed-by-\PASCAL\ and +\.{WEAVE}-followed-by-\TeX\ may be regarded as single operations. + +If you have only the present report, not a tape, you will have to prepare +files \.{WEAVE.WEB} and \.{TANGLE.WEB} by hand, typing them into the +computer by following Appendices D and E. Then you have to simulate the +behavior of \.{TANGLE} by converting \.{TANGLE.WEB} manually into +\.{TANGLE.PAS}; with a good text editor this takes about six hours. Then +you have to correct errors that were made in all this hand work; but still +the whole project is not impossibly difficult, because in fact the entire +development of \.{WEAVE} and \.{TANGLE} (including the writing of the +programs and this manual) took less than two months of work. + \vfill\end Property changes on: branches/stable/source/src/texk/web2c/doc/webman.tex ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: branches/stable/source/src/texk/web2c/etexdir/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/etexdir/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/etexdir/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,11 @@ +2021-03-23 Karl Berry + + * TL'21. + +2021-02-22 Phelype Oleinik + + * etex.ch: avoid "expansion depth" overflow with \numexpr. + 2021-02-13 Karl Berry * am/etex.am (etex_ch_srcs): adjust for split enctex changes. Modified: branches/stable/source/src/texk/web2c/etexdir/etex.ch =================================================================== --- branches/stable/source/src/texk/web2c/etexdir/etex.ch 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/etexdir/etex.ch 2021-04-01 20:52:49 UTC (rev 850) @@ -5017,7 +5017,10 @@ @!p:pointer; {top of expression stack} @!q:pointer; {for stack manipulations} begin l:=cur_val_level; a:=arith_error; b:=false; p:=null; +incr(expand_depth_count); +if expand_depth_count>=expand_depth then overflow("expansion depth",expand_depth); @; +decr(expand_depth_count); if b then begin print_err("Arithmetic overflow"); @.Arithmetic overflow@> Modified: branches/stable/source/src/texk/web2c/lib/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/lib/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/lib/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,12 @@ +2021-03-23 Karl Berry + + * TL'21. + +2021-03-12 Akira Kakuto + + * texmfmp.c: Disable commands containing a character '|' for + write18 in restricted mode for security. + 2021-01-01 Akira Kakuto * printversion.c: Update copyright year. Modified: branches/stable/source/src/texk/web2c/lib/texmfmp.c =================================================================== --- branches/stable/source/src/texk/web2c/lib/texmfmp.c 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/lib/texmfmp.c 2021-04-01 20:52:49 UTC (rev 850) @@ -610,8 +610,18 @@ if (allow == 1) status = system (cmd); - else if (allow == 2) + else if (allow == 2) { +/* + command including a character '|' is not allowed in + restricted mode for security. +*/ + size_t k; + for (k = 0; k < strlen (safecmd); k++) { + if (safecmd[k] == '|') + return 0; + } status = system (safecmd); + } /* Not really meaningful, but we have to manage the return value of system. */ if (status != 0) Modified: branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,16 @@ +2021-03-23 Karl Berry + + * TL'21. + +2021-03-16 Karl Berry + + * writefont.c (write_fontdictionary): pdftex_fail with message + instead of assertion. From Martin Budaj, Mar 16, 2021 at 8:47 AM. + +2021-02-22 Phelype Oleinik + + * pdftex.web: avoid "expansion depth" overflow with \numexpr. + 2021-02-17 Karl Berry * NEWS, Modified: branches/stable/source/src/texk/web2c/pdftexdir/NEWS =================================================================== --- branches/stable/source/src/texk/web2c/pdftexdir/NEWS 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/pdftexdir/NEWS 2021-04-01 20:52:49 UTC (rev 850) @@ -1,6 +1,7 @@ +pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021) (March 23, 2021) - changes: - new primitives \pdfrunninglinkoff and \pdfrunninglinkon; e.g., for - turning off generation of links in headers and footers. + disabling generation of links in headers and footers. - warn instead of aborting when "\pdfendlink ended up in different nesting level than \pdfstartlink". - dump \pdfglyphtounicode assignments in fmt file. @@ -10,7 +11,7 @@ - avoid crash in unusual autoexpand cases. - source: poppler support removed, as it was too hard to keep in sync - with upstream. For native TL, pdftex has always used libs/xpdf, + with upstream. In native TL, pdftex has always used libs/xpdf, which is cut-down and adapted code from xpdf. pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020) (March 27, 2020) Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web =================================================================== --- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web 2021-04-01 20:52:49 UTC (rev 850) @@ -38618,7 +38618,10 @@ @!p:pointer; {top of expression stack} @!q:pointer; {for stack manipulations} begin l:=cur_val_level; a:=arith_error; b:=false; p:=null; +incr(expand_depth_count); +if expand_depth_count>=expand_depth then overflow("expansion depth",expand_depth); @; +decr(expand_depth_count); if b then begin print_err("Arithmetic overflow"); @.Arithmetic overflow@> Modified: branches/stable/source/src/texk/web2c/pdftexdir/writefont.c =================================================================== --- branches/stable/source/src/texk/web2c/pdftexdir/writefont.c 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/pdftexdir/writefont.c 2021-04-01 20:52:49 UTC (rev 850) @@ -1,5 +1,5 @@ /* writefont.c: font descriptors and writing Type 1 fonts. -Copyright 1996-2018 Han The Thanh, +Copyright 1996-2021 Han The Thanh, This file is part of pdfTeX. @@ -552,7 +552,9 @@ fo->tounicode_objnum = write_tounicode(fo->fe->glyph_names, fo->fm->tfm_name, fo->fe->name); } else if (is_type1(fo->fm)) { - assert(fo->fd->builtin_glyph_names != NULL); + if (fo->fd->builtin_glyph_names==NULL) { + pdftex_fail("builtin glyph names is empty"); + } fo->tounicode_objnum = write_tounicode(fo->fd->builtin_glyph_names, fo->fm->tfm_name, NULL); } Modified: branches/stable/source/src/texk/web2c/synctexdir/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/synctexdir/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/synctexdir/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,14 @@ +2021-03-23 Karl Berry + + * TL'21. + +2021-03-04 Karl Berry + + * synctex_scanner_new_with_output_file: don't warn to terminal + with _synctex_error when a file is missing. + code from https://gitlab.gnome.org/GNOME/evince/commit/678410e81d0c889f4db4e995ca451ed62b8a2eee + Debian bug #908964 + 2019-10-10 Hironori Kitagawa * synctex-p-rec.ch0, synctex-ep-rec.ch0: Fix \meaning\synctex @@ -6,7 +17,7 @@ 2019-08-07 Akira Kakuto - * synctex.c: Improve support of non-ascii path names + * synctex.c: Improve support of non-ASCII path names (Windows only). 2018-10-25 Akira Kakuto Modified: branches/stable/source/src/texk/web2c/synctexdir/synctex_parser.c =================================================================== --- branches/stable/source/src/texk/web2c/synctexdir/synctex_parser.c 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/synctexdir/synctex_parser.c 2021-04-01 20:52:49 UTC (rev 850) @@ -6009,7 +6009,8 @@ if ((scanner->reader = synctex_reader_init_with_output_file(scanner->reader, output, build_directory))) { return parse? synctex_scanner_parse(scanner):scanner; } - _synctex_error("No file?"); + // don't warn to terminal if no file is present, this is a library. + // _synctex_error("No file?"); return NULL; } Modified: branches/stable/source/src/texk/web2c/web2c/ChangeLog =================================================================== --- branches/stable/source/src/texk/web2c/web2c/ChangeLog 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/texk/web2c/web2c/ChangeLog 2021-04-01 20:52:49 UTC (rev 850) @@ -1,3 +1,7 @@ +2021-03-23 Karl Berry + + * TL'21. + 2019-08-09 Karl Berry * web2c.defines (texmfyes): new function. Modified: branches/stable/source/src/utils/README =================================================================== --- branches/stable/source/src/utils/README 2021-02-18 17:55:44 UTC (rev 849) +++ branches/stable/source/src/utils/README 2021-04-01 20:52:49 UTC (rev 850) @@ -1,26 +1,30 @@ -$Id: README 57561 2021-01-30 06:52:36Z kakuto $ +$Id: README 58400 2021-03-15 22:10:16Z karl $ Public domain. Originally written 2005 by Karl Berry. Extra utilities we (optionally) compile for TeX Live. See comments in ../texk/README. -asymptote 2.68 - checked 2jan21 +asymptote 2.70 - checked 15mar21 update to TL from CTAN, to include prebuilt doc. - see http://tug.org/texlive/build.html#asymptote + see https://tug.org/texlive/build.html#asymptote and tlpkg/bin/tl-update-asy autosp 2021-01-07 - checked 08jan21 - http://ctan.org/pkg/autosp + https://ctan.org/pkg/autosp +axodraw2 2.1.1c - checked 5mar21 + https://ctan.org/pkg/axodraw2 + (also has files in Master; ctan2tl will install) + devnag - from devanagari package installed in texmf-dist. lacheck - maintained here, by us m-tx 0.63a - checked 29apr18 - http://ctan.org/pkg/m-tx/ + https://ctan.org/pkg/m-tx/ pmx 2.9.4a - checked 30jan21 - http://ctan.org/pkg/pmx/ + https://ctan.org/pkg/pmx/ ps2eps 1.68 - checked 10may12 http://tm.uka.de/~bless/ps2eps @@ -32,7 +36,7 @@ If anyone would like to resume development, just let us know. tpic2pdftex 1.97 - checked 10may12 - http://ctan.org/pkg/tpic2pdftex/ + https://ctan.org/pkg/tpic2pdftex/ vlna 1.5 - checked 10may12 ftp://math.feld.cvut.cz/pub/olsak/vlna/ @@ -40,7 +44,7 @@ xindy - see just below xpdfopen 0.86 - checked 9jul18 - http://ctan.org/pkg/xpdfopen/ + https://ctan.org/pkg/xpdfopen/ http://cs.acadiau.ca/~jdiamond/xpdfopen/ @@ -64,7 +68,7 @@ wget=wget # or "curl -O" or whatever -libsigsegv_ver=libsigsegv-2.12 +libsigsegv_ver=libsigsegv-2.13 cd $clisp_basedir $wget http://ftp.gnu.org/gnu/libsigsegv/$libsigsegv_ver.tar.gz gzip -dc $libsigsegv_ver.tar.gz | tar xf - @@ -108,8 +112,11 @@ # modules/syscalls/configure.orig > modules/syscalls/configure # On FreeBSD/amd64: add --disable-mmap. # +# Do not link with ncurses, we don't need it and versions differ. +ac_cv_search_tgetent=" "; export ac_cv_search_tgetent +# ./configure CPPFLAGS=-DUNIX_BINARY_DISTRIB --prefix=$clisp_toolsdir \ - --without-readline --without-dynamic-modules --without-termcap-ncurses \ + --without-readline --without-dynamic-modules \ --disable-nls \ --with-libsigsegv-prefix=$clisp_toolsdir \ --with-libiconv-prefix=$clisp_toolsdir \ @@ -116,5 +123,8 @@ $clisp_builddir \ && (cd $clisp_builddir && make) +Then the files we want are $clisp_builddir/lisp.run and lispinit.mem, +to be installed as /xindy.{run,mem}. + There may be clisp test failures relating to sockets on some systems. Since xindy doesn't use sockets, we can ignore those for TL.