diff --git a/manual/luatex-tex.tex b/manual/luatex-tex.tex index 2e22a55d4..67e22d735 100644 --- a/manual/luatex-tex.tex +++ b/manual/luatex-tex.tex @@ -1,4 +1,4 @@ -% language=uk +% engine=luatex language=uk % lua.newtable @@ -1969,6 +1969,34 @@ \subsubsection{\type {getlocallevel}} {kpse_init} is explicitly set to \type {false}. In all other cases, the normal values from \type {texmf.cnf} are used. +You can kick in your own nesting level visualizer, for instance: + +\starttyping +callback.register("input_level_string",function(n) + if tex.tracingmacros > 0 and tex.count.tracingstacklevels > 0 then + if tex.tracingmacros > 1 then + return "! " .. string.rep(">",n) .. " " + end +end) +\stoptyping + +Or, in sync with other engines (not checked): + +\newcount\tracingstacklevels + +\starttyping +\directlua { + callback.register("input_level_string", function(n) + if tex.tracingmacros > 0 then + local l = tex.count.tracingstacklevels + if l > 0 then + return string.rep("~",l) .. string.rep(".",n-l) + end + end + end) +} +\stoptyping + \stopsection \startsection[title={The \type {texio} library}][library=texio] diff --git a/manual/luatex.pdf b/manual/luatex.pdf index 0221771cb..b044846b7 100644 Binary files a/manual/luatex.pdf and b/manual/luatex.pdf differ diff --git a/source/ChangeLog b/source/ChangeLog index 96ca08c28..2fc3c69f1 100644 --- a/source/ChangeLog +++ b/source/ChangeLog @@ -1,3 +1,11 @@ +2021-03-23 Karl Berry + + * tardate.ac (tex_live_tardate): 2020-03-23 for TL'21. + +2021-02-17 Karl Berry + + * version.ac: 2021, no more /dev. + 2020-05-28 Karl Berry * Makefile.am (world): do not descend into $(texlinks_dir) if it diff --git a/source/README b/source/README index 7cf4e8b24..b7888e20f 100644 --- a/source/README +++ b/source/README @@ -1,4 +1,4 @@ -$Id: README 54144 2020-03-06 23:51:39Z karl $ +$Id: README 58223 2021-03-08 18:14:30Z karl $ Public domain. Originally written 2005 by Karl Berry. For a high-level overview of building TeX Live, see @@ -32,41 +32,45 @@ aarch64-linux: gcc (Debian 8.3.0-6) 8.3.0 ./Build --enable-arm-neon=check +armhf-linux: + Raspbian/Raspberry Pi OS (Debian Buster) + gcc (Raspbian 8.3.0-6+rpi1) 8.3.0 + ./Build --enable-xindy CLISP=${BUILD_ROOT_DIR}/clisp/clisp-build/clisp} + +i386-cygwin, x86_64-cygwin: gcc-10.2.0, cygwin-3.1.7 + TL_CONFIGURE_ARGS="--enable-xindy --enable-shared CLISP=/path/to/clisp.exe + LDFLAGS='-Wl,--no-insert-timestamp -Wl,--stack,0x800000'" \ + ./Build + + +i386-freebsd, amd64-freebsd: + Built on contextgarden, see below. + FreeBSD 11.4 + +i386-linux: see travis below. + i386-netbsd, amd64-netbsd: - NetBSD/amd64 9.0 - gcc version 7.4.0 (nb3 20190319) + NetBSD/amd64 9.1 + gcc version 7.5.0 (nb4 20200810) TL_MAKE=gmake CC=gcc CXX=g++ \ CFLAGS=-D_NETBSD_SOURCE \ CXXFLAGS='-D_NETBSD_SOURCE -std=c++11' \ LDFLAGS='-L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib' \ ./Build --enable-xindy CLISP=/usr/local/bin/clisp - Except that we take Nelson's asy build. - -i386-freebsd, amd64-freebsd: - http://anthesphoria.net/FreeBSD/TeXLive-2018/ has details for 2018. - 2019 and forward built on contextgarden (see below). - In 2020: FreeBSD 12.1-RELEASE-p1 - (e.g., -https://build.contextgarden.net/#/builders/56/builds/141/steps/2/logs/build _info - ) Except that we take Nelson's asy build. - -i386-linux: see travis below. - -i386-openbsd, amd64-openbsd: - e.g., see CONFIGURE_ARGS in the Makefile in - http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/print/texlive/base/ i386-solaris, x86_64-solaris: Built on contextgarden, see below. Solaris 10, gcc 5.5. See doc/README.solaris. -i386-cygwin, x86_64-cygwin: gcc-4.8.2, cygwin-1.7.29. - ./Build (with --enable-xindy for i386). +universal-darwin: See Master/source/mactexdoc.tar.xz. -x86_64-darwin: See Master/source/mactexdoc.tar.xz. +win32: + Makefiles written by hand, see Master/source/w32tex-src.tar.xz. + Visual Studio 2010 and Visual Studio 2015. x86_64-darwinlegacy: Mac OS X 10.6, clang 5.0, libc++ required + auxiliary installer binaries: Mac OS X 10.6, gcc -std=c99. https://github.com/TeXLive-M/texlive-buildbot http://build.contextgarden.net/waterfall?tag=c/texlive (These links have info on all platforms built by Mojca.) diff --git a/source/README.1prerequisites b/source/README.1prerequisites index 443a4826e..98617641b 100644 --- a/source/README.1prerequisites +++ b/source/README.1prerequisites @@ -15,9 +15,9 @@ notably FreeType; all the TL-maintained directories (and Automake/Autoconf output in general) work with any reasonable 'make'. A C++11 compiler is similarly required because of the third-party -libraries ICU and Poppler; the program 'dvisvgm' also requires C++11. -It is possible to build everything else with older compilers, but you -have to remove the C++11-dependent sources. *Note Build one package::. +library ICU; the program 'dvisvgm' also requires C++11. It is possible +to build everything else with older compilers, but you have to remove +the C++11-dependent sources. *Note Build one package::. A few programs in the tree have additional requirements: diff --git a/source/README.2building b/source/README.2building index d797d72ed..b72be1477 100644 --- a/source/README.2building +++ b/source/README.2building @@ -87,8 +87,8 @@ invoked to build an individual program or library, first building any required libraries. Here is an example from start to finish for working on 'dvipdfm-x'. -(Unfortunately, this does not suffice for building one, or a subset, of -the TeX engines; see the next section.) +(Unfortunately, this does not suffice for building the TeX engines; see +the next section.) mkdir mydir && cd mydir # new working directory @@ -142,7 +142,7 @@ an older compiler lacking such support, you need to (re)move those source directories; specifying '--disable' for them does not suffice, unfortunately. Specifically, before running 'configure': - rm -rf libs/icu libs/poppler libs/graphite2 texk/dvisvgm + rm -rf libs/icu libs/graphite2 texk/dvisvgm Also, even with '--disable-all-pkgs', dependencies are (currently) checked. For instance, if a (non-MacOSX) system does not have @@ -165,19 +165,31 @@ wanting to build one, or a subset, of the TeX engines (or other Web2c programs). The simplest way to do this is to disable everything and then -explicitly specify what to make. For example, to build only LuaTeX: - - ./configure --disable-all-pkgs # or ./Build - cd Work/texk/web2c # build directory - make luatex # specify target - - This works because the 'make' automatically runs 'configure' as -necessary for the dependencies and target. Furthermore, the source tree -can be cut down to just what is needed for the given engine (the -separate pdfTeX and LuaTeX source repositories do this, if you want to -peruse examples). - - We hope to improve the situation in the future. Patches are welcome. +explicitly specify what to make. For example, to build only the +original TeX: + + cd Work # top build directory + ../configure --without-x --disable-shared --disable-all-pkgs \ + --enable-tex --disable-synctex -C CFLAGS=-g CXXFLAGS=-g + make + cd texk/web2c # cd engine build directory + make tex # must specify target + + The first 'make' run will configure everything, and even build the +libraries, even though the packages are disabled. The source tree can +be cut down to just what is needed for the given engine (the separate +pdfTeX and LuaTeX source repositories do this, for example), but see +caveats in previous section. + + If you want to debug an X-related program or shared library setup, or +other variants, change the 'configure' options accordingly. Either +'../Build' or '../configure' can be run. + + Then it is necessary to again specify the target engine ('tex', in +the above) in the 'make'. + + All this is somewhat unfortunate. We hope to improve the situation +in the future. Patches are welcome. 4.7 Cross compilation ===================== diff --git a/source/README.4layout b/source/README.4layout index 64ca8aaf1..407c00d98 100644 --- a/source/README.4layout +++ b/source/README.4layout @@ -28,8 +28,8 @@ many extra hassles, so don't do that, tempting as it may be. Currently the versions we use are: autoconf (GNU Autoconf) 2.69 - automake (GNU automake) 1.16.1 - bison (GNU Bison) 3.5.2 + automake (GNU automake) 1.16.2 + bison (GNU Bison) 3.7.4 flex 2.6.0 ltmain.sh (GNU libtool) 2.4.6 m4 (GNU M4) 1.4.18 @@ -504,7 +504,8 @@ In that case, as above, we put the upstream sources into a subdirectory 'configure' in this original '...-src' directory, but only in our own directory; but we do compile using the source files in '...-src'. - So, to summarize the files that we must (usually) create: + So, to summarize the files that must (usually) be created inside a +new TL source directory ('texk/newprog' or 'utils/newprog'): 'ac/withenable.ac' The 'KPSE_ENABLE_PROG' call just explained. @@ -512,37 +513,67 @@ directory; but we do compile using the source files in '...-src'. 'configure.ac' 'Makefile.am' By merging the contents of the original 'configure.ac' (if - provided) and a comparable program already in TL. There is no magic - recipe, it's necessary to think about needs to be done in the - original vs. in TeX Live. + provided) and a comparable program already in TL. In the above + example, one line that will be needed in 'configure.ac' (can be + added before the 'AC_CONFIG_FILES' at the end) is: + + AC_SUBST([NEWPROG_TREE], [newprog-src]) + + and then use '@NEWPROG_TREE@' in 'Makefile.am' where needed. + + In general, there is no magic recipe for this part of the job. + It's necessary to think about what needs to be done in the original + vs. in TeX Live. It's useful to look at the setup for the most + comparable programs already in TL that you can find. It's also + useful to grep the entire 'Build/source' tree for whatever you can + think of to investigate how something is done. Most of the + TL-specific macros are defined in 'Build/source/m4/*'. 'TLpatches/TL-Changes' - Actions taken after getting the original source tree; typically - removal of derived or unused common files. + First actions taken after getting the original source tree; + typically removal of derived or unused common files. 'TLpatches/patch-...' If any changes are needed to the original sources, record the - patches here so they can be applied next time. And send them - upstream so that perhaps they won't have to be. + patches here so they can be applied next time. Also, send them + upstream so that we don't have to maintain them forever. 'ChangeLog' Record all TL-specific changes, now and in the future. - Then, run GNU 'autoreconf' in the new directory (*note Build system -tools::). After that works, 'svn add' the necessary files, including -the generated 'Makefile.in aclocal.m4 configure', and 'svn:ignore' the -Automake cache 'autom4te.cache'. (This is so people checking out the TL -source tree do not have to run any autotools, but can simply run -'configure'.) - - Then, run the TL tool 'reautoconf' in the top-level TL 'source/' -directory, to incorporate the new program into the build tree. - - Then, run (and rerun) a build until the program compiles and tests -successfully, probably involving rerunning autoreconf in the source -directory, 'make' in the build directory, etc. - - After final success, don't forget to commit. + After populating the new TL source directory ('.../newprog/', in the +above), run GNU 'autoreconf' there (*note Build system tools::). Once +that works, if you are the one who's eventually going to commit the new +package, 'svn add' the necessary files, including the generated +'Makefile.in aclocal.m4 configure', and 'svn:ignore' the Automake cache +'autom4te.cache'. (This is so people checking out the TL source tree do +not have to run any autotools, but can simply run 'configure'.) + + To reiterate: do not fail to commit the generated 'configure' and +other files. The m4 code in 'kpse-pkgs.m4' uses the existence of +'configure' to determine whether to descend into (and configure) a given +subdirectory. + + Then, run the TL tool 'reautoconf' in the top-level TL +'Build/source/' directory, to incorporate the new program into the build +tree. It is good to then rebuild the whole tree (e.g., using TL's +'Build/Build' script) to get all the necessary files generated. + + It will probably fail. So then you need to keep at it until the +program compiles and tests successfully. The most efficient way is to +rerun 'autoreconf' as needed in the new source directory +('Build/source/.../newprog'), then 'make' in the corresponding build +directory ('Build/work/.../newprog'), then 'make check', etc. In the +end, also make sure that the whole tree builds from scratch. + + After final success, don't forget to commit. (Or email the TL +maintainers with the patch.) + + Caveat: adding a new TeX engine is not completely different, but it's +not all that similar, either. In that case, the work is done inside a +new subdirectory of 'texk/web2c/'. Many things are common to all the +engines, other things need to be copied and possibly modified for each +one, yet others are unique to each. No general recipe is possible. 6.6.2 Adding a new generic library module ----------------------------------------- diff --git a/source/README.5configure b/source/README.5configure index b1e00daac..0959a4c54 100644 --- a/source/README.5configure +++ b/source/README.5configure @@ -71,9 +71,7 @@ of 'DVI' and 'GF' files must always be <2GB, due to the file format specifications. With LFS, there is no fixed limit on the size of PDF files created by -'pdftex' or PostScript files created by 'dvips'. The size of PDF images -included by 'pdftex' or 'luatex' must, however, be <2GB when using -'poppler' version 0.22 or before (even on 64-bit systems with LFS). +'pdftex' or PostScript files created by 'dvips'. 7.1.4 '--disable-missing' ------------------------- @@ -362,21 +360,6 @@ is one of: to generate the specified type of file dynamically. The default can be overridden by the user in any case (*note kpathsea library::). -7.3.2 Configure options for system 'poppler' --------------------------------------------- - -Building XeTeX requires 'poppler', either from the TL tree or system -headers and library. Building pdfTeX requires either 'xpdf' from the -TeX Live tree or system 'poppler' headers and library. - -'--with-system-poppler' -Use a system version (0.18 or newer) of 'poppler' for LuaTeX (or -LuaJITTeX) and XeTeX, and use 'pkg-config' to obtain the required flags. - -'--with-system-xpdf' -Use a system version (0.12 or newer) of 'poppler' (and 'pkg-config') for -pdfTeX instead of 'xpdf' from the TL tree. *Note --disable-largefile::. - 7.4 Variables for configure =========================== diff --git a/source/build-aux/config.sub b/source/build-aux/config.sub index 63c1f1c8b..7f7d0b055 100755 --- a/source/build-aux/config.sub +++ b/source/build-aux/config.sub @@ -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 @@ case $os in | 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* \ diff --git a/source/build-aux/texinfo.tex b/source/build-aux/texinfo.tex index dac7ae3d1..2bab6347c 100644 --- a/source/build-aux/texinfo.tex +++ b/source/build-aux/texinfo.tex @@ -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 diff --git a/source/configure b/source/configure index a5c4bec24..9965d8850 100755 --- a/source/configure +++ b/source/configure @@ -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 @@ MAKEFLAGS= # 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@tug.org' PACKAGE_URL='' @@ -785,22 +785,6 @@ enable_native_texlive_build enable_multiplatform enable_cxx_runtime_hack enable_libtool_hack -enable_autosp -enable_axodraw2 -enable_devnag -enable_lacheck -enable_m_tx -enable_pmx -enable_ps2eps -enable_t1utils -enable_texdoctk -enable_tpic2pdftex -enable_vlna -enable_xindy -enable_xindy_rules -enable_xindy_docs -with_clisp_runtime -enable_xpdfopen enable_web2c with_banner_add with_editor @@ -848,81 +832,15 @@ enable_tektronixwin enable_unitermwin enable_web_progs enable_synctex -enable_afm2pl -enable_bibtex_x -enable_bibtex8 -enable_bibtexu -enable_chktex -enable_cjkutils -enable_detex -enable_dtl -enable_dvi2tty -enable_dvidvi -enable_dviljk -enable_dviout_util -enable_dvipdfm_x -enable_dvipng -enable_debug -enable_timing -with_gs -enable_dvipos -enable_dvipsk -enable_dvisvgm -enable_gregorio -enable_gsftopk -enable_lcdf_typetools -enable_cfftot1 -enable_mmafm -enable_mmpfb -enable_otfinfo -enable_otftotfm -enable_t1dotlessj -enable_t1lint -enable_t1rawafm -enable_t1reencode -enable_t1testpage -enable_ttftotype42 -enable_updmap -enable_makeindexk -enable_makejvf -enable_mendexk -enable_musixtnt -enable_ps2pk -enable_psutils -enable_seetexk -enable_tex4htk -enable_ttf2pk2 -enable_ttfdump -enable_upmendex -enable_xdvik -with_xdvi_x_toolkit enable_texlive enable_linked_scripts with_system_harfbuzz -with_system_icu -with_system_teckit with_system_graphite2 with_system_zziplib -with_system_mpfr -with_mpfr_includes -with_mpfr_libdir -with_system_gmp -with_gmp_includes -with_gmp_libdir -with_system_cairo -with_system_pixman -with_system_gd -with_gd_includes -with_gd_libdir -with_system_freetype2 with_system_libpng -with_system_libpaper -with_libpaper_includes -with_libpaper_libdir with_system_zlib with_zlib_includes with_zlib_libdir -with_system_ptexenc with_system_kpathsea enable_mktexmf_default enable_mktexpk_default @@ -1502,7 +1420,7 @@ if test "$ac_init_help" = "long"; then # 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]... @@ -1576,7 +1494,7 @@ fi 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 @@ -1593,21 +1511,6 @@ Optional Features: lib/PLATFORM --enable-cxx-runtime-hack link C++ runtime statically --enable-libtool-hack ignore libtool dependency_libs - --disable-autosp do not build the autosp package - --disable-axodraw2 do not build the axodraw2 package - --disable-devnag do not build the devnag package - --disable-lacheck do not build the lacheck package - --disable-m-tx do not build the m-tx package - --disable-pmx do not build the pmx package - --disable-ps2eps do not build the ps2eps package - --disable-t1utils do not build the t1utils package - --disable-texdoctk do not build the texdoctk package - --disable-tpic2pdftex do not build the tpic2pdftex package - --disable-vlna do not build the vlna package - --enable-xindy build the xindy package - --enable-xindy-rules build and install make-rules package - --enable-xindy-docs build and install documentation - --disable-xpdfopen do not build the xpdfopen package --disable-web2c do not build the web2c (TeX & Co.) package --enable-auto-core cause TeX&MF to dump core, given a certain filename @@ -1655,57 +1558,6 @@ Optional Features: --enable-unitermwin include Uniterm window support --disable-web-progs do not build WEB programs bibtex ... weave --disable-synctex do not build the SyncTeX library and tool - --disable-afm2pl do not build the afm2pl package - --disable-bibtex-x do not build the bibtex-x package - --disable-bibtex8 do not build the bibtex8 program - --disable-bibtexu do not build the bibtexu program - --disable-chktex do not build the chktex package - --disable-cjkutils do not build the cjkutils package - --disable-detex do not build the detex package - --disable-dtl do not build the dtl package - --disable-dvi2tty do not build the dvi2tty package - --disable-dvidvi do not build the dvidvi package - --disable-dviljk do not build the dviljk package - --disable-dviout-util do not build the dviout-util package - --disable-dvipdfm-x do not build the dvipdfm-x package - --disable-dvipng do not build the dvipng package - --disable-debug Compile without debug (-d) option - --enable-timing Output execution time of dvipng - --disable-dvipos do not build the dvipos package - --disable-dvipsk do not build the dvipsk package - --disable-dvisvgm do not build the dvisvgm package - --disable-gregorio do not build the gregorio package - --disable-gsftopk do not build the gsftopk package - --disable-lcdf-typetools - do not build the lcdf-typetools package - --disable-cfftot1 do not build the cfftot1 program - --disable-mmafm do not build the mmafm program - --disable-mmpfb do not build the mmpfb program - --disable-otfinfo do not build the otfinfo program - --disable-otftotfm do not build the otftotfm program - --disable-t1dotlessj do not build the t1dotlessj program - --disable-t1lint do not build the t1lint program - --disable-t1rawafm do not build the t1rawafm program - --disable-t1reencode do not build the t1reencode program - --disable-t1testpage do not build the t1testpage program - --disable-ttftotype42 do not build the ttftotype42 program - --disable-auto-cfftot1 disable running cfftot1 from otftotfm - --disable-auto-t1dotlessj disable running t1dotlessj from otftotfm - --disable-auto-ttftotype42 - disable running ttftotype42 from otftotfm - --disable-auto-updmap disable running updmap from otftotfm - --disable-makeindexk do not build the makeindexk package - --disable-makejvf do not build the makejvf package - --disable-mendexk do not build the mendexk package - --disable-musixtnt do not build the musixtnt package - --disable-ps2pk do not build the ps2pk package - --disable-psutils do not build the psutils package - --disable-seetexk do not build the seetexk package - --disable-tex4htk do not build the tex4htk package - --disable-ttf2pk2 do not build the ttf2pk2 package - --disable-ttfdump do not build the ttfdump package - --disable-upmendex do not build the upmendex package - --disable-xdvik do not build the xdvik package --disable-texlive do not build the texlive (TeX Live scripts) package --disable-linked-scripts do not install the linked scripts --disable-mktexmf-default do not run mktexmf if MF source missing @@ -1737,57 +1589,22 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-clisp-runtime=PATH - pathname of clisp runtime to install for `xindy', - `default' to derive from clisp, or `system' to use - installed version --with-banner-add=STR add STR to version string appended to banner lines --with-editor=CMD invoke CMD from the `e' option [vi +%d '%s'] or [texworks --position=%d "%s"] --with-mf-x-toolkit use X toolkit for METAFONT - --with-gs=/PATH/TO/gs Hard-wire the location of GhostScript - --with-xdvi-x-toolkit=KIT - Use toolkit KIT (xaw/motif/xaw3d/neXtaw) for xdvi - [default: Xaw] --with-system-harfbuzz use installed harfbuzz headers and library (requires pkg-config) - --with-system-icu use installed ICU headers and libraries (requires - pkg-config or icu-config) - --with-system-teckit use installed teckit headers and library (requires - pkg-config) --with-system-graphite2 use installed graphite2 headers and library (requires pkg-config) --with-system-zziplib use installed zziplib headers and library (requires pkg-config) - --with-system-mpfr use installed mpfr headers and library - --with-mpfr-includes=DIR - mpfr headers installed in DIR - --with-mpfr-libdir=DIR mpfr library installed in DIR - --with-system-gmp use installed gmp headers and library - --with-gmp-includes=DIR gmp headers installed in DIR - --with-gmp-libdir=DIR gmp library installed in DIR - --with-system-cairo use installed cairo headers and library (requires - pkg-config) - --with-system-pixman use installed pixman headers and library (requires - pkg-config) - --with-system-gd use installed gd headers and library - --with-gd-includes=DIR gd headers installed in DIR - --with-gd-libdir=DIR gd library installed in DIR - --with-system-freetype2 use installed freetype2 headers and library - (requires freetype-config) --with-system-libpng use installed libpng headers and library (requires pkg-config) - --with-system-libpaper use installed libpaper headers and library - --with-libpaper-includes=DIR - libpaper headers installed in DIR - --with-libpaper-libdir=DIR - libpaper library installed in DIR --with-system-zlib use installed zlib headers and library --with-zlib-includes=DIR zlib headers installed in DIR --with-zlib-libdir=DIR zlib library installed in DIR - --with-system-ptexenc use installed ptexenc headers and library (requires - pkg-config) --with-system-kpathsea use installed kpathsea headers and library (requires pkg-config) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use @@ -1883,7 +1700,7 @@ fi 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. @@ -2660,7 +2477,7 @@ cat >config.log <<_ACEOF 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 $@ @@ -4199,293 +4016,6 @@ $as_echo "$as_me: $host -> \`--disable-mfluajit-nowin'" >&6;} esac ;; esac -## utils/autosp/ac/withenable.ac: configure.ac fragment for Tl subdir -## configure options and TL libraries required for autosp. -# Check whether --enable-autosp was given. -if test "${enable_autosp+set}" = set; then : - enableval=$enable_autosp; -fi -case $enable_autosp in #( - yes|no) : - ;; #( - *) : - - enable_autosp=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-autosp=$enable_autosp'" >&5 -$as_echo "$as_me: Assuming \`--enable-autosp=$enable_autosp'" >&6;} - ac_configure_args="$ac_configure_args '--enable-autosp=$enable_autosp'" - ;; -esac - -## utils/axodraw2/ac/withenable.ac: configure.ac fragment for TL subdir -## configure options and TL libraries for axodraw2. -# Check whether --enable-axodraw2 was given. -if test "${enable_axodraw2+set}" = set; then : - enableval=$enable_axodraw2; -fi -case $enable_axodraw2 in #( - yes|no) : - ;; #( - *) : - - enable_axodraw2=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-axodraw2=$enable_axodraw2'" >&5 -$as_echo "$as_me: Assuming \`--enable-axodraw2=$enable_axodraw2'" >&6;} - ac_configure_args="$ac_configure_args '--enable-axodraw2=$enable_axodraw2'" - ;; -esac - -## utils/devnag/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/devnag/ -## configure options and TL libraries required for devnag -# Check whether --enable-devnag was given. -if test "${enable_devnag+set}" = set; then : - enableval=$enable_devnag; -fi -case $enable_devnag in #( - yes|no) : - ;; #( - *) : - - enable_devnag=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-devnag=$enable_devnag'" >&5 -$as_echo "$as_me: Assuming \`--enable-devnag=$enable_devnag'" >&6;} - ac_configure_args="$ac_configure_args '--enable-devnag=$enable_devnag'" - ;; -esac - -## utils/lacheck/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/lacheck/ -## configure options and TL libraries required for lacheck -# Check whether --enable-lacheck was given. -if test "${enable_lacheck+set}" = set; then : - enableval=$enable_lacheck; -fi -case $enable_lacheck in #( - yes|no) : - ;; #( - *) : - - enable_lacheck=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-lacheck=$enable_lacheck'" >&5 -$as_echo "$as_me: Assuming \`--enable-lacheck=$enable_lacheck'" >&6;} - ac_configure_args="$ac_configure_args '--enable-lacheck=$enable_lacheck'" - ;; -esac - -## utils/m-tx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/m-tx/ -## configure options and TL libraries required for mtx -# Check whether --enable-m-tx was given. -if test "${enable_m_tx+set}" = set; then : - enableval=$enable_m_tx; -fi -case $enable_m_tx in #( - yes|no) : - ;; #( - *) : - - enable_m_tx=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-m-tx=$enable_m_tx'" >&5 -$as_echo "$as_me: Assuming \`--enable-m-tx=$enable_m_tx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-m-tx=$enable_m_tx'" - ;; -esac - -## utils/pmx/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/pmx/ -## configure options and TL libraries required for pmx -# Check whether --enable-pmx was given. -if test "${enable_pmx+set}" = set; then : - enableval=$enable_pmx; -fi -case $enable_pmx in #( - yes|no) : - ;; #( - *) : - - enable_pmx=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-pmx=$enable_pmx'" >&5 -$as_echo "$as_me: Assuming \`--enable-pmx=$enable_pmx'" >&6;} - ac_configure_args="$ac_configure_args '--enable-pmx=$enable_pmx'" - ;; -esac - -## utils/ps2eps/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/ps2eps/ -## configure options and TL libraries required for ps2eps -# Check whether --enable-ps2eps was given. -if test "${enable_ps2eps+set}" = set; then : - enableval=$enable_ps2eps; -fi -case $enable_ps2eps in #( - yes|no) : - ;; #( - *) : - - enable_ps2eps=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ps2eps=$enable_ps2eps'" >&5 -$as_echo "$as_me: Assuming \`--enable-ps2eps=$enable_ps2eps'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ps2eps=$enable_ps2eps'" - ;; -esac - -## utils/t1utils/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/t1utils/ -## configure options and TL libraries required for t1utils -# Check whether --enable-t1utils was given. -if test "${enable_t1utils+set}" = set; then : - enableval=$enable_t1utils; -fi -case $enable_t1utils in #( - yes|no) : - ;; #( - *) : - - enable_t1utils=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-t1utils=$enable_t1utils'" >&5 -$as_echo "$as_me: Assuming \`--enable-t1utils=$enable_t1utils'" >&6;} - ac_configure_args="$ac_configure_args '--enable-t1utils=$enable_t1utils'" - ;; -esac - -## utils/texdoctk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/texdoctk/ -## configure options and TL libraries required for texdoctk -# Check whether --enable-texdoctk was given. -if test "${enable_texdoctk+set}" = set; then : - enableval=$enable_texdoctk; -fi -case $enable_texdoctk in #( - yes|no) : - ;; #( - *) : - - enable_texdoctk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-texdoctk=$enable_texdoctk'" >&5 -$as_echo "$as_me: Assuming \`--enable-texdoctk=$enable_texdoctk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-texdoctk=$enable_texdoctk'" - ;; -esac - -## utils/tpic2pdftex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/tpic2pdftex/ -## configure options and TL libraries required for tpic2pdftex -# Check whether --enable-tpic2pdftex was given. -if test "${enable_tpic2pdftex+set}" = set; then : - enableval=$enable_tpic2pdftex; -fi -case $enable_tpic2pdftex in #( - yes|no) : - ;; #( - *) : - - enable_tpic2pdftex=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-tpic2pdftex=$enable_tpic2pdftex'" >&5 -$as_echo "$as_me: Assuming \`--enable-tpic2pdftex=$enable_tpic2pdftex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-tpic2pdftex=$enable_tpic2pdftex'" - ;; -esac - -## utils/vlna/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/vlna/ -## configure options and TL libraries required for vlna -# Check whether --enable-vlna was given. -if test "${enable_vlna+set}" = set; then : - enableval=$enable_vlna; -fi -case $enable_vlna in #( - yes|no) : - ;; #( - *) : - - enable_vlna=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-vlna=$enable_vlna'" >&5 -$as_echo "$as_me: Assuming \`--enable-vlna=$enable_vlna'" >&6;} - ac_configure_args="$ac_configure_args '--enable-vlna=$enable_vlna'" - ;; -esac - -## utils/xindy/ac/withenable.ac: configure.ac fragment for TL subdir -## configure options and TL libraries required for xindy. -# Check whether --enable-xindy was given. -if test "${enable_xindy+set}" = set; then : - enableval=$enable_xindy; -fi -case $enable_xindy in #( - yes|no) : - ;; #( - *) : - - enable_xindy=no - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xindy=$enable_xindy'" >&5 -$as_echo "$as_me: Assuming \`--enable-xindy=$enable_xindy'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xindy=$enable_xindy'" - ;; -esac - -## utils/xindy/ac/xindy.ac: configure.ac fragment for the TeX Live subdirectory utils/xindy/ -## configure options for xindy -# Check whether --enable-xindy-rules was given. -if test "${enable_xindy_rules+set}" = set; then : - enableval=$enable_xindy_rules; -fi -# Check whether --enable-xindy-docs was given. -if test "${enable_xindy_docs+set}" = set; then : - enableval=$enable_xindy_docs; -fi - -# Check whether --with-clisp-runtime was given. -if test "${with_clisp_runtime+set}" = set; then : - withval=$with_clisp_runtime; -fi - -## utils/xindy/ac/clisp.ac: configure.ac fragment for the TeX Live subdirectory utils/xindy/ -## configure checks for xindy and clisp -case $with_clisp_runtime in #( - default) : - ;; #( - system) : - if test "x$enable_native_texlive_build" = xyes; then : - as_fn_error $? "you can not use the installed clisp for a native TeX Live build" "$LINENO" 5 -fi ;; #( - "") : - if test "x$enable_native_texlive_build" = xyes; then : - with_clisp_runtime=default -else - with_clisp_runtime=system -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--with-clisp-runtime=$with_clisp_runtime'" >&5 -$as_echo "$as_me: Assuming \`--with-clisp-runtime=$with_clisp_runtime'" >&6;} - ac_configure_args="$ac_configure_args '--with-clisp-runtime=$with_clisp_runtime'" ;; #( - *) : - if test ! -f "$with_clisp_runtime"; then : - as_fn_error $? "no such file: \"$with_clisp_runtime\"" "$LINENO" 5 -fi ;; -esac - -## utils/xpdfopen/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory utils/xpdfopen/ -## configure options and TL libraries required for xpdfopen -# Check whether --enable-xpdfopen was given. -if test "${enable_xpdfopen+set}" = set; then : - enableval=$enable_xpdfopen; -fi -if test "x$with_x" = xno; then : - case $enable_xpdfopen in #( - "") : - { $as_echo "$as_me:${as_lineno-$LINENO}: \`--without-x' -> \`--disable-xpdfopen'" >&5 -$as_echo "$as_me: \`--without-x' -> \`--disable-xpdfopen'" >&6;} - enable_xpdfopen=no - ac_configure_args="$ac_configure_args '--disable-xpdfopen'" ;; #( - yes) : - as_fn_error $? "Sorry, incompatible options \`--without-x' and \`--enable-xpdfopen'" "$LINENO" 5 ;; #( - *) : - ;; -esac -fi -case $enable_xpdfopen in #( - yes|no) : - ;; #( - *) : - - enable_xpdfopen=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xpdfopen=$enable_xpdfopen'" >&5 -$as_echo "$as_me: Assuming \`--enable-xpdfopen=$enable_xpdfopen'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xpdfopen=$enable_xpdfopen'" - ;; -esac - ## texk/web2c/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/ ## configure options and TL libraries required for web2c @@ -4944,971 +4474,94 @@ if test "${enable_synctex+set}" = set; then : fi -## texk/afm2pl/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/afm2pl/ -## configure options and TL libraries required for afm2pl -# Check whether --enable-afm2pl was given. -if test "${enable_afm2pl+set}" = set; then : - enableval=$enable_afm2pl; -fi -case $enable_afm2pl in #( - yes|no) : - ;; #( - *) : - - enable_afm2pl=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-afm2pl=$enable_afm2pl'" >&5 -$as_echo "$as_me: Assuming \`--enable-afm2pl=$enable_afm2pl'" >&6;} - ac_configure_args="$ac_configure_args '--enable-afm2pl=$enable_afm2pl'" - ;; -esac - -test "x$enable_afm2pl" = xno || { - need_kpathsea=yes -} - -## texk/bibtex-x/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/bibtex-x/ -## configure options and TL libraries required for bibtex-x -# Check whether --enable-bibtex-x was given. -if test "${enable_bibtex_x+set}" = set; then : - enableval=$enable_bibtex_x; +## texk/texlive/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ +## configure options and TL libraries required for texlive +# Check whether --enable-texlive was given. +if test "${enable_texlive+set}" = set; then : + enableval=$enable_texlive; fi -case $enable_bibtex_x in #( +case $enable_texlive in #( yes|no) : ;; #( *) : - enable_bibtex_x=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-bibtex-x=$enable_bibtex_x'" >&5 -$as_echo "$as_me: Assuming \`--enable-bibtex-x=$enable_bibtex_x'" >&6;} - ac_configure_args="$ac_configure_args '--enable-bibtex-x=$enable_bibtex_x'" + enable_texlive=$enable_all_pkgs + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-texlive=$enable_texlive'" >&5 +$as_echo "$as_me: Assuming \`--enable-texlive=$enable_texlive'" >&6;} + ac_configure_args="$ac_configure_args '--enable-texlive=$enable_texlive'" ;; esac -test "x$enable_bibtex_x" = xno || { - need_kpathsea=yes -} - -## texk/bibtex-x/ac/bibtex-x.ac: configure.ac fragment for the TeX Live subdirectory texk/bibtex-x/ -## configure options for bibtex-x -# Check whether --enable-bibtex8 was given. -if test "${enable_bibtex8+set}" = set; then : - enableval=$enable_bibtex8; +## texk/texlive/ac/texlive.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ +## configure options for texlive +# Check whether --enable-linked-scripts was given. +if test "${enable_linked_scripts+set}" = set; then : + enableval=$enable_linked_scripts; fi -case $enable_bibtex8 in #( - yes | no) : - ;; #( - *) : - enable_bibtex8=yes ;; -esac -# Check whether --enable-bibtexu was given. -if test "${enable_bibtexu+set}" = set; then : - enableval=$enable_bibtexu; -fi -case $enable_bibtexu in #( - yes | no) : - ;; #( - *) : - enable_bibtexu=yes ;; -esac +## libs/pplib/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/pplib/ +## configure options and TL libraries required for pplib -test "x$enable_bibtex_x:$enable_bibtexu" = xyes:yes && need_icu=yes +## libs/harfbuzz/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/harfbuzz/ +## configure options and TL libraries required for harfbuzz -## texk/chktex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/chktex/ -## configure options and TL libraries required for chktex -# Check whether --enable-chktex was given. -if test "${enable_chktex+set}" = set; then : - enableval=$enable_chktex; +# Check whether --with-system-harfbuzz was given. +if test "${with_system_harfbuzz+set}" = set; then : + withval=$with_system_harfbuzz; fi -case $enable_chktex in #( - yes|no) : - ;; #( - *) : - - enable_chktex=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-chktex=$enable_chktex'" >&5 -$as_echo "$as_me: Assuming \`--enable-chktex=$enable_chktex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-chktex=$enable_chktex'" - ;; -esac - -test "x$enable_chktex" = xno || { - need_kpathsea=yes -} - -## texk/cjkutils/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/cjkutils/ -## configure options and TL libraries required for cjkutils -# Check whether --enable-cjkutils was given. -if test "${enable_cjkutils+set}" = set; then : - enableval=$enable_cjkutils; +if test "x$with_system_harfbuzz" = x; then + if test -f $srcdir/libs/harfbuzz/configure; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`harfbuzz' headers and library from TL tree" >&5 +$as_echo "$as_me: Assuming \`harfbuzz' headers and library from TL tree" >&6;} + with_system_harfbuzz=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`harfbuzz' headers and library" >&5 +$as_echo "$as_me: Assuming installed \`harfbuzz' headers and library" >&6;} + with_system_harfbuzz=yes + fi + ac_configure_args="$ac_configure_args '--with-system-harfbuzz=$with_system_harfbuzz'" +elif test "x$with_system_harfbuzz" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`harfbuzz' headers and library" >&5 +$as_echo "$as_me: Using installed \`harfbuzz' headers and library" >&6;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`harfbuzz' headers and library from TL tree" >&5 +$as_echo "$as_me: Using \`harfbuzz' headers and library from TL tree" >&6;} + if test "x$with_system_harfbuzz" != xno; then + with_system_harfbuzz=no + ac_configure_args="$ac_configure_args '--without-system-harfbuzz'" + fi fi -case $enable_cjkutils in #( - yes|no) : - ;; #( - *) : - - enable_cjkutils=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-cjkutils=$enable_cjkutils'" >&5 -$as_echo "$as_me: Assuming \`--enable-cjkutils=$enable_cjkutils'" >&6;} - ac_configure_args="$ac_configure_args '--enable-cjkutils=$enable_cjkutils'" - ;; -esac - -test "x$enable_cjkutils" = xno || { - need_kpathsea=yes -} - -## texk/detex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/detex/ -## configure options and TL libraries required for detex -# Check whether --enable-detex was given. -if test "${enable_detex+set}" = set; then : - enableval=$enable_detex; +if test "x$with_system_harfbuzz" = xyes; then + if test "x$with_system_graphite2" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 +$as_echo "$as_me: -> installed \`graphite2' headers and library" >&6;} + with_system_graphite2=yes + ac_configure_args="$ac_configure_args '--with-system-graphite2'" + elif test "x$with_system_graphite2" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 + fi + if test "x$with_system_icu" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 +$as_echo "$as_me: -> installed \`icu' headers and library" >&6;} + with_system_icu=yes + ac_configure_args="$ac_configure_args '--with-system-icu'" + elif test "x$with_system_icu" != xyes; then + as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-icu'" "$LINENO" 5 + fi fi -case $enable_detex in #( - yes|no) : - ;; #( - *) : - - enable_detex=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-detex=$enable_detex'" >&5 -$as_echo "$as_me: Assuming \`--enable-detex=$enable_detex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-detex=$enable_detex'" - ;; -esac -test "x$enable_detex" = xno || { - need_kpathsea=yes +test "x$need_harfbuzz" = xyes && { + need_graphite2=yes + need_icu=yes } -## texk/dtl/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dtl/ -## configure options and TL libraries required for dtl -# Check whether --enable-dtl was given. -if test "${enable_dtl+set}" = set; then : - enableval=$enable_dtl; -fi -case $enable_dtl in #( - yes|no) : - ;; #( - *) : - - enable_dtl=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dtl=$enable_dtl'" >&5 -$as_echo "$as_me: Assuming \`--enable-dtl=$enable_dtl'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dtl=$enable_dtl'" - ;; -esac - -test "x$enable_dtl" = xno || { - need_kpathsea=yes -} +## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ +## configure options and TL libraries required for graphite2 -## texk/dvi2tty/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvi2tty/ -## configure options and TL libraries required for dvi2tty -# Check whether --enable-dvi2tty was given. -if test "${enable_dvi2tty+set}" = set; then : - enableval=$enable_dvi2tty; -fi -case $enable_dvi2tty in #( - yes|no) : - ;; #( - *) : - - enable_dvi2tty=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvi2tty=$enable_dvi2tty'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvi2tty=$enable_dvi2tty'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvi2tty=$enable_dvi2tty'" - ;; -esac - -test "x$enable_dvi2tty" = xno || { - need_ptexenc=yes -} - -## texk/dvidvi/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvidvi/ -## configure options and TL libraries required for dvidvi -# Check whether --enable-dvidvi was given. -if test "${enable_dvidvi+set}" = set; then : - enableval=$enable_dvidvi; -fi -case $enable_dvidvi in #( - yes|no) : - ;; #( - *) : - - enable_dvidvi=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvidvi=$enable_dvidvi'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvidvi=$enable_dvidvi'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvidvi=$enable_dvidvi'" - ;; -esac - -test "x$enable_dvidvi" = xno || { - need_kpathsea=yes -} - -## texk/dviljk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dviljk/ -## configure options and TL libraries required for dviljk -# Check whether --enable-dviljk was given. -if test "${enable_dviljk+set}" = set; then : - enableval=$enable_dviljk; -fi -case $enable_dviljk in #( - yes|no) : - ;; #( - *) : - - enable_dviljk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dviljk=$enable_dviljk'" >&5 -$as_echo "$as_me: Assuming \`--enable-dviljk=$enable_dviljk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dviljk=$enable_dviljk'" - ;; -esac - -test "x$enable_dviljk" = xno || { - need_kpathsea=yes -} - -## texk/dviout-util/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dviout-util/ -## configure options and TL libraries required for dviout-util -# Check whether --enable-dviout-util was given. -if test "${enable_dviout_util+set}" = set; then : - enableval=$enable_dviout_util; -fi -case $enable_dviout_util in #( - yes|no) : - ;; #( - *) : - - enable_dviout_util=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dviout-util=$enable_dviout_util'" >&5 -$as_echo "$as_me: Assuming \`--enable-dviout-util=$enable_dviout_util'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dviout-util=$enable_dviout_util'" - ;; -esac - -test "x$enable_dviout_util" = xno || { - need_ptexenc=yes -} - -## texk/dvipdfm-x/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipdfm-x/ -## configure options and TL libraries required for dvipdfm-x -# Check whether --enable-dvipdfm-x was given. -if test "${enable_dvipdfm_x+set}" = set; then : - enableval=$enable_dvipdfm_x; -fi -case $enable_dvipdfm_x in #( - yes|no) : - ;; #( - *) : - - enable_dvipdfm_x=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipdfm-x=$enable_dvipdfm_x'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvipdfm-x=$enable_dvipdfm_x'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipdfm-x=$enable_dvipdfm_x'" - ;; -esac - -test "x$enable_dvipdfm_x" = xno || { - need_kpathsea=yes - need_libpng=yes - need_libpaper=yes -} - -## texk/dvipng/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ -## configure options and TL libraries required for dvipng -# Check whether --enable-dvipng was given. -if test "${enable_dvipng+set}" = set; then : - enableval=$enable_dvipng; -fi -case $enable_dvipng in #( - yes|no) : - ;; #( - *) : - - enable_dvipng=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipng=$enable_dvipng'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvipng=$enable_dvipng'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipng=$enable_dvipng'" - ;; -esac - -test "x$enable_dvipng" = xno || { - need_kpathsea=yes - need_gd=yes -} - -## texk/dvipng/ac/dvipng.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ -## configure options for dvipng -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; -fi - -# Check whether --enable-timing was given. -if test "${enable_timing+set}" = set; then : - enableval=$enable_timing; -fi - - -# Check whether --with-gs was given. -if test "${with_gs+set}" = set; then : - withval=$with_gs; -fi - - -## texk/dvipos/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipos/ -## configure options and TL libraries required for dvipos -# Check whether --enable-dvipos was given. -if test "${enable_dvipos+set}" = set; then : - enableval=$enable_dvipos; -fi -case $enable_dvipos in #( - yes|no) : - ;; #( - *) : - - enable_dvipos=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipos=$enable_dvipos'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvipos=$enable_dvipos'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipos=$enable_dvipos'" - ;; -esac - -test "x$enable_dvipos" = xno || { - need_kpathsea=yes -} - -## texk/dvipsk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipsk/ -## configure options and TL libraries required for dvipsk -# Check whether --enable-dvipsk was given. -if test "${enable_dvipsk+set}" = set; then : - enableval=$enable_dvipsk; -fi -case $enable_dvipsk in #( - yes|no) : - ;; #( - *) : - - enable_dvipsk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvipsk=$enable_dvipsk'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvipsk=$enable_dvipsk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvipsk=$enable_dvipsk'" - ;; -esac - -test "x$enable_dvipsk" = xno || { - need_kpathsea=yes -} - -# texk/dvisvgm/ac/withenable.ac: configure.ac fragment -## configure options and TL libraries required for dvisvgm -# Check whether --enable-dvisvgm was given. -if test "${enable_dvisvgm+set}" = set; then : - enableval=$enable_dvisvgm; -fi -case $enable_dvisvgm in #( - yes|no) : - ;; #( - *) : - - enable_dvisvgm=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-dvisvgm=$enable_dvisvgm'" >&5 -$as_echo "$as_me: Assuming \`--enable-dvisvgm=$enable_dvisvgm'" >&6;} - ac_configure_args="$ac_configure_args '--enable-dvisvgm=$enable_dvisvgm'" - ;; -esac - -test "x$enable_dvisvgm" = xno || { - need_kpathsea=yes - need_potrace=yes - need_freetype2=yes - need_zlib=yes -} - -## texk/gregorio/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gregorio/ -## configure options and TL libraries required for gregorio -# Check whether --enable-gregorio was given. -if test "${enable_gregorio+set}" = set; then : - enableval=$enable_gregorio; -fi -case $enable_gregorio in #( - yes|no) : - ;; #( - *) : - - enable_gregorio=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-gregorio=$enable_gregorio'" >&5 -$as_echo "$as_me: Assuming \`--enable-gregorio=$enable_gregorio'" >&6;} - ac_configure_args="$ac_configure_args '--enable-gregorio=$enable_gregorio'" - ;; -esac - -test "x$enable_gregorio" = xno || { - need_kpathsea=yes -} - -## texk/gsftopk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/gsftopk/ -## configure options and TL libraries required for gsftopk -# Check whether --enable-gsftopk was given. -if test "${enable_gsftopk+set}" = set; then : - enableval=$enable_gsftopk; -fi -case $enable_gsftopk in #( - yes|no) : - ;; #( - *) : - - enable_gsftopk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-gsftopk=$enable_gsftopk'" >&5 -$as_echo "$as_me: Assuming \`--enable-gsftopk=$enable_gsftopk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-gsftopk=$enable_gsftopk'" - ;; -esac - -test "x$enable_gsftopk" = xno || { - need_kpathsea=yes -} - -## texk/lcdf-typetools/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/lcdf-typetools/ -## configure options and TL libraries required for lcdf-typetools -# Check whether --enable-lcdf-typetools was given. -if test "${enable_lcdf_typetools+set}" = set; then : - enableval=$enable_lcdf_typetools; -fi -case $enable_lcdf_typetools in #( - yes|no) : - ;; #( - *) : - - enable_lcdf_typetools=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-lcdf-typetools=$enable_lcdf_typetools'" >&5 -$as_echo "$as_me: Assuming \`--enable-lcdf-typetools=$enable_lcdf_typetools'" >&6;} - ac_configure_args="$ac_configure_args '--enable-lcdf-typetools=$enable_lcdf_typetools'" - ;; -esac - -test "x$enable_lcdf_typetools" = xno || { - need_kpathsea=yes -} - -## Define configure options for lcdf-typetools. Extracted from configure.ac -## for ease of building TeX Live. -# Check whether --enable-cfftot1 was given. -if test "${enable_cfftot1+set}" = set; then : - enableval=$enable_cfftot1; -fi -# Check whether --enable-mmafm was given. -if test "${enable_mmafm+set}" = set; then : - enableval=$enable_mmafm; -fi -# Check whether --enable-mmpfb was given. -if test "${enable_mmpfb+set}" = set; then : - enableval=$enable_mmpfb; -fi -# Check whether --enable-otfinfo was given. -if test "${enable_otfinfo+set}" = set; then : - enableval=$enable_otfinfo; -fi -# Check whether --enable-otftotfm was given. -if test "${enable_otftotfm+set}" = set; then : - enableval=$enable_otftotfm; -fi -# Check whether --enable-t1dotlessj was given. -if test "${enable_t1dotlessj+set}" = set; then : - enableval=$enable_t1dotlessj; -fi -# Check whether --enable-t1lint was given. -if test "${enable_t1lint+set}" = set; then : - enableval=$enable_t1lint; -fi -# Check whether --enable-t1rawafm was given. -if test "${enable_t1rawafm+set}" = set; then : - enableval=$enable_t1rawafm; -fi -# Check whether --enable-t1reencode was given. -if test "${enable_t1reencode+set}" = set; then : - enableval=$enable_t1reencode; -fi -# Check whether --enable-t1testpage was given. -if test "${enable_t1testpage+set}" = set; then : - enableval=$enable_t1testpage; -fi -# Check whether --enable-ttftotype42 was given. -if test "${enable_ttftotype42+set}" = set; then : - enableval=$enable_ttftotype42; -fi - -# Check whether --enable-cfftot1 was given. -if test "${enable_cfftot1+set}" = set; then : - enableval=$enable_cfftot1; -fi -# Check whether --enable-t1dotlessj was given. -if test "${enable_t1dotlessj+set}" = set; then : - enableval=$enable_t1dotlessj; -fi -# Check whether --enable-ttftotype42 was given. -if test "${enable_ttftotype42+set}" = set; then : - enableval=$enable_ttftotype42; -fi -# Check whether --enable-updmap was given. -if test "${enable_updmap+set}" = set; then : - enableval=$enable_updmap; -fi - - -## texk/makeindexk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/makeindexk/ -## configure options and TL libraries required for makeindexk -# Check whether --enable-makeindexk was given. -if test "${enable_makeindexk+set}" = set; then : - enableval=$enable_makeindexk; -fi -case $enable_makeindexk in #( - yes|no) : - ;; #( - *) : - - enable_makeindexk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-makeindexk=$enable_makeindexk'" >&5 -$as_echo "$as_me: Assuming \`--enable-makeindexk=$enable_makeindexk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-makeindexk=$enable_makeindexk'" - ;; -esac - -test "x$enable_makeindexk" = xno || { - need_kpathsea=yes -} - -## texk/makejvf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/makejvf/ -## configure options and TL libraries required for makejvf -# Check whether --enable-makejvf was given. -if test "${enable_makejvf+set}" = set; then : - enableval=$enable_makejvf; -fi -case $enable_makejvf in #( - yes|no) : - ;; #( - *) : - - enable_makejvf=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-makejvf=$enable_makejvf'" >&5 -$as_echo "$as_me: Assuming \`--enable-makejvf=$enable_makejvf'" >&6;} - ac_configure_args="$ac_configure_args '--enable-makejvf=$enable_makejvf'" - ;; -esac - -test "x$enable_makejvf" = xno || { - need_ptexenc=yes -} - -## texk/mendexk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/mendexk/ -## configure options and TL libraries required for mendexk -# Check whether --enable-mendexk was given. -if test "${enable_mendexk+set}" = set; then : - enableval=$enable_mendexk; -fi -case $enable_mendexk in #( - yes|no) : - ;; #( - *) : - - enable_mendexk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-mendexk=$enable_mendexk'" >&5 -$as_echo "$as_me: Assuming \`--enable-mendexk=$enable_mendexk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-mendexk=$enable_mendexk'" - ;; -esac - -test "x$enable_mendexk" = xno || { - need_ptexenc=yes -} - -## texk/musixtnt/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/musixtnt/ -## configure options and TL libraries required for musixtnt -# Check whether --enable-musixtnt was given. -if test "${enable_musixtnt+set}" = set; then : - enableval=$enable_musixtnt; -fi -case $enable_musixtnt in #( - yes|no) : - ;; #( - *) : - - enable_musixtnt=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-musixtnt=$enable_musixtnt'" >&5 -$as_echo "$as_me: Assuming \`--enable-musixtnt=$enable_musixtnt'" >&6;} - ac_configure_args="$ac_configure_args '--enable-musixtnt=$enable_musixtnt'" - ;; -esac - -test "x$enable_musixtnt" = xno || { - need_kpathsea=yes -} - -## texk/ps2pk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ps2pk/ -## configure options and TL libraries required for ps2pk -# Check whether --enable-ps2pk was given. -if test "${enable_ps2pk+set}" = set; then : - enableval=$enable_ps2pk; -fi -case $enable_ps2pk in #( - yes|no) : - ;; #( - *) : - - enable_ps2pk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ps2pk=$enable_ps2pk'" >&5 -$as_echo "$as_me: Assuming \`--enable-ps2pk=$enable_ps2pk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ps2pk=$enable_ps2pk'" - ;; -esac - -test "x$enable_ps2pk" = xno || { - need_kpathsea=yes -} - -## texk/psutils/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/psutils/ -## configure options and TL libraries required for psutils -# Check whether --enable-psutils was given. -if test "${enable_psutils+set}" = set; then : - enableval=$enable_psutils; -fi -case $enable_psutils in #( - yes|no) : - ;; #( - *) : - - enable_psutils=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-psutils=$enable_psutils'" >&5 -$as_echo "$as_me: Assuming \`--enable-psutils=$enable_psutils'" >&6;} - ac_configure_args="$ac_configure_args '--enable-psutils=$enable_psutils'" - ;; -esac - -test "x$enable_psutils" = xno || { - need_kpathsea=yes - need_libpaper=yes -} - -## texk/seetexk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/seetexk/ -## configure options and TL libraries required for seetexk -# Check whether --enable-seetexk was given. -if test "${enable_seetexk+set}" = set; then : - enableval=$enable_seetexk; -fi -case $enable_seetexk in #( - yes|no) : - ;; #( - *) : - - enable_seetexk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-seetexk=$enable_seetexk'" >&5 -$as_echo "$as_me: Assuming \`--enable-seetexk=$enable_seetexk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-seetexk=$enable_seetexk'" - ;; -esac - -test "x$enable_seetexk" = xno || { - need_kpathsea=yes -} - -## texk/tex4htk/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/tex4htk/ -## configure options and TL libraries required for tex4htk -# Check whether --enable-tex4htk was given. -if test "${enable_tex4htk+set}" = set; then : - enableval=$enable_tex4htk; -fi -case $enable_tex4htk in #( - yes|no) : - ;; #( - *) : - - enable_tex4htk=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-tex4htk=$enable_tex4htk'" >&5 -$as_echo "$as_me: Assuming \`--enable-tex4htk=$enable_tex4htk'" >&6;} - ac_configure_args="$ac_configure_args '--enable-tex4htk=$enable_tex4htk'" - ;; -esac - -test "x$enable_tex4htk" = xno || { - need_kpathsea=yes -} - -## texk/ttf2pk2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ttf2pk2/ -## configure options and TL libraries required for ttf2pk -# Check whether --enable-ttf2pk2 was given. -if test "${enable_ttf2pk2+set}" = set; then : - enableval=$enable_ttf2pk2; -fi -case $enable_ttf2pk2 in #( - yes|no) : - ;; #( - *) : - - enable_ttf2pk2=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ttf2pk2=$enable_ttf2pk2'" >&5 -$as_echo "$as_me: Assuming \`--enable-ttf2pk2=$enable_ttf2pk2'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ttf2pk2=$enable_ttf2pk2'" - ;; -esac - -test "x$enable_ttf2pk2" = xno || { - need_kpathsea=yes - need_freetype2=yes -} - -## texk/ttfdump/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ttfdump/ -## configure options and TL libraries required for ttfdump -# Check whether --enable-ttfdump was given. -if test "${enable_ttfdump+set}" = set; then : - enableval=$enable_ttfdump; -fi -case $enable_ttfdump in #( - yes|no) : - ;; #( - *) : - - enable_ttfdump=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-ttfdump=$enable_ttfdump'" >&5 -$as_echo "$as_me: Assuming \`--enable-ttfdump=$enable_ttfdump'" >&6;} - ac_configure_args="$ac_configure_args '--enable-ttfdump=$enable_ttfdump'" - ;; -esac - -test "x$enable_ttfdump" = xno || { - need_kpathsea=yes -} - -## texk/upmendex/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/upmendex/ -## configure options and TL libraries required for upmendex -# Check whether --enable-upmendex was given. -if test "${enable_upmendex+set}" = set; then : - enableval=$enable_upmendex; -fi -case $enable_upmendex in #( - yes|no) : - ;; #( - *) : - - enable_upmendex=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-upmendex=$enable_upmendex'" >&5 -$as_echo "$as_me: Assuming \`--enable-upmendex=$enable_upmendex'" >&6;} - ac_configure_args="$ac_configure_args '--enable-upmendex=$enable_upmendex'" - ;; -esac - -test "x$enable_upmendex" = xno || { - need_kpathsea=yes - need_icu=yes -} - -## texk/xdvik/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/xdvik/ -## configure options and TL libraries required for xdvik -# Check whether --enable-xdvik was given. -if test "${enable_xdvik+set}" = set; then : - enableval=$enable_xdvik; -fi -if test "x$with_x" = xno; then : - case $enable_xdvik in #( - "") : - { $as_echo "$as_me:${as_lineno-$LINENO}: \`--without-x' -> \`--disable-xdvik'" >&5 -$as_echo "$as_me: \`--without-x' -> \`--disable-xdvik'" >&6;} - enable_xdvik=no - ac_configure_args="$ac_configure_args '--disable-xdvik'" ;; #( - yes) : - as_fn_error $? "Sorry, incompatible options \`--without-x' and \`--enable-xdvik'" "$LINENO" 5 ;; #( - *) : - ;; -esac -fi -case $enable_xdvik in #( - yes|no) : - ;; #( - *) : - - enable_xdvik=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-xdvik=$enable_xdvik'" >&5 -$as_echo "$as_me: Assuming \`--enable-xdvik=$enable_xdvik'" >&6;} - ac_configure_args="$ac_configure_args '--enable-xdvik=$enable_xdvik'" - ;; -esac - -test "x$enable_xdvik" = xno || { - need_kpathsea=yes - need_freetype2=yes -} - -## texk/xdvik/ac/xdvik.ac: configure.ac fragment for the TeX Live subdirectory texk/xdvik/ -## configure options for xdvik - -# Check whether --with-xdvi-x-toolkit was given. -if test "${with_xdvi_x_toolkit+set}" = set; then : - withval=$with_xdvi_x_toolkit; -fi - - -## texk/texlive/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ -## configure options and TL libraries required for texlive -# Check whether --enable-texlive was given. -if test "${enable_texlive+set}" = set; then : - enableval=$enable_texlive; -fi -case $enable_texlive in #( - yes|no) : - ;; #( - *) : - - enable_texlive=$enable_all_pkgs - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`--enable-texlive=$enable_texlive'" >&5 -$as_echo "$as_me: Assuming \`--enable-texlive=$enable_texlive'" >&6;} - ac_configure_args="$ac_configure_args '--enable-texlive=$enable_texlive'" - ;; -esac - -## texk/texlive/ac/texlive.ac: configure.ac fragment for the TeX Live subdirectory texk/texlive/ -## configure options for texlive -# Check whether --enable-linked-scripts was given. -if test "${enable_linked_scripts+set}" = set; then : - enableval=$enable_linked_scripts; -fi - - -## libs/pplib/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/pplib/ -## configure options and TL libraries required for pplib - -## libs/harfbuzz/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/harfbuzz/ -## configure options and TL libraries required for harfbuzz - -# Check whether --with-system-harfbuzz was given. -if test "${with_system_harfbuzz+set}" = set; then : - withval=$with_system_harfbuzz; -fi -if test "x$with_system_harfbuzz" = x; then - if test -f $srcdir/libs/harfbuzz/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`harfbuzz' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`harfbuzz' headers and library from TL tree" >&6;} - with_system_harfbuzz=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`harfbuzz' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`harfbuzz' headers and library" >&6;} - with_system_harfbuzz=yes - fi - ac_configure_args="$ac_configure_args '--with-system-harfbuzz=$with_system_harfbuzz'" -elif test "x$with_system_harfbuzz" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`harfbuzz' headers and library" >&5 -$as_echo "$as_me: Using installed \`harfbuzz' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`harfbuzz' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`harfbuzz' headers and library from TL tree" >&6;} - if test "x$with_system_harfbuzz" != xno; then - with_system_harfbuzz=no - ac_configure_args="$ac_configure_args '--without-system-harfbuzz'" - fi -fi -if test "x$with_system_harfbuzz" = xyes; then - if test "x$with_system_graphite2" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`graphite2' headers and library" >&5 -$as_echo "$as_me: -> installed \`graphite2' headers and library" >&6;} - with_system_graphite2=yes - ac_configure_args="$ac_configure_args '--with-system-graphite2'" - elif test "x$with_system_graphite2" != xyes; then - as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-graphite2'" "$LINENO" 5 - fi - if test "x$with_system_icu" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`icu' headers and library" >&5 -$as_echo "$as_me: -> installed \`icu' headers and library" >&6;} - with_system_icu=yes - ac_configure_args="$ac_configure_args '--with-system-icu'" - elif test "x$with_system_icu" != xyes; then - as_fn_error $? "Sorry, \`--with-system-harfbuzz' requires \`--with-system-icu'" "$LINENO" 5 - fi -fi - -test "x$need_harfbuzz" = xyes && { - need_graphite2=yes - need_icu=yes -} - -## libs/icu/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/icu/ -## configure options and TL libraries required for icu (modified for XeTeX) - -# Check whether --with-system-icu was given. -if test "${with_system_icu+set}" = set; then : - withval=$with_system_icu; -fi -if test "x$with_system_icu" = x; then - if test -f $srcdir/libs/icu/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`icu' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`icu' headers and library from TL tree" >&6;} - with_system_icu=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`icu' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`icu' headers and library" >&6;} - with_system_icu=yes - fi - ac_configure_args="$ac_configure_args '--with-system-icu=$with_system_icu'" -elif test "x$with_system_icu" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`icu' headers and library" >&5 -$as_echo "$as_me: Using installed \`icu' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`icu' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`icu' headers and library from TL tree" >&6;} - if test "x$with_system_icu" != xno; then - with_system_icu=no - ac_configure_args="$ac_configure_args '--without-system-icu'" - fi -fi - -## libs/teckit/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/teckit/ -## configure options and TL libraries required for teckit - -# Check whether --with-system-teckit was given. -if test "${with_system_teckit+set}" = set; then : - withval=$with_system_teckit; -fi -if test "x$with_system_teckit" = x; then - if test -f $srcdir/libs/teckit/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`teckit' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`teckit' headers and library from TL tree" >&6;} - with_system_teckit=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`teckit' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`teckit' headers and library" >&6;} - with_system_teckit=yes - fi - ac_configure_args="$ac_configure_args '--with-system-teckit=$with_system_teckit'" -elif test "x$with_system_teckit" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`teckit' headers and library" >&5 -$as_echo "$as_me: Using installed \`teckit' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`teckit' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`teckit' headers and library from TL tree" >&6;} - if test "x$with_system_teckit" != xno; then - with_system_teckit=no - ac_configure_args="$ac_configure_args '--without-system-teckit'" - fi -fi -if test "x$with_system_teckit" = xyes; then - if test "x$with_system_zlib" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -$as_echo "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-teckit' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_teckit" = xyes && { - need_zlib=yes -} - -## libs/graphite2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/graphite2/ -## configure options and TL libraries required for graphite2 - -# Check whether --with-system-graphite2 was given. -if test "${with_system_graphite2+set}" = set; then : - withval=$with_system_graphite2; +# Check whether --with-system-graphite2 was given. +if test "${with_system_graphite2+set}" = set; then : + withval=$with_system_graphite2; fi if test "x$with_system_graphite2" = x; then if test -f $srcdir/libs/graphite2/configure; then @@ -5977,307 +4630,6 @@ test "x$need_zziplib" = xyes && { need_zlib=yes } -## libs/xpdf/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ -## configure options and TL libraries required for xpdf -: "kpse_xpdf_options - no-op" -if test "x$with_system_xpdf" = x; then - if test -f $srcdir/libs/xpdf/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`xpdf' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`xpdf' headers and library from TL tree" >&6;} - with_system_xpdf=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`xpdf' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`xpdf' headers and library" >&6;} - with_system_xpdf=yes - fi - ac_configure_args="$ac_configure_args '--with-system-xpdf=$with_system_xpdf'" -elif test "x$with_system_xpdf" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`xpdf' headers and library" >&5 -$as_echo "$as_me: Using installed \`xpdf' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`xpdf' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`xpdf' headers and library from TL tree" >&6;} - if test "x$with_system_xpdf" != xno; then - with_system_xpdf=no - ac_configure_args="$ac_configure_args '--without-system-xpdf'" - fi -fi - -## libs/mpfr/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ -## configure options and TL libraries required for mpfr - -# Check whether --with-system-mpfr was given. -if test "${with_system_mpfr+set}" = set; then : - withval=$with_system_mpfr; -fi - -# Check whether --with-mpfr-includes was given. -if test "${with_mpfr_includes+set}" = set; then : - withval=$with_mpfr_includes; -fi - -# Check whether --with-mpfr-libdir was given. -if test "${with_mpfr_libdir+set}" = set; then : - withval=$with_mpfr_libdir; -fi -if test "x$with_system_mpfr" = x; then - if test -f $srcdir/libs/mpfr/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`mpfr' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`mpfr' headers and library from TL tree" >&6;} - with_system_mpfr=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`mpfr' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`mpfr' headers and library" >&6;} - with_system_mpfr=yes - fi - ac_configure_args="$ac_configure_args '--with-system-mpfr=$with_system_mpfr'" -elif test "x$with_system_mpfr" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`mpfr' headers and library" >&5 -$as_echo "$as_me: Using installed \`mpfr' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`mpfr' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`mpfr' headers and library from TL tree" >&6;} - if test "x$with_system_mpfr" != xno; then - with_system_mpfr=no - ac_configure_args="$ac_configure_args '--without-system-mpfr'" - fi -fi -if test "x$with_system_mpfr" = xyes; then - if test "x$with_system_gmp" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`gmp' headers and library" >&5 -$as_echo "$as_me: -> installed \`gmp' headers and library" >&6;} - with_system_gmp=yes - ac_configure_args="$ac_configure_args '--with-system-gmp'" - elif test "x$with_system_gmp" != xyes; then - as_fn_error $? "Sorry, \`--with-system-mpfr' requires \`--with-system-gmp'" "$LINENO" 5 - fi -fi - -test "x$need_mpfr" = xyes && { - need_gmp=yes -} - -## libs/gmp/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gmp/ -## configure options and TL libraries required for gmp - -# Check whether --with-system-gmp was given. -if test "${with_system_gmp+set}" = set; then : - withval=$with_system_gmp; -fi - -# Check whether --with-gmp-includes was given. -if test "${with_gmp_includes+set}" = set; then : - withval=$with_gmp_includes; -fi - -# Check whether --with-gmp-libdir was given. -if test "${with_gmp_libdir+set}" = set; then : - withval=$with_gmp_libdir; -fi -if test "x$with_system_gmp" = x; then - if test -f $srcdir/libs/gmp/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`gmp' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`gmp' headers and library from TL tree" >&6;} - with_system_gmp=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`gmp' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`gmp' headers and library" >&6;} - with_system_gmp=yes - fi - ac_configure_args="$ac_configure_args '--with-system-gmp=$with_system_gmp'" -elif test "x$with_system_gmp" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`gmp' headers and library" >&5 -$as_echo "$as_me: Using installed \`gmp' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`gmp' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`gmp' headers and library from TL tree" >&6;} - if test "x$with_system_gmp" != xno; then - with_system_gmp=no - ac_configure_args="$ac_configure_args '--without-system-gmp'" - fi -fi - -## libs/cairo/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/cairo/ -## configure options and TL libraries required for cairo - -# Check whether --with-system-cairo was given. -if test "${with_system_cairo+set}" = set; then : - withval=$with_system_cairo; -fi -if test "x$with_system_cairo" = x; then - if test -f $srcdir/libs/cairo/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`cairo' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`cairo' headers and library from TL tree" >&6;} - with_system_cairo=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`cairo' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`cairo' headers and library" >&6;} - with_system_cairo=yes - fi - ac_configure_args="$ac_configure_args '--with-system-cairo=$with_system_cairo'" -elif test "x$with_system_cairo" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`cairo' headers and library" >&5 -$as_echo "$as_me: Using installed \`cairo' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`cairo' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`cairo' headers and library from TL tree" >&6;} - if test "x$with_system_cairo" != xno; then - with_system_cairo=no - ac_configure_args="$ac_configure_args '--without-system-cairo'" - fi -fi -if test "x$with_system_cairo" = xyes; then - if test "x$with_system_pixman" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`pixman' headers and library" >&5 -$as_echo "$as_me: -> installed \`pixman' headers and library" >&6;} - with_system_pixman=yes - ac_configure_args="$ac_configure_args '--with-system-pixman'" - elif test "x$with_system_pixman" != xyes; then - as_fn_error $? "Sorry, \`--with-system-cairo' requires \`--with-system-pixman'" "$LINENO" 5 - fi -fi - -test "x$need_cairo" = xyes && { - need_pixman=yes -} - -## libs/pixman/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/pixman/ -## configure options and TL libraries required for pixman - -# Check whether --with-system-pixman was given. -if test "${with_system_pixman+set}" = set; then : - withval=$with_system_pixman; -fi -if test "x$with_system_pixman" = x; then - if test -f $srcdir/libs/pixman/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`pixman' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`pixman' headers and library from TL tree" >&6;} - with_system_pixman=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`pixman' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`pixman' headers and library" >&6;} - with_system_pixman=yes - fi - ac_configure_args="$ac_configure_args '--with-system-pixman=$with_system_pixman'" -elif test "x$with_system_pixman" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`pixman' headers and library" >&5 -$as_echo "$as_me: Using installed \`pixman' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`pixman' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`pixman' headers and library from TL tree" >&6;} - if test "x$with_system_pixman" != xno; then - with_system_pixman=no - ac_configure_args="$ac_configure_args '--without-system-pixman'" - fi -fi - -## libs/gd/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/ -## configure options and TL libraries required for gd - -# Check whether --with-system-gd was given. -if test "${with_system_gd+set}" = set; then : - withval=$with_system_gd; -fi - -# Check whether --with-gd-includes was given. -if test "${with_gd_includes+set}" = set; then : - withval=$with_gd_includes; -fi - -# Check whether --with-gd-libdir was given. -if test "${with_gd_libdir+set}" = set; then : - withval=$with_gd_libdir; -fi -if test "x$with_system_gd" = x; then - if test -f $srcdir/libs/gd/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`gd' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`gd' headers and library from TL tree" >&6;} - with_system_gd=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`gd' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`gd' headers and library" >&6;} - with_system_gd=yes - fi - ac_configure_args="$ac_configure_args '--with-system-gd=$with_system_gd'" -elif test "x$with_system_gd" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`gd' headers and library" >&5 -$as_echo "$as_me: Using installed \`gd' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`gd' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`gd' headers and library from TL tree" >&6;} - if test "x$with_system_gd" != xno; then - with_system_gd=no - ac_configure_args="$ac_configure_args '--without-system-gd'" - fi -fi -if test "x$with_system_gd" = xyes; then - if test "x$with_system_libpng" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`libpng' headers and library" >&5 -$as_echo "$as_me: -> installed \`libpng' headers and library" >&6;} - with_system_libpng=yes - ac_configure_args="$ac_configure_args '--with-system-libpng'" - elif test "x$with_system_libpng" != xyes; then - as_fn_error $? "Sorry, \`--with-system-gd' requires \`--with-system-libpng'" "$LINENO" 5 - fi - if test "x$with_system_freetype2" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`freetype2' headers and library" >&5 -$as_echo "$as_me: -> installed \`freetype2' headers and library" >&6;} - with_system_freetype2=yes - ac_configure_args="$ac_configure_args '--with-system-freetype2'" - elif test "x$with_system_freetype2" != xyes; then - as_fn_error $? "Sorry, \`--with-system-gd' requires \`--with-system-freetype2'" "$LINENO" 5 - fi -fi - -test "x$need_gd" = xyes && { - need_libpng=yes - need_freetype2=yes -} - -## libs/freetype2/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/freetype2/ -## configure options and TL libraries required for freetype2 - -# Check whether --with-system-freetype2 was given. -if test "${with_system_freetype2+set}" = set; then : - withval=$with_system_freetype2; -fi -if test "x$with_system_freetype2" = x; then - if test -f $srcdir/libs/freetype2/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`freetype2' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`freetype2' headers and library from TL tree" >&6;} - with_system_freetype2=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`freetype2' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`freetype2' headers and library" >&6;} - with_system_freetype2=yes - fi - ac_configure_args="$ac_configure_args '--with-system-freetype2=$with_system_freetype2'" -elif test "x$with_system_freetype2" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`freetype2' headers and library" >&5 -$as_echo "$as_me: Using installed \`freetype2' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`freetype2' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`freetype2' headers and library from TL tree" >&6;} - if test "x$with_system_freetype2" != xno; then - with_system_freetype2=no - ac_configure_args="$ac_configure_args '--without-system-freetype2'" - fi -fi -if test "x$with_system_freetype2" = xyes; then - if test "x$with_system_zlib" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`zlib' headers and library" >&5 -$as_echo "$as_me: -> installed \`zlib' headers and library" >&6;} - with_system_zlib=yes - ac_configure_args="$ac_configure_args '--with-system-zlib'" - elif test "x$with_system_zlib" != xyes; then - as_fn_error $? "Sorry, \`--with-system-freetype2' requires \`--with-system-zlib'" "$LINENO" 5 - fi -fi - -test "x$need_freetype2" = xyes && { - need_zlib=yes -} - ## libs/libpng/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/libpng/ ## configure options and TL libraries required for libpng @@ -6322,46 +4674,6 @@ test "x$need_libpng" = xyes && { need_zlib=yes } -## libs/libpaper/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/libpaper/ -## configure options and TL libraries required for libpaper - -# Check whether --with-system-libpaper was given. -if test "${with_system_libpaper+set}" = set; then : - withval=$with_system_libpaper; -fi - -# Check whether --with-libpaper-includes was given. -if test "${with_libpaper_includes+set}" = set; then : - withval=$with_libpaper_includes; -fi - -# Check whether --with-libpaper-libdir was given. -if test "${with_libpaper_libdir+set}" = set; then : - withval=$with_libpaper_libdir; -fi -if test "x$with_system_libpaper" = x; then - if test -f $srcdir/libs/libpaper/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`libpaper' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`libpaper' headers and library from TL tree" >&6;} - with_system_libpaper=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`libpaper' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`libpaper' headers and library" >&6;} - with_system_libpaper=yes - fi - ac_configure_args="$ac_configure_args '--with-system-libpaper=$with_system_libpaper'" -elif test "x$with_system_libpaper" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`libpaper' headers and library" >&5 -$as_echo "$as_me: Using installed \`libpaper' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`libpaper' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`libpaper' headers and library from TL tree" >&6;} - if test "x$with_system_libpaper" != xno; then - with_system_libpaper=no - ac_configure_args="$ac_configure_args '--without-system-libpaper'" - fi -fi - ## libs/luajit/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory libs/luajit/ ## configure options and TL libraries required for luajit @@ -6403,55 +4715,11 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`zlib' headers and library from TL tree" >&5 $as_echo "$as_me: Using \`zlib' headers and library from TL tree" >&6;} if test "x$with_system_zlib" != xno; then - with_system_zlib=no - ac_configure_args="$ac_configure_args '--without-system-zlib'" - fi -fi - - -## texk/ptexenc/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/ptexenc/ -## configure options and TL libraries required for ptexenc - -# Check whether --with-system-ptexenc was given. -if test "${with_system_ptexenc+set}" = set; then : - withval=$with_system_ptexenc; -fi -if test "x$with_system_ptexenc" = x; then - if test -f $srcdir/texk/ptexenc/configure; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming \`ptexenc' headers and library from TL tree" >&5 -$as_echo "$as_me: Assuming \`ptexenc' headers and library from TL tree" >&6;} - with_system_ptexenc=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Assuming installed \`ptexenc' headers and library" >&5 -$as_echo "$as_me: Assuming installed \`ptexenc' headers and library" >&6;} - with_system_ptexenc=yes - fi - ac_configure_args="$ac_configure_args '--with-system-ptexenc=$with_system_ptexenc'" -elif test "x$with_system_ptexenc" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using installed \`ptexenc' headers and library" >&5 -$as_echo "$as_me: Using installed \`ptexenc' headers and library" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: Using \`ptexenc' headers and library from TL tree" >&5 -$as_echo "$as_me: Using \`ptexenc' headers and library from TL tree" >&6;} - if test "x$with_system_ptexenc" != xno; then - with_system_ptexenc=no - ac_configure_args="$ac_configure_args '--without-system-ptexenc'" - fi -fi -if test "x$with_system_ptexenc" = xyes; then - if test "x$with_system_kpathsea" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: -> installed \`kpathsea' headers and library" >&5 -$as_echo "$as_me: -> installed \`kpathsea' headers and library" >&6;} - with_system_kpathsea=yes - ac_configure_args="$ac_configure_args '--with-system-kpathsea'" - elif test "x$with_system_kpathsea" != xyes; then - as_fn_error $? "Sorry, \`--with-system-ptexenc' requires \`--with-system-kpathsea'" "$LINENO" 5 + with_system_zlib=no + ac_configure_args="$ac_configure_args '--without-system-zlib'" fi fi -test "x$need_ptexenc" = xyes && { - need_kpathsea=yes -} ## texk/kpathsea/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/kpathsea/ ## configure options and TL libraries required for kpathsea @@ -10768,7 +9036,7 @@ fi # Define the identity of the package. PACKAGE='tex-live' - VERSION='2020-03-27' + VERSION='2021-03-23' cat >>confdefs.h <<_ACEOF @@ -21085,13 +19353,11 @@ $as_echo_n "checking for TeX specific libraries to build... " >&6; } echo 'tldbg:_KPSE_RECURSE called: list=texlibs, text=TeX specific libraries, cond=test "x$with_system_[]Kpse_pkg" != xyes && test "x$need_[]Kpse_pkg" = xyes, prefix=texk/.' >&5 MAKE_SUBDIRS= CONF_SUBDIRS= -if test -x $srcdir/texk/ptexenc/configure; then - test "x$with_system_ptexenc" != xyes && test "x$need_ptexenc" = xyes && MAKE_SUBDIRS="texk/ptexenc $MAKE_SUBDIRS" - CONF_SUBDIRS="texk/ptexenc $CONF_SUBDIRS" -fi if test -x $srcdir/texk/kpathsea/configure; then test "x$with_system_kpathsea" != xyes && test "x$need_kpathsea" = xyes && MAKE_SUBDIRS="texk/kpathsea $MAKE_SUBDIRS" CONF_SUBDIRS="texk/kpathsea $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/texk/kpathsea/configure' >&5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_SUBDIRS" >&5 @@ -21732,36 +19998,6 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "$kpse_res" >&6; } fi -## texk/ptexenc/ac/ptexenc.ac: configure.ac fragment for the TeX Live subdirectory texk/ptexenc/ -## basic check of system ptexenc -if test "x$need_ptexenc:$with_system_ptexenc" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`ptexenc' library" >&5 -$as_echo_n "checking requested system \`ptexenc' library... " >&6; } - CPPFLAGS="$PTEXENC_INCLUDES $CPPFLAGS" - LIBS="$PTEXENC_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *version = ptexenc_version_string; -set_enc_string("prog", "name"); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - ## libs/zlib/ac/zlib.ac: configure.ac fragment for the TeX Live subdirectory libs/zlib/ ## basic check of system zlib if test "x$need_zlib:$with_system_zlib" = xyes:yes; then @@ -21793,35 +20029,6 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "$kpse_res" >&6; } fi -## libs/libpaper/ac/libpaper.ac: configure.ac fragment for the TeX Live subdirectory libs/libpaper/ -## basic check of system libpaper -if test "x$need_libpaper:$with_system_libpaper" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`libpaper' library" >&5 -$as_echo_n "checking requested system \`libpaper' library... " >&6; } - CPPFLAGS="$LIBPAPER_INCLUDES $CPPFLAGS" - LIBS="$LIBPAPER_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *v = defaultpapername(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - ## libs/libpng/ac/libpng.ac: configure.ac fragment for the TeX Live subdirectory libs/libpng/ ## basic check of system libpng if test "x$need_libpng:$with_system_libpng" = xyes:yes; then @@ -21852,221 +20059,6 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "$kpse_res" >&6; } fi -## libs/freetype2/ac/freetype2.ac: configure.ac fragment for the TeX Live subdirectory libs/freetype2/ -## basic check of system freetype2 -if test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`freetype2' library" >&5 -$as_echo_n "checking requested system \`freetype2' library... " >&6; } - CPPFLAGS="$FREETYPE2_INCLUDES $CPPFLAGS" - LIBS="$FREETYPE2_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include FT_FREETYPE_H -int -main () -{ -FT_Library library; FT_Init_FreeType(&library); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - -## libs/gd/ac/gd.ac: configure.ac fragment for the TeX Live subdirectory libs/gd/ -## basic check of system gd -if test "x$need_gd:$with_system_gd" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`gd' library" >&5 -$as_echo_n "checking requested system \`gd' library... " >&6; } - CPPFLAGS="$GD_INCLUDES $CPPFLAGS" - LIBS="$GD_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -gdImageCreate(1, 2); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - -## libs/pixman/ac/pixman.ac: configure.ac fragment for the TeX Live subdirectory libs/pixman/ -## basic check of system pixman -if test "x$need_pixman:$with_system_pixman" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`pixman' library" >&5 -$as_echo_n "checking requested system \`pixman' library... " >&6; } - CPPFLAGS="$PIXMAN_INCLUDES $CPPFLAGS" - LIBS="$PIXMAN_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *s = pixman_version_string(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - -## libs/cairo/ac/cairo.ac: configure.ac fragment for the TeX Live subdirectory libs/cairo/ -## basic check of system cairo -if test "x$need_cairo:$with_system_cairo" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`cairo' library" >&5 -$as_echo_n "checking requested system \`cairo' library... " >&6; } - CPPFLAGS="$CAIRO_INCLUDES $CPPFLAGS" - LIBS="$CAIRO_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *s = cairo_version_string(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - -## libs/gmp/ac/gmp.ac: configure.ac fragment for the TeX Live subdirectory libs/gmp/ -## basic check of system gmp -if test "x$need_gmp:$with_system_gmp" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`gmp' library" >&5 -$as_echo_n "checking requested system \`gmp' library... " >&6; } - CPPFLAGS="$GMP_INCLUDES $CPPFLAGS" - LIBS="$GMP_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *s = gmp_version; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - -## libs/mpfr/ac/mpfr.ac: configure.ac fragment for the TeX Live subdirectory libs/mpfr/ -## basic check of system mpfr -if test "x$need_mpfr:$with_system_mpfr" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`mpfr' library" >&5 -$as_echo_n "checking requested system \`mpfr' library... " >&6; } - CPPFLAGS="$MPFR_INCLUDES $CPPFLAGS" - LIBS="$MPFR_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -const char *s = mpfr_get_version(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi - -## libs/xpdf/ac/xpdf.ac: configure.ac fragment for the TeX Live subdirectory libs/xpdf/ -## basic check of system xpdf (a.k.a. poppler, no longer supported in -## TL sources) -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`xpdf' library" >&5 -$as_echo_n "checking requested system \`xpdf' library... " >&6; } - CPPFLAGS="$XPDF_INCLUDES $CPPFLAGS" - LIBS="$XPDF_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -GfxFont *gfxFont; gfxFont->decRefCnt(); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## libs/zziplib/ac/zziplib.ac: configure.ac fragment for the TeX Live subdirectory libs/zziplib/ ## basic check of system zziplib if test "x$need_zziplib:$with_system_zziplib" = xyes:yes; then @@ -22126,85 +20118,6 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "$kpse_res" >&6; } fi -## libs/teckit/ac/teckit.ac: configure.ac fragment for the TeX Live subdirectory libs/teckit/ -## basic check of system teckit -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_teckit:$with_system_teckit" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`teckit' library" >&5 -$as_echo_n "checking requested system \`teckit' library... " >&6; } - CPPFLAGS="$TECKIT_INCLUDES $CPPFLAGS" - LIBS="$TECKIT_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -TECkit_Converter converter; TECkit_DisposeConverter(converter); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -## libs/icu/ac/icu.ac: configure.ac fragment for the TeX Live subdirectory libs/icu/ -## basic check of system icu -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test "x$need_icu:$with_system_icu" = xyes:yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking requested system \`icu' library" >&5 -$as_echo_n "checking requested system \`icu' library... " >&6; } - CPPFLAGS="$ICU_INCLUDES $CPPFLAGS" - LIBS="$ICU_LIBS $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -UErrorCode code; const UChar *src; UChar *dst; -u_strToLower(dst, -1, src, -1, NULL, &code); - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - syslib_used=yes kpse_res=ok -else - syslib_status=no kpse_res=failed -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_res" >&5 -$as_echo "$kpse_res" >&6; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ## libs/harfbuzz/ac/harfbuzz.ac: configure.ac fragment for the TeX Live subdirectory libs/harfbuzz/ ## basic check of system harfbuzz if test "x$need_harfbuzz:$with_system_harfbuzz" = xyes:yes; then @@ -22842,7 +20755,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # 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 @@ -22899,7 +20812,7 @@ _ACEOF 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\\" @@ -24858,11 +22771,11 @@ msg_compiling="$msg_compiling test "x$srcdir" = x. || msg_compiling="$msg_compiling from sources in $kpse_src" { $as_echo "$as_me:${as_lineno-$LINENO}: result: -** Configuration summary for $PACKAGE_STRING (2021/dev$with_banner_add): +** Configuration summary for $PACKAGE_STRING (2021$with_banner_add): $msg_compiling" >&5 $as_echo " -** Configuration summary for $PACKAGE_STRING (2021/dev$with_banner_add): +** Configuration summary for $PACKAGE_STRING (2021$with_banner_add): $msg_compiling" >&6; } case $kpse_src$kpse_bld in diff --git a/source/doc/ChangeLog b/source/doc/ChangeLog index aff2bbb51..b6fc24a84 100644 --- a/source/doc/ChangeLog +++ b/source/doc/ChangeLog @@ -1,3 +1,8 @@ +2021-02-09 Karl Berry + + * tlbuild.texi (Adding a new program module): emphasize requirement + for configure, etc., to be committed. + 2020-11-28 Karl Berry * tlbuild.texi (Adding a new program module): more explicit diff --git a/source/doc/tlbuild-incl/install-tl.texi b/source/doc/tlbuild-incl/install-tl.texi index 6e0e4d009..79876653e 100644 --- a/source/doc/tlbuild-incl/install-tl.texi +++ b/source/doc/tlbuild-incl/install-tl.texi @@ -81,46 +81,24 @@ following modules are supported: @item @code{text} @anchor{install-tl @code{text}} -The text mode user interface (default on Unix systems). Same as the -@code{-no-gui} option. +The text mode user interface (default on Unix systems, including Macs). +Same as the @code{-no-gui} option. -@item @code{tcl} -@anchor{install-tl @code{tcl}} +@item @code{tcl} (or "perltk" or "wizard" or "expert" or nothing) +@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. - -@item @code{wizard} -@anchor{install-tl @code{wizard}} - -The wizard mode user interface, asking only minimal questions before -installing all of TeX Live. - -@item @code{expert} -@anchor{install-tl @code{expert}} - -A generic name for, currently, @code{perltk}; it may select a different GUI -in the future. - -@item @code{perltk} -@anchor{install-tl @code{perltk}} - -The expert GUI installer, providing access to more options. +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 +@code{perltk} interface. @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 -@code{tcl} GUI. - -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. +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. @item @strong{-no-gui} @anchor{install-tl @strong{-no-gui}} @@ -130,10 +108,8 @@ Use the text mode installer (default except on Windows and Macs). @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 @@ will be adjusted accordingly. @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}, -@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 @@ building TeX Live, see @url{https://tug.org/texlive/build.html}. @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 @@ variables. Omit creating the ConTeXt cache. This is useful for redistributors. -@item @code{TEXLIVE_INSTALL_NO_IMPORT} -@anchor{install-tl @code{TEXLIVE_INSTALL_NO_IMPORT}} +@item @code{TEXLIVE_INSTALL_NO_RESUME} +@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 @@ asking about importing previous settings. Omit printing the welcome message after successful installation, e.g., when testing. +@item @code{TEXLIVE_INSTALL_PAPER} +@anchor{install-tl @code{TEXLIVE_INSTALL_PAPER}} + +Set the default paper size for all relevant programs; must be either +@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 @@ This script and its documentation were written for the TeX Live 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 $ diff --git a/source/doc/tlbuild-incl/tlmgr.texi b/source/doc/tlbuild-incl/tlmgr.texi index 690b33848..45a101110 100644 --- a/source/doc/tlbuild-incl/tlmgr.texi +++ b/source/doc/tlbuild-incl/tlmgr.texi @@ -244,6 +244,14 @@ necessarily completely translated) are: @w{English (en, default)}, tlshell shares its message catalog with tlmgr. +@item @strong{--command-logfile} @emph{file} +@anchor{tlmgr @strong{--command-logfile} @emph{file}} + +@code{tlmgr} logs the output of all programs invoked (mktexlr, mtxrun, fmtutil, +updmap) to a separate log file, by default +@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 @@ is available in a remote repository using @anchor{tlmgr @strong{--data @code{item1@comma{}item2@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}, -@code{shortdesc}, @code{longdesc}, @code{installed}, @code{size}, @code{relocatable}, @code{depends}, -@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}, +@code{remoterev}, @code{shortdesc}, @code{longdesc}, @code{installed}, @code{size}, +@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 +@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 +@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}, +@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 -@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 +@code{tlpkg/doc/JSON-formats.txt}, format definition: @code{TLPOBJINFO}. If both +@code{--json} and @code{--data} are given, @code{--json} takes precedence. @end table @@ -1842,12 +1865,12 @@ If the package on the server is older than the package already installed (e.g., if the selected mirror is out of date), @code{tlmgr} does not downgrade. Also, packages for uninstalled platforms are not installed. -@code{tlmgr} saves a copy of the @code{texlive.tlpdb} file used for an update -with a suffix representing the repository url, as in -@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., -@code{mirror.ctan.org} resolves to many different hosts, each resulting in -a possibly different hash), it's harmless to delete them. +@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 +@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 @@ The allowed keys are: @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.} +@item @code{tkfontscale}, value any float. Controls the scaling of fonts in the Tk based frontends. +@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 @@ This script and its documentation were written for the TeX Live 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 $ diff --git a/source/doc/tlbuild.info b/source/doc/tlbuild.info index c68d9ff2f..2a386027b 100644 --- a/source/doc/tlbuild.info +++ b/source/doc/tlbuild.info @@ -3,7 +3,7 @@ tlbuild.texi. This file documents the TeX Live build system and more. -Copyright (C) 2016-2020 Karl Berry. +Copyright (C) 2016-2021 Karl Berry. Copyright (C) 2013-2015 Karl Berry & Peter Breitenlohner. Permission is granted to make and distribute verbatim copies of this @@ -33,7 +33,7 @@ END-INFO-DIR-ENTRY  File: tlbuild.info, Node: Top, Next: Introduction, Up: (dir) -Building TeX Live (2020) +Building TeX Live (2021) ************************ For an overview of this manual, *note Introduction::. @@ -59,7 +59,7 @@ File: tlbuild.info, Node: Introduction, Next: Overview of build system, Prev: 1 Introduction ************** -This manual (dated November 2020) corresponds to the TeX Live 2020 +This manual (dated February 2021) corresponds to the TeX Live 2021 release. This manual is aimed at system installers and programmers, and @@ -1368,6 +1368,11 @@ package, 'svn add' the necessary files, including the generated 'autom4te.cache'. (This is so people checking out the TL source tree do not have to run any autotools, but can simply run 'configure'.) + To reiterate: do not fail to commit the generated 'configure' and +other files. The m4 code in 'kpse-pkgs.m4' uses the existence of +'configure' to determine whether to descend into (and configure) a given +subdirectory. + Then, run the TL tool 'reautoconf' in the top-level TL 'Build/source/' directory, to incorporate the new program into the build tree. It is good to then rebuild the whole tree (e.g., using TL's @@ -2295,40 +2300,22 @@ by either a space or '='. '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. - - 'wizard' - - 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. + options as the former 'perltk' interface. - 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. + 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. *-no-gui* @@ -2336,10 +2323,8 @@ by either a space or '='. *-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), @@ -2370,11 +2355,10 @@ by either a space or '='. 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* @@ -2401,9 +2385,10 @@ by either a space or '='. *-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_ @@ -2692,7 +2677,7 @@ user installations. 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. @@ -2702,6 +2687,11 @@ user installations. 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' @@ -2739,7 +2729,7 @@ This script and its documentation were written for the TeX Live 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 @@ -2978,6 +2968,13 @@ name and its value. 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 @@ -3524,10 +3521,26 @@ B.6.10 info 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* @@ -4460,12 +4473,12 @@ installed (e.g., if the selected mirror is out of date), 'tlmgr' does 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. @@ -4508,6 +4521,8 @@ ignored. All other lines must look like: '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. @@ -5324,7 +5339,7 @@ This script and its documentation were written for the TeX Live 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 @@ -5336,569 +5351,588 @@ Index * Menu: * --bindir configure option: --prefix --bindir .... - (line 6) + (line 6) * --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) + (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. - (line 9) + (line 9) * --disable-bibtexu: Configure options for texk/bibtex-x. - (line 12) + (line 12) * --disable-dump-share: Configure options for texk/web2c. - (line 27) + (line 27) * --disable-dvipdfmx: Configure options for texk/dvipdfm-x. - (line 12) + (line 12) * --disable-etex-synctex: Configure options for texk/web2c. - (line 59) + (line 59) * --disable-ipc: Configure options for texk/web2c. - (line 31) -* --disable-largefile: --disable-largefile. (line 6) + (line 31) +* --disable-largefile: --disable-largefile. (line 6) * --disable-linked-scripts: Configure options for texk/texlive. - (line 6) + (line 6) * --disable-mf-nowin: Configure options for texk/web2c. - (line 34) -* --disable-missing: --disable-missing. (line 6) + (line 34) +* --disable-missing: --disable-missing. (line 6) * --disable-native-texlive-build: --disable-native-texlive-build. - (line 6) + (line 6) * --disable-PROG: --enable-PROG --disable-PROG. - (line 6) + (line 6) * --disable-synctex: Configure options for texk/web2c. - (line 64) + (line 64) * --disable-tex: Configure options for texk/web2c. - (line 37) + (line 37) * --disable-web-progs: Configure options for texk/web2c. - (line 41) + (line 41) * --disable-xdvipdfmx: Configure options for texk/dvipdfm-x. - (line 15) + (line 15) * --enable-*win for Metafont window support: Configure options for texk/web2c. - (line 55) + (line 55) * --enable-auto-core: Configure options for texk/web2c. - (line 45) + (line 45) * --enable-compiler-warnings=LEVEL: --enable-compiler-warnings=LEVEL. - (line 6) -* --enable-cxx-runtime-hack: Macros for compilers. (line 29) + (line 6) +* --enable-cxx-runtime-hack: Macros for compilers. + (line 29) * --enable-etex: Configure options for texk/web2c. - (line 37) + (line 37) * --enable-libtool-hack: Configure options for texk/web2c. - (line 50) -* --enable-maintainer-mode: Build system tools. (line 28) + (line 50) +* --enable-maintainer-mode: Build system tools. (line 28) * --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) + (line 6) +* --enable-missing to ignore dependencies: Build one package. (line 71) +* --enable-mktextfm-default: kpathsea library. (line 18) * --enable-multiplatform: --enable-multiplatform. - (line 6) + (line 6) * --enable-PROG: --enable-PROG --disable-PROG. - (line 6) -* --enable-shared: --enable-shared. (line 6) + (line 6) +* --enable-shared: --enable-shared. (line 6) * --enable-silent-rules: --enable-silent-rules. - (line 6) + (line 6) * --enable-tex-synctex: Configure options for texk/web2c. - (line 59) + (line 59) * --enable-texlive-build: --disable-native-texlive-build. - (line 15) + (line 15) * --enable-xi2-scrolling: Configure options for texk/xdvik. - (line 13) + (line 13) * --enable-xindy-docs: Configure options for utils/xindy. - (line 10) + (line 10) * --enable-xindy-rules: Configure options for utils/xindy. - (line 6) -* --host=HOST: Cross configuring. (line 6) + (line 6) +* --host=HOST: Cross configuring. (line 6) * --libdir configure option: --enable-multiplatform. - (line 6) -* --no-clean Build option: Build problems. (line 6) + (line 6) +* --no-clean Build option: Build problems. (line 6) * --prefix configure option: --prefix --bindir .... - (line 6) + (line 6) * --with-banner-add=STR: Configure options for texk/web2c. - (line 6) + (line 6) * --with-clisp-runtime=FILENAME: Configure options for utils/xindy. - (line 14) + (line 14) * --with-editor=CMD: Configure options for texk/web2c. - (line 11) + (line 11) * --with-fontconfig-includes=DIR: Configure options for texk/web2c. - (line 16) + (line 16) * --with-fontconfig-libdir=DIR: Configure options for texk/web2c. - (line 16) + (line 16) * --with-gs=FILENAME: Configure options for texk/xdvik. - (line 6) + (line 6) * --with-LIB-includes=DIR, -libdir: Library-specific configure options. - (line 16) + (line 16) * --with-libgs-includes, -libdir: Configure options for texk/dvisvgm. - (line 17) -* --with-system-kpathsea: kpathsea library. (line 13) + (line 17) +* --with-system-kpathsea: kpathsea library. (line 13) * --with-system-LIB: Adding a new generic library module. - (line 34) + (line 34) * --with-system-LIB <1>: Library-specific configure options. - (line 9) + (line 9) * --with-system-libgs: Configure options for texk/dvisvgm. - (line 6) -* --with-xdvi-x-toolkit: xdvik package. (line 21) + (line 6) +* --with-xdvi-x-toolkit: xdvik package. (line 21) * --with-xdvi-x-toolkit=KIT: Configure options for texk/xdvik. - (line 9) + (line 9) * --without-libgs: Configure options for texk/dvisvgm. - (line 12) -* --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) + (line 12) +* --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. - (line 42) -* adapting TeX Live for distros: Distro builds. (line 54) + (line 42) +* adapting TeX Live for distros: Distro builds. (line 54) * adding a new generic library: Adding a new generic library module. - (line 6) + (line 6) * adding a new program: Adding a new program module. - (line 6) + (line 6) * adding a new TeX-specific library: Adding a new TeX-specific library module. - (line 6) -* adding to TeX Live: Extending TeX Live. (line 6) + (line 6) +* adding to TeX Live: Extending TeX Live. (line 6) * am/ top-level directory: Top-level directories. - (line 14) + (line 14) * ANSI C: Declarations and definitions. - (line 6) + (line 6) * ApplicationServices Mac framework, required by xetex: Prerequisites. - (line 31) -* asymptote: Linked scripts. (line 23) -* asymptote <1>: asymptote. (line 6) + (line 31) +* asymptote: Linked scripts. (line 23) +* asymptote <1>: asymptote. (line 6) * Autoconf: Overview of build system. - (line 6) -* autoconf macros: Autoconf macros. (line 6) + (line 6) +* autoconf macros: Autoconf macros. (line 6) * Automake: Overview of build system. - (line 6) + (line 6) * autoreconf, for new program: Adding a new program module. - (line 76) -* biber: Linked scripts. (line 23) + (line 76) +* biber: Linked scripts. (line 23) * bibtex-x: Configure options for texk/bibtex-x. - (line 6) + (line 6) * bibtex8: Configure options for texk/bibtex-x. - (line 6) + (line 6) * bibtexu: Configure options for texk/bibtex-x. - (line 6) -* BSD distro: Distro builds. (line 6) -* build directory, required: Building. (line 17) -* build iteration: Build iteration. (line 6) -* build on demand: Build one package. (line 6) -* build one engine: Build one engine. (line 6) -* build one package: Build one package. (line 6) -* build problems: Build problems. (line 6) -* Build script: Building. (line 6) + (line 6) +* BSD distro: Distro builds. (line 6) +* build directory, required: Building. (line 17) +* build iteration: Build iteration. (line 6) +* build on demand: Build one package. (line 6) +* build one engine: Build one engine. (line 6) +* build one package: Build one package. (line 6) +* build problems: Build problems. (line 6) +* Build script: Building. (line 6) * build system, design of: Overview of build system. - (line 6) + (line 6) * build-aux/ top-level directory: Top-level directories. - (line 30) -* BUILDCC, BUILDCFLAGS, ...: Cross configuring. (line 42) -* building: Building. (line 6) -* building a distribution: Build distribution. (line 6) -* building in parallel: Build in parallel. (line 6) -* C++11, removing dependent sources: Build one package. (line 64) -* C++11, required: Prerequisites. (line 15) + (line 30) +* BUILDCC, BUILDCFLAGS, ...: Cross configuring. (line 42) +* building: Building. (line 6) +* building a distribution: Build distribution. (line 6) +* building in parallel: Build in parallel. (line 6) +* C++11, removing dependent sources: Build one package. (line 64) +* C++11, required: Prerequisites. (line 15) * C, ANSI, required: Declarations and definitions. - (line 6) + (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) -* callexe.c: Macros for Windows. (line 32) + (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) -* CC=C-COMPILER: Build one package. (line 78) -* CC_BUILD: Cross problems. (line 13) + (line 10) +* CC=C-COMPILER: Build one package. (line 78) +* CC_BUILD: Cross problems. (line 13) * ChangeLog: Adding a new program module. - (line 73) + (line 73) * chktex: Declarations and definitions. - (line 18) + (line 18) * clisp: Variables for configure. - (line 18) + (line 18) * CLISP: Variables for configure. - (line 17) + (line 17) * 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) -* coding conventions: Coding conventions. (line 6) -* compilers, C and C++11: Prerequisites. (line 6) + (line 14) +* 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) + (line 30) +* configure options: Configure options. (line 6) * configure options, for bibtex-x: Configure options for texk/bibtex-x. - (line 6) + (line 6) * configure options, for dvipdfm-x: Configure options for texk/dvipdfm-x. - (line 6) + (line 6) * configure options, for dvisvgm: Configure options for texk/dvisvgm. - (line 6) + (line 6) * configure options, for kpathsea: Configure options for kpathsea. - (line 6) + (line 6) * configure options, for texk/texlive: Configure options for texk/texlive. - (line 6) + (line 6) * configure options, for web2c: Configure options for texk/web2c. - (line 6) + (line 6) * configure options, for xdvik: Configure options for texk/xdvik. - (line 6) + (line 6) * configure options, for xindy: Configure options for utils/xindy. - (line 6) + (line 6) * configure options, global: Global configure options. - (line 6) + (line 6) * configure options, library-specific: Library-specific configure options. - (line 6) + (line 6) * configure options, program-specific: Program-specific configure options. - (line 6) + (line 6) * configure variables: Variables for configure. - (line 6) + (line 6) * configure.ac: Adding a new program module. - (line 45) -* configuring, for cross compilation: Cross configuring. (line 6) -* const: Const. (line 6) + (line 45) +* configuring, for cross compilation: Cross configuring. (line 6) +* const: Const. (line 6) * continuous integration: Continuous integration. - (line 6) -* conventions, coding: Coding conventions. (line 6) + (line 6) +* conventions, coding: Coding conventions. (line 6) * CPPFLAGS: Variables for configure. - (line 12) -* 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) -* ctangle: Cross problems. (line 26) + (line 12) +* 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) +* ctangle: Cross problems. (line 26) * CXX: Variables for configure. - (line 11) -* CXX=C++-COMPILER: Build one package. (line 78) + (line 11) +* CXX=C++-COMPILER: Build one package. (line 78) * declarations and definitions, in source code: Declarations and definitions. - (line 6) + (line 6) * declarations before statements, avoiding: Declarations and definitions. - (line 6) -* dependencies, with several output files: Build in parallel. (line 6) + (line 6) +* dependencies, with several output files: Build in parallel. (line 6) * DESTDIR: --prefix --bindir .... - (line 9) + (line 9) * directories, for installation: Installation directories. - (line 6) + (line 6) * directories, top-level: Top-level directories. - (line 6) -* discards qualifiers warning: Const. (line 30) -* dist and distcheck targets for make: Build distribution. (line 6) -* distribution tarball, making: Build distribution. (line 6) -* distro, building for: Distro builds. (line 6) + (line 6) +* discards qualifiers warning: Const. (line 30) +* 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. - (line 6) + (line 6) * dvipdfmx: Configure options for texk/dvipdfm-x. - (line 6) + (line 6) * dvisvgm: Configure options for texk/dvisvgm. - (line 6) + (line 6) * engine, adding new: Adding a new program module. - (line 99) -* engine, building one: Build one engine. (line 6) -* environment variables, for configure: Configure options. (line 16) + (line 104) +* engine, building one: Build one engine. (line 6) +* environment variables, for configure: Configure options. (line 16) * exec_prefix: --enable-multiplatform. - (line 6) -* extending TeX Live: Extending TeX Live. (line 6) + (line 6) +* extending TeX Live: Extending TeX Live. (line 6) * extern functions: Declarations and definitions. - (line 41) -* failure to build: Build problems. (line 6) + (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) -* FreeType: Prerequisites. (line 11) -* freetype cross compiling: Cross problems. (line 13) -* freetype library: freetype library. (line 6) -* freetype-config: freetype library. (line 13) + (line 6) +* 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-config <1>: Variables for configure. - (line 24) + (line 24) * FT2_CONFIG: Variables for configure. - (line 21) -* gcc, default compilers: Build one package. (line 78) -* general setup macros: General setup macros. (line 6) + (line 21) +* gcc, default compilers: Build one package. (line 78) +* general setup macros: General setup macros. + (line 6) * generic library module, adding: Adding a new generic library module. - (line 6) + (line 6) * Ghostscript location for Xdvik: Configure options for texk/xdvik. - (line 6) + (line 6) * git-svn: Transfer from Subversion to Github. - (line 6) + (line 6) * global configure options: Global configure options. - (line 6) -* 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) + (line 6) +* 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. - (line 30) -* ICU cross compiling: Cross problems. (line 20) + (line 30) +* ICU cross compiling: Cross problems. (line 20) * ICU libraries: Variables for configure. - (line 24) + (line 24) * icu-config: Variables for configure. - (line 24) + (line 24) * ICU_CONFIG: Variables for configure. - (line 22) -* infrastructure, tools needed for: Build system tools. (line 6) + (line 22) +* infrastructure, tools needed for: Build system tools. (line 6) * inst/ top-level directory: Top-level directories. - (line 39) -* install-tl, TeX Live installer: Installing. (line 8) + (line 39) +* install-tl, TeX Live installer: Installing. (line 8) * installation directories: Installation directories. - (line 6) -* installing: Installing. (line 6) + (line 6) +* installing: Installing. (line 6) * interprocess communication: Configure options for texk/web2c. - (line 31) -* introduction: Introduction. (line 6) + (line 31) +* introduction: Introduction. (line 6) * 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) + (line 6) +* 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) + (line 30) +* kpse-zlib-flags.m4: zlib library. (line 6) * kpsewhich: Variables for configure. - (line 30) + (line 30) * KPSEWHICH: Variables for configure. - (line 29) + (line 29) * KPSE_ADD_FLAGS: Macros for library and header flags. - (line 20) + (line 20) * KPSE_ALL_SYSTEM_FLAGS: Adding a new generic library module. - (line 34) -* KPSE_BASIC: General setup macros. (line 8) -* KPSE_CHECK_LATEX: Macros for programs. (line 8) -* KPSE_CHECK_PDFLATEX: Macros for programs. (line 15) -* KPSE_CHECK_PERL: Macros for programs. (line 18) -* KPSE_CHECK_WIN32: Macros for Windows. (line 9) -* KPSE_COMMON: General setup macros. (line 16) -* KPSE_COMPILER_VISIBILITY: Macros for compilers. (line 18) -* KPSE_COMPILER_WARNINGS: Macros for compilers. (line 8) -* KPSE_COND_MINGW32: Macros for Windows. (line 19) -* KPSE_COND_WIN32: Macros for Windows. (line 15) -* KPSE_COND_WIN32_WRAP: Macros for Windows. (line 24) -* kpse_cv_cxx_hack: Macros for compilers. (line 33) -* kpse_cv_have_win32: Macros for Windows. (line 10) -* kpse_cv_visibility_c[xx]flags: Macros for compilers. (line 25) -* kpse_cv_warning_cflags: Macros for compilers. (line 15) -* KPSE_CXX_HACK: Macros for compilers. (line 28) + (line 34) +* KPSE_BASIC: General setup macros. + (line 8) +* KPSE_CHECK_LATEX: Macros for programs. (line 8) +* KPSE_CHECK_PDFLATEX: Macros for programs. (line 15) +* KPSE_CHECK_PERL: Macros for programs. (line 18) +* KPSE_CHECK_WIN32: Macros for Windows. (line 9) +* KPSE_COMMON: General setup macros. + (line 16) +* KPSE_COMPILER_VISIBILITY: Macros for compilers. + (line 18) +* KPSE_COMPILER_WARNINGS: Macros for compilers. + (line 8) +* KPSE_COND_MINGW32: Macros for Windows. (line 19) +* KPSE_COND_WIN32: Macros for Windows. (line 15) +* KPSE_COND_WIN32_WRAP: Macros for Windows. (line 24) +* kpse_cv_cxx_hack: Macros for compilers. + (line 33) +* kpse_cv_have_win32: Macros for Windows. (line 10) +* kpse_cv_visibility_c[xx]flags: Macros for compilers. + (line 25) +* kpse_cv_warning_cflags: Macros for compilers. + (line 15) +* KPSE_CXX_HACK: Macros for compilers. + (line 28) * KPSE_ENABLE_PROG: Adding a new program module. - (line 14) -* KPSE_LARGEFILE: Macros for libraries. (line 8) + (line 14) +* KPSE_LARGEFILE: Macros for libraries. + (line 8) * KPSE_LIBPNG_FLAGS: Macros for library and header flags. - (line 10) -* KPSE_LIBPNG_FLAGS <1>: png library. (line 46) + (line 10) +* KPSE_LIBPNG_FLAGS <1>: png library. (line 46) * kpse_libs_pkgs: Adding a new generic library module. - (line 6) + (line 6) * KPSE_LIB_FLAGS: Macros for library and header flags. - (line 6) + (line 6) * KPSE_LIB_FLAGS <1>: Adding a new generic library module. - (line 26) + (line 26) * KPSE_LIB_SYSTEM_FLAGS: Adding a new generic library module. - (line 34) -* KPSE_PROG_LEX: Macros for programs. (line 21) + (line 34) +* KPSE_PROG_LEX: Macros for programs. (line 21) * KPSE_RESTORE_FLAGS: Macros for library and header flags. - (line 24) + (line 24) * kpse_texk_pkgs: Adding a new program module. - (line 6) + (line 6) * kpse_texlibs_pkgs: Adding a new TeX-specific library module. - (line 11) -* KPSE_TRY_LIB: png library. (line 18) + (line 11) +* 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) + (line 20) +* KPSE_TRY_LIBXX: png library. (line 31) * KPSE_TRY_LIBXX <1>: Adding a new generic library module. - (line 20) + (line 20) * kpse_utils_pkgs: Adding a new program module. - (line 10) -* KPSE_WIN32_CALL: Macros for Windows. (line 31) + (line 10) +* KPSE_WIN32_CALL: Macros for Windows. (line 31) * KPSE_WITH_LIB: Adding a new generic library module. - (line 11) + (line 11) * KPSE_WITH_TEXLIB: Adding a new TeX-specific library module. - (line 14) -* large file support: --disable-largefile. (line 6) + (line 14) +* large file support: --disable-largefile. (line 6) * LATEX: Variables for configure. - (line 40) + (line 40) * layout of sources: Layout and infrastructure. - (line 6) -* LFS (large file support): --disable-largefile. (line 6) + (line 6) +* LFS (large file support): --disable-largefile. (line 6) * libexpat, dependency of libfontconfig: Configure options for texk/web2c. - (line 50) + (line 50) * libfontconfig, hack for avoiding linking dependencies: Configure options for texk/web2c. - (line 50) + (line 50) * libfreetype: Variables for configure. - (line 24) -* libfreetype, and const: Const. (line 21) -* libpng library: png library. (line 6) + (line 24) +* libfreetype, and const: Const. (line 21) +* libpng library: png library. (line 6) * library module, generic, adding: Adding a new generic library module. - (line 6) + (line 6) * library module, TeX-specific, adding: Adding a new TeX-specific library module. - (line 6) -* library modules: Library modules. (line 6) + (line 6) +* library modules: Library modules. (line 6) * library-specific configure options: Library-specific configure options. - (line 6) -* libsigsegv, required by xindy: Prerequisites. (line 35) -* libstc++, statically linking: Macros for compilers. (line 29) + (line 6) +* libsigsegv, required by xindy: Prerequisites. (line 35) +* libstc++, statically linking: Macros for compilers. + (line 29) * Libtool: Overview of build system. - (line 6) + (line 6) * libtool, hack for avoiding excessive linking: Configure options for texk/web2c. - (line 50) + (line 50) * libXt: Configure options for texk/web2c. - (line 22) -* linked scripts: Linked scripts. (line 6) -* linking C++ libraries statically: Macros for compilers. (line 29) + (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. - (line 14) + (line 14) * LittleEndian architectures: Configure options for texk/web2c. - (line 27) + (line 27) * m4/ top-level directory: Top-level directories. - (line 14) -* macros, for compilers: Macros for compilers. (line 6) -* macros, for libraries: Macros for libraries. (line 6) + (line 14) +* macros, for compilers: Macros for compilers. + (line 6) +* macros, for libraries: Macros for libraries. + (line 6) * macros, for library and header flags: Macros for library and header flags. - (line 6) -* macros, for programs: Macros for programs. (line 6) -* macros, for Windows: Macros for Windows. (line 6) -* macros, general setup: General setup macros. (line 6) + (line 6) +* macros, for programs: Macros for programs. (line 6) +* macros, for Windows: Macros for Windows. (line 6) +* macros, general setup: General setup macros. + (line 6) * MAKE: Variables for configure. - (line 33) -* make -t: Build system tools. (line 43) + (line 33) +* make -t: Build system tools. (line 43) * make rules, verbose vs. silent: --enable-silent-rules. - (line 6) + (line 6) * Makefile.am: Adding a new program module. - (line 46) + (line 46) * mf-nowin: Configure options for texk/web2c. - (line 34) -* mingw32: Cross configuring. (line 27) -* MINGW32, Automake conditional: Macros for Windows. (line 20) -* 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) + (line 34) +* mingw32: Cross configuring. (line 27) +* MINGW32, Automake conditional: Macros for Windows. (line 20) +* 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. - (line 9) -* native cross compilation: Cross compilation. (line 10) + (line 9) +* native cross compilation: Cross compilation. (line 10) * NEWPROG-SRC, original source subdirectory: Adding a new program module. - (line 33) -* 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) -* operating system distribution, building for: Distro builds. (line 6) -* otangle: Cross problems. (line 26) -* overall build process: Building. (line 6) -* parallel build: Build in parallel. (line 6) + (line 33) +* 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) +* operating system distribution, building for: Distro builds. (line 6) +* otangle: Cross problems. (line 26) +* overall build process: Building. (line 6) +* parallel build: Build in parallel. (line 6) * paths, for installation: Installation directories. - (line 6) -* PDF files, size of: --disable-largefile. (line 11) + (line 6) +* PDF files, size of: --disable-largefile. (line 11) * PDFLATEX: Variables for configure. - (line 41) + (line 41) * PERL: Variables for configure. - (line 39) -* perl, required by web2c, etc.: Prerequisites. (line 23) + (line 39) +* 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) -* Preining, Norbert: Distro builds. (line 54) + (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) +* Preining, Norbert: Distro builds. (line 54) * preloaded binaries: Configure options for texk/web2c. - (line 45) -* prerequisites for building: Prerequisites. (line 6) -* problems with build: Build problems. (line 6) + (line 45) +* prerequisites for building: Prerequisites. (line 6) +* problems with build: Build problems. (line 6) * program module, adding: Adding a new program module. - (line 6) -* program modules: Program modules. (line 6) + (line 6) +* program modules: Program modules. (line 6) * program-specific configure options: Program-specific configure options. - (line 6) -* proxy build system: png library. (line 36) -* reautoconf: Build system tools. (line 28) + (line 6) +* proxy build system: png library. (line 36) +* reautoconf: Build system tools. (line 28) * reautoconf, for new program: Adding a new program module. - (line 84) -* requirements for building: Prerequisites. (line 6) -* runscript.exe: Macros for Windows. (line 25) -* scripts, linked and not maintained: Linked scripts. (line 6) + (line 89) +* 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. - (line 13) + (line 13) * SED: Variables for configure. - (line 34) -* 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 source tree: Build one package. (line 53) + (line 34) +* 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 source tree: Build one package. (line 53) * source code declarations: Declarations and definitions. - (line 6) -* source directory building, not supported: Building. (line 17) + (line 6) +* source directory building, not supported: Building. (line 17) * source tree: Layout and infrastructure. - (line 6) -* squeeze: Cross problems. (line 13) -* squeeze/configure.ac: xdvik package. (line 14) + (line 6) +* squeeze: Cross problems. (line 13) +* squeeze/configure.ac: xdvik package. (line 14) * static functions: Declarations and definitions. - (line 35) -* static linking for C++: Macros for compilers. (line 29) + (line 35) +* static linking for C++: Macros for compilers. + (line 29) * stpcpy: Declarations and definitions. - (line 18) -* Subversion repository: Build system tools. (line 38) -* support files, separate from build: Installing. (line 8) -* symlinks, used for scripts: Linked scripts. (line 6) + (line 18) +* 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. - (line 59) + (line 59) * synctex <1>: Configure options for texk/web2c. - (line 64) -* system distribution, building for: Distro builds. (line 6) -* t1utils package: t1utils package. (line 6) -* tangle: Cross problems. (line 26) + (line 64) +* system distribution, building for: Distro builds. (line 6) +* t1utils package: t1utils package. (line 6) +* tangle: Cross problems. (line 26) * tests, running: Overview of build system. - (line 6) + (line 6) * TeX-specific library module, adding: Adding a new TeX-specific library module. - (line 6) -* texlive.tlpdb, TeX Live database: Installing. (line 8) -* tie: Cross problems. (line 26) -* timestamps, in repository: Build system tools. (line 38) + (line 6) +* texlive.tlpdb, TeX Live database: Installing. (line 8) +* tie: Cross problems. (line 26) +* timestamps, in repository: Build system tools. (line 38) * TLpatches/patch-...: Adding a new program module. - (line 68) + (line 68) * TLpatches/TL-Changes: Adding a new program module. - (line 64) -* tools, for building: Build system tools. (line 6) + (line 64) +* tools, for building: Build system tools. (line 6) * top-level directories: Top-level directories. - (line 6) -* touching files to avoid rerunning: Build system tools. (line 43) + (line 6) +* touching files to avoid rerunning: Build system tools. (line 43) * Travis-CI: Continuous integration. - (line 6) + (line 6) * travis.yml: CI testing on Travis-CI. - (line 6) -* type cast from const, avoiding: Const. (line 38) -* use-commit-times, Subversion: Build system tools. (line 38) + (line 6) +* type cast from const, avoiding: Const. (line 38) +* use-commit-times, Subversion: Build system tools. (line 38) * variable declarations, in source code: Declarations and definitions. - (line 52) + (line 52) * 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) + (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. - (line 37) -* wget: Linked scripts. (line 23) -* WIN32, Automake conditional: Macros for Windows. (line 16) -* WIN32_WRAP, Automake conditional: Macros for Windows. (line 25) -* Windows, invoking scripts on: Linked scripts. (line 6) -* Windows, macros for: Macros for Windows. (line 6) + (line 37) +* wget: Linked scripts. (line 23) +* WIN32, Automake conditional: Macros for Windows. (line 16) +* WIN32_WRAP, Automake conditional: Macros for Windows. (line 25) +* Windows, invoking scripts on: Linked scripts. (line 6) +* Windows, macros for: Macros for Windows. (line 6) * withenable.ac, for new modules: Adding a new program module. - (line 14) + (line 14) * 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) + (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. - (line 22) -* X11 development, required by X clients: Prerequisites. (line 27) -* X11 headers, and const: Const. (line 21) -* xasy: asymptote. (line 6) + (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. - (line 9) -* xdvik: xdvik package. (line 6) + (line 9) +* xdvik: xdvik package. (line 6) * xdvik <1>: Configure options for texk/xdvik. - (line 6) + (line 6) * xdvipdfmx: Configure options for texk/dvipdfm-x. - (line 6) -* xindy: Linked scripts. (line 23) -* xindy <1>: xindy package. (line 6) + (line 6) +* xindy: Linked scripts. (line 23) +* xindy <1>: xindy package. (line 6) * xindy <2>: Configure options for utils/xindy. - (line 6) -* xindy cross compiling requires clisp: Cross problems. (line 33) + (line 6) +* xindy cross compiling requires clisp: Cross problems. (line 33) * XInput: Configure options for texk/xdvik. - (line 13) + (line 13) * Xlib: Configure options for texk/web2c. - (line 22) -* xz: Linked scripts. (line 23) -* zlib library: zlib library. (line 6) + (line 22) +* xz: Linked scripts. (line 23) +* zlib library: zlib library. (line 6)  @@ -5943,362 +5977,362 @@ Node: xdvik package49777 Node: asymptote50836 Node: Extending TeX Live51332 Node: Adding a new program module52115 -Node: Adding a new generic library module57025 -Node: Adding a new TeX-specific library module59254 -Node: Configure options59952 -Node: Global configure options61333 -Node: --disable-native-texlive-build61875 -Node: --prefix --bindir ...62837 -Node: --disable-largefile63377 -Node: --disable-missing63919 -Node: --enable-compiler-warnings=LEVEL64320 -Node: --enable-cxx-runtime-hack64976 -Node: --enable-maintainer-mode65396 -Node: --enable-multiplatform65925 -Node: --enable-shared66498 -Node: --enable-silent-rules66869 -Node: --without-ln-s67321 -Node: --without-x67668 -Node: Program-specific configure options67856 -Node: --enable-PROG --disable-PROG68499 -Node: --disable-all-pkgs68772 -Node: Configure options for texk/web2c69555 -Node: Configure options for texk/bibtex-x72093 -Node: Configure options for texk/dvipdfm-x72636 -Node: Configure options for texk/dvisvgm73412 -Node: Configure options for texk/texlive74293 -Node: Configure options for texk/xdvik74714 -Node: Configure options for utils/xindy75335 -Node: Library-specific configure options76225 -Node: Configure options for kpathsea77186 -Node: Variables for configure77890 -Node: Coding conventions79316 -Node: Declarations and definitions80031 -Node: Const82205 -Node: Continuous integration84069 -Node: Transfer from Subversion to Github84733 -Node: Automatic update of the Git mirror86895 -Node: CI testing on Travis-CI87477 -Node: Releases on Github88186 -Node: install-tl88626 -Node: install-tl NAME88995 -Node: install-tl SYNOPSIS89153 -Node: install-tl DESCRIPTION89411 -Node: install-tl REFERENCES90471 -Node: install-tl OPTIONS90995 -Ref: install-tl *-gui* [[=]_module_]91336 -Ref: install-tl text91544 -Ref: install-tl tcl91664 -Ref: install-tl wizard92006 -Ref: install-tl expert92139 -Ref: install-tl perltk92261 -Ref: install-tl *-no-gui*92807 -Ref: install-tl *-lang* _llcode_92897 -Ref: install-tl *-repository* _url|path_93653 -Ref: install-tl *-select-repository*94541 -Ref: install-tl *-all-options*94977 -Ref: install-tl *-custom-bin* _path_95232 -Ref: install-tl *-debug-translation*96066 -Ref: install-tl *-force-platform* _platform_96285 -Ref: install-tl *-help*, *--help*, *-?*96529 -Ref: install-tl *-in-place*96942 -Ref: install-tl *-init-from-profile* _profile_file_97487 -Ref: install-tl *-logfile* _file_97756 -Ref: install-tl *-no-cls*98107 -Ref: install-tl *-no-persistent-downloads*98255 -Ref: install-tl *-persistent-downloads*98280 -Ref: install-tl *-no-verify-downloads*98898 -Ref: install-tl *-non-admin*99261 -Ref: install-tl *-portable*99354 -Ref: install-tl *-print-platform*99493 -Ref: install-tl *-profile* _profile_file_99691 -Ref: install-tl *-q*99912 -Ref: install-tl *-scheme* _scheme_99974 -Ref: install-tl *-v*100448 -Ref: install-tl *-version*, *--version*100603 -Node: install-tl PROFILES100737 -Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)103603 -Ref: install-tl instopt_adjustrepo (default 1)103679 -Ref: install-tl instopt_letter (default 0)103816 -Ref: install-tl instopt_portable (default 0)103907 -Ref: install-tl instopt_write18_restricted (default 1)104003 -Node: install-tl ENVIRONMENT VARIABLES105342 -Ref: install-tl TEXLIVE_DOWNLOADER105720 -Ref: install-tl TL_DOWNLOAD_PROGRAM105743 -Ref: install-tl TL_DOWNLOAD_ARGS105763 -Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK105967 -Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE106169 -Ref: install-tl TEXLIVE_INSTALL_NO_IMPORT106278 -Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME106430 -Ref: install-tl TEXLIVE_INSTALL_PREFIX106552 -Ref: install-tl TEXLIVE_INSTALL_TEXDIR106578 -Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG106609 -Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR106637 -Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME106666 -Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL106696 -Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG106730 -Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR106761 -Ref: install-tl NOPERLDOC107132 -Node: install-tl AUTHORS AND COPYRIGHT107196 -Node: tlmgr107609 -Node: tlmgr NAME108094 -Node: tlmgr SYNOPSIS108226 -Node: tlmgr DESCRIPTION108416 -Node: tlmgr EXAMPLES109515 -Ref: tlmgr tlmgr option repository ctan109766 -Ref: tlmgr tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet109838 -Ref: tlmgr tlmgr update --list110443 -Ref: tlmgr tlmgr update --all110536 -Ref: tlmgr tlmgr info _what_110693 -Node: tlmgr OPTIONS110955 -Ref: tlmgr *--repository* _url|path_111475 -Ref: tlmgr /some/local/dir112661 -Ref: tlmgr file:/some/local/dir112690 -Ref: tlmgr ctan112763 -Ref: tlmgr http://mirror.ctan.org/systems/texlive/tlnet112816 -Ref: tlmgr http://server/path/to/tlnet113157 -Ref: tlmgr https://server/path/to/tlnet113538 -Ref: tlmgr ftp://server/path/to/tlnet114006 -Ref: tlmgr user@machine:/path/to/tlnet114138 -Ref: tlmgr scp://user@machine/path/to/tlnet114179 -Ref: tlmgr ssh://user@machine/path/to/tlnet114220 -Ref: tlmgr *--gui* [_action_]114613 -Ref: tlmgr *--gui-lang* _llcode_115426 -Ref: tlmgr *--debug-translation*116162 -Ref: tlmgr *--machine-readable*116365 -Ref: tlmgr *--no-execute-actions*116633 -Ref: tlmgr *--package-logfile* _file_116826 -Ref: tlmgr *--pause*117080 -Ref: tlmgr *--persistent-downloads*117235 -Ref: tlmgr *--no-persistent-downloads*117263 -Ref: tlmgr *--pin-file*117757 -Ref: tlmgr *--usermode*117975 -Ref: tlmgr *--usertree* _dir_118095 -Ref: tlmgr *--verify-repo=[none|main|all]*118221 -Node: tlmgr ACTIONS119120 -Node: tlmgr help119981 -Node: tlmgr version120458 -Node: tlmgr backup120721 -Ref: tlmgr *backup [_option_...] --all*120892 -Ref: tlmgr *backup [_option_...] _pkg_...*120925 -Ref: tlmgr *--backupdir* _directory_121991 -Ref: tlmgr *--all*122208 -Ref: tlmgr *--clean*[=_N_]122460 -Ref: tlmgr *--dry-run*122787 -Node: tlmgr candidates _pkg_122917 -Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]123272 -Ref: tlmgr *depends*123786 -Ref: tlmgr *executes*124128 -Ref: tlmgr *files*124243 -Ref: tlmgr *runfiles*124379 -Ref: tlmgr *texmfdbs*124516 -Ref: tlmgr - all items in TEXMFDBS have the !! prefix.124746 -Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).124822 -Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.124887 -Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.124962 -Ref: tlmgr *--use-svn*124987 -Node: tlmgr conf125128 -Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*125416 -Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*125480 -Node: tlmgr dump-tlpdb [_option_...] [--json]127895 -Ref: tlmgr *--local*128328 -Ref: tlmgr *--remote*128367 -Ref: tlmgr *--json*128405 -Node: tlmgr generate128976 -Ref: tlmgr *generate [_option_...] language*129172 -Ref: tlmgr *generate [_option_...] language.dat*129211 -Ref: tlmgr *generate [_option_...] language.def*129250 -Ref: tlmgr *generate [_option_...] language.dat.lua*129293 -Ref: tlmgr *--dest* _output_file_131620 -Ref: tlmgr *--localcfg* _local_conf_file_132196 -Ref: tlmgr *--rebuild-sys*132319 -Node: tlmgr gui133134 -Node: tlmgr info133312 -Ref: tlmgr *info [_option_...] _pkg_...*133474 -Ref: tlmgr *info [_option_...] collections*133508 -Ref: tlmgr *info [_option_...] schemes*133538 -Ref: tlmgr *--list*135068 -Ref: tlmgr *--only-installed*135382 -Ref: tlmgr *--only-remote*135570 -Ref: tlmgr *--data item1,item2,...*135874 -Ref: tlmgr *--json* 1136455 -Node: tlmgr init-usertree136838 -Node: tlmgr install [_option_...] _pkg_...137219 -Ref: tlmgr *--dry-run* 1137727 -Ref: tlmgr *--file*137844 -Ref: tlmgr *--force*138066 -Ref: tlmgr *--no-depends*138286 -Ref: tlmgr *--no-depends-at-all*138445 -Ref: tlmgr *--reinstall*138845 -Ref: tlmgr *--with-doc*139223 -Ref: tlmgr *--with-src*139236 -Node: tlmgr key139964 -Ref: tlmgr *key list*140122 -Ref: tlmgr *key add _file_*140140 -Ref: tlmgr *key remove _keyid_*140162 -Node: tlmgr list140756 -Node: tlmgr option140918 -Ref: tlmgr *option [--json] [show]*141073 -Ref: tlmgr *option [--json] showall|help*141104 -Ref: tlmgr *option _key_ [_value_]*141130 -Node: tlmgr paper145708 -Ref: tlmgr *paper [a4|letter]*145857 -Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>145933 -Ref: tlmgr *paper --json*145948 -Node: tlmgr path147163 -Ref: tlmgr *path [--w32mode=user|admin] add*147324 -Ref: tlmgr *path [--w32mode=user|admin] remove*147361 -Node: tlmgr pinning148846 -Ref: tlmgr pinning show149087 -Ref: tlmgr pinning add _repo_ _pkgglob_...149160 -Ref: tlmgr pinning remove _repo_ _pkgglob_...149279 -Ref: tlmgr pinning remove _repo_ --all149432 -Node: tlmgr platform149486 -Ref: tlmgr *platform list|add|remove _platform_...*149672 -Ref: tlmgr *platform set _platform_*149699 -Ref: tlmgr *platform set auto*149720 -Ref: tlmgr *--dry-run* 2150597 -Node: tlmgr postaction150716 -Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*150946 -Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*151020 -Ref: tlmgr *--w32mode=[user|admin]*151335 -Ref: tlmgr *--fileassocmode=[1|2]*151751 -Ref: tlmgr *--all* 1152036 -Node: tlmgr print-platform152091 -Node: tlmgr print-platform-info152422 -Node: tlmgr remove [_option_...] _pkg_...152722 -Ref: tlmgr *--all* 2153206 -Ref: tlmgr *--backup*153316 -Ref: tlmgr *--backupdir* _directory_ 1153342 -Ref: tlmgr *--no-depends* 1153747 -Ref: tlmgr *--no-depends-at-all* 1153809 -Ref: tlmgr *--force* 1153912 -Ref: tlmgr *--dry-run* 3154385 -Node: tlmgr repository154721 -Ref: tlmgr *repository list*154909 -Ref: tlmgr *repository list _path|url|tag_*154943 -Ref: tlmgr *repository add _path_ [_tag_]*154976 -Ref: tlmgr *repository remove _path|tag_*155008 -Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*155062 -Ref: tlmgr *repository status*155083 -Ref: tlmgr The tag (which can be the same as the url);156310 -Node: tlmgr restore156788 -Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*156967 -Ref: tlmgr *restore [_option_...] --all*156997 -Ref: tlmgr *--all* 3157697 -Ref: tlmgr *--backupdir* _directory_ 2157911 -Ref: tlmgr *--dry-run* 4158092 -Ref: tlmgr *--force* 2158224 -Ref: tlmgr *--json* 2158270 -Node: tlmgr search158597 -Ref: tlmgr *search [_option_...] _what_*158761 -Ref: tlmgr *search [_option_...] --file _what_*158798 -Ref: tlmgr *search [_option_...] --all _what_*158834 -Ref: tlmgr *--file* 1159054 -Ref: tlmgr *--all* 4159116 -Ref: tlmgr *--global*159205 -Ref: tlmgr *--word*159332 -Node: tlmgr shell159647 -Ref: tlmgr protocol160382 -Ref: tlmgr help 1160446 -Ref: tlmgr version 1160499 -Ref: tlmgr quit, end, bye, byebye, EOF160567 -Ref: tlmgr restart160588 -Ref: tlmgr load [local|remote]160711 -Ref: tlmgr save160781 -Ref: tlmgr get [_var_] =item set [_var_ [_val_]]160904 -Node: tlmgr show161505 -Node: tlmgr uninstall161672 -Node: tlmgr update [_option_...] [_pkg_...]161902 -Ref: tlmgr *--all* 5162273 -Ref: tlmgr *--self*164452 -Ref: tlmgr *--dry-run* 5165216 -Ref: tlmgr *--list* [_pkg_]165393 -Ref: tlmgr *--exclude* _pkg_166082 -Ref: tlmgr *--no-auto-remove* [_pkg_...]166882 -Ref: tlmgr *--no-auto-install* [_pkg_...]167366 -Ref: tlmgr *--reinstall-forcibly-removed*168128 -Ref: tlmgr *--backup* 1168663 -Ref: tlmgr *--backupdir* _directory_ 3168689 -Ref: tlmgr *--no-depends* 2169855 -Ref: tlmgr *--no-depends-at-all* 2170058 -Ref: tlmgr *--force* 3170161 -Node: tlmgr CONFIGURATION FILE FOR TLMGR171181 -Ref: tlmgr auto-remove, value 0 or 1 (default 1), same as command-line option.172188 -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.172325 -Ref: tlmgr gui-lang _llcode_, with a language code value as with the command-line option.172407 -Ref: tlmgr no-checksums, value 0 or 1 (default 0, see below).172461 -Ref: tlmgr persistent-downloads, value 0 or 1 (default 1), same as command-line option.172541 -Ref: tlmgr require-verification, value 0 or 1 (default 0), same as command-line option.172621 -Ref: tlmgr update-exclude, value: comma-separated list of packages (no space allowed). Same as the command line option --exclude for the action update.172769 -Ref: tlmgr verify-downloads, value 0 or 1 (default 1), same as command-line option.172845 -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).173114 -Node: tlmgr CRYPTOGRAPHIC VERIFICATION174202 -Node: tlmgr Configuration of GnuPG invocation176375 -Node: tlmgr USER MODE177013 -Node: tlmgr User mode install179859 -Node: tlmgr User mode backup, restore, remove, update181003 -Node: tlmgr User mode generate, option, paper181445 -Node: tlmgr MULTIPLE REPOSITORIES181821 -Node: tlmgr Pinning183550 -Node: tlmgr GUI FOR TLMGR185473 -Node: tlmgr Main display187122 -Node: tlmgr Display configuration area187374 -Ref: tlmgr Status187735 -Ref: tlmgr Category187899 -Ref: tlmgr Match188085 -Ref: tlmgr Selection188266 -Ref: tlmgr Display configuration buttons188470 -Node: tlmgr Package list area188653 -Ref: tlmgr a checkbox189237 -Ref: tlmgr package name189373 -Ref: tlmgr local revision (and version)189472 -Ref: tlmgr remote revision (and version)189847 -Ref: tlmgr short description190144 -Node: tlmgr Main display action buttons190189 -Ref: tlmgr Update all installed190455 -Ref: tlmgr Update190827 -Ref: tlmgr Install190877 -Ref: tlmgr Remove191063 -Ref: tlmgr Backup191241 -Node: tlmgr Menu bar191398 -Ref: tlmgr tlmgr menu191621 -Ref: tlmgr Options menu191929 -Ref: tlmgr Actions menu193012 -Ref: tlmgr Help menu193440 -Node: tlmgr GUI options193574 -Ref: tlmgr -background _color_193820 -Ref: tlmgr -font " _fontname_ _fontsize_ "193885 -Ref: tlmgr -foreground _color_194043 -Ref: tlmgr -geometry _geomspec_194095 -Ref: tlmgr -xrm _xresource_194287 -Node: tlmgr MACHINE-READABLE OUTPUT194556 -Node: tlmgr Machine-readable update and install output195366 -Ref: tlmgr location-url _location_196642 -Ref: tlmgr total-bytes _count_196858 -Ref: tlmgr _pkgname_197268 -Ref: tlmgr _status_197478 -Ref: tlmgr d197556 -Ref: tlmgr f197616 -Ref: tlmgr u197795 -Ref: tlmgr r197841 -Ref: tlmgr a197964 -Ref: tlmgr i198142 -Ref: tlmgr I198261 -Ref: tlmgr _localrev_198363 -Ref: tlmgr _serverrev_198470 -Ref: tlmgr _size_198582 -Ref: tlmgr _runtime_198751 -Ref: tlmgr _esttot_198821 -Node: tlmgr Machine-readable option output198854 -Node: tlmgr ENVIRONMENT VARIABLES199366 -Ref: tlmgr TEXLIVE_COMPRESSOR199877 -Ref: tlmgr TEXLIVE_DOWNLOADER200725 -Ref: tlmgr TL_DOWNLOAD_PROGRAM200748 -Ref: tlmgr TL_DOWNLOAD_ARGS200768 -Ref: tlmgr TEXLIVE_PREFER_OWN201794 -Node: tlmgr AUTHORS AND COPYRIGHT202618 -Node: Index203016 +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@machine:/path/to/tlnet113968 +Ref: tlmgr scp://user@machine/path/to/tlnet114009 +Ref: tlmgr ssh://user@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 diff --git a/source/doc/tlbuild.texi b/source/doc/tlbuild.texi index 63dbbca0f..a6e235fb8 100644 --- a/source/doc/tlbuild.texi +++ b/source/doc/tlbuild.texi @@ -1,8 +1,8 @@ \input texinfo @setfilename tlbuild.info -@set version 2020 -@set month-year November 2020 +@set version 2021 +@set month-year February 2021 @set mytitle Building @TeX{} Live (@value{version}) @settitle @value{mytitle} @@ -15,7 +15,7 @@ This file documents the @TL{} build system and more. @noindent -Copyright @copyright{} 2016--2020 Karl Berry.@* +Copyright @copyright{} 2016--2021 Karl Berry.@* Copyright @copyright{} 2013--2015 Karl Berry & Peter Breitenlohner. Permission is granted to make and distribute verbatim copies of this @@ -1721,6 +1721,11 @@ including the generated @file{Makefile.in aclocal.m4 configure}, and so people checking out the TL source tree do not have to run any autotools, but can simply run @code{configure}.) +To reiterate: do not fail to commit the generated @file{configure} and +other files. The m4 code in @file{kpse-pkgs.m4} uses the existence of +@file{configure} to determine whether to descend into (and configure) +a given subdirectory. + @pindex reautoconf@r{, for new program} Then, run the TL tool @code{reautoconf} in the top-level TL @code{Build/source/} directory, to incorporate the new program into diff --git a/source/libs/README b/source/libs/README index c27800155..91b542445 100644 --- a/source/libs/README +++ b/source/libs/README @@ -1,4 +1,4 @@ -$Id: README 57237 2020-12-27 02:02:34Z kakuto $ +$Id: README 57727 2021-02-13 17:46:14Z karl $ Public domain. Originally created by Karl Berry, 2005. Libraries we compile for TeX Live. @@ -15,7 +15,7 @@ cairo 1.16.0 - checked 20oct18 freetype2 2.10.4 - checked 21oct20 http://savannah.nongnu.org/download/freetype/ -gd 2.3.0 - checked 10apr20 +gd 2.3.1 - checked 03feb21 https://github.com/libgd/libgd/releases gmp 6.2.1 - checked 15nov20 @@ -28,7 +28,7 @@ graphite2 1.3.14 - checked 10apr20 harfbuzz 2.7.4 - checked 27dec20 https://github.com/harfbuzz/harfbuzz/releases/download/2.7.4/ -icu 63.1 - checked 8jan19 +icu 68.2 - checked 13feb21 http://download.icu-project.org/files/icu4c/ libpaper 1.1.24+nmu2 - checked 24oct13 @@ -58,7 +58,7 @@ pplib 2.05.0 - checked 21apr20 teckit 2.5.10 - checked 06may20 https://github.com/silnrsi/teckit/archive/2.5.10.tar.gz -xpdf 4.02 - checked 29sep19 +xpdf 4.03 - checked 01feb21 http://www.xpdfreader.com/download.html with modifications for pdftex diff --git a/source/libs/configure b/source/libs/configure index 15571c521..911c7f62c 100755 --- a/source/libs/configure +++ b/source/libs/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for TeX Live libs 2021/dev. +# Generated by GNU Autoconf 2.69 for TeX Live libs 2021. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live libs' PACKAGE_TARNAME='tex-live-libs' -PACKAGE_VERSION='2021/dev' -PACKAGE_STRING='TeX Live libs 2021/dev' +PACKAGE_VERSION='2021' +PACKAGE_STRING='TeX Live libs 2021' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # 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 libs 2021/dev to adapt to many kinds of systems. +\`configure' configures TeX Live libs 2021 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1381,7 +1381,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live libs 2021/dev:";; + short | recursive ) echo "Configuration of TeX Live libs 2021:";; esac cat <<\_ACEOF @@ -1564,7 +1564,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live libs configure 2021/dev +TeX Live libs configure 2021 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1665,7 +1665,7 @@ cat >config.log <<_ACEOF 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 libs $as_me 2021/dev, which was +It was created by TeX Live libs $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4464,7 +4464,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-libs' - VERSION='2021/dev' + VERSION='2021' cat >>confdefs.h <<_ACEOF @@ -4803,34 +4803,50 @@ CONF_SUBDIRS= if test -x $srcdir/pplib/configure; then test "x$with_system_pplib" != xyes && test "x$need_pplib" = xyes && MAKE_SUBDIRS="pplib $MAKE_SUBDIRS" CONF_SUBDIRS="pplib $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/pplib/configure' >&5 fi if test -x $srcdir/harfbuzz/configure; then test "x$with_system_harfbuzz" != xyes && test "x$need_harfbuzz" = xyes && MAKE_SUBDIRS="harfbuzz $MAKE_SUBDIRS" CONF_SUBDIRS="harfbuzz $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/harfbuzz/configure' >&5 fi if test -x $srcdir/graphite2/configure; then test "x$with_system_graphite2" != xyes && test "x$need_graphite2" = xyes && MAKE_SUBDIRS="graphite2 $MAKE_SUBDIRS" CONF_SUBDIRS="graphite2 $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/graphite2/configure' >&5 fi if test -x $srcdir/zziplib/configure; then test "x$with_system_zziplib" != xyes && test "x$need_zziplib" = xyes && MAKE_SUBDIRS="zziplib $MAKE_SUBDIRS" CONF_SUBDIRS="zziplib $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/zziplib/configure' >&5 fi if test -x $srcdir/libpng/configure; then test "x$with_system_libpng" != xyes && test "x$need_libpng" = xyes && MAKE_SUBDIRS="libpng $MAKE_SUBDIRS" CONF_SUBDIRS="libpng $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/libpng/configure' >&5 fi if test -x $srcdir/luajit/configure; then test "x$with_system_luajit" != xyes && test "x$need_luajit" = xyes && MAKE_SUBDIRS="luajit $MAKE_SUBDIRS" CONF_SUBDIRS="luajit $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/luajit/configure' >&5 fi if test -x $srcdir/lua53/configure; then test "x$with_system_lua53" != xyes && test "x$need_lua53" = xyes && MAKE_SUBDIRS="lua53 $MAKE_SUBDIRS" CONF_SUBDIRS="lua53 $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/lua53/configure' >&5 fi if test -x $srcdir/zlib/configure; then test "x$with_system_zlib" != xyes && test "x$need_zlib" = xyes && MAKE_SUBDIRS="zlib $MAKE_SUBDIRS" CONF_SUBDIRS="zlib $CONF_SUBDIRS" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/zlib/configure' >&5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_SUBDIRS" >&5 @@ -5409,7 +5425,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live libs $as_me 2021/dev, which was +This file was extended by TeX Live libs $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5466,7 +5482,7 @@ _ACEOF 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 libs config.status 2021/dev +TeX Live libs config.status 2021 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/m4/ChangeLog b/source/m4/ChangeLog index 599419def..a34db9d83 100644 --- a/source/m4/ChangeLog +++ b/source/m4/ChangeLog @@ -1,3 +1,11 @@ +2021-02-09 Karl Berry + + * kpse-setup.m4 (_KPSE_RECURSE): add debug if configure not found. + +2021-02-07 Karl Berry + + * kpse-pkgs.m4 (KPSE_UTILS_PKGS): new utils program xml2pmx. + 2020-05-14 Karl Berry * kpse-pkgs.m4 (KPSE_LIBS_PKGS), diff --git a/source/m4/kpse-pkgs.m4 b/source/m4/kpse-pkgs.m4 index 4666b2ab5..2f944d4d4 100644 --- a/source/m4/kpse-pkgs.m4 +++ b/source/m4/kpse-pkgs.m4 @@ -1,4 +1,4 @@ -# $Id: kpse-pkgs.m4 55138 2020-05-14 17:47:47Z karl $ +# $Id: kpse-pkgs.m4 57680 2021-02-08 15:49:16Z karl $ # Private Autoconf macros for the TeX Live (TL) tree. # Copyright 2016-2020 Karl Berry # Copyright 2009-2015 Peter Breitenlohner @@ -92,6 +92,7 @@ texdoctk tpic2pdftex vlna xindy +xml2pmx xpdfopen ])]) # KPSE_UTILS_PKGS diff --git a/source/m4/kpse-setup.m4 b/source/m4/kpse-setup.m4 index a93efe488..bb9ac53a5 100644 --- a/source/m4/kpse-setup.m4 +++ b/source/m4/kpse-setup.m4 @@ -1,6 +1,6 @@ -# $Id: kpse-setup.m4 54307 2020-03-14 22:22:16Z karl $ +# $Id: kpse-setup.m4 57699 2021-02-10 02:06:16Z karl $ # Private macros for the TeX Live (TL) tree. -# Copyright 2017-2020 Karl Berry +# Copyright 2017-2021 Karl Berry # Copyright 2009-2015 Peter Breitenlohner # # This file is free software; the copyright holder @@ -283,6 +283,8 @@ m4_ifdef([have_]Kpse_pkg, [dnl if test -x $srcdir/$4Kpse_Pkg/configure; then $3 && Kpse_add([MAKE_SUBDIRS]) Kpse_add([CONF_SUBDIRS]) +else + echo 'tldbg:[$0] skipping subdir, no (executable) configure: '"$srcdir"'/$4Kpse_Pkg/configure' >&AS_MESSAGE_LOG_FD fi ])[]dnl m4_ifdef ]) diff --git a/source/tardate.ac b/source/tardate.ac index 89597bcc2..8238e2fd7 100644 --- a/source/tardate.ac +++ b/source/tardate.ac @@ -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 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]) diff --git a/source/texk/README b/source/texk/README index dc66b1106..adfeeb58f 100644 --- a/source/texk/README +++ b/source/texk/README @@ -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 @@ chktex 1.7.6 - checked 15mar20 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/ diff --git a/source/texk/configure b/source/texk/configure index 57472327d..20cf7f973 100755 --- a/source/texk/configure +++ b/source/texk/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for TeX Live texk 2021/dev. +# Generated by GNU Autoconf 2.69 for TeX Live texk 2021. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live texk' PACKAGE_TARNAME='tex-live-texk' -PACKAGE_VERSION='2021/dev' -PACKAGE_STRING='TeX Live texk 2021/dev' +PACKAGE_VERSION='2021' +PACKAGE_STRING='TeX Live texk 2021' PACKAGE_BUGREPORT='tex-live@tug.org' PACKAGE_URL='' @@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # 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 texk 2021/dev to adapt to many kinds of systems. +\`configure' configures TeX Live texk 2021 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1381,7 +1381,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live texk 2021/dev:";; + short | recursive ) echo "Configuration of TeX Live texk 2021:";; esac cat <<\_ACEOF @@ -1564,7 +1564,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live texk configure 2021/dev +TeX Live texk configure 2021 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1665,7 +1665,7 @@ cat >config.log <<_ACEOF 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 texk $as_me 2021/dev, which was +It was created by TeX Live texk $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4464,7 +4464,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-texk' - VERSION='2021/dev' + VERSION='2021' cat >>confdefs.h <<_ACEOF @@ -4803,10 +4803,14 @@ CONF_SUBDIRS= if test -x $srcdir/web2c/configure; then test "x$enable_web2c" = xyes && MAKE_SUBDIRS="$MAKE_SUBDIRS web2c" CONF_SUBDIRS="$CONF_SUBDIRS web2c" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/web2c/configure' >&5 fi if test -x $srcdir/texlive/configure; then test "x$enable_texlive" = xyes && MAKE_SUBDIRS="$MAKE_SUBDIRS texlive" CONF_SUBDIRS="$CONF_SUBDIRS texlive" +else + echo 'tldbg:_KPSE_RECURSE skipping subdir, no (executable) configure: '"$srcdir"'/texlive/configure' >&5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_SUBDIRS" >&5 @@ -5385,7 +5389,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live texk $as_me 2021/dev, which was +This file was extended by TeX Live texk $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5442,7 +5446,7 @@ _ACEOF 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 texk config.status 2021/dev +TeX Live texk config.status 2021 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/texk/kpathsea/ChangeLog b/source/texk/kpathsea/ChangeLog index b784ee2a5..85061dc53 100644 --- a/source/texk/kpathsea/ChangeLog +++ b/source/texk/kpathsea/ChangeLog @@ -1,3 +1,31 @@ +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, + * version.ac (kpse_dev): no /dev for 6.3.3. + * NEWS, + * doc/kpathsea.texi, + * kpsewhich.c, + * texmf.cnf: copyright 2021. + 2020-12-05 TANAKA Takuji * knj.[ch]: Add new functions win32_fprintf(), win32_perror(). diff --git a/source/texk/kpathsea/NEWS b/source/texk/kpathsea/NEWS index 47cf3f6f2..ae77f815f 100644 --- a/source/texk/kpathsea/NEWS +++ b/source/texk/kpathsea/NEWS @@ -1,6 +1,11 @@ -$Id: NEWS 54578 2020-03-27 00:29:26Z 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, 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. + 6.3.2 (for TeX Live 2020, 27 March 2020) * New option --cnf-line for kpsewhich (and tex and mf) to support arbitrary configuration settings on the command line. diff --git a/source/texk/kpathsea/c-auto.in b/source/texk/kpathsea/c-auto.in index 5d056f1eb..c8498cd71 100644 --- a/source/texk/kpathsea/c-auto.in +++ b/source/texk/kpathsea/c-auto.in @@ -23,7 +23,7 @@ #define KPATHSEA_C_AUTO_H /* kpathsea: the version string. */ -#define KPSEVERSION "kpathsea version 6.3.3/dev" +#define KPSEVERSION "kpathsea version 6.3.3" /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID diff --git a/source/texk/kpathsea/configure b/source/texk/kpathsea/configure index b13ae1cda..25d3323b3 100755 --- a/source/texk/kpathsea/configure +++ b/source/texk/kpathsea/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Kpathsea 6.3.3/dev. +# Generated by GNU Autoconf 2.69 for Kpathsea 6.3.3. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Kpathsea' PACKAGE_TARNAME='kpathsea' -PACKAGE_VERSION='6.3.3/dev' -PACKAGE_STRING='Kpathsea 6.3.3/dev' +PACKAGE_VERSION='6.3.3' +PACKAGE_STRING='Kpathsea 6.3.3' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1339,7 +1339,7 @@ if test "$ac_init_help" = "long"; then # 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 Kpathsea 6.3.3/dev to adapt to many kinds of systems. +\`configure' configures Kpathsea 6.3.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1409,7 +1409,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Kpathsea 6.3.3/dev:";; + short | recursive ) echo "Configuration of Kpathsea 6.3.3:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Kpathsea configure 6.3.3/dev +Kpathsea configure 6.3.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Kpathsea $as_me 6.3.3/dev, which was +It was created by Kpathsea $as_me 6.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2757,14 +2757,14 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -KPSEVERSION=6.3.3/dev +KPSEVERSION=6.3.3 KPSE_LT_VERSINFO=9:3:3 - WEB2CVERSION=" (TeX Live 2021/dev)" + WEB2CVERSION=" (TeX Live 2021)" am__api_version='1.16' @@ -8068,7 +8068,7 @@ fi # Define the identity of the package. PACKAGE='kpathsea' - VERSION='6.3.3/dev' + VERSION='6.3.3' cat >>confdefs.h <<_ACEOF @@ -14697,7 +14697,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Kpathsea $as_me 6.3.3/dev, which was +This file was extended by Kpathsea $as_me 6.3.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14763,7 +14763,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Kpathsea config.status 6.3.3/dev +Kpathsea config.status 6.3.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/texk/kpathsea/configure.ac b/source/texk/kpathsea/configure.ac index 14c204cf6..867d0de16 100644 --- a/source/texk/kpathsea/configure.ac +++ b/source/texk/kpathsea/configure.ac @@ -1,7 +1,7 @@ -dnl $Id$ +dnl $Id: configure.ac 57738 2021-02-14 18:51:30Z karl $ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright 2015-2020 Karl Berry +dnl Copyright 2015-2021 Karl Berry dnl Copyright 2009-2015 Peter Breitenlohner dnl dnl This file is free software; the copyright holder diff --git a/source/texk/kpathsea/doc/kpathsea.info b/source/texk/kpathsea/doc/kpathsea.info index 2744e1176..66b0a4e2f 100644 --- a/source/texk/kpathsea/doc/kpathsea.info +++ b/source/texk/kpathsea/doc/kpathsea.info @@ -1,9 +1,9 @@ -This is kpathsea.info, produced by makeinfo version 6.7 from +This is kpathsea.info, produced by makeinfo version 5.1 from kpathsea.texi. This file documents the Kpathsea library for path searching. - Copyright (C) 1996-2020 Karl Berry & Olaf Weber. + Copyright (C) 1996-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 @@ -37,7 +37,7 @@ Kpathsea library **************** This manual documents the Kpathsea library for path searching. It -corresponds to version 6.3.2, released in March 2020. +corresponds to version 6.3.3, released in February 2021. * Menu: @@ -61,8 +61,8 @@ File: kpathsea.info, Node: Introduction, Next: unixtex.ftp, Prev: Top, Up: T 1 Introduction ************** -This manual corresponds to version 6.3.2 of the Kpathsea library, -released in March 2020. +This manual corresponds to version 6.3.3 of the Kpathsea library, +released in February 2021. The library's fundamental purpose is to return a filename from a list of directories specified by the user, similar to what shells do when @@ -3038,7 +3038,7 @@ Index * !! and casefolding: Casefolding examples. (line 57) * !! in path specifications: ls-R. (line 57) -* !! in TEXMFDBS: ls-R. (line 11) +* !! in 'TEXMFDBS': ls-R. (line 11) * $ expansion: Variable expansion. (line 6) * --all: Path searching options. (line 12) @@ -3046,7 +3046,7 @@ Index (line 19) * --cnf-line: Path searching options. (line 28) -* --cnf-line, source for path: Path sources. (line 9) +* '--cnf-line', source for path: Path sources. (line 9) * --color=tty: ls-R. (line 25) * --debug=NUM: Auxiliary tasks. (line 9) * --dpi=NUM: Path searching options. @@ -3092,12 +3092,12 @@ Index * --without-mktexpk-default: mktex configuration. (line 12) * --without-mktextfm-default: mktex configuration. (line 12) * -1 debugging value: Debugging. (line 23) -* -A option to ls: ls-R. (line 39) +* -A option to 'ls': ls-R. (line 39) * -D NUM: Path searching options. (line 49) * -iname, find predicate: Casefolding examples. (line 78) -* -L option to ls: ls-R. (line 44) +* -L option to 'ls': ls-R. (line 44) * . directories, ignored: ls-R. (line 39) * . files: ls-R. (line 39) * .2602gf: Unable to generate fonts. @@ -3174,7 +3174,7 @@ Index (line 195) * .pro: Supported file formats. (line 169) -* .PROGNAME qualifier in texmf.cnf: Config files. (line 50) +* .PROGNAME qualifier in 'texmf.cnf': Config files. (line 50) * .rhosts, writable by TeX: Security. (line 10) * .ris: Supported file formats. (line 173) @@ -3184,7 +3184,7 @@ Index (line 42) * .tex: Supported file formats. (line 180) -* .tex file, included in ls-R: ls-R. (line 39) +* .tex file, included in 'ls-R': ls-R. (line 39) * .tfm: Supported file formats. (line 199) * .ttc: Supported file formats. @@ -3212,9 +3212,9 @@ Index * 8.3 filenames, using: mktex configuration. (line 68) * : may not be :: Searching overview. (line 13) * :: expansion: Default expansion. (line 6) -* ; translated to : in texmf.cnf: Config files. (line 66) -* = omitted in texmf.cnf and misparsing: Config files. (line 93) -* \, line continuation in texmf.cnf: Config files. (line 37) +* ; translated to ':' in 'texmf.cnf': Config files. (line 66) +* = omitted in 'texmf.cnf' and misparsing: Config files. (line 93) +* \, line continuation in 'texmf.cnf': Config files. (line 37) * \openin: Searching overview. (line 31) * \special, suppressing warnings about: Suppressing warnings. (line 31) @@ -3237,15 +3237,15 @@ Index * announcement mailing list: Mailing lists. (line 6) * API, re-entrant: Programming overview. (line 16) -* append-only directories and mktexpk: Security. (line 36) +* append-only directories and 'mktexpk': Security. (line 36) * appendonlydir: mktex configuration. (line 60) * Apple filesystem, case-insensitive: Casefolding rationale. (line 6) -* arguments to mktex: mktex script arguments. +* arguments to 'mktex': mktex script arguments. (line 6) * argv[0]: Calling sequence. (line 14) * autoconf, recommended: Calling sequence. (line 117) -* automounter, and ls-R: ls-R. (line 46) +* automounter, and 'ls-R': ls-R. (line 46) * auxiliary tasks: Auxiliary tasks. (line 6) * Bach, Johann Sebastian: Default expansion. (line 41) * backslash-newline: Config files. (line 37) @@ -3255,7 +3255,7 @@ Index (line 30) * BIBINPUTS <1>: Supported file formats. (line 121) -* blank lines, in texmf.cnf: Config files. (line 35) +* blank lines, in 'texmf.cnf': Config files. (line 35) * BLTXMLINPUTS: Supported file formats. (line 34) * brace expansion: Brace expansion. (line 6) @@ -3283,7 +3283,7 @@ Index * checksum: Suppressing warnings. (line 16) * circle fonts: Fontmap. (line 19) -* client_path in kpse->format_info: Calling sequence. (line 47) +* client_path in 'kpse->format_info': Calling sequence. (line 47) * CLUAINPUTS: Supported file formats. (line 42) * CMAPFONTS: Supported file formats. @@ -3294,7 +3294,7 @@ Index * cnf.h: Programming with config files. (line 27) * comments, in fontmap files: Fontmap. (line 27) -* comments, in texmf.cnf: Config files. (line 27) +* comments, in 'texmf.cnf': Config files. (line 27) * comments, making: Introduction. (line 29) * common features in glyph lookup: Basic glyph lookup. (line 6) * common problems: Common problems. (line 6) @@ -3320,8 +3320,9 @@ Index * configuration bugs: Bug checklist. (line 27) * configuration file, source for path: Path sources. (line 20) * configuration files as shell scripts.: Config files. (line 86) -* configuration of mktex scripts: mktex configuration. (line 6) -* configure options for mktex scripts: mktex configuration. (line 12) +* configuration of 'mktex' scripts: mktex configuration. (line 6) +* 'configure' options for 'mktex' scripts: mktex configuration. + (line 12) * context diff: Bug checklist. (line 52) * continuation character: Config files. (line 37) * core dumps, reporting: Bug checklist. (line 58) @@ -3345,7 +3346,7 @@ Index * directory permissions: Security. (line 51) * directory structure, for TeX files: TeX directory structure. (line 6) -* disabling mktex scripts: mktex configuration. (line 6) +* disabling 'mktex' scripts: mktex configuration. (line 6) * disk search: Searching overview. (line 22) * disk searching, avoiding: ls-R. (line 57) * disk usage, reducing: Logging. (line 6) @@ -3372,7 +3373,7 @@ Index (line 41) * elt-dirs.c <1>: Subdirectory expansion. (line 48) -* enabling mktex scripts: mktex configuration. (line 6) +* enabling 'mktex' scripts: mktex configuration. (line 6) * ENCFONTS: Supported file formats. (line 61) * engine name: Path searching options. @@ -3401,7 +3402,7 @@ Index * extensions, filename: File lookup. (line 24) * externally-built filename database: Filename database. (line 6) * extra colons: Default expansion. (line 6) -* failed mktex... script invocation: mktex script names. (line 35) +* failed 'mktex...' script invocation: mktex script names. (line 35) * fallback font: Fallback font. (line 6) * fallback resolutions: Fallback font. (line 6) * FAQ, Kpathsea: Common problems. (line 6) @@ -3487,7 +3488,7 @@ Index (line 151) * interface, not frozen: Introduction. (line 29) * introduction: Introduction. (line 6) -* kdebug:: Debugging. (line 105) +* 'kdebug:': Debugging. (line 105) * kdefault.c: Default expansion. (line 48) * Knuth, Donald E.: History. (line 6) * Knuth, Donald E., archive of programs by: unixtex.ftp. (line 20) @@ -3590,9 +3591,9 @@ Index (line 20) * mkocp: mktex script names. (line 18) * mkofm: mktex script names. (line 21) -* mktex script configuration: mktex configuration. (line 6) -* mktex script names: mktex script names. (line 6) -* mktex scripts: mktex scripts. (line 6) +* 'mktex' script configuration: mktex configuration. (line 6) +* 'mktex' script names: mktex script names. (line 6) +* 'mktex' scripts: mktex scripts. (line 6) * mktex.cnf: Specially-recognized files. (line 28) * mktex.cnf <1>: mktex configuration. (line 29) @@ -3602,7 +3603,7 @@ Index * mktexfmt: mktex script names. (line 10) * mktexmf: mktex script names. (line 15) * mktexpk: mktex script names. (line 24) -* mktexpk can't guess mode: Unable to generate fonts. +* 'mktexpk' can't guess mode: Unable to generate fonts. (line 12) * mktextex: mktex script names. (line 27) * mktextfm: mktex script names. (line 30) @@ -3623,9 +3624,9 @@ Index * MT_FEATURES: mktex configuration. (line 39) * multiple TeX hierarchies: Brace expansion. (line 20) * must exist: Searching overview. (line 31) -* names for mktex scripts: mktex script names. (line 6) +* names for 'mktex' scripts: mktex script names. (line 6) * Neumann, Gustaf: History. (line 56) -* NFS and ls-R: ls-R. (line 46) +* NFS and 'ls-R': ls-R. (line 46) * nomfdrivers: mktex configuration. (line 92) * nomode: mktex configuration. (line 97) * none: Suppressing warnings. @@ -3738,7 +3739,7 @@ Index * shell variables: Variable expansion. (line 17) * shell_escape, example for code: Programming with config files. (line 10) -* site overrides for mktex...: mktex configuration. (line 29) +* site overrides for 'mktex...': mktex configuration. (line 29) * skeleton TeX directory: TeX directory structure. (line 6) * slow startup time: Slow path searching. (line 6) @@ -3773,7 +3774,7 @@ Index (line 6) * symbolic links not found: Unable to find files. (line 21) -* symbolic links, and ls-R: ls-R. (line 44) +* symbolic links, and 'ls-R': ls-R. (line 44) * symlinks, resolving: Calling sequence. (line 31) * system C compiler bugs: TeX or Metafont failing. (line 16) @@ -3839,7 +3840,7 @@ Index (line 6) * texmf.cnf: Specially-recognized files. (line 38) -* texmf.cnf missing, warning about: Config files. (line 18) +* 'texmf.cnf' missing, warning about: Config files. (line 18) * texmf.cnf, and variable expansion: Variable expansion. (line 6) * texmf.cnf, definition for: Config files. (line 6) * texmf.cnf, source for path: Path sources. (line 20) @@ -3884,7 +3885,7 @@ Index * tilde.c: Tilde expansion. (line 25) * time system call: Logging. (line 15) * tolerance for glyph lookup: Basic glyph lookup. (line 15) -* trailing / in home directory: Tilde expansion. (line 19) +* trailing '/' in home directory: Tilde expansion. (line 19) * trailing colons: Default expansion. (line 6) * translations, of path searching description: Path searching. (line 10) @@ -3910,7 +3911,7 @@ Index * unreadable file warnings: Suppressing warnings. (line 27) * unreadable files: Searching overview. (line 63) -* unusable ls-R warning: ls-R. (line 51) +* unusable 'ls-R' warning: ls-R. (line 51) * usage patterns, finding: Logging. (line 6) * USERPROFILE, as ~ expansion: Tilde expansion. (line 6) * USE_TEXMFVAR: mktex configuration. (line 128) @@ -3928,8 +3929,8 @@ Index (line 219) * Vojta, Paul: History. (line 30) * Walsh, Norman: History. (line 56) -* warning about unusable ls-R: ls-R. (line 51) -* warning, about missing texmf.cnf: Config files. (line 18) +* warning about unusable 'ls-R': ls-R. (line 51) +* warning, about missing 'texmf.cnf': Config files. (line 18) * warnings, file access: Searching overview. (line 63) * warnings, suppressing: Suppressing warnings. (line 6) @@ -3956,66 +3957,61 @@ Index  Tag Table: Node: Top1480 -Node: Introduction2260 -Node: History4327 -Node: unixtex.ftp8923 -Node: Security10393 -Node: TeX directory structure12897 -Node: Path searching16938 -Node: Searching overview17896 -Node: Path sources21715 -Node: Config files22941 -Node: Path expansion28204 -Node: Default expansion29157 -Node: Variable expansion31227 -Node: Tilde expansion32628 -Node: Brace expansion33608 -Node: KPSE_DOT expansion34547 -Node: Subdirectory expansion35060 -Node: Casefolding search37408 -Node: Casefolding rationale38177 -Node: Casefolding examples39523 -Node: Filename database44569 -Node: ls-R45551 -Node: Filename aliases49227 -Node: Database format50405 -Node: Invoking kpsewhich51418 -Node: Path searching options52373 -Node: Specially-recognized files61971 -Node: Auxiliary tasks63326 -Node: Standard options67051 -Node: TeX support67407 -Node: Supported file formats68761 -Node: File lookup76429 -Node: Glyph lookup78178 -Node: Basic glyph lookup79302 -Node: Fontmap80182 -Node: Fallback font82711 -Node: Suppressing warnings83623 -Node: mktex scripts84750 -Node: mktex configuration85965 -Node: mktex script names91768 -Node: mktex script arguments93154 -Node: Programming94033 -Node: Programming overview94606 -Node: Calling sequence97467 -Node: Program-specific files103996 -Node: Programming with config files105019 -Node: Reporting bugs106606 -Node: Bug checklist107284 -Node: Mailing lists110753 -Node: Debugging111430 -Node: Logging116507 -Node: Common problems118374 -Node: Unable to find files118851 -Node: Slow path searching121261 -Node: Unable to generate fonts122636 -Node: TeX or Metafont failing125108 -Node: Index126310 +Node: Introduction2263 +Node: History4333 +Node: unixtex.ftp8929 +Node: Security10399 +Node: TeX directory structure12903 +Node: Path searching16944 +Node: Searching overview17902 +Node: Path sources21721 +Node: Config files22947 +Node: Path expansion28210 +Node: Default expansion29163 +Node: Variable expansion31233 +Node: Tilde expansion32634 +Node: Brace expansion33614 +Node: KPSE_DOT expansion34553 +Node: Subdirectory expansion35066 +Node: Casefolding search37414 +Node: Casefolding rationale38183 +Node: Casefolding examples39529 +Node: Filename database44575 +Node: ls-R45557 +Node: Filename aliases49233 +Node: Database format50411 +Node: Invoking kpsewhich51424 +Node: Path searching options52379 +Node: Specially-recognized files61977 +Node: Auxiliary tasks63332 +Node: Standard options67057 +Node: TeX support67413 +Node: Supported file formats68767 +Node: File lookup76435 +Node: Glyph lookup78184 +Node: Basic glyph lookup79308 +Node: Fontmap80188 +Node: Fallback font82717 +Node: Suppressing warnings83629 +Node: mktex scripts84756 +Node: mktex configuration85971 +Node: mktex script names91774 +Node: mktex script arguments93160 +Node: Programming94039 +Node: Programming overview94612 +Node: Calling sequence97473 +Node: Program-specific files104002 +Node: Programming with config files105025 +Node: Reporting bugs106612 +Node: Bug checklist107290 +Node: Mailing lists110759 +Node: Debugging111436 +Node: Logging116513 +Node: Common problems118380 +Node: Unable to find files118857 +Node: Slow path searching121267 +Node: Unable to generate fonts122642 +Node: TeX or Metafont failing125114 +Node: Index126316  End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/source/texk/kpathsea/doc/kpathsea.texi b/source/texk/kpathsea/doc/kpathsea.texi index 5888fac79..00ff64eef 100644 --- a/source/texk/kpathsea/doc/kpathsea.texi +++ b/source/texk/kpathsea/doc/kpathsea.texi @@ -2,13 +2,13 @@ @setfilename kpathsea.info @settitle Kpathsea: A library for path searching -@set version 6.3.2 -@set month-year March 2020 +@set version 6.3.3 +@set month-year February 2021 @copying This file documents the Kpathsea library for path searching. -Copyright @copyright{} 1996--2020 Karl Berry & Olaf Weber. +Copyright @copyright{} 1996--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 diff --git a/source/texk/kpathsea/kpsewhich.c b/source/texk/kpathsea/kpsewhich.c index 532f6c487..76f956a24 100644 --- a/source/texk/kpathsea/kpsewhich.c +++ b/source/texk/kpathsea/kpsewhich.c @@ -1,7 +1,7 @@ /* kpsewhich -- standalone path lookup and variable expansion for Kpathsea. Ideas from Thomas Esser, Pierre MacKay, and many others. - Copyright 1995-2019 Karl Berry & Olaf Weber. + Copyright 1995-2021 Karl Berry & Olaf Weber. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -736,7 +736,7 @@ read_command_line (kpathsea kpse, int argc, string *argv) } else if (ARGUMENT_IS ("version")) { puts (kpathsea_version_string); - puts ("Copyright 2020 Karl Berry & Olaf Weber.\n\ + puts ("Copyright 2021 Karl Berry & Olaf Weber.\n\ License LGPLv2.1+: GNU Lesser GPL version 2.1 or later \n\ This is free software: you are free to change and redistribute it.\n\ There is NO WARRANTY, to the extent permitted by law.\n"); diff --git a/source/texk/kpathsea/tests/cnfline.test b/source/texk/kpathsea/tests/cnfline.test index af5a456ab..146d35624 100755 --- a/source/texk/kpathsea/tests/cnfline.test +++ b/source/texk/kpathsea/tests/cnfline.test @@ -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 diff --git a/source/texk/kpathsea/tests/cnfline/texmf.cnf b/source/texk/kpathsea/tests/cnfline/texmf.cnf index 779225a65..e0c7a72d0 100644 --- a/source/texk/kpathsea/tests/cnfline/texmf.cnf +++ b/source/texk/kpathsea/tests/cnfline/texmf.cnf @@ -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 diff --git a/source/texk/kpathsea/texmf.cnf b/source/texk/kpathsea/texmf.cnf index 7af26f6d7..7a4f40307 100644 --- a/source/texk/kpathsea/texmf.cnf +++ b/source/texk/kpathsea/texmf.cnf @@ -4,8 +4,8 @@ % If you modify this original file, YOUR CHANGES WILL BE LOST when it is % updated. Instead, put your changes -- and only your changes, not an % entire copy! -- in ../../texmf.cnf. That is, if this file is -% installed in /some/path/to/texlive/2020/texmf-dist/web2c/texmf.cnf, -% put your custom settings in /some/path/to/texlive/2020/texmf.cnf. +% installed in /some/path/to/texlive/2021/texmf-dist/web2c/texmf.cnf, +% put your custom settings in /some/path/to/texlive/2021/texmf.cnf. % (Below, we use YYYY in place of the specific year.) % % What follows is a super-summary of what this .cnf file can @@ -84,10 +84,10 @@ TEXMFSYSCONFIG = $TEXMFROOT/texmf-config TEXMFHOME = ~/texmf % TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data. -TEXMFVAR = ~/.texlive2020/texmf-var +TEXMFVAR = ~/.texlive2021/texmf-var % TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data. -TEXMFCONFIG = ~/.texlive2020/texmf-config +TEXMFCONFIG = ~/.texlive2021/texmf-config % This is the value manipulated by tlmgr's auxtrees subcommand in the % root texmf.cnf. Kpathsea warns about a literally empty string for a @@ -823,7 +823,7 @@ buf_size = 200000 % 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 @@ nest_size = 500 % simultaneous semantic levels (e.g., groups) 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 diff --git a/source/texk/kpathsea/version.ac b/source/texk/kpathsea/version.ac index 9f0eecf7d..671039dfd 100644 --- a/source/texk/kpathsea/version.ac +++ b/source/texk/kpathsea/version.ac @@ -1,5 +1,5 @@ -dnl $Id: version.ac 54634 2020-04-10 00:57:04Z karl $ -dnl Copyright 2016-2020 Karl Berry +dnl $Id: version.ac 57769 2021-02-17 03:03:54Z karl $ +dnl Copyright 2016-2021 Karl Berry dnl Copyright 2011-2015 Peter Breitenlohner dnl dnl This file is free software; the copyright holder @@ -20,4 +20,4 @@ dnl append "dev", to distinguish binaries built between releases. dnl -------------------------------------------------------- dnl dnl This file is m4-included from configure.ac. -m4_define([kpse_version], [6.3.3/dev]) +m4_define([kpse_version], [6.3.3]) diff --git a/source/texk/texlive/configure b/source/texk/texlive/configure index 37d0467bb..b42f08b75 100755 --- a/source/texk/texlive/configure +++ b/source/texk/texlive/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for TeX Live Scripts 2021/dev. +# Generated by GNU Autoconf 2.69 for TeX Live Scripts 2021. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live Scripts' PACKAGE_TARNAME='tex-live-scripts' -PACKAGE_VERSION='2021/dev' -PACKAGE_STRING='TeX Live Scripts 2021/dev' +PACKAGE_VERSION='2021' +PACKAGE_STRING='TeX Live Scripts 2021' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1238,7 +1238,7 @@ if test "$ac_init_help" = "long"; then # 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 Scripts 2021/dev to adapt to many kinds of systems. +\`configure' configures TeX Live Scripts 2021 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1305,7 +1305,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live Scripts 2021/dev:";; + short | recursive ) echo "Configuration of TeX Live Scripts 2021:";; esac cat <<\_ACEOF @@ -1400,7 +1400,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live Scripts configure 2021/dev +TeX Live Scripts configure 2021 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF 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 Scripts $as_me 2021/dev, which was +It was created by TeX Live Scripts $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2317,7 +2317,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-scripts' - VERSION='2021/dev' + VERSION='2021' cat >>confdefs.h <<_ACEOF @@ -4223,7 +4223,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live Scripts $as_me 2021/dev, which was +This file was extended by TeX Live Scripts $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4280,7 +4280,7 @@ _ACEOF 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 Scripts config.status 2021/dev +TeX Live Scripts config.status 2021 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/texk/web2c/ChangeLog b/source/texk/web2c/ChangeLog index 92487496c..e03ae51d5 100644 --- a/source/texk/web2c/ChangeLog +++ b/source/texk/web2c/ChangeLog @@ -1,7 +1,148 @@ -2021-01-30 Karl Berry +2021-03-23 Karl Berry - * weave.web, - * weave.ch (banner): should have been 4.5. Report from Wolfgang Helbig. + * 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, + * am/bootstrap.am: Main CWEB modules depend on COMMON interface. + +2021-02-17 Karl Berry + + * NEWS, + * doc/web2c.texi: 2021 release. + +2021-02-16 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: Reshuffle byte_mem pointer. + +2021-02-15 Andreas Scherer + + * tracingstacklevels.ch, + * ptexdir/ptex-base.ch: Fix Pascal variable in comment. + +2021-02-14 Petr Olsak + + * tracingstacklevels.ch: slow_print(cur_ext) also. + +2021-02-13 Karl Berry + + * enctexdir/enctex1.ch, + * enctexdir/enctex2.ch, + * enctexdir/enctex-tex.ch, + * enctexdir/enctex-pdftex.ch: new files, from enctex.ch. + * am/texmf.am (tex_ch_srcs): split enctex changes into + common (enctex1.ch, enctex2.ch) and differing (enctex-tex.ch, + enctex-pdftex.ch) pieces to avoid duplicating the whole thing. + * enctex.ch, + * enctex2.ch: remove. + +2021-02-13 Hironori Kitagawa + + * eptexdir/am/eptex.am, eptexdir/etex.ch1, + euptexdir/am/euptex.am, ptexdir/am/ptex.am, + ptexdir/ptex-base.ch, synctexdir/synctex-ep-mem.ch1, + synctexdir/synctex-p-mem.ch1, and uptexdir/am/uptex.am: + Support \tracingstacklevels in [e][u]pTeX. + +2021-02-13 Akira Kakuto + + * enctex.ch: Recover the original enctex.ch in order to be + compatible with the TeX. + * enctex2.ch: Rename the new enctex.ch for pdfTeX. + * pdftexdir/am/pdftex.am: Rename enctex.ch to enctex2.ch. + +2021-02-12 Karl Berry + + * tracingstacklevels.ch: new change file for \tracingstacklevels + parameter, proposed and implemented by Petr Olsak. + * pdftexdir/am/pdftex.am (pdftex_ch_srcs), + * xetexdir/am/xetex.am (xetex_ch_srcs): add it. + * tests/tracingstacklevels.tex, + * tests/tracingstacklevel2.tex: test files (for manual use; not + included in make check). + * xetexdir/xetex.ch (v): new declaration needed in start_input. + * enctex.ch: adjust web2c_int_pars so that this is applied after + tracingstacklevels.ch. + +2021-02-08 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin: Don't repeat yourself. + +2021-02-07 Andreas Scherer + + * cwebboot.cin: CWEB development has moved to another level. + +2021-02-07 Andreas Scherer + + * ctangleboot.cin, + * cwebboot.cin, + * cwebdir/*, + * man/ctwill.man, + * man/cweb.man: New CWEB 4.0 amd CWEBbin 2021. + +2021-02-05 Karl Berry + + * mf.ch: adjust for latest fixes. + +2021-02-05 Donald Knuth + + * mf.web, + * tex.web: further fixes. Reports from Udo Wermuth + and Phelype Oleinik. + * triptrap/trip.log: update for newly added blank line. + +2021-01-31 Karl Berry + + * weave.ch (banner): 4.5. + +2021-01-31 Donald Knuth + + * weave.web (banner, title): should have been 4.5. + Report from Wolfgang Helbig. 2021-01-29 Karl Berry diff --git a/source/texk/web2c/Makefile.in b/source/texk/web2c/Makefile.in index 56317a3cb..e623bd7fd 100644 --- a/source/texk/web2c/Makefile.in +++ b/source/texk/web2c/Makefile.in @@ -3774,7 +3774,9 @@ tex_prereq = texd.h $(am__append_127) tex_ch_srcs = \ tex.web \ tex.ch \ - enctex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-tex.ch \ + enctexdir/enctex2.ch \ $(tex_ch_synctex) \ tex-binpool.ch @@ -4267,7 +4269,9 @@ etex_ch_srcs = \ etexdir/tex.ch0 \ tex.ch \ zlib-fmt.ch \ - enctex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-tex.ch \ + enctexdir/enctex2.ch \ $(etex_ch_synctex) \ etexdir/tex.ch1 \ etexdir/tex.ech \ @@ -4302,6 +4306,7 @@ ptex_prereq = ptexd.h ptexdir/ptex_version.h $(am__append_135) ptex_web_srcs = \ tex.web \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch ptex_ch_srcs = \ @@ -4361,6 +4366,7 @@ eptex_web_srcs = \ etexdir/etex.ch \ etexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch \ etexdir/tex.ech @@ -4405,6 +4411,7 @@ uptex_prereq = uptexd.h ptexdir/ptex_version.h \ uptex_web_srcs = \ tex.web \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch uptex_ch_srcs = \ @@ -4469,6 +4476,7 @@ euptex_web_srcs = \ etexdir/etex.ch \ etexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch \ etexdir/tex.ech @@ -4539,8 +4547,11 @@ pdftex_ch_srcs = \ pdftexdir/pdftex.web \ pdftexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch \ - enctex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-pdftex.ch \ + enctexdir/enctex2.ch \ $(pdftex_ch_synctex) \ pdftexdir/pdftex.ch \ pdftexdir/char-warning-pdftex.ch \ @@ -5228,6 +5239,7 @@ xetex_ch_srcs = \ xetexdir/xetex.web \ xetexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ $(xetex_ch_synctex) \ xetexdir/xetex.ch \ $(xetex_post_ch_synctex) \ @@ -21051,12 +21063,11 @@ tangleboot-web2c: tangleboot.p $(web2c_depend) .pin.p: $(cp_silent)cp -f $< $@ $(tangleboot_OBJECTS): $(tangleboot_DEPENDENCIES) -ctangle.c: ctangleboot$(EXEEXT) cwebdir/comm-w2c.h cwebdir/ctangle.w cwebdir/ctang-w2c.ch ctangleboot-sh +ctangle.c: common-ctangle cwebdir/ctangle.w cwebdir/ctang-w2c.ch @$(ctangleboot) ctangle ctang-w2c -cweb.c: common-ctangle - @$(ctangleboot) common comm-w2c cweb.c -common-ctangle: ctangleboot$(EXEEXT) cwebdir/common.w cwebdir/comm-w2c.ch ctangleboot-sh +cweb.c: common-ctangle cwebdir/common.w cwebdir/comm-w2c.ch @$(ctangleboot) common comm-w2c cweb.c +common-ctangle: ctangleboot$(EXEEXT) cwebdir/comm-w2c.h ctangleboot-sh $(ctangleboot_OBJECTS): $(ctangleboot_DEPENDENCIES) # ctangleboot.cin and cwebboot.cin are in the distribution .cin.c: diff --git a/source/texk/web2c/NEWS b/source/texk/web2c/NEWS index 6ddb6a353..86e75002d 100644 --- a/source/texk/web2c/NEWS +++ b/source/texk/web2c/NEWS @@ -1,14 +1,19 @@ This file records noteworthy changes. (Public domain.) + +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. -* pdftex, xetex, e(u)ptex: if \tracinglostchars >= 3, -make missing characters an error (not just a log message), -and always report the character code in hex. +* for all engines except original TeX: +- if \tracinglostchars >= 3, make missing characters an error (not just + a log message), and always report the character code in hex. +- if new primitive parameter \tracingstacklevels > 0, logging of macro + expansion at higher levels is truncated; also, the macro expansion + depth is indicated on \tracingmacros log lines. -* obscure interaction sequences try to avoid crashing. +* obscure interaction sequences no longer crash. 2020 (for TeX Live 2020, 27 March 2020) diff --git a/source/texk/web2c/am/bootstrap.am b/source/texk/web2c/am/bootstrap.am index 5199f430e..63717703a 100644 --- a/source/texk/web2c/am/bootstrap.am +++ b/source/texk/web2c/am/bootstrap.am @@ -62,12 +62,11 @@ nodist_ctangle_SOURCES = ctangle.c cweb.c # ctangle.c and cweb.c are special cases, since they are needed to compile # themselves. We depend on ctangleboot, even though we might not use it. ctangleboot = AM_V_P=$(AM_V_P) $(SHELL) ./ctangleboot-sh $@ -ctangle.c: ctangleboot$(EXEEXT) cwebdir/comm-w2c.h cwebdir/ctangle.w cwebdir/ctang-w2c.ch ctangleboot-sh +ctangle.c: common-ctangle cwebdir/ctangle.w cwebdir/ctang-w2c.ch @$(ctangleboot) ctangle ctang-w2c -cweb.c: common-ctangle - @$(ctangleboot) common comm-w2c cweb.c -common-ctangle: ctangleboot$(EXEEXT) cwebdir/common.w cwebdir/comm-w2c.ch ctangleboot-sh +cweb.c: common-ctangle cwebdir/common.w cwebdir/comm-w2c.ch @$(ctangleboot) common comm-w2c cweb.c +common-ctangle: ctangleboot$(EXEEXT) cwebdir/comm-w2c.h ctangleboot-sh EXTRA_DIST += cwebdir NEVER_DIST += cwebdir/cweave.log cwebdir/cweave.trs NEVER_DIST += cwebdir/ctwill.log cwebdir/ctwill.trs diff --git a/source/texk/web2c/am/texmf.am b/source/texk/web2c/am/texmf.am index ec4904863..d8e35695e 100644 --- a/source/texk/web2c/am/texmf.am +++ b/source/texk/web2c/am/texmf.am @@ -1,4 +1,4 @@ -## $Id: texmf.am 53155 2019-12-17 19:24:59Z karl $ +## $Id: texmf.am 57736 2021-02-13 23:02:37Z karl $ ## texk/web2c/am/texmf.am: Makefile fragment for TeX and MF. ## ## Copyright 2015-2019 Karl Berry @@ -64,7 +64,9 @@ tex-final.ch: tie$(EXEEXT) $(tex_ch_srcs) tex_ch_srcs = \ tex.web \ tex.ch \ - enctex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-tex.ch \ + enctexdir/enctex2.ch \ $(tex_ch_synctex) \ tex-binpool.ch ## diff --git a/source/texk/web2c/configure b/source/texk/web2c/configure index 8a4d1dd47..abbb8344f 100755 --- a/source/texk/web2c/configure +++ b/source/texk/web2c/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Web2C 2021/dev. +# Generated by GNU Autoconf 2.69 for Web2C 2021. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Web2C' PACKAGE_TARNAME='web2c' -PACKAGE_VERSION='2021/dev' -PACKAGE_STRING='Web2C 2021/dev' +PACKAGE_VERSION='2021' +PACKAGE_STRING='Web2C 2021' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1618,7 +1618,7 @@ if test "$ac_init_help" = "long"; then # 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 Web2C 2021/dev to adapt to many kinds of systems. +\`configure' configures Web2C 2021 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1692,7 +1692,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Web2C 2021/dev:";; + short | recursive ) echo "Configuration of Web2C 2021:";; esac cat <<\_ACEOF @@ -1911,7 +1911,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Web2C configure 2021/dev +Web2C configure 2021 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3000,7 +3000,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Web2C $as_me 2021/dev, which was +It was created by Web2C $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3381,7 +3381,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -WEB2CVERSION=2021/dev +WEB2CVERSION=2021 am__api_version='1.16' @@ -8685,7 +8685,7 @@ fi # Define the identity of the package. PACKAGE='web2c' - VERSION='2021/dev' + VERSION='2021' cat >>confdefs.h <<_ACEOF @@ -23679,7 +23679,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -Web2C config.lt 2021/dev +Web2C config.lt 2021 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -27092,7 +27092,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Web2C $as_me 2021/dev, which was +This file was extended by Web2C $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -27162,7 +27162,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Web2C config.status 2021/dev +Web2C config.status 2021 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/texk/web2c/ctangleboot.cin b/source/texk/web2c/ctangleboot.cin index afd215a5b..4f5f78b7e 100644 --- a/source/texk/web2c/ctangleboot.cin +++ b/source/texk/web2c/ctangleboot.cin @@ -1,14 +1,8 @@ /*1:*/ -#line 64 "cwebdir/ctangle.w" - -/*2:*/ -#line 73 "cwebdir/ctang-w2c.ch" - -#include -#line 83 "cwebdir/ctangle.w" +#line 66 "cwebdir/ctangle.w" -/*:2*//*6:*/ -#line 52 "cwebdir/comm-w2c.h" +/*4:*/ +#line 53 "cwebdir/comm-w2c.h" #ifndef HAVE_GETTEXT #define HAVE_GETTEXT 0 @@ -20,33 +14,20 @@ #define gettext(A) A #endif +#include #include +#include #include -#include - -/*:6*//*62:*/ -#line 888 "cwebdir/ctangle.w" - -#include #include +#include +#include -/*:62*/ -#line 65 "cwebdir/ctangle.w" +/*:4*/ +#line 67 "cwebdir/ctangle.w" -#define banner "This is CTANGLE, Version 3.64" \ +#define banner "This is CTANGLE, Version 4.2" \ \ -#define max_bytes 1000000 \ - -#define max_toks 1000000 -#define max_names 10239 \ - -#define max_texts 10239 -#define hash_size 8501 -#define longest_name 10000 -#define stack_size 50 -#define buf_size 1000 \ - #define _(S) gettext(S) \ #define and_and 04 @@ -72,13 +53,21 @@ #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 @@ -87,15 +76,11 @@ #define mark_harmless {if(history==spotless) history= harmless_message;} #define mark_error history= error_message #define confusion(s) fatal(_("! This can't happen: ") ,s) \ - -#define max_file_name_length 1024 -#define cur_file file[include_depth] -#define cur_file_name file_name[include_depth] -#define web_file_name file_name[0] -#define cur_line line[include_depth] \ + \ #define show_banner flags['b'] #define show_progress flags['p'] +#define show_stats flags['s'] #define show_happiness flags['h'] #define temporary_output flags['t'] #define make_xrefs flags['x'] \ @@ -107,6 +92,18 @@ #define C_printf(c,a) fprintf(C_file,c,a) #define C_putc(c) putc(c,C_file) \ +#define max_bytes 1000000 \ + +#define max_toks 1000000 +#define max_names 10239 \ + +#define max_sections 4000 +#define max_texts 10239 +#define longest_name 10000 +#define stack_size 500 +#define buf_size 1000 +#define long_buf_size (buf_size+longest_name) \ + #define equiv equiv_or_xref \ #define section_flag max_texts \ @@ -148,10 +145,10 @@ #define isxalpha(c) ((c) =='_'||(c) =='$') \ -#define ishigh(c) ((unsigned char) (c) > 0177) \ +#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;} \ @@ -159,10 +156,10 @@ #define max_banner 50 \ -#line 66 "cwebdir/ctangle.w" +#line 68 "cwebdir/ctangle.w" -/*5:*/ -#line 34 "cwebdir/comm-w2c.h" +/*3:*/ +#line 35 "cwebdir/comm-w2c.h" typedef bool boolean; typedef uint8_t eight_bits; @@ -173,24 +170,49 @@ ctangle,cweave,ctwill extern cweb program; extern int phase; -/*:5*//*7:*/ -#line 86 "cwebdir/comm-w2c.h" +/*:3*//*5:*/ +#line 91 "cwebdir/comm-w2c.h" extern char section_text[]; extern char*section_text_end; extern char*id_first; extern char*id_loc; -/*:7*//*8:*/ -#line 101 "cwebdir/comm-w2c.h" +/*:5*//*6:*/ +#line 105 "cwebdir/comm-w2c.h" extern char buffer[]; extern char*buffer_end; extern char*loc; extern char*limit; -/*:8*//*9:*/ -#line 116 "cwebdir/comm-w2c.h" +/*:6*//*7:*/ +#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; @@ -206,99 +228,51 @@ typedef name_info*name_pointer; typedef name_pointer*hash_pointer; extern char byte_mem[]; extern char*byte_mem_end; +extern char*byte_ptr; extern name_info name_dir[]; extern name_pointer name_dir_end; extern name_pointer name_ptr; -extern char*byte_ptr; extern name_pointer hash[]; extern hash_pointer hash_end; extern hash_pointer h; -extern boolean names_match(name_pointer,const char*,size_t,eight_bits); -extern name_pointer id_lookup(const char*,const char*,char); - -extern name_pointer section_lookup(char*,char*,int); -extern void init_node(name_pointer); -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); -/*:9*//*10:*/ -#line 157 "cwebdir/comm-w2c.h" +/*:10*//*12:*/ +#line 201 "cwebdir/comm-w2c.h" extern int history; -extern int wrap_up(void); -extern void err_print(const char*); -extern void fatal(const char*,const char*); -extern void overflow(const char*); -/*:10*//*11:*/ -#line 172 "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 check_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; -extern boolean get_line(void); -extern void check_complete(void); -extern void reset_input(void); - -/*:11*//*12:*/ -#line 195 "cwebdir/comm-w2c.h" - -extern sixteen_bits section_count; -extern boolean changed_section[]; -extern boolean change_pending; -extern boolean print_where; - -/*:12*//*13:*/ -#line 208 "cwebdir/comm-w2c.h" - -extern int argc; -extern char**argv; extern boolean flags[]; +extern const char*use_language; -/*:13*//*14:*/ -#line 220 "cwebdir/comm-w2c.h" +/*:14*//*15:*/ +#line 235 "cwebdir/comm-w2c.h" extern FILE*C_file; extern FILE*tex_file; extern FILE*idx_file; extern FILE*scn_file; -extern FILE*check_file; extern FILE*active_file; +extern FILE*check_file; -/*:14*//*15:*/ -#line 230 "cwebdir/comm-w2c.h" - -extern void common_init(void); -extern void print_stats(void); -extern void cb_show_banner(void); -#line 128 "cwebdir/ctangle.w" - -/*:15*//*108:*/ -#line 903 "cwebdir/ctang-w2c.ch" +/*:15*//*115:*/ +#line 473 "cwebdir/ctang-w2c.ch" extern char cb_banner[]; -/*:108*/ -#line 67 "cwebdir/ctangle.w" +/*:115*/ +#line 69 "cwebdir/ctangle.w" -/*16:*/ -#line 152 "cwebdir/ctangle.w" +/*19:*/ +#line 122 "cwebdir/ctangle.w" typedef struct{ eight_bits*tok_start; @@ -306,8 +280,8 @@ sixteen_bits text_link; }text; typedef text*text_pointer; -/*:16*//*27:*/ -#line 296 "cwebdir/ctangle.w" +/*:19*//*31:*/ +#line 269 "cwebdir/ctangle.w" typedef struct{ eight_bits*end_field; @@ -318,190 +292,220 @@ sixteen_bits section_field; }output_state; typedef output_state*stack_pointer; -/*:27*/ -#line 68 "cwebdir/ctangle.w" +/*:31*/ +#line 70 "cwebdir/ctangle.w" -/*17:*/ -#line 159 "cwebdir/ctangle.w" +/*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; -/*:17*//*23:*/ -#line 227 "cwebdir/ctangle.w" +/*:20*//*26:*/ +#line 198 "cwebdir/ctangle.w" -text_pointer last_unnamed; +static text_pointer last_unnamed; -/*:23*//*28:*/ -#line 312 "cwebdir/ctangle.w" +/*:26*//*32:*/ +#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; -/*:28*//*32:*/ -#line 384 "cwebdir/ctangle.w" +/*:32*//*37:*/ +#line 361 "cwebdir/ctangle.w" -int cur_val; +static int cur_val; -/*:32*//*36:*/ -#line 473 "cwebdir/ctangle.w" +/*:37*//*42:*/ +#line 452 "cwebdir/ctangle.w" -eight_bits out_state; -boolean protect; +static eight_bits out_state; +static boolean protect; -/*:36*//*38:*/ -#line 502 "cwebdir/ctangle.w" +/*:42*//*45:*/ +#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]; +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]; -/*:38*//*45:*/ -#line 599 "cwebdir/ctangle.w" +/*:45*//*52:*/ +#line 582 "cwebdir/ctangle.w" -boolean output_defs_seen= 0; +static boolean output_defs_seen= false; -/*:45*//*51:*/ -#line 710 "cwebdir/ctangle.w" +/*:52*//*57:*/ +#line 691 "cwebdir/ctangle.w" -char translit[128][translit_length]; +static char translit[128][translit_length]; -/*:51*//*56:*/ -#line 789 "cwebdir/ctangle.w" +/*:57*//*62:*/ +#line 770 "cwebdir/ctangle.w" -eight_bits ccode[256]; +static eight_bits ccode[256]; -/*:56*//*59:*/ -#line 845 "cwebdir/ctangle.w" +/*:62*//*66:*/ +#line 830 "cwebdir/ctangle.w" -boolean comment_continues= 0; +static boolean comment_continues= false; -/*:59*//*61:*/ -#line 884 "cwebdir/ctangle.w" +/*:66*//*68:*/ +#line 869 "cwebdir/ctangle.w" -name_pointer cur_section_name; -int no_where; +static name_pointer cur_section_name; +static boolean no_where; -/*:61*//*75:*/ -#line 1195 "cwebdir/ctangle.w" +/*:68*//*82:*/ +#line 1182 "cwebdir/ctangle.w" -text_pointer cur_text; -eight_bits next_control; +static text_pointer cur_text; +static eight_bits next_control; -/*:75*//*82:*/ -#line 1353 "cwebdir/ctangle.w" +/*:82*/ +#line 71 "cwebdir/ctangle.w" -extern sixteen_bits section_count; +/*8:*/ +#line 137 "cwebdir/comm-w2c.h" -/*:82*/ -#line 69 "cwebdir/ctangle.w" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); -/*41:*/ -#line 533 "cwebdir/ctangle.w" +/*:8*//*11:*/ +#line 180 "cwebdir/comm-w2c.h" -#line 264 "cwebdir/ctang-w2c.ch" -static void phase_two(void); -#line 535 "cwebdir/ctangle.w" +extern boolean names_match(name_pointer,const char*,size_t,eight_bits); +extern name_pointer id_lookup(const char*,const char*,char); -/*:41*//*46:*/ -#line 602 "cwebdir/ctangle.w" +extern name_pointer section_lookup(char*,char*,int); +extern void init_node(name_pointer); +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); -#line 351 "cwebdir/ctang-w2c.ch" -static void output_defs(void); -#line 604 "cwebdir/ctangle.w" +/*:11*//*13:*/ +#line 204 "cwebdir/comm-w2c.h" -/*:46*//*48:*/ -#line 648 "cwebdir/ctangle.w" +extern int wrap_up(void); +extern void err_print(const char*); +extern void fatal(const char*,const char*); +extern void overflow(const char*); -#line 371 "cwebdir/ctang-w2c.ch" -static void out_char(eight_bits); -#line 650 "cwebdir/ctangle.w" +/*:13*//*16:*/ +#line 244 "cwebdir/comm-w2c.h" -/*:48*//*90:*/ -#line 1460 "cwebdir/ctangle.w" +extern void common_init(void); +extern void print_stats(void); +extern void cb_show_banner(void); -#line 667 "cwebdir/ctang-w2c.ch" -static void phase_one(void); -#line 1462 "cwebdir/ctangle.w" +/*:16*//*30:*/ +#line 241 "cwebdir/ctangle.w" +static void store_two_bytes(sixteen_bits); -/*:90*//*92:*/ -#line 1478 "cwebdir/ctangle.w" +/*:30*//*35:*/ +#line 324 "cwebdir/ctangle.w" -#line 681 "cwebdir/ctang-w2c.ch" -static void skip_limbo(void); -#line 1480 "cwebdir/ctangle.w" +static void push_level(name_pointer); +static void pop_level(boolean); -/*:92*//*97:*/ -#line 766 "cwebdir/ctang-w2c.ch" +/*:35*//*39:*/ +#line 397 "cwebdir/ctangle.w" +static void get_output(void); + +/*:39*//*44:*/ +#line 473 "cwebdir/ctangle.w" +static void flush_buffer(void); + +/*:44*//*49:*/ +#line 549 "cwebdir/ctangle.w" +static void phase_two(void); + +/*:49*//*53:*/ +#line 585 "cwebdir/ctangle.w" + +static void output_defs(void); +static void out_char(eight_bits); + +/*:53*//*65:*/ +#line 810 "cwebdir/ctangle.w" -static eight_bits get_next(void); static eight_bits skip_ahead(void); static boolean skip_comment(boolean); -static void flush_buffer(void); -static void get_output(void); -static void pop_level(int); -static void push_level(name_pointer); + +/*:65*//*70:*/ +#line 924 "cwebdir/ctangle.w" +static eight_bits get_next(void); + +/*:70*//*84:*/ +#line 1208 "cwebdir/ctangle.w" static void scan_repl(eight_bits); + +/*:84*//*91:*/ +#line 1379 "cwebdir/ctangle.w" static void scan_section(void); -static void store_two_bytes(sixteen_bits); -/*:97*/ -#line 70 "cwebdir/ctangle.w" +/*:91*//*99:*/ +#line 1460 "cwebdir/ctangle.w" +static void phase_one(void); + +/*:99*//*101:*/ +#line 1494 "cwebdir/ctangle.w" +static void skip_limbo(void); + +/*:101*/ +#line 72 "cwebdir/ctangle.w" -#line 68 "cwebdir/ctang-w2c.ch" -/*:1*//*3:*/ -#line 91 "cwebdir/ctangle.w" +/*:1*//*2:*/ +#line 81 "cwebdir/ctangle.w" -#line 82 "cwebdir/ctang-w2c.ch" int main( int ac, char**av) -#line 95 "cwebdir/ctangle.w" { argc= ac;argv= av; program= ctangle; -/*18:*/ -#line 167 "cwebdir/ctangle.w" +/*21:*/ +#line 137 "cwebdir/ctangle.w" text_info->tok_start= tok_ptr= tok_mem; text_ptr= text_info+1;text_ptr->tok_start= tok_mem; -/*:18*//*20:*/ -#line 177 "cwebdir/ctangle.w" +/*:21*//*23:*/ +#line 147 "cwebdir/ctangle.w" -#line 143 "cwebdir/ctang-w2c.ch" init_node(name_dir); -#line 179 "cwebdir/ctangle.w" -/*:20*//*24:*/ -#line 230 "cwebdir/ctangle.w" +/*:23*//*27:*/ +#line 201 "cwebdir/ctangle.w" last_unnamed= text_info;text_info->text_link= 0; -/*:24*//*39:*/ -#line 512 "cwebdir/ctangle.w" +/*:27*//*46:*/ +#line 493 "cwebdir/ctangle.w" cur_out_file= end_output_files= output_files+max_files; -/*:39*//*52:*/ -#line 713 "cwebdir/ctangle.w" +/*:46*//*58:*/ +#line 694 "cwebdir/ctangle.w" { int i; -for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i)); +for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i)); } -/*:52*//*57:*/ -#line 792 "cwebdir/ctangle.w" +/*:58*//*63:*/ +#line 773 "cwebdir/ctangle.w" { int c; for(c= 0;c<256;c++)ccode[c]= ignore; @@ -520,88 +524,76 @@ ccode['<']= ccode['(']= section_name; ccode['\'']= ord; } -/*:57*//*71:*/ -#line 1116 "cwebdir/ctangle.w" +/*:63*//*78:*/ +#line 1103 "cwebdir/ctangle.w" section_text[0]= ' '; -/*:71*//*109:*/ -#line 906 "cwebdir/ctang-w2c.ch" +/*:78*//*116:*/ +#line 476 "cwebdir/ctang-w2c.ch" strncpy(cb_banner,banner,max_banner-1); -/*:109*/ -#line 98 "cwebdir/ctangle.w" -; +/*:116*/ +#line 88 "cwebdir/ctangle.w" + common_init(); -#line 90 "cwebdir/ctang-w2c.ch" +#line 53 "cwebdir/ctang-w2c.ch" if(show_banner)cb_show_banner(); -#line 101 "cwebdir/ctangle.w" +#line 91 "cwebdir/ctangle.w" phase_one(); phase_two(); return wrap_up(); } -/*:3*//*21:*/ -#line 183 "cwebdir/ctangle.w" +/*:2*//*24:*/ +#line 153 "cwebdir/ctangle.w" -#line 153 "cwebdir/ctang-w2c.ch" boolean names_match( name_pointer p, const char*first, size_t l, eight_bits t) {(void)t; -#line 189 "cwebdir/ctangle.w" -if(length(p)!=l)return 0; +if(length(p)!=l)return false; return!strncmp(first,p->byte_start,l); } -/*:21*//*22:*/ -#line 198 "cwebdir/ctangle.w" +/*:24*//*25:*/ +#line 169 "cwebdir/ctangle.w" -#line 166 "cwebdir/ctang-w2c.ch" void init_node( name_pointer node) -#line 202 "cwebdir/ctangle.w" { -#line 174 "cwebdir/ctang-w2c.ch" node->equiv= (void*)text_info; -#line 204 "cwebdir/ctangle.w" } -#line 181 "cwebdir/ctang-w2c.ch" void init_p(name_pointer p,eight_bits t){(void)p;(void)t;} -#line 207 "cwebdir/ctangle.w" -/*:22*//*26:*/ -#line 260 "cwebdir/ctangle.w" +/*:25*//*29:*/ +#line 231 "cwebdir/ctangle.w" -#line 190 "cwebdir/ctang-w2c.ch" static void store_two_bytes( sixteen_bits x) -#line 264 "cwebdir/ctangle.w" { -#line 198 "cwebdir/ctang-w2c.ch" +#line 65 "cwebdir/ctang-w2c.ch" if(tok_ptr+2> tok_mem_end)overflow(_("token")); -#line 266 "cwebdir/ctangle.w" +#line 237 "cwebdir/ctangle.w" *tok_ptr++= x>>8; *tok_ptr++= x&0377; } -/*:26*//*30:*/ -#line 336 "cwebdir/ctangle.w" +/*:29*//*34:*/ +#line 309 "cwebdir/ctangle.w" -#line 206 "cwebdir/ctang-w2c.ch" static void push_level( name_pointer p) -#line 340 "cwebdir/ctangle.w" { -#line 214 "cwebdir/ctang-w2c.ch" +#line 71 "cwebdir/ctang-w2c.ch" if(stack_ptr==stack_end)overflow(_("stack")); -#line 342 "cwebdir/ctangle.w" +#line 315 "cwebdir/ctangle.w" *stack_ptr= cur_state; stack_ptr++; if(p!=NULL){ @@ -611,14 +603,12 @@ cur_section= 0; } } -/*:30*//*31:*/ -#line 355 "cwebdir/ctangle.w" +/*:34*//*36:*/ +#line 332 "cwebdir/ctangle.w" -#line 222 "cwebdir/ctang-w2c.ch" static void pop_level( -int flag) -#line 359 "cwebdir/ctangle.w" +boolean flag) { if(flag&&cur_repl->text_linktext_link+text_info; @@ -629,19 +619,17 @@ stack_ptr--; if(stack_ptr> stack)cur_state= *stack_ptr; } -/*:31*//*33:*/ -#line 391 "cwebdir/ctangle.w" +/*:36*//*38:*/ +#line 368 "cwebdir/ctangle.w" -#line 231 "cwebdir/ctang-w2c.ch" static void get_output(void) -#line 394 "cwebdir/ctangle.w" { sixteen_bits a; 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; } @@ -654,27 +642,25 @@ a= (a-0200)*0400+*cur_byte++; switch(a/024000){ case 0:cur_val= a;out_char(identifier);break; case 1:if(a==output_defs_flag)output_defs(); -else/*34:*/ -#line 423 "cwebdir/ctangle.w" +else/*40:*/ +#line 402 "cwebdir/ctangle.w" { a-= 024000; -#line 238 "cwebdir/ctang-w2c.ch" if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir); -#line 427 "cwebdir/ctangle.w" else if(a!=0){ -#line 244 "cwebdir/ctang-w2c.ch" +#line 77 "cwebdir/ctang-w2c.ch" fputs(_("\n! Not present: <"),stdout); -#line 429 "cwebdir/ctangle.w" +#line 408 "cwebdir/ctangle.w" print_section_name(a+name_dir);err_print(">"); } goto restart; } -/*:34*/ -#line 412 "cwebdir/ctangle.w" -; +/*:40*/ +#line 389 "cwebdir/ctangle.w" + break; default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; out_char(section_number); @@ -682,13 +668,11 @@ out_char(section_number); } } -/*:33*//*37:*/ -#line 481 "cwebdir/ctangle.w" +/*:38*//*43:*/ +#line 460 "cwebdir/ctangle.w" -#line 251 "cwebdir/ctang-w2c.ch" static void flush_buffer(void) -#line 484 "cwebdir/ctangle.w" { C_putc('\n'); if(cur_line%100==0&&show_progress){ @@ -699,51 +683,49 @@ update_terminal; cur_line++; } -/*:37*//*42:*/ -#line 536 "cwebdir/ctangle.w" +/*:43*//*48:*/ +#line 514 "cwebdir/ctangle.w" -#line 271 "cwebdir/ctang-w2c.ch" static void phase_two(void){ -#line 539 "cwebdir/ctangle.w" -web_file_open= 0; +web_file_open= false; cur_line= 1; -/*29:*/ -#line 325 "cwebdir/ctangle.w" +/*33:*/ +#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; -/*:29*/ -#line 541 "cwebdir/ctangle.w" -; -/*44:*/ -#line 595 "cwebdir/ctangle.w" +/*:33*/ +#line 519 "cwebdir/ctangle.w" + +/*51:*/ +#line 578 "cwebdir/ctangle.w" if(!output_defs_seen) output_defs(); -/*:44*/ -#line 542 "cwebdir/ctangle.w" -; +/*:51*/ +#line 520 "cwebdir/ctangle.w" + if(text_info->text_link==0&&cur_out_file==end_output_files){ -#line 278 "cwebdir/ctang-w2c.ch" +#line 89 "cwebdir/ctang-w2c.ch" fputs(_("\n! No program text was specified."),stdout);mark_harmless; -#line 545 "cwebdir/ctangle.w" +#line 523 "cwebdir/ctangle.w" } else{ if(cur_out_file==end_output_files){ if(show_progress) -#line 284 "cwebdir/ctang-w2c.ch" +#line 95 "cwebdir/ctang-w2c.ch" printf(_("\nWriting the output file (%s):"),C_file_name); -#line 551 "cwebdir/ctangle.w" +#line 529 "cwebdir/ctangle.w" } else{ if(show_progress){ -#line 290 "cwebdir/ctang-w2c.ch" +#line 101 "cwebdir/ctang-w2c.ch" fputs(_("\nWriting the output files:"),stdout); -#line 555 "cwebdir/ctangle.w" +#line 533 "cwebdir/ctangle.w" printf(" (%s)",C_file_name); update_terminal; @@ -752,16 +734,16 @@ if(text_info->text_link==0)goto writeloop; } while(stack_ptr> stack)get_output(); flush_buffer(); -writeloop:/*43:*/ -#line 322 "cwebdir/ctang-w2c.ch" +writeloop:/*50:*/ +#line 130 "cwebdir/ctang-w2c.ch" fclose(C_file);C_file= NULL; -/*98:*/ -#line 786 "cwebdir/ctang-w2c.ch" +/*105:*/ +#line 356 "cwebdir/ctang-w2c.ch" if((C_file= fopen(C_file_name,"r"))!=NULL){ -/*99:*/ -#line 793 "cwebdir/ctang-w2c.ch" +/*106:*/ +#line 363 "cwebdir/ctang-w2c.ch" char x[BUFSIZ],y[BUFSIZ]; int x_size,y_size,comparison= false; @@ -770,8 +752,8 @@ if((check_file= fopen(check_file_name,"r"))==NULL) fatal(_("! Cannot open output file "),check_file_name); -if(temporary_output)/*100:*/ -#line 808 "cwebdir/ctang-w2c.ch" +if(temporary_output)/*107:*/ +#line 378 "cwebdir/ctang-w2c.ch" do{ x_size= fread(x,1,BUFSIZ,C_file); @@ -780,18 +762,18 @@ comparison= (x_size==y_size); if(comparison)comparison= !memcmp(x,y,x_size); }while(comparison&&!feof(C_file)&&!feof(check_file)); -/*:100*/ -#line 801 "cwebdir/ctang-w2c.ch" +/*:107*/ +#line 371 "cwebdir/ctang-w2c.ch" fclose(C_file);C_file= NULL; fclose(check_file);check_file= NULL; -/*:99*/ -#line 788 "cwebdir/ctang-w2c.ch" +/*:106*/ +#line 358 "cwebdir/ctang-w2c.ch" -/*101:*/ -#line 819 "cwebdir/ctang-w2c.ch" +/*108:*/ +#line 389 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -800,14 +782,14 @@ remove(C_file_name); rename(check_file_name,C_file_name); } -/*:101*/ -#line 789 "cwebdir/ctang-w2c.ch" +/*:108*/ +#line 359 "cwebdir/ctang-w2c.ch" }else rename(check_file_name,C_file_name); -/*:98*/ -#line 324 "cwebdir/ctang-w2c.ch" +/*:105*/ +#line 132 "cwebdir/ctang-w2c.ch" for(an_output_file= end_output_files;an_output_file> cur_out_file;){ an_output_file--; @@ -827,15 +809,15 @@ cur_byte= cur_repl->tok_start; cur_end= (cur_repl+1)->tok_start; while(stack_ptr> stack)get_output(); flush_buffer();fclose(C_file);C_file= NULL; -/*102:*/ -#line 832 "cwebdir/ctang-w2c.ch" +/*109:*/ +#line 402 "cwebdir/ctang-w2c.ch" if(0==strcmp("/dev/stdout",output_file_name)) -/*104:*/ -#line 859 "cwebdir/ctang-w2c.ch" +/*111:*/ +#line 429 "cwebdir/ctang-w2c.ch" { -/*107:*/ -#line 890 "cwebdir/ctang-w2c.ch" +/*114:*/ +#line 460 "cwebdir/ctang-w2c.ch" char in_buf[BUFSIZ+1]; int in_size,comparison= true; @@ -843,8 +825,8 @@ if((check_file= fopen(check_file_name,"r"))==NULL) fatal(_("! Cannot open output file "),check_file_name); -/*:107*/ -#line 860 "cwebdir/ctang-w2c.ch" +/*:114*/ +#line 430 "cwebdir/ctang-w2c.ch" do{ in_size= fread(in_buf,1,BUFSIZ,check_file); @@ -852,8 +834,8 @@ in_buf[in_size]= '\0'; fprintf(stdout,"%s",in_buf); }while(!feof(check_file)); fclose(check_file);check_file= NULL; -/*103:*/ -#line 849 "cwebdir/ctang-w2c.ch" +/*110:*/ +#line 419 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -862,20 +844,20 @@ remove(output_file_name); rename(check_file_name,output_file_name); } -/*:103*/ -#line 867 "cwebdir/ctang-w2c.ch" +/*:110*/ +#line 437 "cwebdir/ctang-w2c.ch" } -/*:104*/ -#line 834 "cwebdir/ctang-w2c.ch" +/*:111*/ +#line 404 "cwebdir/ctang-w2c.ch" else if(0==strcmp("/dev/stderr",output_file_name)) -/*105:*/ -#line 872 "cwebdir/ctang-w2c.ch" +/*112:*/ +#line 442 "cwebdir/ctang-w2c.ch" { -/*107:*/ -#line 890 "cwebdir/ctang-w2c.ch" +/*114:*/ +#line 460 "cwebdir/ctang-w2c.ch" char in_buf[BUFSIZ+1]; int in_size,comparison= true; @@ -883,8 +865,8 @@ if((check_file= fopen(check_file_name,"r"))==NULL) fatal(_("! Cannot open output file "),check_file_name); -/*:107*/ -#line 873 "cwebdir/ctang-w2c.ch" +/*:114*/ +#line 443 "cwebdir/ctang-w2c.ch" do{ in_size= fread(in_buf,1,BUFSIZ,check_file); @@ -892,8 +874,8 @@ in_buf[in_size]= '\0'; fprintf(stderr,"%s",in_buf); }while(!feof(check_file)); fclose(check_file);check_file= NULL; -/*103:*/ -#line 849 "cwebdir/ctang-w2c.ch" +/*110:*/ +#line 419 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -902,21 +884,21 @@ remove(output_file_name); rename(check_file_name,output_file_name); } -/*:103*/ -#line 880 "cwebdir/ctang-w2c.ch" +/*:110*/ +#line 450 "cwebdir/ctang-w2c.ch" } -/*:105*/ -#line 836 "cwebdir/ctang-w2c.ch" +/*:112*/ +#line 406 "cwebdir/ctang-w2c.ch" else if(0==strcmp("/dev/null",output_file_name)) -/*106:*/ -#line 885 "cwebdir/ctang-w2c.ch" +/*113:*/ +#line 455 "cwebdir/ctang-w2c.ch" { int comparison= true; -/*103:*/ -#line 849 "cwebdir/ctang-w2c.ch" +/*110:*/ +#line 419 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -925,18 +907,18 @@ remove(output_file_name); rename(check_file_name,output_file_name); } -/*:103*/ -#line 887 "cwebdir/ctang-w2c.ch" +/*:110*/ +#line 457 "cwebdir/ctang-w2c.ch" } -/*:106*/ -#line 838 "cwebdir/ctang-w2c.ch" +/*:113*/ +#line 408 "cwebdir/ctang-w2c.ch" else{ if((C_file= fopen(output_file_name,"r"))!=NULL){ -/*99:*/ -#line 793 "cwebdir/ctang-w2c.ch" +/*106:*/ +#line 363 "cwebdir/ctang-w2c.ch" char x[BUFSIZ],y[BUFSIZ]; int x_size,y_size,comparison= false; @@ -945,8 +927,8 @@ if((check_file= fopen(check_file_name,"r"))==NULL) fatal(_("! Cannot open output file "),check_file_name); -if(temporary_output)/*100:*/ -#line 808 "cwebdir/ctang-w2c.ch" +if(temporary_output)/*107:*/ +#line 378 "cwebdir/ctang-w2c.ch" do{ x_size= fread(x,1,BUFSIZ,C_file); @@ -955,18 +937,18 @@ comparison= (x_size==y_size); if(comparison)comparison= !memcmp(x,y,x_size); }while(comparison&&!feof(C_file)&&!feof(check_file)); -/*:100*/ -#line 801 "cwebdir/ctang-w2c.ch" +/*:107*/ +#line 371 "cwebdir/ctang-w2c.ch" fclose(C_file);C_file= NULL; fclose(check_file);check_file= NULL; -/*:99*/ -#line 841 "cwebdir/ctang-w2c.ch" +/*:106*/ +#line 411 "cwebdir/ctang-w2c.ch" -/*103:*/ -#line 849 "cwebdir/ctang-w2c.ch" +/*110:*/ +#line 419 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -975,39 +957,37 @@ remove(output_file_name); rename(check_file_name,output_file_name); } -/*:103*/ -#line 842 "cwebdir/ctang-w2c.ch" +/*:110*/ +#line 412 "cwebdir/ctang-w2c.ch" }else rename(check_file_name,output_file_name); } -/*:102*/ -#line 343 "cwebdir/ctang-w2c.ch" +/*:109*/ +#line 151 "cwebdir/ctang-w2c.ch" } strcpy(check_file_name,""); -#line 590 "cwebdir/ctangle.w" +#line 573 "cwebdir/ctangle.w" + +/*:50*/ +#line 541 "cwebdir/ctangle.w" -/*:43*/ -#line 563 "cwebdir/ctangle.w" -; -#line 296 "cwebdir/ctang-w2c.ch" if(show_happiness){ if(show_progress)new_line; +#line 107 "cwebdir/ctang-w2c.ch" fputs(_("Done."),stdout); +#line 545 "cwebdir/ctangle.w" } -#line 565 "cwebdir/ctangle.w" } } -/*:42*//*47:*/ -#line 605 "cwebdir/ctangle.w" +/*:48*//*54:*/ +#line 589 "cwebdir/ctangle.w" -#line 358 "cwebdir/ctang-w2c.ch" static void output_defs(void) -#line 608 "cwebdir/ctangle.w" { sixteen_bits a; push_level(NULL); @@ -1017,7 +997,7 @@ cur_byte= cur_text->tok_start; cur_end= (cur_text+1)->tok_start; C_printf("%s","#define "); out_state= normal; -protect= 1; +protect= true; while(cur_bytebyte_start; k= (cur_val+name_dir+1)->byte_start; while(j 0)C_printf("/*%d:*/",cur_val); @@ -1105,11 +1083,11 @@ C_printf("%s","\"\n"); } break; -/*:54*/ -#line 663 "cwebdir/ctangle.w" -; -/*50:*/ -#line 404 "cwebdir/ctang-w2c.ch" +/*:60*/ +#line 644 "cwebdir/ctangle.w" + +/*56:*/ +#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; @@ -1128,11 +1106,10 @@ case colon_colon:C_putc(':');C_putc(':');out_state= normal;break; case period_ast:C_putc('.');C_putc('*');out_state= normal;break; case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal; break; -#line 699 "cwebdir/ctangle.w" -/*:50*/ -#line 664 "cwebdir/ctangle.w" -; +/*:56*/ +#line 645 "cwebdir/ctangle.w" + case'=':case'>':C_putc(cur_char);C_putc(' '); out_state= normal;break; case join:out_state= unbreakable;break; @@ -1149,85 +1126,78 @@ default:C_putc(cur_char);out_state= normal;break; } } -#line 404 "cwebdir/ctang-w2c.ch" -/*:49*//*58:*/ -#line 813 "cwebdir/ctangle.w" +/*:55*//*64:*/ +#line 794 "cwebdir/ctangle.w" -#line 428 "cwebdir/ctang-w2c.ch" static eight_bits skip_ahead(void) -#line 816 "cwebdir/ctangle.w" { 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; } } } -/*:58*//*60:*/ -#line 848 "cwebdir/ctangle.w" +/*:64*//*67:*/ +#line 833 "cwebdir/ctangle.w" -#line 436 "cwebdir/ctang-w2c.ch" static boolean skip_comment( boolean is_long_comment) -#line 851 "cwebdir/ctangle.w" { 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 443 "cwebdir/ctang-w2c.ch" +#line 165 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in mid-comment")); -#line 859 "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 449 "cwebdir/ctang-w2c.ch" +#line 171 "cwebdir/ctang-w2c.ch" err_print(_("! Section name ended in mid-comment"));loc--; -#line 872 "cwebdir/ctangle.w" +#line 857 "cwebdir/ctangle.w" -return(comment_continues= 0); +return comment_continues= false; } else loc++; } } } -/*:60*//*63:*/ -#line 900 "cwebdir/ctangle.w" +/*:67*//*69:*/ +#line 881 "cwebdir/ctangle.w" -#line 456 "cwebdir/ctang-w2c.ch" static eight_bits get_next(void) -#line 903 "cwebdir/ctangle.w" { 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; -/*77:*/ -#line 1225 "cwebdir/ctangle.w" +print_where= false; +/*85:*/ +#line 1214 "cwebdir/ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -1238,27 +1208,25 @@ id_first= cur_file_name; store_two_bytes((sixteen_bits)cur_line); } id_loc= id_first+strlen(id_first); -#line 598 "cwebdir/ctang-w2c.ch" {int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200); app_repl(a_l%0400);} -#line 1237 "cwebdir/ctangle.w" -/*:77*/ -#line 912 "cwebdir/ctangle.w" -; +/*:85*/ +#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=='.')/*66:*/ -#line 978 "cwebdir/ctangle.w" +if(xisdigit(c)||c=='.')/*73:*/ +#line 964 "cwebdir/ctangle.w" { id_first= loc-1; if(*id_first=='.'&&!xisdigit(*loc))goto mistake; @@ -1279,41 +1247,37 @@ while(xisdigit(*loc))loc++; found:while(*loc=='u'||*loc=='U'||*loc=='l'||*loc=='L' ||*loc=='f'||*loc=='F')loc++; id_loc= loc; -return(constant); +return constant; } -/*:66*/ -#line 924 "cwebdir/ctangle.w" +/*:73*/ +#line 905 "cwebdir/ctangle.w" -#line 463 "cwebdir/ctang-w2c.ch" else if(c=='\''||c=='"' ||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"')) ||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"'))) -#line 926 "cwebdir/ctangle.w" -/*67:*/ -#line 1006 "cwebdir/ctangle.w" +/*74:*/ +#line 992 "cwebdir/ctangle.w" { char delim= c; id_first= section_text+1; id_loc= section_text;*++id_loc= delim; -#line 494 "cwebdir/ctang-w2c.ch" if(delim=='L'||delim=='u'||delim=='U'){ if(delim=='u'&&*loc=='8'){*++id_loc= *loc++;} delim= *loc++;*++id_loc= delim; } -#line 1013 "cwebdir/ctangle.w" -while(1){ +while(true){ if(loc>=limit){ if(*(limit-1)!='\\'){ -#line 503 "cwebdir/ctang-w2c.ch" +#line 177 "cwebdir/ctang-w2c.ch" err_print(_("! String didn't end"));loc= limit;break; -#line 1017 "cwebdir/ctangle.w" +#line 1004 "cwebdir/ctangle.w" } -if(get_line()==0){ -#line 509 "cwebdir/ctang-w2c.ch" +if(get_line()==false){ +#line 183 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in middle of string"));loc= buffer;break; -#line 1021 "cwebdir/ctangle.w" +#line 1008 "cwebdir/ctangle.w" } else if(++id_loc<=section_text_end)*id_loc= '\n'; @@ -1331,74 +1295,72 @@ c= *loc++; if(++id_loc<=section_text_end)*id_loc= c; } if(id_loc>=section_text_end){ -#line 515 "cwebdir/ctang-w2c.ch" +#line 189 "cwebdir/ctang-w2c.ch" fputs(_("\n! String too long: "),stdout); -#line 1039 "cwebdir/ctangle.w" +#line 1026 "cwebdir/ctangle.w" term_write(section_text+1,25); err_print("..."); } id_loc++; -return(string); +return string; } -/*:67*/ -#line 926 "cwebdir/ctangle.w" +/*:74*/ +#line 909 "cwebdir/ctangle.w" else if(isalpha(c)||isxalpha(c)||ishigh(c)) -/*65:*/ -#line 972 "cwebdir/ctangle.w" +/*72:*/ +#line 957 "cwebdir/ctangle.w" { id_first= --loc; -#line 485 "cwebdir/ctang-w2c.ch" while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc) ||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc)); -#line 975 "cwebdir/ctangle.w" -id_loc= loc;return(identifier); +id_loc= loc;return identifier; } -/*:65*/ -#line 928 "cwebdir/ctangle.w" +/*:72*/ +#line 911 "cwebdir/ctangle.w" -else if(c=='@')/*68:*/ -#line 1050 "cwebdir/ctangle.w" +else if(c=='@')/*75:*/ +#line 1037 "cwebdir/ctangle.w" { c= ccode[(eight_bits)*loc++]; switch(c){ case ignore:continue; -#line 521 "cwebdir/ctang-w2c.ch" +#line 195 "cwebdir/ctang-w2c.ch" case translit_code:err_print(_("! Use @l in limbo only"));continue; -#line 1055 "cwebdir/ctangle.w" +#line 1042 "cwebdir/ctangle.w" case control_text:while((c= skip_ahead())=='@'); if(*(loc-1)!='>') -#line 527 "cwebdir/ctang-w2c.ch" +#line 201 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in control text")); -#line 1060 "cwebdir/ctangle.w" +#line 1047 "cwebdir/ctangle.w" continue; case section_name: cur_section_name_char= *(loc-1); -/*70:*/ -#line 1098 "cwebdir/ctangle.w" +/*77:*/ +#line 1085 "cwebdir/ctangle.w" { char*k; -/*72:*/ -#line 1118 "cwebdir/ctangle.w" +/*79:*/ +#line 1105 "cwebdir/ctangle.w" k= section_text; -while(1){ -if(loc> limit&&get_line()==0){ -#line 545 "cwebdir/ctang-w2c.ch" +while(true){ +if(loc> limit&&get_line()==false){ +#line 219 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in section name")); -#line 1123 "cwebdir/ctangle.w" +#line 1110 "cwebdir/ctangle.w" loc= buffer+1;break; } c= *loc; -/*73:*/ -#line 1142 "cwebdir/ctangle.w" +/*80:*/ +#line 1129 "cwebdir/ctangle.w" if(c=='@'){ c= *(loc+1); @@ -1406,23 +1368,23 @@ if(c=='>'){ loc+= 2;break; } if(ccode[(eight_bits)c]==new_section){ -#line 557 "cwebdir/ctang-w2c.ch" +#line 231 "cwebdir/ctang-w2c.ch" err_print(_("! Section name didn't end"));break; -#line 1150 "cwebdir/ctangle.w" +#line 1137 "cwebdir/ctangle.w" } if(ccode[(eight_bits)c]==section_name){ -#line 563 "cwebdir/ctang-w2c.ch" +#line 237 "cwebdir/ctang-w2c.ch" err_print(_("! Nesting of section names not allowed"));break; -#line 1154 "cwebdir/ctangle.w" +#line 1141 "cwebdir/ctangle.w" } *(++k)= '@';loc++; } -/*:73*/ -#line 1127 "cwebdir/ctangle.w" -; +/*:80*/ +#line 1114 "cwebdir/ctangle.w" + loc++;if(k=section_text_end){ -#line 551 "cwebdir/ctang-w2c.ch" +#line 225 "cwebdir/ctang-w2c.ch" fputs(_("\n! Section name too long: "),stdout); -#line 1136 "cwebdir/ctangle.w" +#line 1123 "cwebdir/ctangle.w" term_write(section_text+1,25); printf("...");mark_harmless; } if(*k==' '&&k> section_text)k--; -/*:72*/ -#line 1100 "cwebdir/ctangle.w" -; +/*:79*/ +#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); else cur_section_name= section_lookup(section_text+1,k,0); if(cur_section_name_char=='(') -/*40:*/ -#line 516 "cwebdir/ctangle.w" +/*47:*/ +#line 497 "cwebdir/ctangle.w" { for(an_output_file= cur_out_file; @@ -1457,40 +1419,40 @@ if(an_output_file==end_output_files){ if(cur_out_file> output_files) *--cur_out_file= cur_section_name; else{ -#line 258 "cwebdir/ctang-w2c.ch" +#line 83 "cwebdir/ctang-w2c.ch" overflow(_("output files")); -#line 526 "cwebdir/ctangle.w" +#line 507 "cwebdir/ctangle.w" } } } -/*:40*/ -#line 1106 "cwebdir/ctangle.w" -; -return(section_name); +/*:47*/ +#line 1093 "cwebdir/ctangle.w" + +return section_name; } -/*:70*/ -#line 1064 "cwebdir/ctangle.w" -; -case string:/*74:*/ -#line 1164 "cwebdir/ctangle.w" +/*:77*/ +#line 1051 "cwebdir/ctangle.w" + +case string:/*81:*/ +#line 1151 "cwebdir/ctangle.w" { id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; while(*loc!='@'||*(loc+1)!='>')loc++; -#line 569 "cwebdir/ctang-w2c.ch" +#line 243 "cwebdir/ctang-w2c.ch" if(loc>=limit)err_print(_("! Verbatim string didn't end")); -#line 1168 "cwebdir/ctangle.w" +#line 1155 "cwebdir/ctangle.w" id_loc= loc;loc+= 2; -return(string); +return string; } -/*:74*/ -#line 1065 "cwebdir/ctangle.w" -; -case ord:/*69:*/ -#line 1077 "cwebdir/ctangle.w" +/*:81*/ +#line 1052 "cwebdir/ctangle.w" + +case ord:/*76:*/ +#line 1064 "cwebdir/ctangle.w" id_first= loc; if(*loc=='\\'){ @@ -1499,49 +1461,47 @@ if(*++loc=='\'')loc++; while(*loc!='\''){ if(*loc=='@'){ if(*(loc+1)!='@') -#line 533 "cwebdir/ctang-w2c.ch" +#line 207 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in ASCII constant")); -#line 1086 "cwebdir/ctangle.w" +#line 1073 "cwebdir/ctangle.w" else loc++; } loc++; if(loc> limit){ -#line 539 "cwebdir/ctang-w2c.ch" +#line 213 "cwebdir/ctang-w2c.ch" err_print(_("! String didn't end"));loc= limit-1;break; -#line 1092 "cwebdir/ctangle.w" +#line 1079 "cwebdir/ctangle.w" } } loc++; -return(ord); +return ord; -/*:69*/ -#line 1066 "cwebdir/ctangle.w" -; -default:return(c); +/*:76*/ +#line 1053 "cwebdir/ctangle.w" + +default:return c; } } -/*:68*/ -#line 929 "cwebdir/ctangle.w" +/*:75*/ +#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:/*64:*/ -#line 950 "cwebdir/ctangle.w" +mistake:/*71:*/ +#line 935 "cwebdir/ctangle.w" switch(c){ case'+':if(*loc=='+')compress(plus_plus);break; case'-':if(*loc=='-'){compress(minus_minus);} -#line 472 "cwebdir/ctang-w2c.ch" else{if(*loc=='>'){if(*(loc+1)=='*'){loc++;compress(minus_gt_ast);} else compress(minus_gt);}}break; -#line 956 "cwebdir/ctangle.w" case'.':if(*loc=='*'){compress(period_ast);} else if(*loc=='.'&&*(loc+1)=='.'){ loc++;compress(dot_dot_dot); @@ -1555,30 +1515,26 @@ case'<':if(*loc=='='){compress(lt_eq);} else if(*loc=='<')compress(lt_lt);break; case'&':if(*loc=='&')compress(and_and);break; case'|':if(*loc=='|')compress(or_or);break; -#line 479 "cwebdir/ctang-w2c.ch" case'!':if(*loc=='=')compress(non_eq);break; -#line 970 "cwebdir/ctangle.w" } -/*:64*/ -#line 936 "cwebdir/ctangle.w" +/*:71*/ +#line 919 "cwebdir/ctangle.w" -return(c); +return c; } } -/*:63*//*76:*/ -#line 1199 "cwebdir/ctangle.w" +/*:69*//*83:*/ +#line 1186 "cwebdir/ctangle.w" -#line 583 "cwebdir/ctang-w2c.ch" static void scan_repl( eight_bits t) -#line 1203 "cwebdir/ctangle.w" { sixteen_bits a; -if(t==section_name){/*77:*/ -#line 1225 "cwebdir/ctangle.w" +if(t==section_name){/*85:*/ +#line 1214 "cwebdir/ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -1589,46 +1545,44 @@ id_first= cur_file_name; store_two_bytes((sixteen_bits)cur_line); } id_loc= id_first+strlen(id_first); -#line 598 "cwebdir/ctang-w2c.ch" {int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200); app_repl(a_l%0400);} -#line 1237 "cwebdir/ctangle.w" -/*:77*/ -#line 1205 "cwebdir/ctangle.w" -;} -while(1)switch(a= get_next()){ -/*78:*/ -#line 1238 "cwebdir/ctangle.w" +/*:85*/ +#line 1192 "cwebdir/ctangle.w" +} +while(true)switch(a= get_next()){ +/*86:*/ +#line 1227 "cwebdir/ctangle.w" case identifier:a= id_lookup(id_first,id_loc,0)-name_dir; app_repl((a/0400)+0200); app_repl(a%0400);break; case section_name:if(t!=section_name)goto done; else{ -/*79:*/ -#line 1271 "cwebdir/ctangle.w" +/*87:*/ +#line 1260 "cwebdir/ctangle.w" { char*try_loc= loc; while(*try_loc==' '&&try_loc text_info_end)overflow(_("text")); -#line 1218 "cwebdir/ctangle.w" +#line 1205 "cwebdir/ctangle.w" cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; } -/*:76*//*83:*/ -#line 1360 "cwebdir/ctangle.w" +/*:83*//*90:*/ +#line 1346 "cwebdir/ctangle.w" -#line 648 "cwebdir/ctang-w2c.ch" static void scan_section(void) -#line 1363 "cwebdir/ctangle.w" { 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){ -/*84:*/ -#line 1399 "cwebdir/ctangle.w" +while(true){ +/*92:*/ +#line 1387 "cwebdir/ctangle.w" while(next_controltext_link= 0; +cur_text->text_link= macro; } -/*:85*/ -#line 1376 "cwebdir/ctangle.w" +/*:93*/ +#line 1362 "cwebdir/ctangle.w" continue; } @@ -1845,43 +1789,41 @@ p= name_dir;break; } if(next_control==section_name){ p= cur_section_name; -/*86:*/ -#line 1431 "cwebdir/ctangle.w" +/*94:*/ +#line 1419 "cwebdir/ctangle.w" while((next_control= get_next())=='+'); if(next_control!='='&&next_control!=eq_eq) continue; -/*:86*/ -#line 1384 "cwebdir/ctangle.w" -; +/*:94*/ +#line 1370 "cwebdir/ctangle.w" + break; } return; } -no_where= print_where= 0; -/*87:*/ -#line 1436 "cwebdir/ctangle.w" +no_where= print_where= false; +/*95:*/ +#line 1424 "cwebdir/ctangle.w" -/*88:*/ -#line 1441 "cwebdir/ctangle.w" +/*96:*/ +#line 1429 "cwebdir/ctangle.w" store_two_bytes((sixteen_bits)(0150000+section_count)); -/*:88*/ -#line 1437 "cwebdir/ctangle.w" -; +/*:96*/ +#line 1425 "cwebdir/ctangle.w" + scan_repl(section_name); -/*89:*/ -#line 1445 "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; } -#line 661 "cwebdir/ctang-w2c.ch" else if(p->equiv==(void*)text_info)p->equiv= (void*)cur_text; -#line 1450 "cwebdir/ctangle.w" else{ q= (text_pointer)p->equiv; @@ -1892,22 +1834,20 @@ q->text_link= cur_text-text_info; cur_text->text_link= section_flag; -/*:89*/ -#line 1439 "cwebdir/ctangle.w" -; +/*:97*/ +#line 1427 "cwebdir/ctangle.w" + + +/*:95*/ +#line 1376 "cwebdir/ctangle.w" -/*:87*/ -#line 1390 "cwebdir/ctangle.w" -; } -/*:83*//*91:*/ -#line 1463 "cwebdir/ctangle.w" +/*:90*//*98:*/ +#line 1448 "cwebdir/ctangle.w" -#line 674 "cwebdir/ctang-w2c.ch" static void phase_one(void){ -#line 1466 "cwebdir/ctangle.w" phase= 1; section_count= 0; reset_input(); @@ -1917,94 +1857,89 @@ check_complete(); phase= 2; } -/*:91*//*93:*/ -#line 1481 "cwebdir/ctangle.w" +/*:98*//*100:*/ +#line 1465 "cwebdir/ctangle.w" -#line 688 "cwebdir/ctang-w2c.ch" static void skip_limbo(void) -#line 1484 "cwebdir/ctangle.w" { 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){ c= *loc++; if(ccode[(eight_bits)c]==new_section)break; switch(ccode[(eight_bits)c]){ -case translit_code:/*94:*/ -#line 1510 "cwebdir/ctangle.w" +case translit_code:/*102:*/ +#line 1496 "cwebdir/ctangle.w" while(xisspace(*loc)&&loc limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2)) ||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1))) -#line 707 "cwebdir/ctang-w2c.ch" +#line 309 "cwebdir/ctang-w2c.ch" err_print(_("! Improper hex number following @l")); -#line 1516 "cwebdir/ctangle.w" +#line 1502 "cwebdir/ctangle.w" else{ -unsigned i; +unsigned int i; char*beg; sscanf(loc-3,"%x",&i); while(xisspace(*loc)&&loc=translit_length) -#line 713 "cwebdir/ctang-w2c.ch" +#line 315 "cwebdir/ctang-w2c.ch" err_print(_("! Replacement string in @l too long")); -#line 1526 "cwebdir/ctangle.w" +#line 1512 "cwebdir/ctangle.w" else{ -#line 719 "cwebdir/ctang-w2c.ch" strncpy(translit[i-0200],beg,(size_t)(loc-beg)); -#line 1529 "cwebdir/ctangle.w" translit[i-0200][loc-beg]= '\0'; } } -/*:94*/ -#line 1494 "cwebdir/ctangle.w" -;break; +/*:102*/ +#line 1478 "cwebdir/ctangle.w" +break; case format_code:case'@':break; case control_text:if(c=='q'||c=='Q'){ while((c= skip_ahead())=='@'); if(*(loc-1)!='>') -#line 695 "cwebdir/ctang-w2c.ch" +#line 297 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in control text")); -#line 1500 "cwebdir/ctangle.w" +#line 1484 "cwebdir/ctangle.w" break; } -#line 701 "cwebdir/ctang-w2c.ch" +#line 303 "cwebdir/ctang-w2c.ch" default:err_print(_("! Double @ should be used in limbo")); -#line 1504 "cwebdir/ctangle.w" +#line 1488 "cwebdir/ctangle.w" } } } } -/*:93*//*95:*/ -#line 1536 "cwebdir/ctangle.w" +/*:100*//*103:*/ +#line 1522 "cwebdir/ctangle.w" -#line 726 "cwebdir/ctang-w2c.ch" void print_stats(void){ -#line 740 "cwebdir/ctang-w2c.ch" +#line 328 "cwebdir/ctang-w2c.ch" puts(_("\nMemory usage statistics:")); printf(_("%ld names (out of %ld)\n"), -(long)(name_ptr-name_dir),(long)max_names); +(ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf(_("%ld replacement texts (out of %ld)\n"), -(long)(text_ptr-text_info),(long)max_texts); +(ptrdiff_t)(text_ptr-text_info),(long)max_texts); printf(_("%ld bytes (out of %ld)\n"), -(long)(byte_ptr-byte_mem),(long)max_bytes); +(ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); printf(_("%ld tokens (out of %ld)\n"), -#line 1547 "cwebdir/ctangle.w" -(long)(tok_ptr-tok_mem),(long)max_toks); +#line 1533 "cwebdir/ctangle.w" +(ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } -#line 753 "cwebdir/ctang-w2c.ch" -/*:95*/ +#line 341 "cwebdir/ctang-w2c.ch" +/*:103*/ diff --git a/source/texk/web2c/cwebboot.cin b/source/texk/web2c/cwebboot.cin index 2854c14f8..150c303a3 100644 --- a/source/texk/web2c/cwebboot.cin +++ b/source/texk/web2c/cwebboot.cin @@ -1,31 +1,40 @@ /*1:*/ -#line 58 "cwebdir/common.w" +#line 66 "cwebdir/common.w" -/*85:*/ -#line 1247 "cwebdir/comm-w2c.ch" - -#include -#include - -/*:85*//*88:*/ -#line 1286 "cwebdir/comm-w2c.ch" +/*3:*/ +#line 53 "cwebdir/comm-w2c.h" #ifndef HAVE_GETTEXT #define HAVE_GETTEXT 0 #endif #if HAVE_GETTEXT -#include #include #else +#define gettext(A) A +#endif + +#include +#include +#include +#include +#include +#include +#include + +/*:3*//*89:*/ +#line 709 "cwebdir/comm-w2c.ch" + +#if HAVE_GETTEXT +#include +#else #define setlocale(A,B) "" #define bindtextdomain(A,B) "" #define textdomain(A) "" -#define gettext(A) A #endif -/*:88*//*90:*/ -#line 1380 "cwebdir/comm-w2c.ch" +/*:89*//*91:*/ +#line 756 "cwebdir/comm-w2c.ch" typedef bool boolean; #define HAVE_BOOLEAN @@ -34,14 +43,16 @@ typedef bool boolean; #include #include -/*:90*//*93:*/ -#line 1419 "cwebdir/comm-w2c.ch" +/*:91*//*94:*/ +#line 795 "cwebdir/comm-w2c.ch" #define CWEB #include "help.h" -/*:93*/ -#line 59 "cwebdir/common.w" +/*:94*/ +#line 67 "cwebdir/common.w" + +#define _(S) gettext(S) \ #define and_and 04 #define lt_lt 020 @@ -59,11 +70,12 @@ typedef bool boolean; #define period_ast 026 #define minus_gt_ast 027 \ -#define buf_size 1000 -#define longest_name 10000 -#define long_buf_size (buf_size+longest_name) +#define xisalpha(c) (isalpha((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisdigit(c) (isdigit((eight_bits) c) &&((eight_bits) c<0200) ) #define xisspace(c) (isspace((eight_bits) c) &&((eight_bits) c<0200) ) -#define xisupper(c) (isupper((eight_bits) c) &&((eight_bits) c<0200) ) \ +#define xislower(c) (islower((eight_bits) c) &&((eight_bits) c<0200) ) +#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 \ @@ -74,6 +86,48 @@ typedef bool boolean; #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 spotless 0 +#define harmless_message 1 +#define error_message 2 +#define fatal_message 3 +#define mark_harmless {if(history==spotless) history= harmless_message;} +#define mark_error history= error_message +#define confusion(s) fatal(_("! This can't happen: ") ,s) \ + \ + +#define show_banner flags['b'] +#define show_progress flags['p'] +#define show_stats flags['s'] +#define show_happiness flags['h'] +#define temporary_output flags['t'] +#define make_xrefs flags['x'] \ + +#define update_terminal fflush(stdout) +#define new_line putchar('\n') +#define putxchar putchar +#define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout) +#define C_printf(c,a) fprintf(C_file,c,a) +#define C_putc(c) putc(c,C_file) \ + +#define max_bytes 1000000 \ + +#define max_toks 1000000 +#define max_names 10239 \ + +#define max_sections 4000 +#define max_texts 10239 +#define longest_name 10000 +#define stack_size 500 +#define buf_size 1000 +#define long_buf_size (buf_size+longest_name) \ + #define lines_dont_match (change_limit-change_buffer!=limit-buffer|| \ strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) ) \ @@ -83,31 +137,14 @@ for(loc= buffer;xisspace(*loc) ;loc++) ; \ if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b; \ } \ -#define max_sections 10239 \ - \ - #define too_long() {include_depth--; \ err_print(_("! Include file name too long") ) ;goto restart;} \ - \ - -#define max_bytes 1000000 \ - -#define max_names 10239 \ - \ - -#define length(c) (size_t) ((c+1) ->byte_start-(c) ->byte_start) -#define print_id(c) term_write((c) ->byte_start,length((c) ) ) \ #define hash_size 8501 \ -#define llink link -#define rlink dummy.Rlink -#define root name_dir->rlink \ - \ - #define first_chunk(p) ((p) ->byte_start+2) -#define prefix_length(p) (int) ((unsigned char) *((p) ->byte_start) *256+ \ -(unsigned char) *((p) ->byte_start+1) ) +#define prefix_length(p) (int) ((eight_bits) *((p) ->byte_start) *256+ \ +(eight_bits) *((p) ->byte_start+1) ) #define set_prefix_length(p,m) (*((p) ->byte_start) = (m) /256, \ *((p) ->byte_start+1) = (m) %256) \ @@ -119,83 +156,161 @@ err_print(_("! Include file name too long") ) ;goto restart;} \ #define bad_extension 5 \ -#define spotless 0 -#define harmless_message 1 -#define error_message 2 -#define fatal_message 3 -#define mark_harmless {if(history==spotless) history= harmless_message;} -#define mark_error history= error_message \ - #define RETURN_OK 0 #define RETURN_WARN 5 #define RETURN_ERROR 10 #define RETURN_FAIL 20 \ -#define confusion(s) fatal(_("! This can't happen: ") ,s) \ - \ - -#define show_banner flags['b'] -#define show_progress flags['p'] -#define show_stats flags['s'] -#define show_happiness flags['h'] -#define temporary_output flags['t'] -#define make_xrefs flags['x'] \ - #define flag_change (**argv!='-') -#define update_terminal fflush(stdout) \ - -#define new_line putchar('\n') -#define putxchar putchar -#define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout) -#define C_printf(c,a) fprintf(C_file,c,a) -#define C_putc(c) putc(c,C_file) \ - #define max_banner 50 \ #define PATH_SEPARATOR separators[0] #define DIR_SEPARATOR separators[1] #define DEVICE_SEPARATOR separators[2] \ -#define _(S) gettext(S) \ - #define kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) \ -#line 60 "cwebdir/common.w" +#line 68 "cwebdir/common.w" /*2:*/ -#line 73 "cwebdir/common.w" +#line 35 "cwebdir/comm-w2c.h" -#line 77 "cwebdir/comm-w2c.ch" +typedef bool boolean; typedef uint8_t eight_bits; typedef uint16_t sixteen_bits; -#line 84 "cwebdir/comm-w2c.ch" typedef enum{ ctangle,cweave,ctwill }cweb; +extern cweb program; +extern int phase; + +/*:2*//*4:*/ +#line 91 "cwebdir/comm-w2c.h" + +extern char section_text[]; +extern char*section_text_end; +extern char*id_first; +extern char*id_loc; + +/*:4*//*5:*/ +#line 105 "cwebdir/comm-w2c.h" + +extern char buffer[]; +extern char*buffer_end; +extern char*loc; +extern char*limit; + +/*:5*//*6:*/ +#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; +union{ +struct name_info*Rlink; + +char Ilk; +}dummy; +void*equiv_or_xref; +}name_info; +typedef name_info*name_pointer; +typedef name_pointer*hash_pointer; +extern char byte_mem[]; +extern char*byte_mem_end; +extern char*byte_ptr; +extern name_info name_dir[]; +extern name_pointer name_dir_end; +extern name_pointer name_ptr; +extern name_pointer hash[]; +extern hash_pointer hash_end; +extern hash_pointer h; + +/*:9*//*11:*/ +#line 201 "cwebdir/comm-w2c.h" + +extern int history; + +/*:11*//*13:*/ +#line 218 "cwebdir/comm-w2c.h" + +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 boolean flags[]; +extern const char*use_language; + +/*:13*//*14:*/ +#line 235 "cwebdir/comm-w2c.h" + +extern FILE*C_file; +extern FILE*tex_file; +extern FILE*idx_file; +extern FILE*scn_file; +extern FILE*active_file; +extern FILE*check_file; + +/*:14*/ +#line 69 "cwebdir/common.w" + +/*18:*/ +#line 83 "cwebdir/common.w" + +#line 72 "cwebdir/comm-w2c.ch" cweb program; -#line 76 "cwebdir/common.w" +#line 85 "cwebdir/common.w" + +/*:18*//*19:*/ +#line 92 "cwebdir/common.w" -/*:2*//*6:*/ -#line 130 "cwebdir/comm-w2c.ch" +int phase; + +/*:19*//*21:*/ +#line 130 "cwebdir/common.w" char section_text[longest_name+1]; char*section_text_end= section_text+longest_name; char*id_first; char*id_loc; -#line 138 "cwebdir/common.w" -/*:6*//*7:*/ -#line 159 "cwebdir/common.w" +/*:21*//*22:*/ +#line 150 "cwebdir/common.w" char buffer[long_buf_size]; char*buffer_end= buffer+buf_size-2; -char*limit= buffer; char*loc= buffer; +char*limit= buffer; -#line 155 "cwebdir/comm-w2c.ch" -/*:7*//*10:*/ -#line 214 "cwebdir/common.w" +/*:22*//*25:*/ +#line 194 "cwebdir/common.w" int include_depth; FILE*file[max_include_depth]; @@ -203,124 +318,92 @@ FILE*change_file; char file_name[max_include_depth][max_file_name_length]; char change_file_name[max_file_name_length]; -#line 222 "cwebdir/common.w" +#line 202 "cwebdir/common.w" 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; -/*:10*//*20:*/ -#line 418 "cwebdir/common.w" +/*:25*//*26:*/ +#line 220 "cwebdir/common.w" + +static char change_buffer[buf_size]; +static char*change_limit; + +/*:26*//*37:*/ +#line 399 "cwebdir/common.w" -#line 420 "cwebdir/common.w" sixteen_bits section_count; boolean changed_section[max_sections]; boolean change_pending; -boolean print_where= 0; +boolean print_where= false; -/*:20*//*27:*/ -#line 594 "cwebdir/common.w" +/*:37*//*43:*/ +#line 596 "cwebdir/common.w" -typedef struct name_info{ -char*byte_start; -/*31:*/ -#line 631 "cwebdir/common.w" - -struct name_info*link; - -/*:31*//*40:*/ -#line 730 "cwebdir/common.w" - -union{ -struct name_info*Rlink; - -char Ilk; -}dummy; - -/*:40*//*55:*/ -#line 773 "cwebdir/comm-w2c.ch" - -void*equiv_or_xref; -#line 1064 "cwebdir/common.w" - -/*:55*/ -#line 597 "cwebdir/common.w" - -}name_info; -typedef name_info*name_pointer; char byte_mem[max_bytes]; char*byte_mem_end= byte_mem+max_bytes-1; name_info name_dir[max_names]; name_pointer name_dir_end= name_dir+max_names-1; -/*:27*//*29:*/ -#line 617 "cwebdir/common.w" +/*:43*//*44:*/ +#line 607 "cwebdir/common.w" -name_pointer name_ptr; char*byte_ptr; +name_pointer name_ptr; -/*:29*//*32:*/ -#line 644 "cwebdir/common.w" +/*:44*//*46:*/ +#line 627 "cwebdir/common.w" -typedef name_pointer*hash_pointer; name_pointer hash[hash_size]; hash_pointer hash_end= hash+hash_size-1; hash_pointer h; -/*:32*//*56:*/ -#line 1082 "cwebdir/common.w" +/*:46*//*65:*/ +#line 1014 "cwebdir/common.w" int history= spotless; -/*:56*//*67:*/ -#line 1220 "cwebdir/common.w" +/*:65*//*73:*/ +#line 1135 "cwebdir/common.w" int argc; char**argv; char C_file_name[max_file_name_length]; char tex_file_name[max_file_name_length]; char idx_file_name[max_file_name_length]; -#line 934 "cwebdir/comm-w2c.ch" +#line 431 "cwebdir/comm-w2c.ch" char scn_file_name[max_file_name_length]; char check_file_name[max_file_name_length]; -#line 941 "cwebdir/comm-w2c.ch" +#line 1142 "cwebdir/common.w" boolean flags[128]; -const char*use_language= ""; -#line 1228 "cwebdir/common.w" -/*:67*//*77:*/ -#line 1370 "cwebdir/common.w" +/*:73*//*83:*/ +#line 1282 "cwebdir/common.w" FILE*C_file; FILE*tex_file; FILE*idx_file; -#line 1131 "cwebdir/comm-w2c.ch" +#line 569 "cwebdir/comm-w2c.ch" FILE*scn_file; FILE*check_file; -#line 1138 "cwebdir/comm-w2c.ch" +#line 576 "cwebdir/comm-w2c.ch" FILE*active_file; char*found_filename; -#line 1376 "cwebdir/common.w" - -#line 1155 "cwebdir/comm-w2c.ch" -/*:77*/ -#line 61 "cwebdir/common.w" +#line 1288 "cwebdir/common.w" -/*3:*/ -#line 83 "cwebdir/common.w" -int phase; +#line 593 "cwebdir/comm-w2c.ch" +/*:83*//*86:*/ +#line 638 "cwebdir/comm-w2c.ch" -/*:3*//*11:*/ -#line 240 "cwebdir/common.w" +const char*use_language= ""; -char change_buffer[buf_size]; -char*change_limit; -/*:11*//*86:*/ -#line 1260 "cwebdir/comm-w2c.ch" +/*:86*//*87:*/ +#line 651 "cwebdir/comm-w2c.ch" char cb_banner[max_banner]; string texmf_locale; @@ -329,141 +412,116 @@ string texmf_locale; #endif char separators[]= SEPARATORS; -/*:86*/ -#line 62 "cwebdir/common.w" +/*:87*/ +#line 70 "cwebdir/common.w" -/*33:*/ -#line 650 "cwebdir/common.w" +/*7:*/ +#line 137 "cwebdir/comm-w2c.h" -#line 502 "cwebdir/comm-w2c.ch" -extern boolean names_match(name_pointer,const char*,size_t,eight_bits); -#line 652 "cwebdir/common.w" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); -/*:33*//*38:*/ -#line 703 "cwebdir/common.w" - -#line 532 "cwebdir/comm-w2c.ch" -extern void init_p(name_pointer,eight_bits); -#line 705 "cwebdir/common.w" +/*:7*//*10:*/ +#line 180 "cwebdir/comm-w2c.h" -/*:38*//*46:*/ -#line 852 "cwebdir/common.w" +extern boolean names_match(name_pointer,const char*,size_t,eight_bits); +extern name_pointer id_lookup(const char*,const char*,char); -#line 612 "cwebdir/comm-w2c.ch" +extern name_pointer section_lookup(char*,char*,int); extern void init_node(name_pointer); -#line 854 "cwebdir/common.w" - -/*:46*//*53:*/ -#line 1017 "cwebdir/common.w" - -#line 738 "cwebdir/comm-w2c.ch" -static int section_name_cmp(char**,int,name_pointer); -#line 1019 "cwebdir/common.w" - -/*:53*//*57:*/ -#line 1092 "cwebdir/common.w" - -#line 780 "cwebdir/comm-w2c.ch" -extern void err_print(const char*); -#line 1094 "cwebdir/common.w" +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); -/*:57*//*60:*/ -#line 1140 "cwebdir/common.w" +/*:10*//*12:*/ +#line 204 "cwebdir/comm-w2c.h" -#line 807 "cwebdir/comm-w2c.ch" extern int wrap_up(void); -extern void print_stats(void); -#line 1143 "cwebdir/common.w" - -#line 818 "cwebdir/comm-w2c.ch" -/*:60*//*63:*/ -#line 1173 "cwebdir/common.w" - -#line 881 "cwebdir/comm-w2c.ch" +extern void err_print(const char*); extern void fatal(const char*,const char*); extern void overflow(const char*); -#line 1175 "cwebdir/common.w" -/*:63*//*69:*/ -#line 1251 "cwebdir/common.w" +/*:12*//*15:*/ +#line 244 "cwebdir/comm-w2c.h" -#line 971 "cwebdir/comm-w2c.ch" -static void scan_args(void); -#line 1253 "cwebdir/common.w" +extern void common_init(void); +extern void print_stats(void); +extern void cb_show_banner(void); + +/*:15*//*24:*/ +#line 180 "cwebdir/common.w" +static boolean input_ln(FILE*); -/*:69*//*83:*/ -#line 1222 "cwebdir/comm-w2c.ch" +/*:24*//*28:*/ +#line 241 "cwebdir/common.w" +static void prime_the_change_buffer(void); -boolean get_line(void); -name_pointer id_lookup(const char*,const char*,char); -name_pointer section_lookup(char*,char*,int); -void check_complete(void); -void common_init(void); -void print_prefix_name(name_pointer); -void print_section_name(name_pointer); -void reset_input(void); -void sprint_section_name(char*,name_pointer); +/*:28*//*33:*/ +#line 340 "cwebdir/common.w" +static void check_change(void); -/*:83*//*84:*/ -#line 1235 "cwebdir/comm-w2c.ch" +/*:33*//*55:*/ +#line 774 "cwebdir/common.w" -static boolean input_ln(FILE*); 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 check_change(void); -static void prime_the_change_buffer(void); -/*:84*//*98:*/ -#line 1485 "cwebdir/comm-w2c.ch" +/*:55*//*64:*/ +#line 1002 "cwebdir/common.w" +static int section_name_cmp(char**,int,name_pointer); + +/*:64*//*76:*/ +#line 1197 "cwebdir/common.w" +static void scan_args(void); + +#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); -void cb_show_banner(void); -/*:98*/ -#line 63 "cwebdir/common.w" +/*:96*/ +#line 71 "cwebdir/common.w" -/*:1*//*4:*/ -#line 89 "cwebdir/common.w" +/*:1*//*20:*/ +#line 99 "cwebdir/common.w" -#line 94 "cwebdir/comm-w2c.ch" void common_init(void) -#line 92 "cwebdir/common.w" { -#line 103 "cwebdir/comm-w2c.ch" -/*30:*/ -#line 621 "cwebdir/common.w" +#line 78 "cwebdir/comm-w2c.ch" +/*45:*/ +#line 611 "cwebdir/common.w" name_dir->byte_start= byte_ptr= byte_mem; name_ptr= name_dir+1; name_ptr->byte_start= byte_mem; +root= NULL; -/*:30*//*34:*/ -#line 655 "cwebdir/common.w" +/*:45*//*47:*/ +#line 634 "cwebdir/common.w" for(h= hash;h<=hash_end;*h++= NULL); -/*:34*//*41:*/ -#line 737 "cwebdir/common.w" +/*:47*/ +#line 78 "cwebdir/comm-w2c.ch" -root= NULL; - -/*:41*/ -#line 103 "cwebdir/comm-w2c.ch" - -/*91:*/ -#line 1394 "cwebdir/comm-w2c.ch" +/*92:*/ +#line 770 "cwebdir/comm-w2c.ch" kpse_set_program_name(argv[0],"cweb"); -/*:91*/ -#line 104 "cwebdir/comm-w2c.ch" +/*:92*/ +#line 79 "cwebdir/comm-w2c.ch" -/*89:*/ -#line 1342 "cwebdir/comm-w2c.ch" +#line 85 "cwebdir/comm-w2c.ch" +/*90:*/ +#line 718 "cwebdir/comm-w2c.ch" setlocale(LC_MESSAGES,setlocale(LC_CTYPE,"")); texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}"); @@ -478,21 +536,24 @@ free(texmf_locale); textdomain("cweb"); -/*:89*/ -#line 105 "cwebdir/comm-w2c.ch" +/*:90*/ +#line 85 "cwebdir/comm-w2c.ch" -/*68:*/ -#line 1233 "cwebdir/common.w" +/*74:*/ +#line 1148 "cwebdir/common.w" -#line 948 "cwebdir/comm-w2c.ch" -temporary_output= 1; -#line 1235 "cwebdir/common.w" +#line 438 "cwebdir/comm-w2c.ch" +make_xrefs= true; +temporary_output= true; +#line 1150 "cwebdir/common.w" +show_stats= false; -/*:68*/ -#line 106 "cwebdir/comm-w2c.ch" +/*:74*/ +#line 86 "cwebdir/comm-w2c.ch" -/*78:*/ -#line 1155 "cwebdir/comm-w2c.ch" +#line 105 "cwebdir/common.w" +/*84:*/ +#line 593 "cwebdir/comm-w2c.ch" scan_args(); if(program==ctangle){ @@ -523,183 +584,169 @@ else strcpy(dot_pos,".wtp"); if((tex_file= fopen(check_file_name,"wb"))==NULL) fatal(_("! Cannot open output file "),check_file_name); } -#line 1388 "cwebdir/common.w" +#line 1300 "cwebdir/common.w" -/*:78*/ -#line 107 "cwebdir/comm-w2c.ch" +#line 628 "cwebdir/comm-w2c.ch" +/*:84*/ +#line 105 "cwebdir/common.w" -#line 96 "cwebdir/common.w" } -/*:4*//*9:*/ -#line 172 "cwebdir/common.w" +/*:20*//*23:*/ +#line 160 "cwebdir/common.w" -#line 162 "cwebdir/comm-w2c.ch" static boolean input_ln( FILE*fp) -#line 175 "cwebdir/common.w" { 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 169 "cwebdir/comm-w2c.ch" +#line 92 "cwebdir/comm-w2c.ch" if((*(k++)= c)!=' '&&c!='\r')limit= k; -#line 182 "cwebdir/common.w" +#line 170 "cwebdir/common.w" if(k> buffer_end) if((c= getc(fp))!=EOF&&c!='\n'){ -#line 175 "cwebdir/comm-w2c.ch" +#line 98 "cwebdir/comm-w2c.ch" ungetc(c,fp);loc= buffer;err_print(_("! Input line too long")); -#line 185 "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; } -/*:9*//*12:*/ -#line 251 "cwebdir/common.w" +/*:23*//*27:*/ +#line 231 "cwebdir/common.w" -#line 201 "cwebdir/comm-w2c.ch" static void prime_the_change_buffer(void) -#line 254 "cwebdir/common.w" { change_limit= change_buffer; -/*13:*/ -#line 265 "cwebdir/common.w" +/*29:*/ +#line 247 "cwebdir/common.w" -while(1){ +while(true){ change_line++; if(!input_ln(change_file))return; if(limit buffer+1&&buffer[0]=='@'){ -#line 248 "cwebdir/comm-w2c.ch" char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1]; -#line 341 "cwebdir/common.w" -/*17:*/ -#line 358 "cwebdir/common.w" +/*34:*/ +#line 342 "cwebdir/common.w" if(xyz_code=='x'||xyz_code=='z'){ -#line 260 "cwebdir/comm-w2c.ch" +#line 133 "cwebdir/comm-w2c.ch" loc= buffer+2;err_print(_("! Where is the matching @y?")); -#line 361 "cwebdir/common.w" +#line 345 "cwebdir/common.w" } else if(xyz_code=='y'){ if(n> 0){ loc= buffer+2; printf("\n! Hmm... %d ",n); -#line 266 "cwebdir/comm-w2c.ch" +#line 139 "cwebdir/comm-w2c.ch" err_print(_("of the preceding lines failed to match")); -#line 368 "cwebdir/common.w" +#line 352 "cwebdir/common.w" } change_depth= include_depth; return; } -/*:17*/ -#line 342 "cwebdir/common.w" -; +/*:34*/ +#line 324 "cwebdir/common.w" + } -/*15:*/ -#line 292 "cwebdir/common.w" +/*31:*/ +#line 274 "cwebdir/common.w" { -#line 227 "cwebdir/comm-w2c.ch" change_limit= change_buffer+(ptrdiff_t)(limit-buffer); strncpy(change_buffer,buffer,(size_t)(limit-buffer+1)); -#line 296 "cwebdir/common.w" } -/*:15*/ -#line 344 "cwebdir/common.w" -; -changing= 0;cur_line++; +/*:31*/ +#line 326 "cwebdir/common.w" + +changing= false;cur_line++; while(!input_ln(cur_file)){ if(include_depth==0){ -#line 254 "cwebdir/comm-w2c.ch" +#line 127 "cwebdir/comm-w2c.ch" err_print(_("! CWEB file ended during a change")); -#line 349 "cwebdir/common.w" +#line 331 "cwebdir/common.w" -input_has_ended= 1;return; +input_has_ended= true;return; } include_depth--;cur_line++; } @@ -707,19 +754,17 @@ if(lines_dont_match)n++; } } -/*:16*//*18:*/ -#line 378 "cwebdir/common.w" +/*:32*//*35:*/ +#line 362 "cwebdir/common.w" -#line 273 "cwebdir/comm-w2c.ch" void reset_input(void) -#line 381 "cwebdir/common.w" { limit= buffer;loc= buffer+1;buffer[0]= ' '; -/*19:*/ -#line 393 "cwebdir/common.w" +/*36:*/ +#line 377 "cwebdir/common.w" -#line 284 "cwebdir/comm-w2c.ch" +#line 149 "cwebdir/comm-w2c.ch" if((found_filename= kpse_find_cweb(web_file_name))==NULL|| (web_file= fopen(found_filename,"r"))==NULL){ fatal(_("! Cannot open input file "),web_file_name); @@ -730,11 +775,11 @@ strcpy(web_file_name,found_filename+ ((strncmp(found_filename,"./",2)==0)?2:0)); free(found_filename); }else fatal(_("! Filename too long\n"),found_filename); -#line 399 "cwebdir/common.w" +#line 383 "cwebdir/common.w" -web_file_open= 1; -#line 300 "cwebdir/comm-w2c.ch" +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){ fatal(_("! Cannot open change file "),change_file_name); @@ -745,74 +790,70 @@ strcpy(change_file_name,found_filename+ ((strncmp(found_filename,"./",2)==0)?2:0)); free(found_filename); }else fatal(_("! Filename too long\n"),found_filename); -#line 404 "cwebdir/common.w" +#line 388 "cwebdir/common.w" + +/*:36*/ +#line 367 "cwebdir/common.w" -/*:19*/ -#line 383 "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; } -/*:18*//*21:*/ -#line 426 "cwebdir/common.w" +/*:35*//*38:*/ +#line 406 "cwebdir/common.w" -#line 328 "cwebdir/comm-w2c.ch" boolean get_line(void) -#line 428 "cwebdir/common.w" { restart: if(changing&&include_depth==change_depth) -/*25:*/ -#line 537 "cwebdir/common.w" +/*41:*/ +#line 514 "cwebdir/common.w" { change_line++; if(!input_ln(change_file)){ -#line 440 "cwebdir/comm-w2c.ch" +#line 274 "cwebdir/comm-w2c.ch" err_print(_("! Change file ended without @z")); -#line 541 "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= ' '; if(buffer[0]=='@'){ -#line 446 "cwebdir/comm-w2c.ch" if(xisupper(buffer[1]))buffer[1]= tolower((eight_bits)buffer[1]); -#line 554 "cwebdir/common.w" if(buffer[1]=='x'||buffer[1]=='y'){ loc= buffer+2; -#line 452 "cwebdir/comm-w2c.ch" +#line 280 "cwebdir/comm-w2c.ch" err_print(_("! Where is the matching @z?")); -#line 557 "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; } } } } -/*:25*/ -#line 431 "cwebdir/common.w" -; +/*:41*/ +#line 411 "cwebdir/common.w" + if(!changing||include_depth> change_depth){ -/*24:*/ -#line 520 "cwebdir/common.w" +/*40:*/ +#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; @@ -825,38 +866,38 @@ if(buffer[0]==change_buffer[0]) if(change_limit> change_buffer)check_change(); } -/*:24*/ -#line 433 "cwebdir/common.w" -; +/*:40*/ +#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= '"'; while(*loc==' '||*loc=='\t')loc++; if(loc>=limit){ -#line 334 "cwebdir/comm-w2c.ch" +#line 180 "cwebdir/comm-w2c.ch" err_print(_("! Include file name not given")); -#line 443 "cwebdir/common.w" +#line 423 "cwebdir/common.w" goto restart; } if(include_depth>=max_include_depth-1){ -#line 340 "cwebdir/comm-w2c.ch" +#line 186 "cwebdir/comm-w2c.ch" err_print(_("! Too many nested includes")); -#line 448 "cwebdir/common.w" +#line 428 "cwebdir/common.w" goto restart; } include_depth++; -/*23:*/ -#line 380 "cwebdir/comm-w2c.ch" +/*39:*/ +#line 451 "cwebdir/common.w" { -#line 389 "cwebdir/comm-w2c.ch" +#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 479 "cwebdir/common.w" +#line 456 "cwebdir/common.w" if(*loc=='"'){ loc++; @@ -867,7 +908,7 @@ while(*loc!=' '&&*loc!='\t'&&*loc!='"'&&k<=cur_file_name_end)*k++= *loc++; if(k> cur_file_name_end)too_long(); *k= '\0'; -#line 396 "cwebdir/comm-w2c.ch" +#line 230 "cwebdir/comm-w2c.ch" if((found_filename= kpse_find_cweb(cur_file_name))!=NULL&& (cur_file= fopen(found_filename,"r"))!=NULL){ @@ -877,45 +918,42 @@ strcpy(cur_file_name,found_filename+ ((strncmp(found_filename,"./",2)==0)?2:0)); free(found_filename); }else fatal(_("! Filename too long\n"),found_filename); -#line 490 "cwebdir/common.w" -cur_line= 0;print_where= 1; +#line 467 "cwebdir/common.w" +cur_line= 0;print_where= true; goto restart; } -#line 434 "cwebdir/comm-w2c.ch" +#line 268 "cwebdir/comm-w2c.ch" include_depth--;err_print(_("! Cannot open include file"));goto restart; -#line 518 "cwebdir/common.w" +#line 495 "cwebdir/common.w" } -/*:23*/ -#line 452 "cwebdir/common.w" -; +/*:39*/ +#line 432 "cwebdir/common.w" + } -return 1; +return true; } -#line 355 "cwebdir/comm-w2c.ch" -/*:21*//*26:*/ -#line 569 "cwebdir/common.w" +#line 201 "cwebdir/comm-w2c.ch" +/*:38*//*42:*/ +#line 546 "cwebdir/common.w" -#line 462 "cwebdir/comm-w2c.ch" void check_complete(void){ if(change_limit!=change_buffer){ strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1)); limit= buffer+(ptrdiff_t)(change_limit-change_buffer); -#line 575 "cwebdir/common.w" -changing= 1;change_depth= include_depth;loc= buffer; -#line 472 "cwebdir/comm-w2c.ch" +changing= true;change_depth= include_depth;loc= buffer; +#line 286 "cwebdir/comm-w2c.ch" err_print(_("! Change file entry did not match")); -#line 577 "cwebdir/common.w" +#line 554 "cwebdir/common.w" } } -/*:26*//*35:*/ -#line 660 "cwebdir/common.w" +/*:42*//*48:*/ +#line 639 "cwebdir/common.w" -#line 514 "cwebdir/comm-w2c.ch" name_pointer id_lookup( const char*first, @@ -923,26 +961,23 @@ const char*last, char t) { const char*i= first; -#line 668 "cwebdir/common.w" int h; int l; name_pointer p; if(last==NULL)for(last= first;*last!='\0';last++); -#line 526 "cwebdir/comm-w2c.ch" l= (int)(last-first); -#line 673 "cwebdir/common.w" -/*36:*/ -#line 683 "cwebdir/common.w" +/*49:*/ +#line 662 "cwebdir/common.w" -h= (unsigned char)*i; -while(++ilink; @@ -951,63 +986,55 @@ p= name_ptr; p->link= hash[h];hash[h]= p; } -/*:37*/ -#line 674 "cwebdir/common.w" -; -if(p==name_ptr)/*39:*/ -#line 706 "cwebdir/common.w" +/*:50*/ +#line 653 "cwebdir/common.w" + +if(p==name_ptr)/*51:*/ +#line 681 "cwebdir/common.w" { -#line 539 "cwebdir/comm-w2c.ch" +#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 709 "cwebdir/common.w" +#line 684 "cwebdir/common.w" strncpy(byte_ptr,first,l); (++name_ptr)->byte_start= byte_ptr+= l; -#line 546 "cwebdir/comm-w2c.ch" init_p(p,t); -#line 712 "cwebdir/common.w" } -/*:39*/ -#line 675 "cwebdir/common.w" -; -return(p); +/*:51*/ +#line 654 "cwebdir/common.w" + +return p; } -/*:35*//*42:*/ -#line 764 "cwebdir/common.w" +/*:48*//*52:*/ +#line 713 "cwebdir/common.w" -#line 554 "cwebdir/comm-w2c.ch" void print_section_name( name_pointer p) -#line 768 "cwebdir/common.w" { char*ss,*s= first_chunk(p); name_pointer q= p+1; while(p!=name_dir){ ss= (p+1)->byte_start-1; if(*ss==' '&&ss>=s){ -#line 564 "cwebdir/comm-w2c.ch" term_write(s,(size_t)(ss-s));p= q->link;q= p; }else{ term_write(s,(size_t)(ss+1-s));p= name_dir;q= NULL; -#line 777 "cwebdir/common.w" } s= p->byte_start; } if(q)term_write("...",3); } -/*:42*//*43:*/ -#line 783 "cwebdir/common.w" +/*:52*//*53:*/ +#line 732 "cwebdir/common.w" -#line 575 "cwebdir/comm-w2c.ch" void sprint_section_name( char*dest, name_pointer p) -#line 788 "cwebdir/common.w" { char*ss,*s= first_chunk(p); name_pointer q= p+1; @@ -1018,22 +1045,18 @@ p= q->link;q= p; }else{ ss++;p= name_dir; } -#line 584 "cwebdir/comm-w2c.ch" strncpy(dest,s,(size_t)(ss-s)),dest+= ss-s; -#line 799 "cwebdir/common.w" s= p->byte_start; } *dest= '\0'; } -/*:43*//*44:*/ -#line 804 "cwebdir/common.w" +/*:53*//*54:*/ +#line 753 "cwebdir/common.w" -#line 592 "cwebdir/comm-w2c.ch" void print_prefix_name( name_pointer p) -#line 808 "cwebdir/common.w" { char*s= first_chunk(p); int l= prefix_length(p); @@ -1041,16 +1064,14 @@ term_write(s,l); if(s+l<(p+1)->byte_start)term_write("...",3); } -/*:44*//*45:*/ -#line 825 "cwebdir/common.w" +/*:54*//*56:*/ +#line 779 "cwebdir/common.w" -#line 602 "cwebdir/comm-w2c.ch" static int web_strcmp( char*j, int j_len, char*k, int k_len) -#line 829 "cwebdir/common.w" { char*j1= j+j_len,*k1= k+k_len; while(k byte_mem_end)overflow(_("byte memory")); if(name_ptr+1>=name_dir_end)overflow(_("name")); -#line 869 "cwebdir/common.w" +#line 822 "cwebdir/common.w" (++name_ptr)->byte_start= byte_ptr= s+name_len; if(ispref){ *(byte_ptr-1)= ' '; @@ -1097,46 +1115,41 @@ init_node(p); return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p); } -/*:47*//*48:*/ -#line 884 "cwebdir/common.w" +/*:57*//*58:*/ +#line 837 "cwebdir/common.w" -#line 655 "cwebdir/comm-w2c.ch" static void extend_section_name( name_pointer p, char*first, char*last, int ispref) -#line 891 "cwebdir/common.w" { char*s; name_pointer q= p+1; -#line 666 "cwebdir/comm-w2c.ch" int name_len= (int)(last-first)+ispref; -#line 672 "cwebdir/comm-w2c.ch" +#line 308 "cwebdir/comm-w2c.ch" if(name_ptr>=name_dir_end)overflow(_("name")); -#line 896 "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; name_ptr->link= name_dir; -#line 678 "cwebdir/comm-w2c.ch" +#line 314 "cwebdir/comm-w2c.ch" if(s+name_len> byte_mem_end)overflow(_("byte memory")); -#line 901 "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)= ' '; } -/*:48*//*49:*/ -#line 912 "cwebdir/common.w" +/*:58*//*59:*/ +#line 865 "cwebdir/common.w" -#line 687 "cwebdir/comm-w2c.ch" name_pointer section_lookup( char*first,char*last, int ispref) -#line 917 "cwebdir/common.w" { int c= 0; name_pointer p= root; @@ -1144,11 +1157,9 @@ name_pointer q= NULL; name_pointer r= NULL; name_pointer par= NULL; -#line 696 "cwebdir/comm-w2c.ch" int name_len= (int)(last-first)+1; -#line 925 "cwebdir/common.w" -/*50:*/ -#line 936 "cwebdir/common.w" +/*60:*/ +#line 889 "cwebdir/common.w" while(p){ c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p)); @@ -1158,14 +1169,14 @@ par= p; p= (c==less?p->llink:p->rlink); }else{ if(r!=NULL){ -#line 702 "cwebdir/comm-w2c.ch" +#line 320 "cwebdir/comm-w2c.ch" fputs(_("\n! Ambiguous prefix: matches <"),stdout); -#line 946 "cwebdir/common.w" +#line 899 "cwebdir/common.w" print_prefix_name(p); -#line 708 "cwebdir/comm-w2c.ch" +#line 326 "cwebdir/comm-w2c.ch" fputs(_(">\n and <"),stdout); -#line 949 "cwebdir/common.w" +#line 902 "cwebdir/common.w" print_prefix_name(r); err_print(">"); return name_dir; @@ -1178,28 +1189,28 @@ if(p==NULL) p= q,q= NULL; } -/*:50*/ -#line 926 "cwebdir/common.w" -; -/*51:*/ -#line 961 "cwebdir/common.w" +/*:60*/ +#line 879 "cwebdir/common.w" + +/*61:*/ +#line 914 "cwebdir/common.w" if(r==NULL) return add_section_name(par,c,first,last+1,ispref); -/*:51*/ -#line 927 "cwebdir/common.w" -; -/*52:*/ -#line 969 "cwebdir/common.w" +/*:61*/ +#line 880 "cwebdir/common.w" + +/*62:*/ +#line 922 "cwebdir/common.w" switch(section_name_cmp(&first,name_len,r)){ case prefix: if(!ispref){ -#line 714 "cwebdir/comm-w2c.ch" +#line 332 "cwebdir/comm-w2c.ch" fputs(_("\n! New name is a prefix of <"),stdout); -#line 975 "cwebdir/common.w" +#line 928 "cwebdir/common.w" print_section_name(r); err_print(">"); @@ -1211,92 +1222,84 @@ case extension:if(!ispref||first<=last) extend_section_name(r,first,last+1,ispref); return r; case bad_extension: -#line 720 "cwebdir/comm-w2c.ch" +#line 338 "cwebdir/comm-w2c.ch" fputs(_("\n! New name extends <"),stdout); -#line 987 "cwebdir/common.w" +#line 940 "cwebdir/common.w" print_section_name(r); err_print(">"); return r; default: -#line 726 "cwebdir/comm-w2c.ch" +#line 344 "cwebdir/comm-w2c.ch" fputs(_("\n! Section name incompatible with <"),stdout); -#line 993 "cwebdir/common.w" +#line 946 "cwebdir/common.w" print_prefix_name(r); -#line 732 "cwebdir/comm-w2c.ch" +#line 350 "cwebdir/comm-w2c.ch" fputs(_(">,\n which abbreviates <"),stdout); -#line 996 "cwebdir/common.w" +#line 949 "cwebdir/common.w" print_section_name(r); err_print(">"); return r; } -/*:52*/ -#line 928 "cwebdir/common.w" -; +/*:62*/ +#line 881 "cwebdir/common.w" + } -/*:49*//*54:*/ -#line 1020 "cwebdir/common.w" +/*:59*//*63:*/ +#line 970 "cwebdir/common.w" -#line 747 "cwebdir/comm-w2c.ch" static int section_name_cmp( char**pfirst, int len, name_pointer r) -#line 1025 "cwebdir/common.w" { char*first= *pfirst; name_pointer q= r+1; 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; switch(c= web_strcmp(first,len,s,ss-s)){ case equal:if(q==name_dir) if(ispref){ -#line 756 "cwebdir/comm-w2c.ch" *pfirst= first+(ptrdiff_t)(ss-s); -#line 1039 "cwebdir/common.w" return extension; }else return equal; else return(q->byte_start==(q+1)->byte_start)?equal:prefix; case extension: if(!ispref)return bad_extension; first+= ss-s; -#line 762 "cwebdir/comm-w2c.ch" if(q!=name_dir){len-= (int)(ss-s);s= q->byte_start;r= q;continue;} -#line 1046 "cwebdir/common.w" *pfirst= first;return extension; default:return c; } } } -/*:54*//*58:*/ -#line 1095 "cwebdir/common.w" +/*:63*//*66:*/ +#line 1024 "cwebdir/common.w" -#line 788 "cwebdir/comm-w2c.ch" void err_print( const char*s) -#line 1099 "cwebdir/common.w" { char*k,*l; printf(*s=='!'?"\n%s":"%s",s); -if(web_file_open)/*59:*/ -#line 1115 "cwebdir/common.w" +if(web_file_open)/*67:*/ +#line 1044 "cwebdir/common.w" {if(changing&&include_depth==change_depth) -#line 798 "cwebdir/comm-w2c.ch" +#line 358 "cwebdir/comm-w2c.ch" 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 1120 "cwebdir/common.w" +#line 1049 "cwebdir/common.w" l= (loc>=limit?limit:loc); if(l> buffer){ for(k= buffer;k spotless))new_line; -#line 1153 "cwebdir/common.w" +if(show_progress)new_line; if(show_stats) print_stats(); -#line 844 "cwebdir/comm-w2c.ch" -/*62:*/ -#line 1160 "cwebdir/common.w" +#line 388 "cwebdir/comm-w2c.ch" +/*69:*/ +#line 1086 "cwebdir/common.w" switch(history){ -#line 868 "cwebdir/comm-w2c.ch" +#line 412 "cwebdir/comm-w2c.ch" case spotless: if(show_happiness)puts(_("(No errors were found.)"));break; case harmless_message: @@ -1339,14 +1340,14 @@ case error_message: puts(_("(Pardon me, but I think I spotted something wrong.)"));break; case fatal_message: puts(_("(That was a fatal error, my friend.)")); -#line 1168 "cwebdir/common.w" +#line 1094 "cwebdir/common.w" } -/*:62*/ -#line 844 "cwebdir/comm-w2c.ch" +/*:69*/ +#line 388 "cwebdir/comm-w2c.ch" -/*87:*/ -#line 1271 "cwebdir/comm-w2c.ch" +/*88:*/ +#line 662 "cwebdir/comm-w2c.ch" if(C_file)fclose(C_file); if(tex_file)fclose(tex_file); @@ -1354,62 +1355,55 @@ if(check_file)fclose(check_file); if(strlen(check_file_name)) remove(check_file_name); -/*:87*/ -#line 845 "cwebdir/comm-w2c.ch" +/*:88*/ +#line 389 "cwebdir/comm-w2c.ch" -#line 852 "cwebdir/comm-w2c.ch" +#line 396 "cwebdir/comm-w2c.ch" switch(history){ case harmless_message:return RETURN_WARN; case error_message:return RETURN_ERROR; case fatal_message:return RETURN_FAIL; default:return RETURN_OK; } -#line 1158 "cwebdir/common.w" +#line 1084 "cwebdir/common.w" } -/*:61*//*64:*/ -#line 890 "cwebdir/comm-w2c.ch" +/*:68*//*70:*/ +#line 1102 "cwebdir/common.w" void fatal( const char*s,const char*t) -#line 1182 "cwebdir/common.w" { -#line 898 "cwebdir/comm-w2c.ch" if(*s)err_print(s); -#line 1184 "cwebdir/common.w" err_print(t); history= fatal_message;exit(wrap_up()); } -/*:64*//*65:*/ -#line 906 "cwebdir/comm-w2c.ch" +/*:70*//*71:*/ +#line 1113 "cwebdir/common.w" void overflow( const char*t) -#line 1193 "cwebdir/common.w" { -#line 914 "cwebdir/comm-w2c.ch" +#line 425 "cwebdir/comm-w2c.ch" printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("",""); -#line 1195 "cwebdir/common.w" +#line 1118 "cwebdir/common.w" } -/*:65*//*70:*/ -#line 1254 "cwebdir/common.w" +/*:71*//*75:*/ +#line 1167 "cwebdir/common.w" -#line 978 "cwebdir/comm-w2c.ch" static void scan_args(void) -#line 1257 "cwebdir/common.w" { 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; -#line 1264 "cwebdir/common.w" -#line 990 "cwebdir/comm-w2c.ch" +#line 462 "cwebdir/comm-w2c.ch" #if defined DEV_NULL strncpy(change_file_name,DEV_NULL,max_file_name_length-2); @@ -1421,36 +1415,36 @@ change_file_name[max_file_name_length-2]= '\0'; strcpy(change_file_name,"/dev/null"); #endif +#line 1178 "cwebdir/common.w" while(--argc> 0){ -#line 1266 "cwebdir/common.w" -if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/ -#line 1068 "cwebdir/comm-w2c.ch" +if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/ +#line 510 "cwebdir/comm-w2c.ch" { if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0) -/*94:*/ -#line 1423 "cwebdir/comm-w2c.ch" +/*95:*/ +#line 799 "cwebdir/comm-w2c.ch" cb_usagehelp(program==ctangle?CTANGLEHELP: program==cweave?CWEAVEHELP:CTWILLHELP,NULL); -/*:94*/ -#line 1072 "cwebdir/comm-w2c.ch" +/*:95*/ +#line 514 "cwebdir/comm-w2c.ch" if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0) -/*96:*/ -#line 1466 "cwebdir/comm-w2c.ch" +/*98:*/ +#line 846 "cwebdir/comm-w2c.ch" printversionandexit(cb_banner, program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth", -NULL,"Contemporary development on https://github.com/ascherer/cwebbin.\n"); +NULL,"Contemporary development on https://github.com/ascherer/cweb.\n"); -/*:96*/ -#line 1075 "cwebdir/comm-w2c.ch" +/*:98*/ +#line 517 "cwebdir/comm-w2c.ch" if(strcmp("-verbose",*argv)==0||strcmp("--verbose",*argv)==0) @@ -1460,23 +1454,22 @@ if(strcmp("-quiet",*argv)==0||strcmp("--quiet",*argv)==0) {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)/*75:*/ -#line 1352 "cwebdir/common.w" +if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/ +#line 555 "cwebdir/comm-w2c.ch" -#line 1118 "cwebdir/comm-w2c.ch" cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); -#line 1363 "cwebdir/common.w" +#line 1275 "cwebdir/common.w" -#line 1125 "cwebdir/comm-w2c.ch" -/*:75*/ -#line 1090 "cwebdir/comm-w2c.ch" +#line 563 "cwebdir/comm-w2c.ch" +/*:81*/ +#line 532 "cwebdir/comm-w2c.ch" while(isdigit(*dot_pos))dot_pos++; dot_pos--; @@ -1485,17 +1478,17 @@ if(*dot_pos=='l'){ use_language= ++dot_pos; break; }else -#line 1103 "cwebdir/comm-w2c.ch" +#line 1261 "cwebdir/common.w" flags[(eight_bits)*dot_pos]= flag_change; -#line 1350 "cwebdir/common.w" } -/*:74*/ -#line 1266 "cwebdir/common.w" +#line 555 "cwebdir/comm-w2c.ch" +/*:80*/ +#line 1179 "cwebdir/common.w" else{ s= name_pos= *argv;dot_pos= NULL; -#line 1011 "cwebdir/comm-w2c.ch" +#line 482 "cwebdir/comm-w2c.ch" while(*s){ if(*s=='.')dot_pos= s++; else if(*s==DIR_SEPARATOR||*s==DEVICE_SEPARATOR||*s=='/') @@ -1503,81 +1496,77 @@ dot_pos= NULL,name_pos= ++s; else s++; } -#line 1274 "cwebdir/common.w" -if(!found_web)/*71:*/ -#line 1292 "cwebdir/common.w" +#line 1187 "cwebdir/common.w" +if(!found_web)/*77:*/ +#line 1206 "cwebdir/common.w" { if(s-*argv> max_file_name_length-5) -/*76:*/ -#line 1125 "cwebdir/comm-w2c.ch" +/*82:*/ +#line 563 "cwebdir/comm-w2c.ch" fatal(_("! Filename too long\n"),*argv); -#line 1365 "cwebdir/common.w" +#line 1277 "cwebdir/common.w" + +/*:82*/ +#line 1209 "cwebdir/common.w" -/*:76*/ -#line 1295 "cwebdir/common.w" -; if(dot_pos==NULL) sprintf(web_file_name,"%s.w",*argv); else{ strcpy(web_file_name,*argv); *dot_pos= 0; } -#line 1303 "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; } -/*:71*/ -#line 1275 "cwebdir/common.w" +/*:77*/ +#line 1188 "cwebdir/common.w" -else if(!found_change)/*72:*/ -#line 1310 "cwebdir/common.w" +else if(!found_change)/*78:*/ +#line 1224 "cwebdir/common.w" { -#line 1043 "cwebdir/comm-w2c.ch" if(strcmp(*argv,"-")!=0){ -#line 1314 "cwebdir/common.w" if(s-*argv> max_file_name_length-4) -/*76:*/ -#line 1125 "cwebdir/comm-w2c.ch" +/*82:*/ +#line 563 "cwebdir/comm-w2c.ch" fatal(_("! Filename too long\n"),*argv); -#line 1365 "cwebdir/common.w" +#line 1277 "cwebdir/common.w" -/*:76*/ -#line 1315 "cwebdir/common.w" -; +/*:82*/ +#line 1228 "cwebdir/common.w" + if(dot_pos==NULL) sprintf(change_file_name,"%s.ch",*argv); else strcpy(change_file_name,*argv); -#line 1050 "cwebdir/comm-w2c.ch" } -found_change= 1; -#line 1321 "cwebdir/common.w" +found_change= true; } -/*:72*/ -#line 1276 "cwebdir/common.w" +/*:78*/ +#line 1189 "cwebdir/common.w" -else if(!found_out)/*73:*/ -#line 1323 "cwebdir/common.w" +else if(!found_out)/*79:*/ +#line 1236 "cwebdir/common.w" { if(s-*argv> max_file_name_length-5) -/*76:*/ -#line 1125 "cwebdir/comm-w2c.ch" +/*82:*/ +#line 563 "cwebdir/comm-w2c.ch" fatal(_("! Filename too long\n"),*argv); -#line 1365 "cwebdir/common.w" +#line 1277 "cwebdir/common.w" + +/*:82*/ +#line 1239 "cwebdir/common.w" -/*:76*/ -#line 1326 "cwebdir/common.w" -; if(dot_pos==NULL){ sprintf(tex_file_name,"%s.tex",*argv); sprintf(idx_file_name,"%s.idx",*argv); @@ -1586,53 +1575,46 @@ sprintf(C_file_name,"%s.c",*argv); }else{ strcpy(tex_file_name,*argv); strcpy(C_file_name,*argv); -#line 1057 "cwebdir/comm-w2c.ch" if(make_xrefs){ -#line 1336 "cwebdir/common.w" *dot_pos= 0; sprintf(idx_file_name,"%s.idx",*argv); sprintf(scn_file_name,"%s.scn",*argv); } } -found_out= 1; +found_out= true; } -#line 1067 "cwebdir/comm-w2c.ch" -/*:73*/ -#line 1277 "cwebdir/common.w" +/*:79*/ +#line 1190 "cwebdir/common.w" -else/*75:*/ -#line 1352 "cwebdir/common.w" +else/*81:*/ +#line 555 "cwebdir/comm-w2c.ch" -#line 1118 "cwebdir/comm-w2c.ch" - cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); +cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); -#line 1363 "cwebdir/common.w" +#line 1275 "cwebdir/common.w" + +#line 563 "cwebdir/comm-w2c.ch" +/*:81*/ +#line 1191 "cwebdir/common.w" -#line 1125 "cwebdir/comm-w2c.ch" -/*:75*/ -#line 1278 "cwebdir/common.w" -; } } -if(!found_web)/*75:*/ -#line 1352 "cwebdir/common.w" +if(!found_web)/*81:*/ +#line 555 "cwebdir/comm-w2c.ch" -#line 1118 "cwebdir/comm-w2c.ch" cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); -#line 1363 "cwebdir/common.w" +#line 1275 "cwebdir/common.w" + +#line 563 "cwebdir/comm-w2c.ch" +/*:81*/ +#line 1194 "cwebdir/common.w" -#line 1125 "cwebdir/comm-w2c.ch" -/*:75*/ -#line 1281 "cwebdir/common.w" -; -#line 1283 "cwebdir/common.w" } -#line 1030 "cwebdir/comm-w2c.ch" -/*:70*//*95:*/ -#line 1432 "cwebdir/comm-w2c.ch" +/*:75*//*97:*/ +#line 812 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str) { @@ -1664,8 +1646,8 @@ textdomain("cweb"); history= spotless;exit(wrap_up()); } -/*:95*//*97:*/ -#line 1474 "cwebdir/comm-w2c.ch" +/*:97*//*99:*/ +#line 854 "cwebdir/comm-w2c.ch" void cb_show_banner(void) { @@ -1677,4 +1659,4 @@ textdomain("cweb"); } -/*:97*/ +/*:99*/ diff --git a/source/texk/web2c/cwebdir/ChangeLog b/source/texk/web2c/cwebdir/ChangeLog index a737adc07..be924eeb0 100644 --- a/source/texk/web2c/cwebdir/ChangeLog +++ b/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,211 @@ +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. + +2021-02-17 Andreas Scherer + + * Makefile: Main CWEB modules depend on COMMON interface. + +2021-02-16 Andreas Scherer + + * common.c, + * common.h, + * ctangle.c, + * comm-w2c.h: Reshuffle byte_mem pointer. + +2021-02-16 Andreas Scherer + + * comm-w2c.ch, + * common.h: Restore comment from 'cweave.w' (3.64c). + +2021-02-11 Andreas Scherer + + * texinputs/pdfctwimac.tex: Fix bug in color setter. + +2021-02-08 Andreas Scherer + + * comm-w2c.ch, + * common.c, + * common.h, + * common.w, + * ctangle.c, + * ctangle.w, + * cweave.w: Don't repeat yourself. + +2021-02-07 Andreas Scherer + + * comm-w2c.ch: Fix 'reading error'; + CWEB development has moved to another level. + +2021-02-07 Andreas Scherer + + * Makefile, + * README, + * comm-{amiga,bs,mac,os2,pc,ql,vms,w32}.ch, + * comm-w2c.ch, + * comm-w2c.h, + * common.c, + * common.h, + * common.w, + * ctang-{bs,pc,ql,vms,w32}.ch, + * ctang-man.ch, + * ctang-w2c.ch, + * ctangle.c, + * ctangle.w, + * ctwill-mini.ch, + * ctwill-w2c.ch, + * ctwill.bux, + * cweav-{bs,pc,ql,vms,w32}.ch, + * cweav-man.ch, + * cweav-w2c.ch, + * cweave.w, + * cweb.1, + * cwebmac.tex, + * cwebman-w2c.ch, + * cwebman.tex, + * examples/wmerge.w, + * po/{cweb,cweb-tl,web2c-help}.pot, + * po/de/{cweb,cweb-tl,web2c-help}.po, + * po/it/cweb.po, + * system.bux: New CWEB 4.0 and CWEBbin 2021. + 2020-07-30 Andreas Scherer * comm-w2c.ch, diff --git a/source/texk/web2c/cwebdir/Makefile b/source/texk/web2c/cwebdir/Makefile index 1367d0089..0c20d83c1 100644 --- a/source/texk/web2c/cwebdir/Makefile +++ b/source/texk/web2c/cwebdir/Makefile @@ -1,6 +1,6 @@ # This file is part of CWEB. # It is distributed WITHOUT ANY WARRANTY, express or implied. -# Version 3.64 --- February 2002 +# Version 4.2 --- February 2021 # Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -63,8 +63,10 @@ RM= /bin/rm 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 @@ ALL = common.w ctangle.w cweave.w prod.w \ case "$(PDFTEX)" in \ dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \ pdftex ) pdftex $* ;; \ + xetex ) xetex $* ;; \ esac all: ctangle cweave @@ -125,7 +128,7 @@ SAVEctangle.c: SAVEcommon.c: $(CP) common.c SAVEcommon.c -common.c: common.w $(CCHANGES) +common.c: common.w $(CCHANGES) common.h $(CTANGLE) common $(CCHANGES) common.o: common.c @@ -134,13 +137,13 @@ common.o: common.c ctangle: ctangle.o common.o $(CC) $(LINKFLAGS) -o ctangle ctangle.o common.o -ctangle.c: ctangle.w $(TCHANGES) +ctangle.c: ctangle.w $(TCHANGES) common.h $(CTANGLE) ctangle $(TCHANGES) cweave: cweave.o common.o $(CC) $(LINKFLAGS) -o cweave cweave.o common.o -cweave.c: cweave.w $(WCHANGES) +cweave.c: cweave.w $(WCHANGES) common.h prod.w $(CTANGLE) cweave $(WCHANGES) doc: $(SOURCES:.w=.dvi) diff --git a/source/texk/web2c/cwebdir/README b/source/texk/web2c/cwebdir/README index 6429dabfa..081dc5aa0 100644 --- a/source/texk/web2c/cwebdir/README +++ b/source/texk/web2c/cwebdir/README @@ -1,7 +1,7 @@ % This file is part of CWEB. % The CWEB programs by Silvio Levy are based on programs by D. E. Knuth. % They are distributed WITHOUT ANY WARRANTY, express or implied. -% This README file last updated January 2016 by Don Knuth +% This README file last updated February 2021 by Andreas Scherer % Copyright (C) 1987,1990,1993,2000,2016 Silvio Levy and Donald E. Knuth @@ -18,9 +18,13 @@ % there will verify and forward bug reports. % % DEK takes no responsibility for the changefiles; they should be -% maintained independently. His job is to correct errors in -% ctangle.w, cweave.w, prod.w, common.w, cwebmac.tex, cwebman.tex, -% and in the files of examples/*.w, nothing more. +% maintained independently. He even transferred the job to correct errors +% in ctangle.w, cweave.w, prod.w, common.w, cwebmac.tex, cwebman.tex, +% and in the files of examples/*.w to Andreas Scherer in 2021. +% Further significant developments, including versions that neither +% Don Knuth nor Silvio Levy themselves do maintain, are ongoing. +% All of the really current news about CWEB is, in fact, now to be found +% on the CWEB development page https://github.com/ascherer/cweb. This directory contains the following files: @@ -30,6 +34,7 @@ comm-amiga.ch comm-bs.ch comm-mac.ch comm-man.ch +comm-os2.ch comm-pc.ch comm-ql.ch comm-vms.ch @@ -68,7 +73,7 @@ The files common.c and ctangle.c are used for bootstrapping. The file cweb.1 is a manual page. The file cweb.el is suggested for GNU-Emacs users. The file c++lib.w is for C++ users (say `@i c++lib.w' at beginning of program). -The files *-man.ch are used if you want to make the full 239-page CWEB manual. +The files *-man.ch are used if you want to make the full 240-page CWEB manual. The files *-bs.ch are used instead of *-pc.ch if you are doing BIG programs. You can use makefile.bs to make CWEB with *-bs.ch. The files *-ql.ch are for QDOS/SMSQ systems; see readme.ql for further info. @@ -102,9 +107,3 @@ Note that change files for VMS, AMIGA, MAC, and PCs are provided. When you are first bootstrapping to a new system, you may need to edit common.c and ctangle.c by hand, but the vast majority of the change-file changes are minor refinements that are not necessary for a rudimentary ctangle. - ------------------------------------------ -These archival sources are maintained only to the extent of fixing -significant bugs that were unintended at the time of writing. -A multi-decade ongoing project to improve and extend CWEB can be found at - https://github.com/ascherer/cwebbin diff --git a/source/texk/web2c/cwebdir/comm-amiga.ch b/source/texk/web2c/cwebdir/comm-amiga.ch index 57e65d1cc..f17c2d333 100644 --- a/source/texk/web2c/cwebdir/comm-amiga.ch +++ b/source/texk/web2c/cwebdir/comm-amiga.ch @@ -4,14 +4,14 @@ This is the change file for CWEB's COMMON on the Amiga With Lattice C 5.1, use compilation switches -b0 -r0, and ignore the compiler warnings. With SAS 6.0, use compilation switches Code=far Data=far. -@x section 69 +@x section 75 An omitted change file argument means that |"/dev/null"| should be used, @y An omitted change file argument means that |"nil:"| should be used, @z -@x section 70 - if (found_change<=0) strcpy(change_file_name,"/dev/null"); +@x section 76 + strcpy(change_file_name,"/dev/null"); @y - if (found_change<=0) strcpy(change_file_name,"nil:"); + strcpy(change_file_name,"nil:"); @z diff --git a/source/texk/web2c/cwebdir/comm-bs.ch b/source/texk/web2c/cwebdir/comm-bs.ch index 26f79b160..b01b86799 100644 --- a/source/texk/web2c/cwebdir/comm-bs.ch +++ b/source/texk/web2c/cwebdir/comm-bs.ch @@ -12,55 +12,68 @@ by using "huge" pointers. (This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94; revised 24 Jul 94.) +(Update attempt by Andreas Scherer, 31 Jan 2021. Good luck!) -@x Section 23. - cur_file_name[l]='/'; /* \UNIX/ pathname separator */ -@y - cur_file_name[l]='/'; /* A valid {\mc MSDOS} pathname separator */ -@z +@x Section 6. + for section names */ -@x Section 27. -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240 */ - -@= +@= typedef struct name_info { char *byte_start; /* beginning of the name in |byte_mem| */ - @@; + struct name_info *link; + union { + struct name_info *Rlink; /* right link in binary search tree for section + names */ + char Ilk; /* used by identifiers in \.{CWEAVE} only */ + } dummy; + void *equiv_or_xref; /* info corresponding to names */ } name_info; /* contains information about an identifier or section name */ -typedef name_info *name_pointer; /* pointer into array of |name_info|s */ -char byte_mem[max_bytes]; /* characters of names */ -char *byte_mem_end = byte_mem+max_bytes-1; /* end of |byte_mem| */ -name_info name_dir[max_names]; /* information about names */ -name_pointer name_dir_end = name_dir+max_names-1; /* end of |name_dir| */ +typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */ +typedef name_pointer *hash_pointer; +extern char byte_mem[]; /* characters of names */ +extern char *byte_mem_end; /* end of |byte_mem| */ @y -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240 */ + for section names */ @f huge extern -@= +@= typedef struct name_info { char huge* byte_start; /* beginning of the name in |byte_mem| */ - @@; + struct name_info *link; + union { + struct name_info *Rlink; /* right link in binary search tree for section + names */ + char Ilk; /* used by identifiers in \.{CWEAVE} only */ + } dummy; + union { + void huge* equiv_member; + void huge* xref_member; + } ptr_union; /* info corresponding to names */ } name_info; /* contains information about an identifier or section name */ -typedef name_info *name_pointer; /* pointer into array of |name_info|s */ -char huge byte_mem[max_bytes]; /* characters of names */ -char huge* byte_mem_end; /* end of |byte_mem| */ -name_info name_dir[max_names]; /* information about names */ -name_pointer name_dir_end = name_dir+max_names-1; +typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */ +typedef name_pointer *hash_pointer; +extern char huge byte_mem[]; /* characters of names */ +extern char huge* byte_mem_end; /* end of |byte_mem| */ +@z + + +@x Section 39. + cur_file_name[l]='/'; /* \UNIX/ pathname separator */ +@y + cur_file_name[l]='/'; /* A valid {\mc MSDOS} pathname separator */ @z -@x Section 29. +@x Section 44. char *byte_ptr; /* first unused position in |byte_mem| */ @y char huge* byte_ptr; /* first unused position in |byte_mem| */ @z -@x Section 30. +@x Section 45. @ @= name_dir->byte_start=byte_ptr=byte_mem; /* position zero in both arrays */ name_ptr=name_dir+1; /* |name_dir[0]| will be used only for error recovery */ @@ -74,156 +87,137 @@ byte_mem_end = byte_mem+max_bytes-1; @z -@x Section 42. +@x Section 52. void -print_section_name(p) -name_pointer p; +print_section_name( +name_pointer p) { char *ss, *s = first_chunk(p); @y void -print_section_name(p) -name_pointer p; +print_section_name( +name_pointer p) { char huge* ss, huge* s = first_chunk(p); @z -@x Section 43. +@x Section 53. void -sprint_section_name(dest,p) - char*dest; - name_pointer p; +sprint_section_name( + char *dest, + name_pointer p) { char *ss, *s = first_chunk(p); @y void -sprint_section_name(dest,p) - char*dest; - name_pointer p; +sprint_section_name( + char huge* dest, + name_pointer p) { char huge* ss, huge* s = first_chunk(p); @z -@x Section 44. +@x Section 54. void -print_prefix_name(p) -name_pointer p; +print_prefix_name( +name_pointer p) { char *s = first_chunk(p); @y void -print_prefix_name(p) -name_pointer p; +print_prefix_name( +name_pointer p) { char huge* s = first_chunk(p); @z -@x Section 47. -name_pointer -add_section_name(par,c,first,last,ispref) /* install a new node in the tree */ -name_pointer par; /* parent of new node */ -int c; /* right or left? */ -char *first; /* first character of section name */ -char *last; /* last character of section name, plus one */ -int ispref; /* are we adding a prefix or a full name? */ +@x Section 57. +static name_pointer +add_section_name(@t\1\1@> /* install a new node in the tree */ +name_pointer par, /* parent of new node */ +int c, /* right or left? */ +char *first, /* first character of section name */ +char *last, /* last character of section name, plus one */ +int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ { name_pointer p=name_ptr; /* new node */ char *s=first_chunk(p); @y -name_pointer -add_section_name(par,c,first,last,ispref) /* install a new node in the tree */ -name_pointer par; /* parent of new node */ -int c; /* right or left? */ -char *first; /* first character of section name */ -char *last; /* last character of section name, plus one */ -int ispref; /* are we adding a prefix or a full name? */ +static name_pointer +add_section_name(@t\1\1@> /* install a new node in the tree */ +name_pointer par, /* parent of new node */ +int c, /* right or left? */ +char huge* first, /* first character of section name */ +char huge* last, /* last character of section name, plus one */ +int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ { name_pointer p=name_ptr; /* new node */ char huge* s=first_chunk(p); @z -@x Section 48. -void -extend_section_name(p,first,last,ispref) -name_pointer p; /* name to be extended */ -char *first; /* beginning of extension text */ -char *last; /* one beyond end of extension text */ -int ispref; /* are we adding a prefix or a full name? */ +@x Section 58. +static void +extend_section_name(@t\1\1@> +name_pointer p, /* name to be extended */ +char *first, /* beginning of extension text */ +char *last, /* one beyond end of extension text */ +int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ { char *s; @y -void -extend_section_name(p,first,last,ispref) -name_pointer p; /* name to be extended */ -char *first; /* beginning of extension text */ -char *last; /* one beyond end of extension text */ -int ispref; /* are we adding a prefix or a full name? */ +static void +extend_section_name(@t\1\1@> +name_pointer p, /* name to be extended */ +char huge* first, /* beginning of extension text */ +char huge* last, /* one beyond end of extension text */ +int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ { char huge* s; @z -@x Section 54. -int section_name_cmp(pfirst,len,r) -char **pfirst; /* pointer to beginning of comparison string */ -int len; /* length of string */ -name_pointer r; /* section name being compared */ +@x Section 64. +static int section_name_cmp(@t\1\1@> +char **pfirst, /* pointer to beginning of comparison string */ +int len, /* length of string */ +name_pointer r@t\2\2@>) /* section name being compared */ { char *first=*pfirst; /* beginning of comparison string */ name_pointer q=r+1; /* access to subsequent chunks */ char *ss, *s=first_chunk(r); @y -int section_name_cmp(pfirst,len,r) -char **pfirst; /* pointer to beginning of comparison string */ -int len; /* length of string */ -name_pointer r; /* section name being compared */ +static int section_name_cmp(@t\1\1@> +char huge** pfirst, /* pointer to beginning of comparison string */ +int len, /* length of string */ +name_pointer r@t\2\2@>) /* section name being compared */ { - char *first=*pfirst; /* beginning of comparison string */ + char huge* first=*pfirst; /* beginning of comparison string */ name_pointer q=r+1; /* access to subsequent chunks */ char huge* ss, huge* s=first_chunk(r); @z -@x Section 55. -source files, respectively; here we just declare a common field -|equiv_or_xref| as a pointer to a |char|. - -@= -char *equiv_or_xref; /* info corresponding to names */ +@x Section 75. +An omitted change file argument means that |"/dev/null"| should be used, @y -source files, respectively. Here we just declare a common field -|ptr_union| as a union of pointers to |char|, which happen to have -different addressing attributes. - -@= -union { - char *equiv_member; - char huge* xref_member; -} ptr_union; /* info corresponding to names */ +An omitted change file argument means that |"NUL"| should be used, @z -@x Section 69. -An omitted change file argument means that |"/dev/null"| should be used, +@x Section 76. + strcpy(change_file_name,"/dev/null"); @y -An omitted change file argument means that |"NUL"| should be used, + strcpy(change_file_name,"NUL"); @z -@x Section 70. +@x Section 76. else if (*s=='/') dot_pos=NULL,name_pos=++s; @y else if (*s == ':' || *s == '\\' || *s == '/') dot_pos=NULL,name_pos=++s; @z - - -@x Section 70. - if (found_change<=0) strcpy(change_file_name,"/dev/null"); -@y - if (found_change<=0) strcpy(change_file_name,"NUL"); -@z diff --git a/source/texk/web2c/cwebdir/comm-mac.ch b/source/texk/web2c/cwebdir/comm-mac.ch index b9bd40865..aa3a77fed 100644 --- a/source/texk/web2c/cwebdir/comm-mac.ch +++ b/source/texk/web2c/cwebdir/comm-mac.ch @@ -4,23 +4,26 @@ No changes to CTANGLE or CWEAVE are needed. (Contributed 13 Oct 2000 by AndPio@aol.com; slightly edited by Don Knuth) @x in limbo, change the title page document to specify Mac version - \centerline{(Version 3.64)} + \centerline{(Version 4.2)} @y - \centerline{(Version 3.64 for MacOS)} + \centerline{(Version 4.2 for MacOS)} @z -@x section 9: Make input_ln accept \n, \r, \n\r, or \r\n as line endings +@x sections 23/24: Make input_ln accept \n, \r, \n\r, or \r\n as line endings @ 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@> -@c -int input_ln(fp) /* copies a line into |buffer| or returns 0 */ -FILE *fp; /* what file to read from */ +@= +static boolean input_ln(FILE *);@/ + +@ @c +static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */ +FILE *fp@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; @@ -28,10 +31,10 @@ FILE *fp; /* what file to read from */ if ((c=getc(fp))!=EOF && c!='\n') { 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 @@ -42,27 +45,30 @@ line endings, so that \.{CWEB} will works with ASCII files stored in \UNIX/, {\mc DOS} or {\mc MAC} format. @^system dependencies@> -@c -int input_ln(fp) /* copies a line into |buffer| or returns 0 */ -FILE *fp; /* what file to read from */ +@= +static boolean input_ln(FILE *);@/ + +@ @c +static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */ +FILE *fp@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 @@ -71,17 +77,17 @@ FILE *fp; /* what file to read from */ } @z -@x section 12, simply return if no change file was specified +@x section 28, simply return if no change file was specified change_limit=change_buffer; /* this value is used if the change file ends */ - @; + @@; @y change_limit=change_buffer; /* this value is used if the change file ends */ if (change_file_name[0] == '\0') /* no change file specified */ return; /* so we have reached the end of that file */ - @; + @@; @z -@x section 19, don't try to open a change file if none was specified +@x section 36, don't try to open a change file if none was specified if ((change_file=fopen(change_file_name,"r"))==NULL) fatal("! Cannot open change file ", change_file_name); @y @@ -91,7 +97,7 @@ else if ((change_file=fopen(change_file_name,"r"))==NULL) fatal("! Cannot open change file ", change_file_name); @z -@x section 22, declare colon as Mac's path separator +@x section 39, declare colon as Mac's path separator (Colon-separated paths are not supported.) The remainder of the \.{@@i} line after the file name is ignored. @@ -104,38 +110,37 @@ The remainder of the \.{@@i} line after the file name is ignored. @d PATH_SEP ':' /* MacOS pathname separator */ @^system dependencies@> @z - -@x section 23, use the path separator constant +@x section 39, use the path separator constant cur_file_name[l]='/'; /* \UNIX/ pathname separator */ @y cur_file_name[l]=PATH_SEP; /* pathname separator */ @z -@x section 69, explain the convention for omitted change files +@x section 75, explain the convention for omitted change files An omitted change file argument means that |"/dev/null"| should be used, @y An omitted change file argument means that no change file should be used, @z -@x section 70, use the Metrowerks |ccommand| to access command lines +@x section 76, make change file name empty when it is unspecified + strcpy(change_file_name,"/dev/null"); +@y + change_file_name[0]='\0'; /* empty string */ +@z +@x section 76, use the Metrowerks |ccommand| to access command lines while (--argc > 0) { @y argc = ccommand (&argv); /* use Mac interface to command line */ @^system dependencies@> while (--argc > 0) { @z -@x section 70, use the path separator constant +@x section 76, use the path separator constant else if (*s=='/') dot_pos=NULL,name_pos=++s; @y else if (*s==PATH_SEP) dot_pos=NULL,name_pos=++s; @z -@x section 70, make change file name empty when it is unspecified - if (found_change<=0) strcpy(change_file_name,"/dev/null"); -@y - if (found_change<=0) change_file_name[0]='\0'; /* empty string */ -@z -@x section 82, insert an extra module before the index +@x section 85, insert an extra module before the index @** Index. @y by putting the new module here, we preserve all the previous section numbers @ We assume an interface to \CEE/ command-line emulation as supplied by diff --git a/source/texk/web2c/cwebdir/comm-os2.ch b/source/texk/web2c/cwebdir/comm-os2.ch index 5e20a6706..2b85f8b1f 100644 --- a/source/texk/web2c/cwebdir/comm-os2.ch +++ b/source/texk/web2c/cwebdir/comm-os2.ch @@ -4,21 +4,21 @@ This is the change file for CWEB's COMMON under OS/2 These changes tested with WATCOM C v10.0a. No changes to CTANGLE or CWEAVE are needed with OS/2. -@x section 69 +@x section 75 An omitted change file argument means that |"/dev/null"| should be used, @y An omitted change file argument means that |"NUL"| should be used, @z -@x section 70 (this change copied from comm-pc.ch) - else if (*s=='/') dot_pos=NULL,name_pos=++s; +@x section 76 + strcpy(change_file_name,"/dev/null"); @y - else if (*s == ':' || *s == '\\' || *s == '/') - dot_pos=NULL,name_pos=++s; + strcpy(change_file_name,"NUL"); @z -@x section 70 - if (found_change<=0) strcpy(change_file_name,"/dev/null"); +@x section 76 (this change copied from comm-pc.ch) + else if (*s=='/') dot_pos=NULL,name_pos=++s; @y - if (found_change<=0) strcpy(change_file_name,"NUL"); + else if (*s == ':' || *s == '\\' || *s == '/') + dot_pos=NULL,name_pos=++s; @z diff --git a/source/texk/web2c/cwebdir/comm-pc.ch b/source/texk/web2c/cwebdir/comm-pc.ch index e69bafb52..5f7d9c42f 100644 --- a/source/texk/web2c/cwebdir/comm-pc.ch +++ b/source/texk/web2c/cwebdir/comm-pc.ch @@ -4,30 +4,30 @@ This is the change file for CWEB's COMMON under DOS Changes necessary for compiling with Borland C/C++ Use compilation switches -mc -w-pro -Ff=5000 -Note: The change to section 27 is not necessary if using a compiler +Note: The change to section 16 is not necessary if using a compiler that allows >64K arrays. -@x section 27 -@d max_bytes 90000 /* the number of bytes in identifiers, +@x section 16 +@d max_bytes 1000000 /* the number of bytes in identifiers, @y @d max_bytes (unsigned)60000 /* the number of bytes in identifiers, @z -@x section 69 +@x section 75 An omitted change file argument means that |"/dev/null"| should be used, @y An omitted change file argument means that |"NUL"| should be used, @z -@x section 70 (this change copied from comm-bs.ch, July 94) - else if (*s=='/') dot_pos=NULL,name_pos=++s; +@x section 76 + strcpy(change_file_name,"/dev/null"); @y - else if (*s == ':' || *s == '\\' || *s == '/') - dot_pos=NULL,name_pos=++s; + strcpy(change_file_name,"NUL"); @z -@x section 70 - if (found_change<=0) strcpy(change_file_name,"/dev/null"); +@x section 76 (this change copied from comm-bs.ch, July 94) + else if (*s=='/') dot_pos=NULL,name_pos=++s; @y - if (found_change<=0) strcpy(change_file_name,"NUL"); + else if (*s == ':' || *s == '\\' || *s == '/') + dot_pos=NULL,name_pos=++s; @z diff --git a/source/texk/web2c/cwebdir/comm-ql.ch b/source/texk/web2c/cwebdir/comm-ql.ch index 8859e215b..c03b9185c 100644 --- a/source/texk/web2c/cwebdir/comm-ql.ch +++ b/source/texk/web2c/cwebdir/comm-ql.ch @@ -10,61 +10,39 @@ ex cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c' @x \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (Version 3.64)} +\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 3.64)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @y \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (QL Version 3.64)} +\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 3.64)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @z -@x -The line number of each open file is also kept for error reporting and -for the benefit of \.{CTANGLE}. - -@f line x /* make |line| an unreserved word */ -@d max_include_depth 10 /* maximum number of source files open - simultaneously, not counting the change file */ -@d max_file_name_length 60 -@d cur_file file[include_depth] /* current file */ -@d cur_file_name file_name[include_depth] /* current file name */ -@d cur_line line[include_depth] /* number of current line in current file */ -@d web_file file[0] /* main source file */ -@d web_file_name file_name[0] /* main source file name */ -@y -The line number of each open file is also kept for error reporting and -for the benefit of \.{CTANGLE}. For use on QDOS/SMSQ systems the variable |max_file_name_length| is shortened to 42 characters, i.e. 5 characters for the device name, 36 characters for the file name plus one character as string terminator. (Note that (current) QDOS/SMSQ file systems have a limitation of 36 characters as maximum length for a file name. - -@f line x /* make |line| an unreserved word */ -@d max_include_depth 10 /* maximum number of source files open - simultaneously, not counting the change file */ +@x +@d max_file_name_length 1024 +@y @d max_file_name_length 42 -@d cur_file file[include_depth] /* current file */ -@d cur_file_name file_name[include_depth] /* current file name */ -@d cur_line line[include_depth] /* number of current line in current file */ -@d web_file file[0] /* main source file */ -@d web_file_name file_name[0] /* main source file name */ @z @@ -90,99 +68,6 @@ when no changes are desired. @^system dependencies@> If there's a third file name, it will be the output file. - -@= -void scan_args(); - -@ @c -void -scan_args() -{ - 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; - /* have these names have been seen? */ - boolean flag_change; - - while (--argc > 0) { - if ((**(++argv)=='-'||**argv=='+')&&*(*argv+1)) @@; - else { - s=name_pos=*argv;@+dot_pos=NULL; - while (*s) { - if (*s=='.') dot_pos=s++; - else if (*s=='/') dot_pos=NULL,name_pos=++s; - else s++; - } - if (!found_web) @@; - else if (!found_change) @@; - else if (!found_out) @@; - else @; - } - } - if (!found_web) @; - if (found_change<=0) strcpy(change_file_name,"/dev/null"); -} - -@ 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. -The other file names come from adding other things -after the dot. We must check that there is enough room in -|web_file_name| and the other arrays for the argument. - -@= -{ - if (s-*argv > max_file_name_length-5) - @; - if (dot_pos==NULL) - sprintf(web_file_name,"%s.w",*argv); - else { - strcpy(web_file_name,*argv); - *dot_pos=0; /* string now ends where the dot was */ - } - sprintf(alt_web_file_name,"%s.web",*argv); - sprintf(tex_file_name,"%s.tex",name_pos); /* strip off directory name */ - 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; -} - -@ @= -{ - if (strcmp(*argv,"-")==0) found_change=-1; - else { - if (s-*argv > max_file_name_length-4) - @; - if (dot_pos==NULL) - sprintf(change_file_name,"%s.ch",*argv); - else strcpy(change_file_name,*argv); - found_change=1; - } -} - -@ @= -{ - if (s-*argv > max_file_name_length-5) - @; - if (dot_pos==NULL) { - sprintf(tex_file_name,"%s.tex",*argv); - sprintf(idx_file_name,"%s.idx",*argv); - sprintf(scn_file_name,"%s.scn",*argv); - sprintf(C_file_name,"%s.c",*argv); - } else { - strcpy(tex_file_name,*argv); - strcpy(C_file_name,*argv); - if (flags['x']) { /* indexes will be generated */ - *dot_pos=0; - sprintf(idx_file_name,"%s.idx",*argv); - sprintf(scn_file_name,"%s.scn",*argv); - } - } - found_out=1; -} @y @ 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} @@ -204,41 +89,42 @@ always use the {\em full} name (i.e. with full path). Fortunately the routine has been written to search for the last ``dot'', so the altered version will search for the last |"_"| (including directory separators), so we have what we want. +@z -@= -void scan_args(); -@ @c -void -scan_args() -{ +@x + char *dot_pos; /* position of |'.'| in the argument */ +@y 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; - /* have these names have been seen? */ - boolean flag_change; - - while (--argc > 0) { - if ((**(++argv)=='-'||**argv=='+')&&*(*argv+1)) @@; - else { - s=name_pos=*argv;@+dot_pos=NULL; - while (*s) { +@z + + +@x + strcpy(change_file_name,"/dev/null"); +@y + strcpy(change_file_name,"NUL"); +@z + + +@x + if (*s=='.') dot_pos=s++; + else if (*s=='/') dot_pos=NULL,name_pos=++s; + else s++; +@y if (*s=='_') dot_pos=s++; else if (*s=='_') dot_pos=NULL,name_pos=++s; else s++; - } - if (!found_web) @@; - else if (!found_change) @@; - else if (!found_out) @@; - else @; - } - } - if (!found_web) @; - if (found_change<=0) strcpy(change_file_name,"NUL"); -} +@z + +@x +@ 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. +The other file names come from adding other things +after the dot. We must check that there is enough room in +|web_file_name| and the other arrays for the argument. +@y @ 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. @@ -250,7 +136,28 @@ If you've read the section before carefully you'll have noticed, that QDOS/SMSQ file names contain almost a |"_"|, so this routine will not work, i.e. you'll {\em have} to add the |"_w"| always. Nevertheless I adapted the routine as if it would work. +@z + +@x +@= +{ + if (s-*argv > max_file_name_length-5) + @@; + if (dot_pos==NULL) + sprintf(web_file_name,"%s.w",*argv); + else { + strcpy(web_file_name,*argv); + *dot_pos=0; /* string now ends where the dot was */ + } + sprintf(alt_web_file_name,"%s.web",*argv); + sprintf(tex_file_name,"%s.tex",name_pos); /* strip off directory name */ + 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=true; +} +@y @= { if (s-*argv > max_file_name_length-5) @@ -266,22 +173,60 @@ the routine as if it would work. 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 + +@x @ @= { - if (strcmp(*argv,"-")==0) found_change=-1; - else { + if (strcmp(*argv,"-")!=0) { + if (s-*argv > max_file_name_length-4) + @@; + if (dot_pos==NULL) + sprintf(change_file_name,"%s.ch",*argv); + else strcpy(change_file_name,*argv); + } + found_change=true; +} +@y +@ @= +{ + if (strcmp(*argv,"-")!=0) { if (s-*argv > max_file_name_length-4) @; if (dot_pos==NULL) sprintf(change_file_name,"%s_ch",*argv); else strcpy(change_file_name,*argv); - found_change=1; + found_change=true; } } +@z + +@x +@ @= +{ + if (s-*argv > max_file_name_length-5) + @@; + if (dot_pos==NULL) { + sprintf(tex_file_name,"%s.tex",*argv); + sprintf(idx_file_name,"%s.idx",*argv); + sprintf(scn_file_name,"%s.scn",*argv); + sprintf(C_file_name,"%s.c",*argv); + } else { + strcpy(tex_file_name,*argv); + strcpy(C_file_name,*argv); + if (make_xrefs) { /* indexes will be generated */ + *dot_pos=0; + sprintf(idx_file_name,"%s.idx",*argv); + sprintf(scn_file_name,"%s.scn",*argv); + } + } + found_out=true; +} +@y @ @= { if (s-*argv > max_file_name_length-5) @@ -294,13 +239,13 @@ the routine as if it would work. } else { strcpy(tex_file_name,*argv); strcpy(C_file_name,*argv); - if (flags['x']) { /* indexes will be generated */ + if (make_xrefs) { /* indexes will be generated */ *dot_pos=0; sprintf(idx_file_name,"%s_idx",*argv); sprintf(scn_file_name,"%s_scn",*argv); } } - found_out=1; + found_out=true; } @z diff --git a/source/texk/web2c/cwebdir/comm-vms.ch b/source/texk/web2c/cwebdir/comm-vms.ch index cd5fe5243..caf8ecef7 100644 --- a/source/texk/web2c/cwebdir/comm-vms.ch +++ b/source/texk/web2c/cwebdir/comm-vms.ch @@ -13,19 +13,26 @@ modified: (only the two changes by BL are necessary for initial bootstrapping via hand-editing of common.c) -@x section 5 (01-FEB-1992 ST) -#include +@x section 3 (01-FEB-1992 ST) +#include /* definition of |@!isalpha|, |@!isdigit| and so on */ +#include /* definition of |@!bool|, |@!true| and |@!false| */ +#include /* definition of |@!ptrdiff_t| */ +#include /* definition of |@!uint8_t| and |@!uint16_t| */ +#include /* definition of |@!getenv| and |@!exit| */ +#include /* definition of |@!printf| and friends */ +#include /* definition of |@!strlen|, |@!strcmp| and so on */ @y -#include ctype /* VMS searches Textlibraries faster */ +#include ctype /* definition of |@!isalpha|, |@!isdigit| and so on */ + /* VMS searches text libraries faster */ +#include stdbool /* definition of |@!bool|, |@!true| and |@!false| */ +#include stddef /* definition of |@!ptrdiff_t| */ +#include stdint /* definition of |@!uint8_t| and |@!uint16_t| */ +#include stdlib /* definition of |@!getenv| and |@!exit| */ +#include stdio /* definition of |@!printf| and friends */ +#include string /* definition of |@!strlen|, |@!strcmp| and so on */ @z -@x section 8 (01-FEB-1992 ST) -#include -@y -#include stdio /* VMS searches Textlibraries faster */ -@z - -@x section 61 (01-FEB-1992 ST) +@x section 68 (01-FEB-1992 ST) programs are started. Here, for instance, we pass the operating system a status of 0 if and only if only harmless messages were printed. @y @@ -37,9 +44,9 @@ A suitable status to signal an error condition to VAX/VMS could be print |"%SYSTEM-F-ABORT, abort"|, if |history > harmless_message|. @z -@x section 61 (1987 BL) (01-FEB-1992 ST) (11-JAN-1993 DEK) - if (history > harmless_message) return(1); - else return(0); +@x section 68 (1987 BL) (01-FEB-1992 ST) (11-JAN-1993 DEK) + if (history > harmless_message) return EXIT_FAILURE; + else return EXIT_SUCCESS; @y /* VAX/VMS and UNIX have different error status conventions. @@ -52,7 +59,7 @@ print |"%SYSTEM-F-ABORT, abort"|, if |history > harmless_message|. else exit(SS$_NORMAL); @z -@x section 69 (01-FEB-1992 ST) +@x section 75 (01-FEB-1992 ST) An omitted change file argument means that |"/dev/null"| should be used, when no changes are desired. @y @@ -60,14 +67,14 @@ An omitted change file argument means that the null device |"NL:"| should be used, when no changes are desired. @z -@x section 70 (1987 BL) (01-FEB-1992 ST) (05-APR-1992 DEK) - if (found_change<=0) strcpy(change_file_name,"/dev/null"); +@x section 76 (1987 BL) (01-FEB-1992 ST) (05-APR-1992 DEK) + strcpy(change_file_name,"/dev/null"); @y - if (found_change<=) strcpy(change_file_name,"NL:"); + strcpy(change_file_name,"NL:"); /* {\tt NL:} is the VAX/VMS notation for {\tt /dev/null} */ @z -@x section 82 (01-FEB-1992 ST) +@x section 85 (01-FEB-1992 ST) @** Index. @y @* VAX/VMS specific code. diff --git a/source/texk/web2c/cwebdir/comm-w2c.ch b/source/texk/web2c/cwebdir/comm-w2c.ch index e134eab9a..286a39723 100644 --- a/source/texk/web2c/cwebdir/comm-w2c.ch +++ b/source/texk/web2c/cwebdir/comm-w2c.ch @@ -1,31 +1,32 @@ -@q Changes for CWEB in TeX Live from numerous contributors. @> -@q This file is in the Public Domain. @> +@q Changes for CWEB in TeX Live from numerous contributors. @> +@q This file is in the Public Domain. @> -@q Most of the original Kpathsea changes by Wlodek Bzyl and Olaf Weber @> -@q were merged with the set of change files of the CWEBbin project; @> -@q see https://github.com/ascherer/cwebbin for the original parts. @> +@q Most of the original Kpathsea changes by Wlodek Bzyl and Olaf Weber @> +@q were merged with the set of change files of the CWEBbin project; @> +@q see https://github.com/ascherer/cwebbin for the original parts. @> -@q This stripped change file {comm,ctang,cweav,ctwill}-w2c.ch has been @> -@q created from the set of change files {comm,ctang,cweav}-patch.ch, @> -@q {comm,ctang,cweav}-ansi.ch, {comm,ctang,cweav}-extensions.ch, @> -@q {comm,ctang,cweav}-output.ch, {comm,ctang,cweav}-i18n.ch, and @> -@q cweav-twill.ch for CTWILL, and {comm,ctang,cweav,ctwill}-texlive.ch @> -@q with the 'tie' processor and is used as a monolithic changefile for @> -@q {common,ctangle,cweave}.w in TeX Live. @> +@q This stripped change file {comm,ctang,cweav,ctwill,cwebman}-w2c.ch @> +@q has been created from the elaborate set of change files @> +@q {comm,ctang,cweav,cwebman}-patch.ch, @> +@q {comm,cweav,cwebman}-extensions.ch, {comm,ctang,cweav}-output.ch, @> +@q {comm,ctang,cweav}-i18n.ch, and cweav-twill.ch for CTWILL, and @> +@q {comm,ctang,cweav,ctwill,cwebman}-texlive.ch with the 'tie' processor @> +@q and is used as a monolithic changefile for {common,ctangle,cweave}.w @> +@q and cwebman.tex in TeX Live. @> -@q Please send comments, suggestions, etc. to tex-k@@tug.org. @> +@q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{Common code for CTANGLE and CWEAVE (Version 3.64)} +\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 (\TeX~Live)} +\def\title{Common code for CTANGLE and CWEAVE (4.2 [\TeX~Live])} @z @x - \centerline{(Version 3.64)} + \centerline{(Version 4.2)} @y - \centerline{(Version 3.64 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -37,16 +38,7 @@ @x } @y -}} -\datecontentspage -@z - -@x -@s not_eq normal @q unreserve a C++ keyword @> -@y -@s boolean int -@s uint8_t int -@s uint16_t int +}}\datecontentspage @z @x @@ -63,104 +55,35 @@ sometimes use \.{CWEB} to refer to any of the three component @z @x -|program|. - -@d ctangle 0 -@d cweave 1 +@i common.h @y -|program|. And \.{CTWILL} adds some extra twists. +@i comm-w2c.h @z @x -typedef short boolean; +|program|. @y -typedef uint8_t eight_bits; -typedef uint16_t sixteen_bits; +|program|. And \.{CTWILL} adds some extra twists. @z @x boolean program; /* \.{CWEAVE} or \.{CTANGLE}? */ @y -typedef enum { - @!ctangle, @!cweave, @!ctwill -} cweb; cweb program; /* \.{CTANGLE} or \.{CWEAVE} or \.{CTWILL}? */ @z @x -void -common_init() -@y -void -common_init(void) -@z - -@x - @; - @; - @; + @@; @y @@; @@; - @@; - @@; - @@; -@z - -@x -\.{ctype.h} header file. - -@= -#include -@y -\.{ctype.h} header file, included through the \Kpathsea/ interface. -@z - -@x -@d not_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */ -@y -@d non_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */ -@z - -@x -@d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */ -@y -@d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */ - -@= -char section_text[longest_name+1]; /* name being sought for */ -char *section_text_end = section_text+longest_name; /* end of |section_text| */ -char *id_first; /* where the current identifier begins in the buffer */ -char *id_loc; /* just after the current identifier in the buffer */ -@z - -@x -@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ -@y -@d buf_size 1000 /* for \.{CWEAVE} and \.{CTANGLE} */ -@z - -@x -@d xisspace(c) (isspace(c)&&((unsigned char)c<0200)) -@d xisupper(c) (isupper(c)&&((unsigned char)c<0200)) -@y -@d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200)) -@d xisupper(c) (isupper((eight_bits)c)&&((eight_bits)c<0200)) -@z - -@x -@ @= -#include -@y -@ Most of the standard \CEE/ interface comes from \Kpathsea/. @z @x -int input_ln(fp) /* copies a line into |buffer| or returns 0 */ -FILE *fp; /* what file to read from */ + @@; @y -static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns 0 */ -FILE *fp@t\2\2@>) /* what file to read from */ + @@; + @@; @z @x @@ -176,36 +99,8 @@ FILE *fp@t\2\2@>) /* what file to read from */ @z @x -@d max_file_name_length 60 -@y -@d max_file_name_length 1024 -@z - -@x -char alt_web_file_name[max_file_name_length]; /* alternate name to try */ -@y -@z - -@x -@d lines_dont_match (change_limit-change_buffer != limit-buffer || - strncmp(buffer, change_buffer, limit-buffer)) +static char alt_web_file_name[max_file_name_length]; /* alternate name to try */ @y -@d lines_dont_match (change_limit-change_buffer != limit-buffer || @| - strncmp(buffer, change_buffer, (size_t)(limit-buffer))) -@z - -@x -void -prime_the_change_buffer() -@y -static void -prime_the_change_buffer(void) -@z - -@x - if (xisupper(buffer[1])) buffer[1]=tolower(buffer[1]); -@y - if (xisupper(buffer[1])) buffer[1]=tolower((eight_bits)buffer[1]); @z @x @@ -220,34 +115,12 @@ prime_the_change_buffer(void) err_print(_("! Change file ended after @@x")); @z -@x - change_limit=change_buffer+(limit-buffer); - strncpy(change_buffer,buffer,limit-buffer+1); -@y - change_limit=change_buffer+(ptrdiff_t)(limit-buffer); - strncpy(change_buffer,buffer,(size_t)(limit-buffer+1)); -@z - -@x -void -check_change() /* switches to |change_file| if the buffers match */ -@y -static void -check_change(void) /* switches to |change_file| if the buffers match */ -@z - @x err_print("! Change file ended before @@y"); @y err_print(_("! Change file ended before @@y")); @z -@x - char xyz_code=xisupper(buffer[1])? tolower(buffer[1]): buffer[1]; -@y - char xyz_code=xisupper(buffer[1])? tolower((eight_bits)buffer[1]): buffer[1]; -@z - @x err_print("! CWEB file ended during a change"); @y @@ -266,14 +139,6 @@ check_change(void) /* switches to |change_file| if the buffers match */ err_print(_("of the preceding lines failed to match")); @z -@x -void -reset_input() -@y -void -reset_input(void) -@z - @x if ((web_file=fopen(web_file_name,"r"))==NULL) { strcpy(web_file_name,alt_web_file_name); @@ -309,25 +174,6 @@ if ((found_filename=kpse_find_cweb(change_file_name))==NULL || @| } else fatal(_("! Filename too long\n"), found_filename); @z -@x -@d max_sections 2000 /* number of identifiers, strings, section names; - must be less than 10240 */ -@y -@d max_sections 10239 /* number of identifiers, strings, section names; - must be less than 10240 */ -@z - -@x -typedef unsigned short sixteen_bits; -@y -@z - -@x -int get_line() /* inputs the next line */ -@y -boolean get_line(void) /* inputs the next line */ -@z - @x err_print("! Include file name not given"); @y @@ -357,7 +203,7 @@ stop reading it and start reading from the named include file. The \.{@@i} line should give a complete file name with or without double quotes. The actual file lookup is done with the help of the \Kpathsea/ library; -see section~\X90:File lookup with \Kpathsea/\X~for details. % FIXME +see section~\X91:File lookup with \Kpathsea/\X~for details. % FIXME The remainder of the \.{@@i} line after the file name is ignored. @^system dependencies@> @.CWEBINPUTS@> @z @@ -368,18 +214,6 @@ The remainder of the \.{@@i} line after the file name is ignored. err_print(_("! Include file name too long")); goto restart;} @z -@x -@= -#include /* declaration of |getenv| and |exit| */ -@y -@z - -@x -@ @= { -@y -@ @.CWEBINPUTS@>@= { -@z - @x char temp_file_name[max_file_name_length]; char *cur_file_name_end=cur_file_name+max_file_name_length-1; @@ -425,7 +259,7 @@ The remainder of the \.{@@i} line after the file name is ignored. 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 */ } } @@ -440,98 +274,18 @@ The remainder of the \.{@@i} line after the file name is ignored. err_print(_("! Change file ended without @@z")); @z -@x - if (xisupper(buffer[1])) buffer[1]=tolower(buffer[1]); -@y - if (xisupper(buffer[1])) buffer[1]=tolower((eight_bits)buffer[1]); -@z - @x err_print("! Where is the matching @@z?"); @y err_print(_("! Where is the matching @@z?")); @z -@x -void -check_complete(){ - if (change_limit!=change_buffer) { /* |changing| is 0 */ - strncpy(buffer,change_buffer,change_limit-change_buffer+1); - limit=buffer+(int)(change_limit-change_buffer); -@y -void -check_complete(void) { - if (change_limit!=change_buffer) { /* |changing| is 0 */ - strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1)); - limit=buffer+(ptrdiff_t)(change_limit-change_buffer); -@z - @x err_print("! Change file entry did not match"); @y err_print(_("! Change file entry did not match")); @z -@x -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names; must be less than $2^{24}$ */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240 */ -@y -@d max_bytes 1000000 /* the number of bytes in identifiers, - index entries, and section names; must be less than $2^{24}$ */ -@d max_names 10239 /* number of identifiers, strings, section names; - must be less than 10240 */ -@z - -@x -@d length(c) (c+1)->byte_start-(c)->byte_start /* the length of a name */ -@y -@d length(c) (size_t)((c+1)->byte_start-(c)->byte_start) /* the length of a name */ -@z - -@x -@d hash_size 353 /* should be prime */ -@y -@d hash_size 8501 /* should be prime */ -@z - -@x -extern int names_match(); -@y -extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/ -@z - -@x -name_pointer -id_lookup(first,last,t) /* looks up a string in the identifier table */ -char *first; /* first character of string */ -char *last; /* last character of string plus one */ -char t; /* the |ilk|; used by \.{CWEAVE} only */ -{ - char *i=first; /* position in |buffer| */ -@y -name_pointer -id_lookup(@t\1\1@> /* looks up a string in the identifier table */ -const char *first, /* first character of string */ -const char *last, /* last character of string plus one */ -char t@t\2\2@>) /* the |ilk|; used by \.{CWEAVE} only */ -{ - const char *i=first; /* position in |buffer| */ -@z - -@x - l=last-first; /* compute the length */ -@y - l=(int)(last-first); /* compute the length */ -@z - -@x -void init_p(); -@y -extern void init_p(name_pointer,eight_bits);@/ -@z - @x if (byte_ptr+l>byte_mem_end) overflow("byte memory"); if (name_ptr>=name_dir_end) overflow("name"); @@ -540,102 +294,6 @@ extern void init_p(name_pointer,eight_bits);@/ if (name_ptr>=name_dir_end) overflow(_("name")); @z -@x - if (program==cweave) init_p(p,t); -@y - init_p(p,t); -@z - -@x -void -print_section_name(p) -name_pointer p; -@y -void -print_section_name( -name_pointer p) -@z - -@x - term_write(s,ss-s); p=q->link; q=p; - } else { - term_write(s,ss+1-s); p=name_dir; q=NULL; -@y - term_write(s,(size_t)(ss-s)); p=q->link; q=p; - } else { - term_write(s,(size_t)(ss+1-s)); p=name_dir; q=NULL; -@z - -@x -void -sprint_section_name(dest,p) - char*dest; - name_pointer p; -@y -void -sprint_section_name( - char *dest, - name_pointer p) -@z - -@x - strncpy(dest,s,ss-s), dest+=ss-s; -@y - strncpy(dest,s,(size_t)(ss-s)), dest+=ss-s; -@z - -@x -void -print_prefix_name(p) -name_pointer p; -@y -void -print_prefix_name( -name_pointer p) -@z - -@x -int web_strcmp(j,j_len,k,k_len) /* fuller comparison than |strcmp| */ - char *j, *k; /* beginning of first and second strings */ - int j_len, k_len; /* length of strings */ -@y -static int web_strcmp(@t\1\1@> /* fuller comparison than |strcmp| */ - char *j, /* beginning of first string */ - int j_len, /* length of first string */ - char *k, /* beginning of second string */ - int k_len@t\2\2@>) /* length of second string */ -@z - -@x -extern void init_node(); -@y -extern void init_node(name_pointer);@/ -@z - -@x -name_pointer -add_section_name(par,c,first,last,ispref) /* install a new node in the tree */ -name_pointer par; /* parent of new node */ -int c; /* right or left? */ -char *first; /* first character of section name */ -char *last; /* last character of section name, plus one */ -int ispref; /* are we adding a prefix or a full name? */ -@y -static name_pointer -add_section_name(@t\1\1@> /* install a new node in the tree */ -name_pointer par, /* parent of new node */ -int c, /* right or left? */ -char *first, /* first character of section name */ -char *last, /* last character of section name, plus one */ -int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ -@z - -@x - int name_len=last-first+ispref; /* length of section name */ -@y - int name_len=(int)(last-first)+ispref; /* length of section name */ -@z - @x if (s+name_len>byte_mem_end) overflow("byte memory"); if (name_ptr+1>=name_dir_end) overflow("name"); @@ -644,28 +302,6 @@ int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ if (name_ptr+1>=name_dir_end) overflow(_("name")); @z -@x -void -extend_section_name(p,first,last,ispref) -name_pointer p; /* name to be extended */ -char *first; /* beginning of extension text */ -char *last; /* one beyond end of extension text */ -int ispref; /* are we adding a prefix or a full name? */ -@y -static void -extend_section_name(@t\1\1@> -name_pointer p, /* name to be extended */ -char *first, /* beginning of extension text */ -char *last, /* one beyond end of extension text */ -int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ -@z - -@x - int name_len=last-first+ispref; -@y - int name_len=(int)(last-first)+ispref; -@z - @x if (name_ptr>=name_dir_end) overflow("name"); @y @@ -679,117 +315,41 @@ int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ @z @x -name_pointer -section_lookup(first,last,ispref) /* find or install section name in tree */ -char *first, *last; /* first and last characters of new name */ -int ispref; /* is the new name a prefix or a full name? */ -@y -name_pointer -section_lookup(@t\1\1@> /* find or install section name in tree */ -char *first,char *last, /* first and last characters of new name */ -int ispref@t\2\2@>) /* is the new name a prefix or a full name? */ -@z - -@x - int name_len=last-first+1; -@y - int name_len=(int)(last-first)+1; -@z - -@x - printf("\n! Ambiguous prefix: matches <"); + fputs("\n! Ambiguous prefix: matches <",stdout); @y fputs(_("\n! Ambiguous prefix: matches <"),stdout); @z @x - printf(">\n and <"); + fputs(">\n and <",stdout); @y fputs(_(">\n and <"),stdout); @z @x - printf("\n! New name is a prefix of <"); + fputs("\n! New name is a prefix of <",stdout); @y fputs(_("\n! New name is a prefix of <"),stdout); @z @x - printf("\n! New name extends <"); + fputs("\n! New name extends <",stdout); @y fputs(_("\n! New name extends <"),stdout); @z @x - printf("\n! Section name incompatible with <"); + fputs("\n! Section name incompatible with <",stdout); @y fputs(_("\n! Section name incompatible with <"),stdout); @z @x - printf(">,\n which abbreviates <"); + fputs(">,\n which abbreviates <",stdout); @y fputs(_(">,\n which abbreviates <"),stdout); @z -@x -int section_name_cmp(); -@y -static int section_name_cmp(char **,int,name_pointer);@/ -@z - -@x -int section_name_cmp(pfirst,len,r) -char **pfirst; /* pointer to beginning of comparison string */ -int len; /* length of string */ -name_pointer r; /* section name being compared */ -@y -static int section_name_cmp(@t\1\1@> -char **pfirst, /* pointer to beginning of comparison string */ -int len, /* length of string */ -name_pointer r@t\2\2@>) /* section name being compared */ -@z - -@x - *pfirst=first+(ss-s); -@y - *pfirst=first+(ptrdiff_t)(ss-s); -@z - -@x - if (q!=name_dir) {len -= ss-s; s=q->byte_start; r=q; continue;} -@y - if (q!=name_dir) {len -= (int)(ss-s); s=q->byte_start; r=q; continue;} -@z - -@x -|equiv_or_xref| as a pointer to a |char|. - -@= -char *equiv_or_xref; /* info corresponding to names */ -@y -|equiv_or_xref| as a pointer to |void|. - -@= -void *equiv_or_xref; /* info corresponding to names */ -@z - -@x -void err_print(); -@y -extern void err_print(const char *);@/ -@z - -@x -void -err_print(s) /* prints `\..' and location of error message */ -char *s; -@y -void -err_print(@t\1\1@> /* prints `\..' and location of error message */ -const char *s@t\2\2@>) -@z - @x printf(". (l. %d of change file)\n", change_line); else if (include_depth==0) printf(". (l. %d)\n", cur_line); @@ -801,21 +361,13 @@ else if (include_depth==0) printf(_(". (l. %d)\n"), cur_line); @z @x -int wrap_up(); -extern void print_stats(); -@y -extern int wrap_up(void);@/ -extern void print_stats(void);@/ -@z - -@x -@ Some implementations may wish to pass the |history| value to the +Some implementations may wish to pass the |history| value to the operating system so that it can be used to govern whether or not other programs are started. Here, for instance, we pass the operating system a status of 0 if and only if only harmless messages were printed. @^system dependencies@> @y -@ On multi-tasking systems like the {\mc AMIGA} it is very convenient to +On multi-tasking systems like the {\mc AMIGA} it is very convenient to know a little bit more about the reasons why a program failed. The four levels of return indicated by the |history| value are very suitable for this purpose. Here, for instance, we pass the operating system a status @@ -831,23 +383,15 @@ can be made sensitive to these conditions. @z @x -int wrap_up() { - putchar('\n'); -@y -int wrap_up(void) { - if (show_progress || show_happiness || (history > spotless)) new_line; -@z - -@x - @; + @@; @y @@; @@; @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; @@ -858,12 +402,12 @@ int wrap_up(void) { @z @x -case spotless: if (show_happiness) printf("(No errors were found.)\n"); break; +case spotless: if (show_happiness) puts("(No errors were found.)"); break; case harmless_message: - printf("(Did you see the warning message above?)\n"); break; + puts("(Did you see the warning message above?)"); break; case error_message: - printf("(Pardon me, but I think I spotted something wrong.)\n"); break; -case fatal_message: printf("(That was a fatal error, my friend.)\n"); + puts("(Pardon me, but I think I spotted something wrong.)"); break; +case fatal_message: puts("(That was a fatal error, my friend.)"); @y case spotless: if (show_happiness) puts(_("(No errors were found.)")); break; @@ -875,59 +419,12 @@ case fatal_message: puts(_("(That was a fatal error, my friend.)")); @z -@x -void fatal(), overflow(); -@y -extern void fatal(const char *,const char *);@/ -extern void overflow(const char *);@/ -@z - -@x -@c void -fatal(s,t) - char *s,*t; -@y -@c void -fatal( - const char *s,const char *t) -@z - -@x - if (*s) printf(s); -@y - if (*s) err_print(s); -@z - -@x -@c void -overflow(t) - char *t; -@y -@c void -overflow( - const char *t) -@z - @x printf("\n! Sorry, %s capacity exceeded",t); fatal("",""); @y printf(_("\n! Sorry, %s capacity exceeded"),t); fatal("",""); @z -@x -@d confusion(s) fatal("! This can't happen: ",s) -@y -@d confusion(s) fatal(_("! This can't happen: "),s) -@z - -@x -@d show_happiness flags['h'] /* should lack of errors be announced? */ -@y -@d show_happiness flags['h'] /* should lack of errors be announced? */ -@d temporary_output flags['t'] /* should temporary output take precedence? */ -@d make_xrefs flags['x'] /* should cross references be output? */ -@z - @x char scn_file_name[max_file_name_length]; /* name of |scn_file| */ @y @@ -936,16 +433,10 @@ char check_file_name[max_file_name_length]; /* name of |check_file| */ @z @x -boolean flags[128]; /* an option for each 7-bit code */ +show_banner=show_happiness=show_progress=make_xrefs=true;@/ @y -boolean flags[128]; /* an option for each 7-bit code */ -const char *use_language=""; /* prefix of \.{cwebmac.tex} in \TEX/ output */ -@z - -@x -show_banner=show_happiness=show_progress=1; -@y -temporary_output=1; /* Check temporary output for changes */ +make_xrefs=true;@/ +temporary_output=true; /* Check temporary output for changes */ @z @x @@ -966,26 +457,7 @@ systems the contents of the compile-time variable |DEV_NULL| (\TeX~Live) or @z @x -void scan_args(); -@y -static void scan_args(void);@/ -@z - -@x -void -scan_args() -@y -static void -scan_args(void) -@z - -@x - boolean flag_change; -@y -@z - -@x - while (--argc > 0) { + strcpy(change_file_name,"/dev/null"); @y @# #if defined DEV_NULL @@ -998,7 +470,6 @@ scan_args(void) strcpy(change_file_name,"/dev/null"); #endif @^system dependencies@> - while (--argc > 0) { @z @x @@ -1017,11 +488,6 @@ scan_args(void) @^system dependencies@> @z -@x - if (found_change<=0) strcpy(change_file_name,"/dev/null"); -@y -@z - @x @ 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 @@ -1037,34 +503,10 @@ otherwise we add |".w"|. @z @x - if (strcmp(*argv,"-")==0) found_change=-1; - else { -@y - if (strcmp(*argv,"-")!=0) { -@z - -@x - found_change=1; - } -@y - } - found_change=1; -@z - -@x - if (flags['x']) { /* indexes will be generated */ -@y - if (make_xrefs) { /* indexes will be generated */ -@z - -@x -@ @= +@= { - if (**argv=='-') flag_change=0; - else flag_change=1; for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++) @y -@ @d flag_change (**argv!='-') @= { if (strcmp("-help",*argv)==0 || strcmp("--help",*argv)==0) @@ -1081,10 +523,10 @@ otherwise we add |".w"|. { 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) @@; @@ -1098,12 +540,7 @@ otherwise we add |".w"|. @z @x - flags[*dot_pos]=flag_change; -@y - flags[(eight_bits)*dot_pos]=flag_change; -@z - -@x +@ @= { if (program==ctangle) fatal( @@ -1115,6 +552,7 @@ else fatal( ,""); } @y +@ @= cb_usage(program==ctangle ? "ctangle" : program==cweave ? "cweave" : "ctwill"); @.Usage:@> @z @@ -1143,12 +581,12 @@ char *found_filename; /* filename found by |kpse_find_file| */ @ @= scan_args(); if (program==ctangle) { - if ((C_file=fopen(C_file_name,"w"))==NULL) + if ((C_file=fopen(C_file_name,"wb"))==NULL) fatal("! Cannot open output file ", C_file_name); @.Cannot open output file@> } else { - if ((tex_file=fopen(tex_file_name,"w"))==NULL) + if ((tex_file=fopen(tex_file_name,"wb"))==NULL) fatal("! Cannot open output file ", tex_file_name); } @y @@ -1184,72 +622,25 @@ else { } @z -@x -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ -@y -@ For string handling we include the {\mc ANSI C} system header file---through -the \Kpathsea/ interface---instead of predeclaring the standard system -functions |strlen|, |strcmp|, |strcpy|, |strncmp|, and |strncpy|. -@^system dependencies@> -@z - @x @** Index. @y -@** Extensions for modern \.{CWEB}. The following sections introduce changes -and extensions to the code that have been created by numerous contributors over -the course of a quarter century. They make \.{CWEB} adhere to modern coding -standards and introduce new or improved features. +@** Extensions to \.{CWEB}. The following sections introduce new or improved +features that have been created by numerous contributors over the course of a +quarter century. Care has been taken to keep the original section numbering intact, so this new -section should have the same number as the original ``\&{82.~Index},'' and -additional material follows below. +material should nicely integrate with the original ``\&{85.~Index}.'' -@* Function declarations. Here are declarations---conforming to -{\mc ANSI~C}---of all functions in this code that appear in \.{common.h} -and thus should agree with \.{CTANGLE} and \.{CWEAVE}. +@* Language setting. This global variable is set by the argument of the +`\.{+l}' (or `\.{-l}') command-line option. -@= -boolean get_line(void);@/ -name_pointer id_lookup(const char *,const char *,char);@/ -name_pointer section_lookup(char *,char *,int);@/ -void check_complete(void);@/ -void common_init(void);@/ -void print_prefix_name(name_pointer);@/ -void print_section_name(name_pointer);@/ -void reset_input(void);@/ -void sprint_section_name(char *,name_pointer);@/ - -@ The following functions are private to \.{common.w}. - -@= -static boolean input_ln(FILE *);@/ -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 check_change(void);@/ -static void prime_the_change_buffer(void);@/ +@= +const char *use_language=""; /* prefix of \.{cwebmac.tex} in \TEX/ output */ -@* Standard C library interfaces. This updated version of \.{CWEB} uses -standard C types for boolean values, pointers, and objects with fixed sizes -(|@!uint8_t|, |@!uint16_t|; already in \Kpathsea/). -@= -#include /* type definition of |bool| */ -#include /* type definition of |ptrdiff_t| */ - -@ The |scan_args| and |cb_show_banner| routines and the |bindtextdomain| -argument string need a few extra variables. +@* User communication. The |scan_args| and |cb_show_banner| routines and the +|bindtextdomain| argument string need a few extra variables. @d max_banner 50 @@ -1257,7 +648,7 @@ argument string need a few extra variables. @d DIR_SEPARATOR separators[1] @d DEVICE_SEPARATOR separators[2] -@= +@= char cb_banner[max_banner];@/ string texmf_locale;@/ #ifndef SEPARATORS @@ -1275,35 +666,12 @@ if(check_file) fclose(check_file); if(strlen(check_file_name)) /* Delete the temporary file in case of a break */ remove(check_file_name); -@* Internationalization. You may have noticed that almost all \.{"strings"} -in the \.{CWEB} sources are placed in the context of the `|_|'~macro. -This is just a shortcut for the `|@!gettext|' function from the ``GNU~gettext -utilities.'' For systems that do not have this library installed, we wrap -things for neutral behavior without internationalization. - -@d _(S) gettext(S) - -@= -#ifndef HAVE_GETTEXT -#define HAVE_GETTEXT 0 -#endif -@# -#if HAVE_GETTEXT -#include /* |@!LC_MESSAGES|, |@!LC_CTYPE| */ -#include -#else -#define setlocale(A,B) "" -#define bindtextdomain(A,B) "" -#define textdomain(A) "" -#define gettext(A) A -#endif - -@ If translation catalogs for your personal \.{LANGUAGE} are installed at the -appropriate place, \.{CTANGLE} and \.{CWEAVE} will talk to you in your favorite -language. Catalog \.{cweb} contains all strings from ``plain \.{CWEB},'' -catalog \.{cweb-tl} contains a few extra strings specific to the \TeX~Live -interface, and catalog \.{web2c-help} contains the ``\.{--help}'' texts for -\.{CTANGLE} and \.{CWEAVE}. +@* Internationalization. If translation catalogs for your personal +\.{LANGUAGE} are installed at the appropriate place, \.{CTANGLE} and \.{CWEAVE} +will talk to you in your favorite language. Catalog \.{cweb} contains all +strings from ``plain \.{CWEB},'' catalog \.{cweb-tl} contains a few extra +strings specific to the \TeX~Live interface, and catalog \.{web2c-help} +contains the ``\.{--help}'' texts for \.{CTANGLE} and \.{CWEAVE}. @.cweb.mo@> @.cweb-tl.mo@> @.web2c-help.mo@> @@ -1318,10 +686,9 @@ resulting \.{*.po} files to the maintainers at \.{tex-k@@tug.org}. 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 @@ -1339,7 +706,16 @@ There are several ways to set |TEXMFLOCALEDIR|: e.g., \.{TEXMFLOCALEDIR=\$TEXMFMAIN/locale}\hfil\break or \.{TEXMFLOCALEDIR.cweb=\$TEXMFMAIN/locale}.\par} -@= +@= +#if HAVE_GETTEXT +#include /* |@!LC_MESSAGES|, |@!LC_CTYPE| */ +#else +#define setlocale(A,B) "" +#define bindtextdomain(A,B) "" +#define textdomain(A) "" +#endif + +@ @= setlocale(LC_MESSAGES, setlocale(LC_CTYPE, "")); texmf_locale = kpse_var_expand ("${TEXMFLOCALEDIR}"); @@ -1429,7 +805,11 @@ cb_usagehelp(program==ctangle ? CTANGLEHELP : \.{i18n}/\.{t10n}. We simply filter the strings through the catalogs (if available). -@c +@= +static void cb_usage (const_string str);@/ +static void cb_usagehelp (const_string *message, const_string bug_email);@/ + +@ @c static void cb_usage (const_string str) { textdomain("cweb-tl"); @@ -1466,7 +846,7 @@ template in English. @= printversionandexit(cb_banner, program == ctwill ? "Donald E. Knuth" : "Silvio Levy and Donald E. Knuth", - NULL, "Contemporary development on https://github.com/ascherer/cwebbin.\n"); + NULL, "Contemporary development on https://github.com/ascherer/cweb.\n"); @.--version@> @ But the ``banner'' is, at least the first part. @@ -1482,10 +862,5 @@ void cb_show_banner (void) @.cweb.mo@> } -@ @= -static void cb_usage (const_string str);@/ -static void cb_usagehelp (const_string *message, const_string bug_email);@/ -void cb_show_banner (void); /* |extern| for option \.{+b} */ - @** Index. @z diff --git a/source/texk/web2c/cwebdir/comm-w2c.h b/source/texk/web2c/cwebdir/comm-w2c.h index a772d1190..6c9e605b1 100644 --- a/source/texk/web2c/cwebdir/comm-w2c.h +++ b/source/texk/web2c/cwebdir/comm-w2c.h @@ -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 3.64 --- February 2017 (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 @@ -15,23 +15,24 @@ % entire resulting derived work is distributed under the terms of a % permission notice identical to this one. -% Amendments to 'common.h' resulting in this extended 'comm-w2c.h' were -% created by numerous collaborators over the course of many years. +% Amendments to 'common.h' resulting in this updated version were created +% by numerous collaborators over the course of many years. % Please send comments, suggestions, etc. to tex-k@@tug.org. % The next few sections contain stuff from the file |"common.w"| that has % to be included in both |"ctangle.w"| and |"cweave.w"|. It appears in this -% file |"common.h"|, which needs to be updated when |"common.w"| changes. +% file |"common.h"|, which is also included in |"common.w"| to propagate +% possible changes from this single source consistently. First comes general stuff: - @s boolean int @s uint8_t int @s uint16_t int -@= + +@= typedef bool boolean; typedef uint8_t eight_bits; typedef uint16_t sixteen_bits; @@ -60,9 +61,13 @@ internationalization. #define gettext(A) A #endif @# -#include /* |@!bool|, |@!true|, |@!false| */ -#include /* |@!uint8_t|, |@!uint16_t| */ -#include +#include /* definition of |@!isalpha|, |@!isdigit| and so on */ +#include /* definition of |@!bool|, |@!true| and |@!false| */ +#include /* definition of |@!ptrdiff_t| */ +#include /* definition of |@!uint8_t| and |@!uint16_t| */ +#include /* definition of |@!getenv| and |@!exit| */ +#include /* definition of |@!printf| and friends */ +#include /* definition of |@!strlen|, |@!strcmp| and so on */ @ Code related to the character set: @^ASCII code dependencies@> @@ -84,13 +89,12 @@ internationalization. @d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */ @= -extern char section_text[]; /* name being sought for */ +extern char section_text[]; /* text being sought for */ extern char *section_text_end; /* end of |section_text| */ extern char *id_first; /* where the current identifier begins in the buffer */ extern char *id_loc; /* just after the current identifier in the buffer */ @ Code related to input routines: - @d xisalpha(c) (isalpha((eight_bits)c)&&((eight_bits)c<0200)) @d xisdigit(c) (isdigit((eight_bits)c)&&((eight_bits)c<0200)) @d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200)) @@ -101,9 +105,47 @@ extern char *id_loc; /* just after the current identifier in the buffer */ @= extern char buffer[]; /* where each line of input goes */ extern char *buffer_end; /* end of |buffer| */ -extern char *loc; /* points to the next character to be read from the buffer*/ +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: +@f line x /* make |line| an unreserved word */ +@d max_include_depth 10 /* maximum number of source files open + simultaneously, not counting the change file */ +@d max_file_name_length 1024 +@d cur_file file[include_depth] /* current file */ +@d cur_file_name file_name[include_depth] /* current file name */ +@d cur_line line[include_depth] /* number of current line in current file */ +@d web_file file[0] /* main source file */ +@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 */ @@ -111,7 +153,6 @@ extern char *limit; /* points to the last character in the buffer */ @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 */ -@d chunk_marker 0 @= typedef struct name_info { @@ -128,13 +169,15 @@ typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */ 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 */ + +@ @= extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/ extern name_pointer id_lookup(const char *,const char *,char); /* looks up a string in the identifier table */ @@ -143,7 +186,7 @@ extern void init_node(name_pointer);@/ 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,54 +196,21 @@ extern void sprint_section_name(char *,name_pointer);@/ @d mark_harmless {if (history==spotless) history=harmless_message;} @d mark_error history=error_message @d confusion(s) fatal(_("! This can't happen: "),s) +@.This can't happen@> -@= +@= extern int history; /* indicates how bad this run was */ + +@ @= extern int wrap_up(void); /* indicate |history| and exit */ extern void err_print(const char *); /* print error message and context */ 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: -@f line x /* make |line| an unreserved word */ -@d max_file_name_length 1024 -@d cur_file file[include_depth] /* current file */ -@d cur_file_name file_name[include_depth] /* current file name */ -@d web_file_name file_name[0] /* main source file name */ -@d cur_line line[include_depth] /* number of current line in current file */ - -@= -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 check_file_name[]; /* name of |check_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? */ +@d show_stats flags['s'] /* should statistics be printed at end of run? */ @d show_happiness flags['h'] /* should lack of errors be announced? */ @d temporary_output flags['t'] /* should temporary output take precedence? */ @d make_xrefs flags['x'] /* should cross references be output? */ @@ -208,26 +218,48 @@ extern boolean print_where; /* tells \.{CTANGLE} to print line and file info */ @= 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) @d C_printf(c,a) fprintf(C_file,c,a) -@d C_putc(c) putc(c,C_file) +@d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */ @= extern FILE *C_file; /* where output of \.{CTANGLE} goes */ extern FILE *tex_file; /* where output of \.{CWEAVE} goes */ extern FILE *idx_file; /* where index from \.{CWEAVE} goes */ extern FILE *scn_file; /* where list of sections from \.{CWEAVE} goes */ -extern FILE *check_file; /* temporary output file */ extern FILE *active_file; /* currently active file for \.{CWEAVE} output */ +extern FILE *check_file; /* temporary output file */ @ The procedure that gets everything rolling: - -@= +@= 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 +\.{CWEB}. + +@d max_bytes 1000000 /* the number of bytes in identifiers, + index entries, and section names */ +@d max_toks 1000000 /* number of bytes in compressed \CEE/ code */ +@d max_names 10239 /* number of identifiers, strings, section names; + must be less than 10240 */ +@d max_sections 4000 /* greater than the total number of sections */ +@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 */ +@d buf_size 1000 /* maximum length of input line, plus one */ +@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */ + +@ End of \.{COMMON} interface. diff --git a/source/texk/web2c/cwebdir/comm-w32.ch b/source/texk/web2c/cwebdir/comm-w32.ch index b300f496d..d256cedf1 100644 --- a/source/texk/web2c/cwebdir/comm-w32.ch +++ b/source/texk/web2c/cwebdir/comm-w32.ch @@ -35,60 +35,32 @@ Admittedly, this is not vital for cweb, except that I build the whole texlive set of programs using the __fastcall convention. @x -@= -#include +extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/ @y -@= -#include -#include +extern boolean __cdecl names_match(name_pointer,const char *,size_t,eight_bits);@/ @z @x -@ @= -extern int names_match(); +extern void init_p(name_pointer,eight_bits);@/ @y -@ @= -extern int __cdecl names_match(); +extern void __cdecl init_p(name_pointer,eight_bits);@/ @z -@x -@= -void init_p(); +@x section 75 +An omitted change file argument means that |"/dev/null"| should be used, @y -@= -void __cdecl init_p(); +An omitted change file argument means that |"NUL"| should be used, @z -@x section 69 -An omitted change file argument means that |"/dev/null"| should be used, +@x section 76 + strcpy(change_file_name,"/dev/null"); @y -An omitted change file argument means that |"NUL"| should be used, + strcpy(change_file_name,"NUL"); @z -@x section 70 (this change copied from comm-bs.ch, July 94) +@x section 76 (this change copied from comm-bs.ch, July 94) else if (*s=='/') dot_pos=NULL,name_pos=++s; @y else if (*s == ':' || *s == '\\' || *s == '/') dot_pos=NULL,name_pos=++s; @z - -@x section 70 - if (found_change<=0) strcpy(change_file_name,"/dev/null"); -@y - if (found_change<=0) strcpy(change_file_name,"NUL"); -@z - -@x -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ -@y -@z diff --git a/source/texk/web2c/cwebdir/common.c b/source/texk/web2c/cwebdir/common.c index 2bf7a9d4a..7dd0f0c08 100644 --- a/source/texk/web2c/cwebdir/common.c +++ b/source/texk/web2c/cwebdir/common.c @@ -1,26 +1,22 @@ /*1:*/ -#line 58 "common.w" +#line 66 "common.w" -/*5:*/ -#line 102 "common.w" - -#include - -/*:5*//*8:*/ -#line 165 "common.w" - -#include - -/*:8*//*22:*/ -#line 471 "common.w" +/*3:*/ +#line 46 "common.h" +#include +#include +#include +#include #include +#include +#include -/*:22*/ -#line 59 "common.w" +/*: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 @@ -28,7 +24,7 @@ #define plus_plus 013 #define minus_minus 01 #define minus_gt 031 -#define not_eq 032 +#define non_eq 032 #define lt_eq 034 #define gt_eq 035 #define eq_eq 036 @@ -38,23 +34,65 @@ #define period_ast 026 #define minus_gt_ast 027 \ -#define buf_size 100 -#define longest_name 10000 -#define long_buf_size (buf_size+longest_name) -#define xisspace(c) (isspace(c) &&((unsigned char) c<0200) ) -#define xisupper(c) (isupper(c) &&((unsigned char) c<0200) ) \ +#define xisalpha(c) (isalpha((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisdigit(c) (isdigit((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisspace(c) (isspace((eight_bits) c) &&((eight_bits) c<0200) ) +#define xislower(c) (islower((eight_bits) c) &&((eight_bits) c<0200) ) +#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 60 +#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 spotless 0 +#define harmless_message 1 +#define error_message 2 +#define fatal_message 3 +#define mark_harmless {if(history==spotless) history= harmless_message;} +#define mark_error history= error_message +#define confusion(s) fatal("! This can't happen: ",s) \ + \ + +#define show_banner flags['b'] +#define show_progress flags['p'] +#define show_stats flags['s'] +#define show_happiness flags['h'] +#define make_xrefs flags['x'] \ + +#define update_terminal fflush(stdout) +#define new_line putchar('\n') +#define putxchar putchar +#define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout) +#define C_printf(c,a) fprintf(C_file,c,a) +#define C_putc(c) putc(c,C_file) \ + +#define max_bytes 1000000 \ + +#define max_toks 1000000 +#define max_names 10239 \ + +#define max_sections 4000 +#define max_texts 10239 +#define longest_name 10000 +#define stack_size 500 +#define buf_size 1000 +#define long_buf_size (buf_size+longest_name) \ + #define lines_dont_match (change_limit-change_buffer!=limit-buffer|| \ -strncmp(buffer,change_buffer,limit-buffer) ) \ +strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) ) \ #define if_section_start_make_pending(b) {*limit= '!'; \ for(loc= buffer;xisspace(*loc) ;loc++) ; \ @@ -62,30 +100,14 @@ for(loc= buffer;xisspace(*loc) ;loc++) ; \ if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b; \ } \ -#define max_sections 2000 \ - \ - #define too_long() {include_depth--; \ err_print("! Include file name too long") ;goto restart;} \ -#define max_bytes 90000 \ - -#define max_names 4000 \ - \ - -#define length(c) (c+1) ->byte_start-(c) ->byte_start -#define print_id(c) term_write((c) ->byte_start,length((c) ) ) \ - -#define hash_size 353 \ - -#define llink link -#define rlink dummy.Rlink -#define root name_dir->rlink \ - \ +#define hash_size 8501 \ #define first_chunk(p) ((p) ->byte_start+2) -#define prefix_length(p) (int) ((unsigned char) *((p) ->byte_start) *256+ \ -(unsigned char) *((p) ->byte_start+1) ) +#define prefix_length(p) (int) ((eight_bits) *((p) ->byte_start) *256+ \ +(eight_bits) *((p) ->byte_start+1) ) #define set_prefix_length(p,m) (*((p) ->byte_start) = (m) /256, \ *((p) ->byte_start+1) = (m) %256) \ @@ -97,48 +119,140 @@ err_print("! Include file name too long") ;goto restart;} \ #define bad_extension 5 \ -#define spotless 0 -#define harmless_message 1 -#define error_message 2 -#define fatal_message 3 -#define mark_harmless {if(history==spotless) history= harmless_message;} -#define mark_error history= error_message \ +#define flag_change (**argv!='-') -#define confusion(s) fatal("! This can't happen: ",s) \ - \ +#line 68 "common.w" -#define show_banner flags['b'] -#define show_progress flags['p'] -#define show_stats flags['s'] -#define show_happiness flags['h'] \ +/*2:*/ +#line 37 "common.h" -#define update_terminal fflush(stdout) \ +typedef bool boolean; +typedef uint8_t eight_bits; +typedef uint16_t sixteen_bits; +extern boolean program; +extern int phase; -#define new_line putchar('\n') -#define putxchar putchar -#define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout) -#define C_printf(c,a) fprintf(C_file,c,a) -#define C_putc(c) putc(c,C_file) \ +/*:2*//*4:*/ +#line 74 "common.h" +extern char section_text[]; +extern char*section_text_end; +extern char*id_first; +extern char*id_loc; -#line 60 "common.w" +/*:4*//*5:*/ +#line 88 "common.h" -/*2:*/ -#line 73 "common.w" +extern char buffer[]; +extern char*buffer_end; +extern char*loc; +extern char*limit; + +/*:5*//*6:*/ +#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; +union{ +struct name_info*Rlink; + +char Ilk; +}dummy; +void*equiv_or_xref; +}name_info; +typedef name_info*name_pointer; +typedef name_pointer*hash_pointer; +extern char byte_mem[]; +extern char*byte_mem_end; +extern char*byte_ptr; +extern name_info name_dir[]; +extern name_pointer name_dir_end; +extern name_pointer name_ptr; +extern name_pointer hash[]; +extern hash_pointer hash_end; +extern hash_pointer h; + +/*:9*//*11:*/ +#line 183 "common.h" + +extern int history; + +/*:11*//*13:*/ +#line 199 "common.h" + +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 boolean flags[]; + +/*:13*//*14:*/ +#line 215 "common.h" + +extern FILE*C_file; +extern FILE*tex_file; +extern FILE*idx_file; +extern FILE*scn_file; +extern FILE*active_file; + +/*:14*/ +#line 69 "common.w" + +/*18:*/ +#line 83 "common.w" -typedef short boolean; boolean program; -/*:2*//*7:*/ -#line 159 "common.w" +/*:18*//*19:*/ +#line 92 "common.w" + +int phase; + +/*:19*//*21:*/ +#line 130 "common.w" + +char section_text[longest_name+1]; +char*section_text_end= section_text+longest_name; +char*id_first; +char*id_loc; + +/*:21*//*22:*/ +#line 150 "common.w" char buffer[long_buf_size]; char*buffer_end= buffer+buf_size-2; -char*limit= buffer; char*loc= buffer; +char*limit= buffer; -/*:7*//*10:*/ -#line 214 "common.w" +/*:22*//*25:*/ +#line 194 "common.w" int include_depth; FILE*file[max_include_depth]; @@ -146,79 +260,57 @@ FILE*change_file; 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; -/*:10*//*20:*/ -#line 418 "common.w" +/*:25*//*26:*/ +#line 220 "common.w" + +static char change_buffer[buf_size]; +static char*change_limit; + +/*:26*//*37:*/ +#line 399 "common.w" -typedef unsigned short sixteen_bits; sixteen_bits section_count; boolean changed_section[max_sections]; boolean change_pending; -boolean print_where= 0; +boolean print_where= false; -/*:20*//*27:*/ -#line 594 "common.w" +/*:37*//*43:*/ +#line 596 "common.w" -typedef struct name_info{ -char*byte_start; -/*31:*/ -#line 631 "common.w" - -struct name_info*link; - -/*:31*//*40:*/ -#line 730 "common.w" - -union{ -struct name_info*Rlink; - -char Ilk; -}dummy; - -/*:40*//*55:*/ -#line 1062 "common.w" - -char*equiv_or_xref; - -/*:55*/ -#line 597 "common.w" - -}name_info; -typedef name_info*name_pointer; char byte_mem[max_bytes]; char*byte_mem_end= byte_mem+max_bytes-1; name_info name_dir[max_names]; name_pointer name_dir_end= name_dir+max_names-1; -/*:27*//*29:*/ -#line 617 "common.w" +/*:43*//*44:*/ +#line 607 "common.w" -name_pointer name_ptr; char*byte_ptr; +name_pointer name_ptr; -/*:29*//*32:*/ -#line 644 "common.w" +/*:44*//*46:*/ +#line 627 "common.w" -typedef name_pointer*hash_pointer; name_pointer hash[hash_size]; hash_pointer hash_end= hash+hash_size-1; hash_pointer h; -/*:32*//*56:*/ -#line 1082 "common.w" +/*:46*//*65:*/ +#line 1014 "common.w" int history= spotless; -/*:56*//*67:*/ -#line 1220 "common.w" +/*:65*//*73:*/ +#line 1135 "common.w" int argc; char**argv; @@ -228,8 +320,8 @@ char idx_file_name[max_file_name_length]; char scn_file_name[max_file_name_length]; boolean flags[128]; -/*:67*//*77:*/ -#line 1370 "common.w" +/*:73*//*83:*/ +#line 1282 "common.w" FILE*C_file; FILE*tex_file; @@ -237,138 +329,133 @@ FILE*idx_file; FILE*scn_file; FILE*active_file; -/*:77*/ -#line 61 "common.w" - -/*3:*/ -#line 83 "common.w" -int phase; - -/*:3*//*11:*/ -#line 240 "common.w" - -char change_buffer[buf_size]; -char*change_limit; - -/*:11*/ -#line 62 "common.w" - -/*33:*/ -#line 650 "common.w" - -extern int names_match(); +/*:83*/ +#line 70 "common.w" -/*:33*//*38:*/ -#line 703 "common.w" +/*7:*/ +#line 119 "common.h" -void init_p(); +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); -/*:38*//*46:*/ -#line 852 "common.w" +/*:7*//*10:*/ +#line 162 "common.h" -extern void init_node(); +extern boolean names_match(name_pointer,const char*,size_t,eight_bits); +extern name_pointer id_lookup(const char*,const char*,char); -/*:46*//*53:*/ -#line 1017 "common.w" +extern name_pointer section_lookup(char*,char*,int); +extern void init_node(name_pointer); +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); -int section_name_cmp(); +/*:10*//*12:*/ +#line 186 "common.h" -/*:53*//*57:*/ -#line 1092 "common.w" +extern int wrap_up(void); +extern void err_print(const char*); +extern void fatal(const char*,const char*); +extern void overflow(const char*); -void err_print(); +/*:12*//*15:*/ +#line 223 "common.h" -/*:57*//*60:*/ -#line 1140 "common.w" +extern void common_init(void); +extern void print_stats(void); -int wrap_up(); -extern void print_stats(); +/*:15*//*24:*/ +#line 180 "common.w" +static boolean input_ln(FILE*); -/*:60*//*63:*/ -#line 1173 "common.w" +/*:24*//*28:*/ +#line 241 "common.w" +static void prime_the_change_buffer(void); -void fatal(),overflow(); +/*:28*//*33:*/ +#line 340 "common.w" +static void check_change(void); -/*:63*//*69:*/ -#line 1251 "common.w" +/*:33*//*55:*/ +#line 774 "common.w" -void scan_args(); +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); -/*:69*//*81:*/ -#line 1411 "common.w" +/*:55*//*64:*/ +#line 1002 "common.w" +static int section_name_cmp(char**,int,name_pointer); -extern int strlen(); -extern int strcmp(); -extern char*strcpy(); -extern int strncmp(); -extern char*strncpy(); +/*:64*//*76:*/ +#line 1197 "common.w" +static void scan_args(void); -/*:81*/ -#line 63 "common.w" +/*:76*/ +#line 71 "common.w" -/*:1*//*4:*/ -#line 89 "common.w" +/*:1*//*20:*/ +#line 99 "common.w" void -common_init() +common_init(void) { -/*30:*/ -#line 621 "common.w" +/*45:*/ +#line 611 "common.w" name_dir->byte_start= byte_ptr= byte_mem; name_ptr= name_dir+1; name_ptr->byte_start= byte_mem; +root= NULL; -/*:30*//*34:*/ -#line 655 "common.w" +/*:45*//*47:*/ +#line 634 "common.w" for(h= hash;h<=hash_end;*h++= NULL); -/*:34*//*41:*/ -#line 737 "common.w" +/*:47*/ +#line 103 "common.w" -root= NULL; +/*74:*/ +#line 1148 "common.w" -/*:41*/ -#line 93 "common.w" -; -/*68:*/ -#line 1233 "common.w" +show_banner= show_happiness= show_progress= make_xrefs= true; +show_stats= false; -show_banner= show_happiness= show_progress= 1; +/*:74*/ +#line 104 "common.w" -/*:68*/ -#line 94 "common.w" -; -/*78:*/ -#line 1377 "common.w" +/*84:*/ +#line 1289 "common.w" scan_args(); if(program==ctangle){ -if((C_file= fopen(C_file_name,"w"))==NULL) +if((C_file= fopen(C_file_name,"wb"))==NULL) fatal("! Cannot open output file ",C_file_name); } else{ -if((tex_file= fopen(tex_file_name,"w"))==NULL) +if((tex_file= fopen(tex_file_name,"wb"))==NULL) fatal("! Cannot open output file ",tex_file_name); } -/*:78*/ -#line 95 "common.w" -; +/*:84*/ +#line 105 "common.w" + } -/*:4*//*9:*/ -#line 172 "common.w" +/*:20*//*23:*/ +#line 160 "common.w" -int input_ln(fp) -FILE*fp; +static boolean input_ln( +FILE*fp) { 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; @@ -377,27 +464,27 @@ if((c= getc(fp))!=EOF&&c!='\n'){ 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; } -/*:9*//*12:*/ -#line 251 "common.w" +/*:23*//*27:*/ +#line 231 "common.w" -void -prime_the_change_buffer() +static void +prime_the_change_buffer(void) { change_limit= change_buffer; -/*13:*/ -#line 265 "common.w" +/*29:*/ +#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(buffer[1]):buffer[1]; -/*17:*/ -#line 358 "common.w" +char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1]; +/*34:*/ +#line 342 "common.w" if(xyz_code=='x'||xyz_code=='z'){ loc= buffer+2;err_print("! Where is the matching @y?"); @@ -478,27 +565,27 @@ change_depth= include_depth; return; } -/*:17*/ -#line 342 "common.w" -; +/*:34*/ +#line 324 "common.w" + } -/*15:*/ -#line 292 "common.w" +/*31:*/ +#line 274 "common.w" { -change_limit= change_buffer+(limit-buffer); -strncpy(change_buffer,buffer,limit-buffer+1); +change_limit= change_buffer+(ptrdiff_t)(limit-buffer); +strncpy(change_buffer,buffer,(size_t)(limit-buffer+1)); } -/*:15*/ -#line 344 "common.w" -; -changing= 0;cur_line++; +/*:31*/ +#line 326 "common.w" + +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++; } @@ -506,15 +593,15 @@ if(lines_dont_match)n++; } } -/*:16*//*18:*/ -#line 378 "common.w" +/*:32*//*35:*/ +#line 362 "common.w" void -reset_input() +reset_input(void) { limit= buffer;loc= buffer+1;buffer[0]= ' '; -/*19:*/ -#line 393 "common.w" +/*36:*/ +#line 377 "common.w" if((web_file= fopen(web_file_name,"r"))==NULL){ strcpy(web_file_name,alt_web_file_name); @@ -523,28 +610,28 @@ fatal("! Cannot open input file ",web_file_name); } -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); -/*:19*/ -#line 383 "common.w" -; +/*:36*/ +#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; } -/*:18*//*21:*/ -#line 426 "common.w" +/*:35*//*38:*/ +#line 406 "common.w" -int get_line() +boolean get_line(void) { restart: if(changing&&include_depth==change_depth) -/*25:*/ -#line 537 "common.w" +/*41:*/ +#line 514 "common.w" { change_line++; if(!input_ln(change_file)){ @@ -554,37 +641,37 @@ 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= ' '; if(buffer[0]=='@'){ -if(xisupper(buffer[1]))buffer[1]= tolower(buffer[1]); +if(xisupper(buffer[1]))buffer[1]= tolower((eight_bits)buffer[1]); if(buffer[1]=='x'||buffer[1]=='y'){ loc= buffer+2; err_print("! Where is the matching @z?"); } else if(buffer[1]=='z'){ -prime_the_change_buffer();changing= !changing;print_where= 1; +prime_the_change_buffer();changing= !changing;print_where= true; } } } } -/*:25*/ -#line 431 "common.w" -; +/*:41*/ +#line 411 "common.w" + if(!changing||include_depth> change_depth){ -/*24:*/ -#line 520 "common.w" +/*40:*/ +#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; @@ -597,12 +684,12 @@ if(buffer[0]==change_buffer[0]) if(change_limit> change_buffer)check_change(); } -/*:24*/ -#line 433 "common.w" -; +/*:40*/ +#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= '"'; @@ -618,8 +705,8 @@ err_print("! Too many nested includes"); goto restart; } include_depth++; -/*23:*/ -#line 474 "common.w" +/*39:*/ +#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; @@ -636,7 +723,7 @@ if(k> cur_file_name_end)too_long(); *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"); @@ -659,61 +746,61 @@ for(;k>=cur_file_name;k--)*(k+l+1)= *k; 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; } } include_depth--;err_print("! Cannot open include file");goto restart; } -/*:23*/ -#line 452 "common.w" -; +/*:39*/ +#line 432 "common.w" + } -return 1; +return true; } -/*:21*//*26:*/ -#line 569 "common.w" +/*:38*//*42:*/ +#line 546 "common.w" void -check_complete(){ +check_complete(void){ if(change_limit!=change_buffer){ -strncpy(buffer,change_buffer,change_limit-change_buffer+1); -limit= buffer+(int)(change_limit-change_buffer); -changing= 1;change_depth= include_depth;loc= buffer; +strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1)); +limit= buffer+(ptrdiff_t)(change_limit-change_buffer); +changing= true;change_depth= include_depth;loc= buffer; err_print("! Change file entry did not match"); } } -/*:26*//*35:*/ -#line 660 "common.w" +/*:42*//*48:*/ +#line 639 "common.w" name_pointer -id_lookup(first,last,t) -char*first; -char*last; -char t; +id_lookup( +const char*first, +const char*last, +char t) { -char*i= first; +const char*i= first; int h; int l; name_pointer p; if(last==NULL)for(last= first;*last!='\0';last++); -l= last-first; -/*36:*/ -#line 683 "common.w" +l= (int)(last-first); +/*49:*/ +#line 662 "common.w" -h= (unsigned char)*i; -while(++ilink; @@ -722,53 +809,53 @@ p= name_ptr; p->link= hash[h];hash[h]= p; } -/*:37*/ -#line 674 "common.w" -; -if(p==name_ptr)/*39:*/ -#line 706 "common.w" +/*:50*/ +#line 653 "common.w" + +if(p==name_ptr)/*51:*/ +#line 681 "common.w" { if(byte_ptr+l> byte_mem_end)overflow("byte memory"); if(name_ptr>=name_dir_end)overflow("name"); strncpy(byte_ptr,first,l); (++name_ptr)->byte_start= byte_ptr+= l; -if(program==cweave)init_p(p,t); +init_p(p,t); } -/*:39*/ -#line 675 "common.w" -; -return(p); +/*:51*/ +#line 654 "common.w" + +return p; } -/*:35*//*42:*/ -#line 764 "common.w" +/*:48*//*52:*/ +#line 713 "common.w" void -print_section_name(p) -name_pointer p; +print_section_name( +name_pointer p) { char*ss,*s= first_chunk(p); name_pointer q= p+1; while(p!=name_dir){ ss= (p+1)->byte_start-1; if(*ss==' '&&ss>=s){ -term_write(s,ss-s);p= q->link;q= p; +term_write(s,(size_t)(ss-s));p= q->link;q= p; }else{ -term_write(s,ss+1-s);p= name_dir;q= NULL; +term_write(s,(size_t)(ss+1-s));p= name_dir;q= NULL; } s= p->byte_start; } if(q)term_write("...",3); } -/*:42*//*43:*/ -#line 783 "common.w" +/*:52*//*53:*/ +#line 732 "common.w" void -sprint_section_name(dest,p) -char*dest; -name_pointer p; +sprint_section_name( +char*dest, +name_pointer p) { char*ss,*s= first_chunk(p); name_pointer q= p+1; @@ -779,18 +866,18 @@ p= q->link;q= p; }else{ ss++;p= name_dir; } -strncpy(dest,s,ss-s),dest+= ss-s; +strncpy(dest,s,(size_t)(ss-s)),dest+= ss-s; s= p->byte_start; } *dest= '\0'; } -/*:43*//*44:*/ -#line 804 "common.w" +/*:53*//*54:*/ +#line 753 "common.w" void -print_prefix_name(p) -name_pointer p; +print_prefix_name( +name_pointer p) { char*s= first_chunk(p); int l= prefix_length(p); @@ -798,12 +885,14 @@ term_write(s,l); if(s+l<(p+1)->byte_start)term_write("...",3); } -/*:44*//*45:*/ -#line 825 "common.w" +/*:54*//*56:*/ +#line 779 "common.w" -int web_strcmp(j,j_len,k,k_len) -char*j,*k; -int j_len,k_len; +static int web_strcmp( +char*j, +int j_len, +char*k, +int k_len) { char*j1= j+j_len,*k1= k+k_len; while(k byte_mem_end)overflow("byte memory"); if(name_ptr+1>=name_dir_end)overflow("name"); (++name_ptr)->byte_start= byte_ptr= s+name_len; @@ -845,19 +934,19 @@ init_node(p); return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p); } -/*:47*//*48:*/ -#line 884 "common.w" +/*:57*//*58:*/ +#line 837 "common.w" -void -extend_section_name(p,first,last,ispref) -name_pointer p; -char*first; -char*last; -int ispref; +static void +extend_section_name( +name_pointer p, +char*first, +char*last, +int ispref) { char*s; name_pointer q= p+1; -int name_len= last-first+ispref; +int name_len= (int)(last-first)+ispref; if(name_ptr>=name_dir_end)overflow("name"); while(q->link!=name_dir)q= q->link; q->link= name_ptr; @@ -869,13 +958,13 @@ strncpy(s,first,name_len); if(ispref)*(byte_ptr-1)= ' '; } -/*:48*//*49:*/ -#line 912 "common.w" +/*:58*//*59:*/ +#line 865 "common.w" name_pointer -section_lookup(first,last,ispref) -char*first,*last; -int ispref; +section_lookup( +char*first,char*last, +int ispref) { int c= 0; name_pointer p= root; @@ -883,9 +972,9 @@ name_pointer q= NULL; name_pointer r= NULL; name_pointer par= NULL; -int name_len= last-first+1; -/*50:*/ -#line 936 "common.w" +int name_len= (int)(last-first)+1; +/*60:*/ +#line 889 "common.w" while(p){ c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p)); @@ -895,10 +984,10 @@ par= p; p= (c==less?p->llink:p->rlink); }else{ if(r!=NULL){ -printf("\n! Ambiguous prefix: matches <"); +fputs("\n! Ambiguous prefix: matches <",stdout); print_prefix_name(p); -printf(">\n and <"); +fputs(">\n and <",stdout); print_prefix_name(r); err_print(">"); return name_dir; @@ -911,26 +1000,26 @@ if(p==NULL) p= q,q= NULL; } -/*:50*/ -#line 926 "common.w" -; -/*51:*/ -#line 961 "common.w" +/*:60*/ +#line 879 "common.w" + +/*61:*/ +#line 914 "common.w" if(r==NULL) return add_section_name(par,c,first,last+1,ispref); -/*:51*/ -#line 927 "common.w" -; -/*52:*/ -#line 969 "common.w" +/*:61*/ +#line 880 "common.w" + +/*62:*/ +#line 922 "common.w" switch(section_name_cmp(&first,name_len,r)){ case prefix: if(!ispref){ -printf("\n! New name is a prefix of <"); +fputs("\n! New name is a prefix of <",stdout); print_section_name(r); err_print(">"); @@ -942,71 +1031,71 @@ case extension:if(!ispref||first<=last) extend_section_name(r,first,last+1,ispref); return r; case bad_extension: -printf("\n! New name extends <"); +fputs("\n! New name extends <",stdout); print_section_name(r); err_print(">"); return r; default: -printf("\n! Section name incompatible with <"); +fputs("\n! Section name incompatible with <",stdout); print_prefix_name(r); -printf(">,\n which abbreviates <"); +fputs(">,\n which abbreviates <",stdout); print_section_name(r); err_print(">"); return r; } -/*:52*/ -#line 928 "common.w" -; +/*:62*/ +#line 881 "common.w" + } -/*:49*//*54:*/ -#line 1020 "common.w" +/*:59*//*63:*/ +#line 970 "common.w" -int section_name_cmp(pfirst,len,r) -char**pfirst; -int len; -name_pointer r; +static int section_name_cmp( +char**pfirst, +int len, +name_pointer r) { char*first= *pfirst; name_pointer q= r+1; 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; switch(c= web_strcmp(first,len,s,ss-s)){ case equal:if(q==name_dir) if(ispref){ -*pfirst= first+(ss-s); +*pfirst= first+(ptrdiff_t)(ss-s); return extension; }else return equal; else return(q->byte_start==(q+1)->byte_start)?equal:prefix; case extension: if(!ispref)return bad_extension; first+= ss-s; -if(q!=name_dir){len-= ss-s;s= q->byte_start;r= q;continue;} +if(q!=name_dir){len-= (int)(ss-s);s= q->byte_start;r= q;continue;} *pfirst= first;return extension; default:return c; } } } -/*:54*//*58:*/ -#line 1095 "common.w" +/*:63*//*66:*/ +#line 1024 "common.w" void -err_print(s) -char*s; +err_print( +const char*s) { char*k,*l; printf(*s=='!'?"\n%s":"%s",s); -if(web_file_open)/*59:*/ -#line 1115 "common.w" +if(web_file_open)/*67:*/ +#line 1044 "common.w" {if(changing&&include_depth==change_depth) printf(". (l. %d of change file)\n",change_line); @@ -1025,85 +1114,83 @@ if(*limit=='|')putchar('|'); putchar(' '); } -/*:59*/ -#line 1102 "common.w" -; +/*:67*/ +#line 1031 "common.w" + update_terminal;mark_error; } -/*:58*//*61:*/ -#line 1150 "common.w" +/*:66*//*68:*/ +#line 1076 "common.w" -int wrap_up(){ -putchar('\n'); +int wrap_up(void){ +if(show_progress)new_line; if(show_stats) print_stats(); -/*62:*/ -#line 1160 "common.w" +/*69:*/ +#line 1086 "common.w" switch(history){ -case spotless:if(show_happiness)printf("(No errors were found.)\n");break; +case spotless:if(show_happiness)puts("(No errors were found.)");break; case harmless_message: -printf("(Did you see the warning message above?)\n");break; +puts("(Did you see the warning message above?)");break; case error_message: -printf("(Pardon me, but I think I spotted something wrong.)\n");break; -case fatal_message:printf("(That was a fatal error, my friend.)\n"); +puts("(Pardon me, but I think I spotted something wrong.)");break; +case fatal_message:puts("(That was a fatal error, my friend.)"); } -/*:62*/ -#line 1155 "common.w" -; -if(history> harmless_message)return(1); -else return(0); +/*:69*/ +#line 1081 "common.w" + +if(history> harmless_message)return EXIT_FAILURE; +else return EXIT_SUCCESS; } -/*:61*//*64:*/ -#line 1179 "common.w" +/*:68*//*70:*/ +#line 1102 "common.w" void -fatal(s,t) -char*s,*t; +fatal( +const char*s,const char*t) { -if(*s)printf(s); +if(*s)err_print(s); err_print(t); history= fatal_message;exit(wrap_up()); } -/*:64*//*65:*/ -#line 1190 "common.w" +/*:70*//*71:*/ +#line 1113 "common.w" void -overflow(t) -char*t; +overflow( +const char*t) { printf("\n! Sorry, %s capacity exceeded",t);fatal("",""); } -/*:65*//*70:*/ -#line 1254 "common.w" +/*:71*//*75:*/ +#line 1167 "common.w" -void -scan_args() +static void +scan_args(void) { 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; -boolean flag_change; +strcpy(change_file_name,"/dev/null"); while(--argc> 0){ -if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/ -#line 1344 "common.w" +if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/ +#line 1258 "common.w" { -if(**argv=='-')flag_change= 0; -else flag_change= 1; for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++) -flags[*dot_pos]= flag_change; +flags[(eight_bits)*dot_pos]= flag_change; } -/*:74*/ -#line 1266 "common.w" +/*:80*/ +#line 1179 "common.w" else{ s= name_pos= *argv;dot_pos= NULL; @@ -1112,19 +1199,19 @@ if(*s=='.')dot_pos= s++; else if(*s=='/')dot_pos= NULL,name_pos= ++s; else s++; } -if(!found_web)/*71:*/ -#line 1292 "common.w" +if(!found_web)/*77:*/ +#line 1206 "common.w" { if(s-*argv> max_file_name_length-5) -/*76:*/ -#line 1364 "common.w" +/*82:*/ +#line 1276 "common.w" fatal("! Filename too long\n",*argv); -/*:76*/ -#line 1295 "common.w" -; +/*:82*/ +#line 1209 "common.w" + if(dot_pos==NULL) sprintf(web_file_name,"%s.w",*argv); else{ @@ -1136,50 +1223,49 @@ 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; } -/*:71*/ -#line 1275 "common.w" +/*:77*/ +#line 1188 "common.w" -else if(!found_change)/*72:*/ -#line 1310 "common.w" +else if(!found_change)/*78:*/ +#line 1224 "common.w" { -if(strcmp(*argv,"-")==0)found_change= -1; -else{ +if(strcmp(*argv,"-")!=0){ if(s-*argv> max_file_name_length-4) -/*76:*/ -#line 1364 "common.w" +/*82:*/ +#line 1276 "common.w" fatal("! Filename too long\n",*argv); -/*:76*/ -#line 1315 "common.w" -; +/*:82*/ +#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; } -/*:72*/ -#line 1276 "common.w" +/*:78*/ +#line 1189 "common.w" -else if(!found_out)/*73:*/ -#line 1323 "common.w" +else if(!found_out)/*79:*/ +#line 1236 "common.w" { if(s-*argv> max_file_name_length-5) -/*76:*/ -#line 1364 "common.w" +/*82:*/ +#line 1276 "common.w" fatal("! Filename too long\n",*argv); -/*:76*/ -#line 1326 "common.w" -; +/*:82*/ +#line 1239 "common.w" + if(dot_pos==NULL){ sprintf(tex_file_name,"%s.tex",*argv); sprintf(idx_file_name,"%s.idx",*argv); @@ -1188,20 +1274,20 @@ sprintf(C_file_name,"%s.c",*argv); }else{ strcpy(tex_file_name,*argv); strcpy(C_file_name,*argv); -if(flags['x']){ +if(make_xrefs){ *dot_pos= 0; sprintf(idx_file_name,"%s.idx",*argv); sprintf(scn_file_name,"%s.scn",*argv); } } -found_out= 1; +found_out= true; } -/*:73*/ -#line 1277 "common.w" +/*:79*/ +#line 1190 "common.w" -else/*75:*/ -#line 1352 "common.w" +else/*81:*/ +#line 1264 "common.w" { if(program==ctangle) @@ -1214,13 +1300,13 @@ else fatal( ,""); } -/*:75*/ -#line 1278 "common.w" -; +/*:81*/ +#line 1191 "common.w" + } } -if(!found_web)/*75:*/ -#line 1352 "common.w" +if(!found_web)/*81:*/ +#line 1264 "common.w" { if(program==ctangle) @@ -1233,10 +1319,9 @@ else fatal( ,""); } -/*:75*/ -#line 1281 "common.w" -; -if(found_change<=0)strcpy(change_file_name,"/dev/null"); +/*:81*/ +#line 1194 "common.w" + } -/*:70*/ +/*:75*/ diff --git a/source/texk/web2c/cwebdir/common.h b/source/texk/web2c/cwebdir/common.h index d6c0bfb60..425239f1c 100644 --- a/source/texk/web2c/cwebdir/common.h +++ b/source/texk/web2c/cwebdir/common.h @@ -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 3.64 --- February 2017 (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 @@ -15,25 +15,42 @@ % entire resulting derived work is distributed under the terms of a % permission notice identical to this one. -% Please send comments, suggestions, etc. to levy@@math.berkeley.edu. +% Amendments to 'common.h' resulting in this updated version were created +% by numerous collaborators over the course of many years. + +% Please send comments, suggestions, etc. to tex-k@@tug.org. % The next few sections contain stuff from the file |"common.w"| that has % to be included in both |"ctangle.w"| and |"cweave.w"|. It appears in this -% file |"common.h"|, which needs to be updated when |"common.w"| changes. +% file |"common.h"|, which is also included in |"common.w"| to propagate +% possible changes from this single source consistently. First comes general stuff: -@d ctangle 0 -@d cweave 1 +@s boolean int +@s uint8_t int +@s uint16_t int + +@d ctangle false +@d cweave true -@= -typedef short boolean; -typedef char unsigned eight_bits; +@= +typedef bool boolean; +typedef uint8_t eight_bits; +typedef uint16_t sixteen_bits; extern boolean program; /* \.{CWEAVE} or \.{CTANGLE}? */ extern int phase; /* which phase are we in? */ -@ @= -#include +@ Interface to the standard \CEE/ library: + +@= +#include /* definition of |@!isalpha|, |@!isdigit| and so on */ +#include /* definition of |@!bool|, |@!true| and |@!false| */ +#include /* definition of |@!ptrdiff_t| */ +#include /* definition of |@!uint8_t| and |@!uint16_t| */ +#include /* definition of |@!getenv| and |@!exit| */ +#include /* definition of |@!printf| and friends */ +#include /* definition of |@!strlen|, |@!strcmp| and so on */ @ Code related to the character set: @^ASCII code dependencies@> @@ -44,7 +61,7 @@ extern int phase; /* which phase are we in? */ @d plus_plus 013 /* `\.{++}'\,; corresponds to MIT's {\tentex\char'13} */ @d minus_minus 01 /* `\.{--}'\,; corresponds to MIT's {\tentex\char'1} */ @d minus_gt 031 /* `\.{->}'\,; corresponds to MIT's {\tentex\char'31} */ -@d not_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */ +@d non_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */ @d lt_eq 034 /* `\.{<=}'\,; corresponds to MIT's {\tentex\char'34} */ @d gt_eq 035 /* `\.{>=}'\,; corresponds to MIT's {\tentex\char'35} */ @d eq_eq 036 /* `\.{==}'\,; corresponds to MIT's {\tentex\char'36} */ @@ -55,34 +72,69 @@ extern int phase; /* which phase are we in? */ @d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */ @= -char section_text[longest_name+1]; /* name being sought for */ -char *section_text_end = section_text+longest_name; /* end of |section_text| */ -char *id_first; /* where the current identifier begins in the buffer */ -char *id_loc; /* just after the current identifier in the buffer */ +extern char section_text[]; /* text being sought for */ +extern char *section_text_end; /* end of |section_text| */ +extern char *id_first; /* where the current identifier begins in the buffer */ +extern char *id_loc; /* just after the current identifier in the buffer */ @ Code related to input routines: - -@d xisalpha(c) (isalpha(c)&&((eight_bits)c<0200)) -@d xisdigit(c) (isdigit(c)&&((eight_bits)c<0200)) -@d xisspace(c) (isspace(c)&&((eight_bits)c<0200)) -@d xislower(c) (islower(c)&&((eight_bits)c<0200)) -@d xisupper(c) (isupper(c)&&((eight_bits)c<0200)) -@d xisxdigit(c) (isxdigit(c)&&((eight_bits)c<0200)) +@d xisalpha(c) (isalpha((eight_bits)c)&&((eight_bits)c<0200)) +@d xisdigit(c) (isdigit((eight_bits)c)&&((eight_bits)c<0200)) +@d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200)) +@d xislower(c) (islower((eight_bits)c)&&((eight_bits)c<0200)) +@d xisupper(c) (isupper((eight_bits)c)&&((eight_bits)c<0200)) +@d xisxdigit(c) (isxdigit((eight_bits)c)&&((eight_bits)c<0200)) @= extern char buffer[]; /* where each line of input goes */ extern char *buffer_end; /* end of |buffer| */ -extern char *loc; /* points to the next character to be read from the buffer*/ +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: +@f line x /* make |line| an unreserved word */ +@d max_include_depth 10 /* maximum number of source files open + simultaneously, not counting the change file */ +@d max_file_name_length 1024 +@d cur_file file[include_depth] /* current file */ +@d cur_file_name file_name[include_depth] /* current file name */ +@d cur_line line[include_depth] /* number of current line in current file */ +@d web_file file[0] /* main source file */ +@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) (c+1)->byte_start-(c)->byte_start /* the length of a name */ +@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 */ @d llink link /* left link in binary search tree for section names */ @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 */ -@d chunk_marker 0 @= typedef struct name_info { @@ -93,22 +145,30 @@ typedef struct name_info { names */ char Ilk; /* used by identifiers in \.{CWEAVE} only */ } dummy; - char *equiv_or_xref; /* info corresponding to names */ + void *equiv_or_xref; /* info corresponding to names */ } name_info; /* contains information about an identifier or section name */ typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */ 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 */ -extern name_pointer id_lookup(); /* looks up a string in the identifier table */ -extern name_pointer section_lookup(); /* finds section name */ -extern void print_section_name(), sprint_section_name(); + +@ @= +extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/ +extern name_pointer id_lookup(const char *,const char *,char); + /* looks up a string in the identifier table */ +extern name_pointer section_lookup(char *,char *,int); /* finds section name */ +extern void init_node(name_pointer);@/ +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); @ Code related to error handling: @d spotless 0 /* |history| value for normal jobs */ @@ -118,67 +178,39 @@ extern void print_section_name(), sprint_section_name(); @d mark_harmless {if (history==spotless) history=harmless_message;} @d mark_error history=error_message @d confusion(s) fatal("! This can't happen: ",s) - -@= -extern history; /* indicates how bad this run was */ -extern err_print(); /* print error message and context */ -extern wrap_up(); /* indicate |history| and exit */ -extern void fatal(); /* issue error message and die */ -extern void overflow(); /* succumb because a table has overflowed */ - -@ Code related to file handling: -@f line x /* make |line| an unreserved word */ -@d max_file_name_length 60 -@d cur_file file[include_depth] /* current file */ -@d cur_file_name file_name[include_depth] /* current file name */ -@d web_file_name file_name[0] /* main source file name */ -@d cur_line line[include_depth] /* number of current line in current file */ +@.This can't happen@> @= -extern 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 line[]; /* number of current line in the stacked files */ -extern change_line; /* number of current line in change file */ -extern 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 reset_input(); /* initialize to read the web file and change file */ -extern get_line(); /* inputs the next line */ -extern check_complete(); /* checks that all changes were picked up */ +extern int history; /* indicates how bad this run was */ -@ Code related to section numbers: -@= -typedef unsigned short sixteen_bits; -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 */ +@ @= +extern int wrap_up(void); /* indicate |history| and exit */ +extern void err_print(const char *); /* print error message and context */ +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 command line arguments: @d show_banner flags['b'] /* should the banner line be printed? */ @d show_progress flags['p'] /* should progress reports be printed? */ +@d show_stats flags['s'] /* should statistics be printed at end of run? */ @d show_happiness flags['h'] /* should lack of errors be announced? */ +@d make_xrefs flags['x'] /* should cross references be output? */ @= 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) @d C_printf(c,a) fprintf(C_file,c,a) -@d C_putc(c) putc(c,C_file) +@d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */ @= extern FILE *C_file; /* where output of \.{CTANGLE} goes */ @@ -188,6 +220,24 @@ extern FILE *scn_file; /* where list of sections from \.{CWEAVE} goes */ extern FILE *active_file; /* currently active file for \.{CWEAVE} output */ @ The procedure that gets everything rolling: - -@= -extern void common_init(); +@= +extern void common_init(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 +\.{CWEB}. + +@d max_bytes 1000000 /* the number of bytes in identifiers, + index entries, and section names */ +@d max_toks 1000000 /* number of bytes in compressed \CEE/ code */ +@d max_names 10239 /* number of identifiers, strings, section names; + must be less than 10240 */ +@d max_sections 4000 /* greater than the total number of sections */ +@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 */ +@d buf_size 1000 /* maximum length of input line, plus one */ +@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */ + +@ End of \.{COMMON} interface. diff --git a/source/texk/web2c/cwebdir/common.w b/source/texk/web2c/cwebdir/common.w index d8aacfb7b..15e93c2c5 100644 --- a/source/texk/web2c/cwebdir/common.w +++ b/source/texk/web2c/cwebdir/common.w @@ -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 3.64 --- January 2002 +% Version 4.2 --- February 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -15,14 +15,19 @@ % entire resulting derived work is given a different name and distributed % under the terms of a permission notice identical to this one. +% Amendments to 'common.w' resulting in this updated version were created +% by numerous collaborators over the course of many years. + +% Please send comments, suggestions, etc. to tex-k@@tug.org. + \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (Version 3.64)} +\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 3.64)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -41,7 +46,10 @@ under the terms of a permission notice identical to this one. \pageno=\contentspagenumber \advance\pageno by 1 \let\maybe=\iftrue -@s not_eq normal @q unreserve a C++ keyword @> + +@s boolean int +@s uint8_t int +@s uint16_t int @** Introduction. This file contains code common to both \.{CTANGLE} and \.{CWEAVE}, which roughly concerns the following @@ -58,20 +66,21 @@ The file begins with a few basic definitions. @c @@/ @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. + +@i common.h @ In certain cases \.{CTANGLE} and \.{CWEAVE} should do almost, but not quite, the same thing. In these cases we've written common code for both, differentiating between the two by means of the global variable |program|. -@d ctangle 0 -@d cweave 1 - -@= -typedef short boolean; +@= boolean program; /* \.{CWEAVE} or \.{CTANGLE}? */ @ \.{CWEAVE} operates in three phases: First it inputs the source @@ -80,7 +89,8 @@ produces the \TEX/ output file, and finally it sorts and outputs the index. 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 @@ -88,29 +98,26 @@ procedure later. @c void -common_init() +common_init(void) { - @; - @; - @; + @@; + @@; + @@; } @* The character set. \.{CWEB} uses the conventions of \CEE/ programs found in the standard \.{ctype.h} header file. -@= -#include +A few character pairs are encoded internally as single characters, +using the definitions in the interface sections above. These definitions +are consistent with an extension of ASCII code originally developed at +MIT and explained in Appendix~C of {\sl The \TEX/book\/}; thus, users +who have such a character set can type things like \.{\char'32} and +\.{\char'4} instead of \.{!=} and \.{\&\&}. (However, their files will +not be too portable until more people adopt the extended code.) -@ A few character pairs are encoded internally as single characters, -using the definitions below. These definitions are consistent with -an extension of ASCII code originally developed at MIT and explained in -Appendix~C of {\sl The \TEX/book\/}; thus, users who have such a -character set can type things like \.{\char'32} and \.{\char'4} instead -of \.{!=} and \.{\&\&}. (However, their files will not be too portable -until more people adopt the extended code.) - -If the character set is not ASCII, the definitions given here may conflict +If the character set is not ASCII, the definitions given may conflict with existing characters; in such cases, other arbitrary codes should be substituted. The indexes to \.{CTANGLE} and \.{CWEAVE} mention every case where similar codes may have to be changed in order to @@ -120,26 +127,16 @@ in those indexes. @^ASCII code dependencies@> @^system dependencies@> -@d and_and 04 /* `\.{\&\&}'\,; corresponds to MIT's {\tentex\char'4} */ -@d lt_lt 020 /* `\.{<<}'\,; corresponds to MIT's {\tentex\char'20} */ -@d gt_gt 021 /* `\.{>>}'\,; corresponds to MIT's {\tentex\char'21} */ -@d plus_plus 013 /* `\.{++}'\,; corresponds to MIT's {\tentex\char'13} */ -@d minus_minus 01 /* `\.{--}'\,; corresponds to MIT's {\tentex\char'1} */ -@d minus_gt 031 /* `\.{->}'\,; corresponds to MIT's {\tentex\char'31} */ -@d not_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */ -@d lt_eq 034 /* `\.{<=}'\,; corresponds to MIT's {\tentex\char'34} */ -@d gt_eq 035 /* `\.{>=}'\,; corresponds to MIT's {\tentex\char'35} */ -@d eq_eq 036 /* `\.{==}'\,; corresponds to MIT's {\tentex\char'36} */ -@d or_or 037 /* `\.{\v\v}'\,; corresponds to MIT's {\tentex\char'37} */ -@d dot_dot_dot 016 /* `\.{...}'\,; corresponds to MIT's {\tentex\char'16} */ -@d colon_colon 06 /* `\.{::}'\,; corresponds to MIT's {\tentex\char'6} */ -@d period_ast 026 /* `\.{.*}'\,; corresponds to MIT's {\tentex\char'26} */ -@d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */ +@= +char section_text[longest_name+1]; /* text being sought for */ +char *section_text_end = section_text+longest_name; /* end of |section_text| */ +char *id_first; /* where the current identifier begins in the buffer */ +char *id_loc; /* just after the current identifier in the buffer */ @** 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. @@ -150,32 +147,23 @@ Since |buf_size| is strictly less than |long_buf_size|, some of \.{CWEB}'s routines use the fact that it is safe to refer to |*(limit+2)| without overstepping the bounds of the array. -@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ -@d longest_name 10000 -@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */ -@d xisspace(c) (isspace(c)&&((unsigned char)c<0200)) -@d xisupper(c) (isupper(c)&&((unsigned char)c<0200)) - -@= +@= char buffer[long_buf_size]; /* where each line of input goes */ char *buffer_end=buffer+buf_size-2; /* end of |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 */ - -@ @= -#include +char *limit=buffer; /* points to the last character in 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@> @c -int input_ln(fp) /* copies a line into |buffer| or returns 0 */ -FILE *fp; /* what file to read from */ +static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */ +FILE *fp@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; @@ -183,12 +171,14 @@ FILE *fp; /* what file to read from */ if ((c=getc(fp))!=EOF && c!='\n') { 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 @@ -201,32 +191,22 @@ from the |change_file|. The line number of each open file is also kept for error reporting and for the benefit of \.{CTANGLE}. -@f line x /* make |line| an unreserved word */ -@d max_include_depth 10 /* maximum number of source files open - simultaneously, not counting the change file */ -@d max_file_name_length 60 -@d cur_file file[include_depth] /* current file */ -@d cur_file_name file_name[include_depth] /* current file name */ -@d cur_line line[include_depth] /* number of current line in current file */ -@d web_file file[0] /* main source file */ -@d web_file_name file_name[0] /* main source file name */ - -@= +@= int include_depth; /* current level of nesting */ FILE *file[max_include_depth]; /* stack of non-change files */ FILE *change_file; /* change file */ 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|, @@ -234,41 +214,43 @@ so that no further matches will be made. Here's a shorthand expression for inequality between the two lines: -@d lines_dont_match (change_limit-change_buffer != limit-buffer || - strncmp(buffer, change_buffer, limit-buffer)) +@d lines_dont_match (change_limit-change_buffer != limit-buffer || @| + 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. 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. @c -void -prime_the_change_buffer() +static void +prime_the_change_buffer(void) { change_limit=change_buffer; /* this value is used if the change file ends */ - @; - @; - @; + @@; + @@; + @@; } +@ @=@+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= { - change_limit=change_buffer+(limit-buffer); - strncpy(change_buffer,buffer,limit-buffer+1); + change_limit=change_buffer+(ptrdiff_t)(limit-buffer); + strncpy(change_buffer,buffer,(size_t)(limit-buffer+1)); } @ The following procedure is used to see if the next change entry should -go into effect; it is called only when |changing| is 0. +go into effect; it is called only when |changing| is |false|. The idea is to test whether or not the current contents of |buffer| matches the current contents of |change_buffer|. If not, there's nothing more to do; but if so, a change is called for: @@ -306,7 +288,7 @@ prepares to read the next line from |change_file|. When a match is found, the current section is marked as changed unless the first line after the \.{@@x} and after the \.{@@y} both start with -either |'@@*'| or |'@@ '| (possibly preceded by whitespace). +either `\.{@@*}' or `\.{@@\ }' (possibly preceded by whitespace). This procedure is called only when |buffer - change_limit=change_buffer; changing=0; + change_limit=change_buffer; changing=false; return; } if (limit>buffer+1 && buffer[0]=='@@') { - char xyz_code=xisupper(buffer[1])? tolower(buffer[1]): buffer[1]; + char xyz_code=xisupper(buffer[1])? tolower((eight_bits)buffer[1]): buffer[1]; @; + 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++; } @@ -355,6 +337,8 @@ check_change() /* switches to |change_file| if the buffers match */ } } +@ @=@+static void check_change(void); + @ @= if (xyz_code=='x' || xyz_code=='z') { loc=buffer+2; err_print("! Where is the matching @@y?"); @@ -377,14 +361,14 @@ phases one and two of \.{CWEAVE}. @c void -reset_input() +reset_input(void) { limit=buffer; loc=buffer+1; buffer[0]=' '; - @; + @@; 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. @@ -398,7 +382,7 @@ if ((web_file=fopen(web_file_name,"r"))==NULL) { } @.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); @@ -412,28 +396,24 @@ If we've just changed from the |cur_file| to the |change_file|, or if the |cur_file| has changed, we tell \.{CTANGLE} to print this information in the \CEE/ file by means of the |print_where| flag. -@d max_sections 2000 /* number of identifiers, strings, section names; - must be less than 10240 */ - -@= -typedef unsigned short sixteen_bits; +@= sixteen_bits section_count; /* the current section number */ 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 -int get_line() /* inputs the next line */ +boolean get_line(void) /* inputs the next line */ { restart: if (changing && include_depth==change_depth) - @; + @@; if (! changing || include_depth>change_depth) { - @; + @@; 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='"'; @@ -449,9 +429,9 @@ int get_line() /* inputs the next line */ goto restart; } include_depth++; /* push input stack */ - @; + @@; } - return 1; + return true; } @ When an \.{@@i} line is found in the |cur_file|, we must temporarily @@ -468,10 +448,7 @@ The remainder of the \.{@@i} line after the file name is ignored. @d too_long() {include_depth--; err_print("! Include file name too long"); goto restart;} -@= -#include /* declaration of |getenv| and |exit| */ - -@ @= { +@.CWEBINPUTS@>@= { char temp_file_name[max_file_name_length]; char *cur_file_name_end=cur_file_name+max_file_name_length-1; char *k=cur_file_name, *kk; @@ -487,7 +464,7 @@ The remainder of the \.{@@i} line after the file name is ignored. @.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"); @@ -510,7 +487,7 @@ The remainder of the \.{@@i} line after the file name is ignored. 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 */ } } @@ -520,8 +497,8 @@ The remainder of the \.{@@i} line after the file name is ignored. @ @= { 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; @@ -543,21 +520,21 @@ The remainder of the \.{@@i} line after the file name is ignored. } 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=' '; if (buffer[0]=='@@') { - if (xisupper(buffer[1])) buffer[1]=tolower(buffer[1]); + if (xisupper(buffer[1])) buffer[1]=tolower((eight_bits)buffer[1]); if (buffer[1]=='x' || buffer[1]=='y') { loc=buffer+2; err_print("! Where is the matching @@z?"); @.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; } } } @@ -568,11 +545,11 @@ had a line that didn't match any relevant line in |web_file|. @c void -check_complete(){ - if (change_limit!=change_buffer) { /* |changing| is 0 */ - strncpy(buffer,change_buffer,change_limit-change_buffer+1); - limit=buffer+(int)(change_limit-change_buffer); - changing=1; change_depth=include_depth; loc=buffer; +check_complete(void) { + 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=true; change_depth=include_depth; loc=buffer; err_print("! Change file entry did not match"); @.Change file entry did not match@> } @@ -584,52 +561,58 @@ other strings in a large array of |char|s, called |byte_mem|. Information about the names is kept in the array |name_dir|, whose elements are structures of type |name_info|, containing a pointer into the |byte_mem| array (the address where the name begins) and other data. -A |name_pointer| variable is a pointer into |name_dir|. - -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names; must be less than $2^{24}$ */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240 */ - -@= -typedef struct name_info { - char *byte_start; /* beginning of the name in |byte_mem| */ - @@; -} name_info; /* contains information about an identifier or section name */ -typedef name_info *name_pointer; /* pointer into array of |name_info|s */ +A |name_pointer| variable is a pointer into |name_dir|. You find the +complete layout of |name_info| in the interface sections above. + +The actual sequence of characters in the name pointed to by a |name_pointer +p| appears in positions |p->byte_start| to |(p+1)->byte_start-1|, inclusive. + +The names of identifiers are found by computing a hash address |h| and +then looking at strings of bytes signified by the |name_pointer|s +|hash[h]|, |hash[h]->link|, |hash[h]->link->link|, \dots, +until either finding the desired name or encountering the null pointer. + +The names of sections are stored in |byte_mem| together +with the identifier names, but a hash table is not used for them because +\.{CTANGLE} needs to be able to recognize a section name when given a prefix of +that name. A conventional binary search tree is used to retrieve section names, +with fields called |llink| and |rlink| (where |llink| takes the place +of |link|). The root of this tree is stored in |name_dir->rlink|; +this will be the only information in |name_dir[0]|. + +Since the space used by |rlink| has a different function for +identifiers than for section names, we declare it as a |union|. + +The last component of |name_info| is different for \.{CTANGLE} and +\.{CWEAVE}. In \.{CTANGLE}, if |p| is a pointer to a section name, +|p->equiv| is a pointer to its replacement text, an element of the +array |text_info|. In \.{CWEAVE}, on the other hand, if +|p| points to an identifier, |p->xref| is a pointer to its +list of cross-references, an element of the array |xmem|. The make-up +of |text_info| and |xmem| is discussed in the \.{CTANGLE} and \.{CWEAVE} +source files, respectively; here we just declare a common field +|equiv_or_xref| as a pointer to |void|. + +@= char byte_mem[max_bytes]; /* characters of names */ char *byte_mem_end = byte_mem+max_bytes-1; /* end of |byte_mem| */ name_info name_dir[max_names]; /* information about names */ name_pointer name_dir_end = name_dir+max_names-1; /* end of |name_dir| */ -@ The actual sequence of characters in the name pointed to by a |name_pointer -p| appears in positions |p->byte_start| to |(p+1)->byte_start-1|, inclusive. -The |print_id| macro prints this text on the user's terminal. - -@d length(c) (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 */ - @ The first unused position in |byte_mem| and |name_dir| is kept in |byte_ptr| and |name_ptr|, respectively. Thus we usually have |name_ptr->byte_start==byte_ptr|, and certainly we want to keep |name_ptr<=name_dir_end| and |byte_ptr<=byte_mem_end|. -@= -name_pointer name_ptr; /* first unused position in |name_dir| */ +@= char *byte_ptr; /* first unused position in |byte_mem| */ +name_pointer name_ptr; /* first unused position in |name_dir| */ @ @= name_dir->byte_start=byte_ptr=byte_mem; /* position zero in both arrays */ name_ptr=name_dir+1; /* |name_dir[0]| will be used only for error recovery */ name_ptr->byte_start=byte_mem; /* this makes name 0 of length zero */ - -@ The names of identifiers are found by computing a hash address |h| and -then looking at strings of bytes signified by the |name_pointer|s -|hash[h]|, |hash[h]->link|, |hash[h]->link->link|, \dots, -until either finding the desired name or encountering the null pointer. - -@= -struct name_info *link; +root=NULL; /* the binary search tree starts out with nothing in it */ @ The hash table itself consists of |hash_size| entries of type |name_pointer|, and is @@ -639,17 +622,13 @@ function |names_match|, which is slightly different in \.{CWEAVE} and \.{CTANGLE}. If there is no match for the identifier, it is inserted into the table. -@d hash_size 353 /* should be prime */ +@d hash_size 8501 /* should be prime */ -@= -typedef name_pointer *hash_pointer; +@= name_pointer hash[hash_size]; /* heads of hash lists */ hash_pointer hash_end = hash+hash_size-1; /* end of |hash| */ hash_pointer h; /* index into hash-head array */ -@ @= -extern int names_match(); - @ Initially all the hash lists are empty. @= @@ -659,21 +638,21 @@ for (h=hash; h<=hash_end; *h++=NULL) ; @c name_pointer -id_lookup(first,last,t) /* looks up a string in the identifier table */ -char *first; /* first character of string */ -char *last; /* last character of string plus one */ -char t; /* the |ilk|; used by \.{CWEAVE} only */ +id_lookup(@t\1\1@> /* looks up a string in the identifier table */ +const char *first, /* first character of string */ +const char *last, /* last character of string plus one */ +char t@t\2\2@>) /* the |ilk|; used by \.{CWEAVE} only */ { - char *i=first; /* position in |buffer| */ + const char *i=first; /* position in |buffer| */ int h; /* hash code */ int l; /* length of the given identifier */ name_pointer p; /* where the identifier is being sought */ if (last==NULL) for (last=first; *last!='\0'; last++); - l=last-first; /* compute the length */ - @; - @; - if (p==name_ptr) @; - return(p); + l=(int)(last-first); /* compute the length */ + @@; + @@; + if (p==name_ptr) @@; + return p; } @ A simple hash code is used: If the sequence of @@ -681,8 +660,8 @@ character codes is $c_1c_2\ldots c_n$, its hash value will be $$(2^{n-1}c_1+2^{n-2}c_2+\cdots+c_n)\,\bmod\,|hash_size|.$$ @= -h=(unsigned char)*i; -while (++i @ If the identifier is new, it will be placed in position |p=name_ptr|, @@ -699,44 +678,14 @@ if (p==NULL) { @ The information associated with a new identifier must be initialized in a slightly different way in \.{CWEAVE} than in \.{CTANGLE}; hence the |init_p| procedure. - -@= -void init_p(); - -@ @= { +@= { if (byte_ptr+l>byte_mem_end) overflow("byte memory"); if (name_ptr>=name_dir_end) overflow("name"); strncpy(byte_ptr,first,l); (++name_ptr)->byte_start=byte_ptr+=l; - if (program==cweave) init_p(p,t); + init_p(p,t); } -@ The names of sections are stored in |byte_mem| together -with the identifier names, but a hash table is not used for them because -\.{CTANGLE} needs to be able to recognize a section name when given a prefix of -that name. A conventional binary search tree is used to retrieve section names, -with fields called |llink| and |rlink| (where |llink| takes the place -of |link|). The root of this tree is stored in |name_dir->rlink|; -this will be the only information in |name_dir[0]|. - -Since the space used by |rlink| has a different function for -identifiers than for section names, we declare it as a |union|. - -@d llink link /* left link in binary search tree for section names */ -@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 */ - -@= -union { - struct name_info *Rlink; /* right link in binary search tree for section - names */ - char Ilk; /* used by identifiers in \.{CWEAVE} only */ -} dummy; - -@ @= -root=NULL; /* the binary search tree starts out with nothing in it */ - @ If |p| is a |name_pointer| variable, as we have seen, |p->byte_start| is the beginning of the area where the name corresponding to |p| is stored. However, if |p| refers to a section @@ -756,24 +705,24 @@ to additional chunks in the same way. Null links are represented by |name_dir|. @d first_chunk(p) ((p)->byte_start+2) -@d prefix_length(p) (int)((unsigned char)*((p)->byte_start)*256 + - (unsigned char)*((p)->byte_start+1)) +@d prefix_length(p) (int)((eight_bits)*((p)->byte_start)*256 + + (eight_bits)*((p)->byte_start+1)) @d set_prefix_length(p,m) (*((p)->byte_start)=(m)/256, *((p)->byte_start+1)=(m)%256) @c void -print_section_name(p) -name_pointer p; +print_section_name( +name_pointer p) { char *ss, *s = first_chunk(p); name_pointer q = p+1; while (p!=name_dir) { ss = (p+1)->byte_start-1; if (*ss==' ' && ss>=s) { - term_write(s,ss-s); p=q->link; q=p; + term_write(s,(size_t)(ss-s)); p=q->link; q=p; } else { - term_write(s,ss+1-s); p=name_dir; q=NULL; + term_write(s,(size_t)(ss+1-s)); p=name_dir; q=NULL; } s = p->byte_start; } @@ -782,9 +731,9 @@ name_pointer p; @ @c void -sprint_section_name(dest,p) - char*dest; - name_pointer p; +sprint_section_name( + char *dest, + name_pointer p) { char *ss, *s = first_chunk(p); name_pointer q = p+1; @@ -795,7 +744,7 @@ sprint_section_name(dest,p) } else { ss++; p=name_dir; } - strncpy(dest,s,ss-s), dest+=ss-s; + strncpy(dest,s,(size_t)(ss-s)), dest+=ss-s; s = p->byte_start; } *dest='\0'; @@ -803,8 +752,8 @@ sprint_section_name(dest,p) @ @c void -print_prefix_name(p) -name_pointer p; +print_prefix_name( +name_pointer p) { char *s = first_chunk(p); int l = prefix_length(p); @@ -822,10 +771,17 @@ are null-terminated, and we keep an eye open for prefixes and extensions. @d prefix 3 /* the first name is a proper prefix of the second */ @d extension 4 /* the first name is a proper extension of the second */ -@c -int web_strcmp(j,j_len,k,k_len) /* fuller comparison than |strcmp| */ - char *j, *k; /* beginning of first and second strings */ - int j_len, k_len; /* length of strings */ +@= +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); + +@ @c +static int web_strcmp(@t\1\1@> /* fuller comparison than |strcmp| */ + char *j, /* beginning of first string */ + int j_len, /* length of first string */ + char *k, /* beginning of second string */ + int k_len@t\2\2@>) /* length of second string */ { char *j1=j+j_len, *k1=k+k_len; while (k= -extern void init_node(); - -@ @c -name_pointer -add_section_name(par,c,first,last,ispref) /* install a new node in the tree */ -name_pointer par; /* parent of new node */ -int c; /* right or left? */ -char *first; /* first character of section name */ -char *last; /* last character of section name, plus one */ -int ispref; /* are we adding a prefix or a full name? */ +@c +static name_pointer +add_section_name(@t\1\1@> /* install a new node in the tree */ +name_pointer par, /* parent of new node */ +int c, /* right or left? */ +char *first, /* first character of section name */ +char *last, /* last character of section name, plus one */ +int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ { name_pointer p=name_ptr; /* new node */ char *s=first_chunk(p); - int name_len=last-first+ispref; /* length of section name */ + int name_len=(int)(last-first)+ispref; /* length of section name */ if (s+name_len>byte_mem_end) overflow("byte memory"); if (name_ptr+1>=name_dir_end) overflow("name"); (++name_ptr)->byte_start=byte_ptr=s+name_len; @@ -882,16 +835,16 @@ int ispref; /* are we adding a prefix or a full name? */ } @ @c -void -extend_section_name(p,first,last,ispref) -name_pointer p; /* name to be extended */ -char *first; /* beginning of extension text */ -char *last; /* one beyond end of extension text */ -int ispref; /* are we adding a prefix or a full name? */ +static void +extend_section_name(@t\1\1@> +name_pointer p, /* name to be extended */ +char *first, /* beginning of extension text */ +char *last, /* one beyond end of extension text */ +int ispref@t\2\2@>) /* are we adding a prefix or a full name? */ { char *s; name_pointer q=p+1; - int name_len=last-first+ispref; + int name_len=(int)(last-first)+ispref; if (name_ptr>=name_dir_end) overflow("name"); while (q->link!=name_dir) q=q->link; q->link=name_ptr; @@ -911,9 +864,9 @@ exactly equals or is a prefix or extension of a name in the tree. @c name_pointer -section_lookup(first,last,ispref) /* find or install section name in tree */ -char *first, *last; /* first and last characters of new name */ -int ispref; /* is the new name a prefix or a full name? */ +section_lookup(@t\1\1@> /* find or install section name in tree */ +char *first,char *last, /* first and last characters of new name */ +int ispref@t\2\2@>) /* is the new name a prefix or a full name? */ { int c=0; /* comparison between two names; initialized so some compilers won't complain */ name_pointer p=root; /* current node of the search tree */ @@ -921,11 +874,11 @@ int ispref; /* is the new name a prefix or a full name? */ name_pointer r=NULL; /* where a match has been found */ name_pointer par=NULL; /* parent of |p|, if |r| is |NULL|; otherwise parent of |r| */ - int name_len=last-first+1; + int name_len=(int)(last-first)+1; @; - @; - @; + if more than one is found@>@; + @@; + @@; } @ A legal new name matches an existing section name if and only if it @@ -942,10 +895,10 @@ while (p) { /* compare shortest prefix of |p| with new name */ p=(c==less?p->llink:p->rlink); } else { /* new name matches |p| */ if (r!=NULL) { /* and also |r|: illegal */ - printf("\n! Ambiguous prefix: matches <"); + fputs("\n! Ambiguous prefix: matches <",stdout); @.Ambiguous prefix ... @> print_prefix_name(p); - printf(">\n and <"); + fputs(">\n and <",stdout); print_prefix_name(r); err_print(">"); return name_dir; /* the unsection */ @@ -971,7 +924,7 @@ switch(section_name_cmp(&first,name_len,r)) { /* compare all of |r| with new name */ case prefix: if (!ispref) { - printf("\n! New name is a prefix of <"); + fputs("\n! New name is a prefix of <",stdout); @.New name is a prefix...@> print_section_name(r); err_print(">"); @@ -983,16 +936,16 @@ switch(section_name_cmp(&first,name_len,r)) { extend_section_name(r,first,last+1,ispref); return r; case bad_extension: - printf("\n! New name extends <"); + fputs("\n! New name extends <",stdout); @.New name extends...@> print_section_name(r); err_print(">"); return r; default: /* no match: illegal */ - printf("\n! Section name incompatible with <"); + fputs("\n! Section name incompatible with <",stdout); @.Section name incompatible...@> print_prefix_name(r); - printf(">,\n which abbreviates <"); + fputs(">,\n which abbreviates <",stdout); print_section_name(r); err_print(">"); return r; @@ -1014,53 +967,39 @@ us to regard \.{@@} as an ``extension'' of itself. @d bad_extension 5 -@= -int section_name_cmp(); - -@ @c -int section_name_cmp(pfirst,len,r) -char **pfirst; /* pointer to beginning of comparison string */ -int len; /* length of string */ -name_pointer r; /* section name being compared */ +@c +static int section_name_cmp(@t\1\1@> +char **pfirst, /* pointer to beginning of comparison string */ +int len, /* length of string */ +name_pointer r@t\2\2@>) /* section name being compared */ { char *first=*pfirst; /* beginning of comparison string */ name_pointer q=r+1; /* access to subsequent chunks */ 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; switch(c=web_strcmp(first,len,s,ss-s)) { case equal: if (q==name_dir) if (ispref) { - *pfirst=first+(ss-s); + *pfirst=first+(ptrdiff_t)(ss-s); return extension; /* null extension */ } else return equal; else return (q->byte_start==(q+1)->byte_start)? equal: prefix; case extension: if (!ispref) return bad_extension; first += ss-s; - if (q!=name_dir) {len -= ss-s; s=q->byte_start; r=q; continue;} + if (q!=name_dir) {len -= (int)(ss-s); s=q->byte_start; r=q; continue;} *pfirst=first; return extension; default: return c; } } } -@ The last component of |name_info| is different for \.{CTANGLE} and -\.{CWEAVE}. In \.{CTANGLE}, if |p| is a pointer to a section name, -|p->equiv| is a pointer to its replacement text, an element of the -array |text_info|. In \.{CWEAVE}, on the other hand, if -|p| points to an identifier, |p->xref| is a pointer to its -list of cross-references, an element of the array |xmem|. The make-up -of |text_info| and |xmem| is discussed in the \.{CTANGLE} and \.{CWEAVE} -source files, respectively; here we just declare a common field -|equiv_or_xref| as a pointer to a |char|. - -@= -char *equiv_or_xref; /* info corresponding to names */ +@ @=@+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 @@ -1072,14 +1011,7 @@ terminated abnormally. The value of |history| does not influence the behavior of the program; it is simply computed for the convenience of systems that might want to use such information. -@d spotless 0 /* |history| value for normal jobs */ -@d harmless_message 1 /* |history| value when non-serious info was printed */ -@d error_message 2 /* |history| value when an error was noted */ -@d fatal_message 3 /* |history| value when we had to stop prematurely */ -@d mark_harmless {if (history==spotless) history=harmless_message;} -@d mark_error history=error_message - -@= +@= int history=spotless; /* indicates how bad this run was */ @ The command `|err_print("! Error message")|' will report a syntax error to @@ -1089,17 +1021,14 @@ Note that no period follows the error message, since the error routine will automatically supply a period. A newline is automatically supplied if the string begins with |"!"|. -@= -void err_print(); - -@ @c +@c void -err_print(s) /* prints `\..' and location of error message */ -char *s; +err_print(@t\1\1@> /* prints `\..' and location of error message */ +const char *s@t\2\2@>) { char *k,*l; /* pointers into |buffer| */ printf(*s=='!'? "\n%s" : "%s",s); - if(web_file_open) @; + if(web_file_open) @@; update_terminal; mark_error; } @@ -1135,52 +1064,46 @@ up and quit as graciously as possible. This is done by calling the function |wrap_up| at the end of the code. \.{CTANGLE} and \.{CWEAVE} have their own notions about how to -print the job statistics. +print the job statistics. See the function(s) |print_stats| in the +interface above and in the index. -@= -int wrap_up(); -extern void print_stats(); - -@ Some implementations may wish to pass the |history| value to the +Some implementations may wish to pass the |history| value to the operating system so that it can be used to govern whether or not other programs are started. Here, for instance, we pass the operating system a status of 0 if and only if only harmless messages were printed. @^system dependencies@> @c -int wrap_up() { - putchar('\n'); +int wrap_up(void) { + if (show_progress) new_line; 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; } @ @= switch (history) { -case spotless: if (show_happiness) printf("(No errors were found.)\n"); break; +case spotless: if (show_happiness) puts("(No errors were found.)"); break; case harmless_message: - printf("(Did you see the warning message above?)\n"); break; + puts("(Did you see the warning message above?)"); break; case error_message: - printf("(Pardon me, but I think I spotted something wrong.)\n"); break; -case fatal_message: printf("(That was a fatal error, my friend.)\n"); + puts("(Pardon me, but I think I spotted something wrong.)"); break; +case fatal_message: puts("(That was a fatal error, my friend.)"); } /* there are no other cases */ @ When there is no way to recover from an error, the |fatal| subroutine is invoked. This happens most often when |overflow| occurs. -@= -void fatal(), overflow(); - -@ The two parameters to |fatal| are strings that are essentially +The two parameters to |fatal| are strings that are essentially concatenated to print the final error message. @c void -fatal(s,t) - char *s,*t; +fatal( + const char *s,const char *t) { - if (*s) printf(s); + if (*s) err_print(s); err_print(t); history=fatal_message; exit(wrap_up()); } @@ -1188,8 +1111,8 @@ fatal(s,t) @ An overflow stop occurs if \.{CWEB}'s tables aren't large enough. @c void -overflow(t) - char *t; +overflow( + const char *t) { printf("\n! Sorry, %s capacity exceeded",t); fatal("",""); } @@ -1200,9 +1123,6 @@ and \.{CWEB} prints an error message that is really for the \.{CWEB} maintenance person, not the user. In such cases the program says |confusion("indication of where we are")|. -@d confusion(s) fatal("! This can't happen: ",s) -@.This can't happen@> - @** Command line arguments. The user calls \.{CWEAVE} and \.{CTANGLE} with arguments on the command line. These are either file names or flags to be turned off (beginning with |"-"|) @@ -1212,12 +1132,7 @@ of the program. The various file name variables contain strings with the names of those files. Most of the 128 flags are undefined but available for future extensions. -@d show_banner flags['b'] /* should the banner line be printed? */ -@d show_progress flags['p'] /* should progress reports be printed? */ -@d show_stats flags['s'] /* should statistics be printed at end of run? */ -@d show_happiness flags['h'] /* should lack of errors be announced? */ - -@= +@= int argc; /* copy of |ac| parameter to |main| */ char **argv; /* copy of |av| parameter to |main| */ char C_file_name[max_file_name_length]; /* name of |C_file| */ @@ -1226,12 +1141,13 @@ char idx_file_name[max_file_name_length]; /* name of |idx_file| */ 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=1; +show_banner=show_happiness=show_progress=make_xrefs=true;@/ +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} @@ -1248,20 +1164,17 @@ when no changes are desired. If there's a third file name, it will be the output file. -@= -void scan_args(); - -@ @c -void -scan_args() +@c +static void +scan_args(void) { 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? */ - boolean flag_change; + strcpy(change_file_name,"/dev/null"); while (--argc > 0) { if ((**(++argv)=='-'||**argv=='+')&&*(*argv+1)) @@; else { @@ -1275,13 +1188,14 @@ scan_args() |web_file_name|, |tex_file_name|, and |C_file_name|@>@; else if (!found_change) @@; else if (!found_out) @@; - else @; + else @@; } } - if (!found_web) @; - if (found_change<=0) strcpy(change_file_name,"/dev/null"); + 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. @@ -1292,7 +1206,7 @@ after the dot. We must check that there is enough room in @= { if (s-*argv > max_file_name_length-5) - @; + @@; if (dot_pos==NULL) sprintf(web_file_name,"%s.w",*argv); else { @@ -1304,26 +1218,25 @@ after the dot. We must check that there is enough room in 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; } @ @= { - if (strcmp(*argv,"-")==0) found_change=-1; - else { + if (strcmp(*argv,"-")!=0) { if (s-*argv > max_file_name_length-4) - @; + @@; if (dot_pos==NULL) sprintf(change_file_name,"%s.ch",*argv); else strcpy(change_file_name,*argv); - found_change=1; } + found_change=true; } @ @= { if (s-*argv > max_file_name_length-5) - @; + @@; if (dot_pos==NULL) { sprintf(tex_file_name,"%s.tex",*argv); sprintf(idx_file_name,"%s.idx",*argv); @@ -1332,21 +1245,20 @@ after the dot. We must check that there is enough room in } else { strcpy(tex_file_name,*argv); strcpy(C_file_name,*argv); - if (flags['x']) { /* indexes will be generated */ + if (make_xrefs) { /* indexes will be generated */ *dot_pos=0; sprintf(idx_file_name,"%s.idx",*argv); sprintf(scn_file_name,"%s.scn",*argv); } } - found_out=1; + found_out=true; } -@ @= +@ @d flag_change (**argv!='-') +@= { - if (**argv=='-') flag_change=0; - else flag_change=1; for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++) - flags[*dot_pos]=flag_change; + flags[(eight_bits)*dot_pos]=flag_change; } @ @= @@ -1367,7 +1279,7 @@ else fatal( @** Output. Here is the code that opens the output file: @^system dependencies@> -@= +@= FILE *C_file; /* where output of \.{CTANGLE} goes */ FILE *tex_file; /* where output of \.{CWEAVE} goes */ FILE *idx_file; /* where index from \.{CWEAVE} goes */ @@ -1377,42 +1289,13 @@ FILE *active_file; /* currently active file for \.{CWEAVE} output */ @ @= scan_args(); if (program==ctangle) { - if ((C_file=fopen(C_file_name,"w"))==NULL) + if ((C_file=fopen(C_file_name,"wb"))==NULL) fatal("! Cannot open output file ", C_file_name); @.Cannot open output file@> } else { - if ((tex_file=fopen(tex_file_name,"w"))==NULL) + if ((tex_file=fopen(tex_file_name,"wb"))==NULL) fatal("! Cannot open output file ", tex_file_name); } -@ The |update_terminal| procedure is called when we want -to make sure that everything we have output to the terminal so far has -actually left the computer's internal buffers and been sent. -@^system dependencies@> - -@d update_terminal fflush(stdout) /* empty the terminal output buffer */ - -@ Terminal output uses |putchar| and |putc| when we have to -translate from \.{CWEB}'s code into the external character code, -and |printf| when we just want to print strings. -Several macros make other kinds of output convenient. -@^system dependencies@> -@d new_line putchar('\n') @d putxchar putchar -@d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout) -@d C_printf(c,a) fprintf(C_file,c,a) -@d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */ - -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ - @** Index. diff --git a/source/texk/web2c/cwebdir/ctang-bs.ch b/source/texk/web2c/cwebdir/ctang-bs.ch index c4062c406..55cc27cd0 100644 --- a/source/texk/web2c/cwebdir/ctang-bs.ch +++ b/source/texk/web2c/cwebdir/ctang-bs.ch @@ -17,64 +17,17 @@ by using "huge" pointers. The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 3.64)\n" +@d banner "This is CTANGLE (Version 4.2)" @y The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 3.64pc/big)\n" -@z - - -@x Section 4. -@ The following parameters were sufficient in the original \.{TANGLE} to -handle \TEX/, -so they should be sufficient for most applications of \.{CTANGLE}. -If you change |max_bytes|, |max_names| or |hash_size| you should also -change them in the file |"common.w"|. - -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names; used in |"common.w"| */ -@d max_toks 270000 /* number of bytes in compressed \CEE/ code */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240; used in |"common.w"| */ -@d max_texts 2500 /* number of replacement texts, must be less than 10240 */ -@d hash_size 353 /* should be prime; used in |"common.w"| */ -@d longest_name 10000 /* section names shouldn't be longer than this */ -@d stack_size 50 /* number of simultaneous levels of macro expansion */ -@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ -@y -@ The following parameters were sufficient in the original \.{TANGLE} to -handle \TEX/, -so they should be sufficient for most applications of \.{CTANGLE}. -If you change |max_bytes|, |max_names| or |hash_size| you should also -change them in the file |"common.w"|. - -(This is a modified version of \.{CTANGLE}, and in fact one of the parameters -has been reduced in value. The parameter |max_toks| -has been reduced from 270000 [which -was sufficient to handle \TEX/] to -170000, so that \.{CTANGLE} -may be run on {\mc MSDOS} -systems that are tight on memory. Consider, for -instance, an 80286-based machine with several TSRs and drivers, trying -to run \.{CTANGLE} from a makefile.) - -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names; used in |"common.w"| */ -@d max_toks 170000 /* number of bytes in compressed \CEE/ code */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240; used in |"common.w"| */ -@d max_texts 2500 /* number of replacement texts, must be less than 10240 */ -@d hash_size 353 /* should be prime; used in |"common.w"| */ -@d longest_name 10000 /* section names shouldn't be longer than this */ -@d stack_size 50 /* number of simultaneous levels of macro expansion */ -@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ +@d banner "This is CTANGLE (Version 4.2pc/big)" @z @x Section 9. -@d chunk_marker 0 + for section names */ @= typedef struct name_info { @@ -85,24 +38,21 @@ typedef struct name_info { names */ char Ilk; /* used by identifiers in \.{CWEAVE} only */ } dummy; - char *equiv_or_xref; /* info corresponding to names */ + void *equiv_or_xref; /* info corresponding to names */ } name_info; /* contains information about an identifier or section name */ typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */ 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 */ -extern name_pointer id_lookup(); /* looks up a string in the identifier table */ -extern name_pointer section_lookup(); /* finds section name */ -extern void print_section_name(), sprint_section_name(); @y -@d chunk_marker 0 + for section names */ @f huge extern @@ -131,9 +81,49 @@ extern char huge* 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 */ -extern name_pointer id_lookup(); /* looks up a string in the identifier table */ -extern name_pointer section_lookup(); /* finds section name */ -extern void print_section_name(), sprint_section_name(); +@z + + +@x Section 17. +@ The following parameters were sufficient in the original \.{WEB} to +handle \TEX/, so they should be sufficient for most applications of +\.{CWEB}. + +@d max_bytes 1000000 /* the number of bytes in identifiers, + index entries, and section names */ +@d max_toks 1000000 /* number of bytes in compressed \CEE/ code */ +@d max_names 10239 /* number of identifiers, strings, section names; + must be less than 10240 */ +@d max_sections 4000 /* greater than the total number of sections */ +@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 */ +@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 +\.{CWEB}. + +(This is a modified version of \.{CTANGLE}, and in fact one of the parameters +has been reduced in value. The parameter |max_toks| +has been reduced from 270000 [which +was sufficient to handle \TEX/] to +170000, so that \.{CTANGLE} +may be run on {\mc MSDOS} +systems that are tight on memory. Consider, for +instance, an 80286-based machine with several TSRs and drivers, trying +to run \.{CTANGLE} from a makefile.) + +@d max_bytes 90000 /* the number of bytes in identifiers, + index entries, and section names */ +@d max_toks 170000 /* number of bytes in compressed \CEE/ code */ +@d max_names 4000 /* number of identifiers, strings, section names; + must be less than 10240 */ +@d max_sections 4000 /* greater than the total number of sections */ +@d max_texts 2500 /* 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 50 /* number of simultaneous levels of macro expansion */ +@d buf_size 100 /* for \.{CWEAVE} */ @z @@ -151,13 +141,13 @@ typedef text *text_pointer; @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 @@ -190,8 +180,8 @@ text_ptr=text_info+1; text_ptr->tok_start=tok_mem; @x Section 49. -out_char(cur_char) -eight_bits cur_char; +out_char( +eight_bits cur_char) { char *j, *k; /* pointer into |byte_mem| */ @y diff --git a/source/texk/web2c/cwebdir/ctang-man.ch b/source/texk/web2c/cwebdir/ctang-man.ch index 12e9d3248..5b4d06c88 100644 --- a/source/texk/web2c/cwebdir/ctang-man.ch +++ b/source/texk/web2c/cwebdir/ctang-man.ch @@ -16,7 +16,7 @@ under the terms of a permission notice identical to this one. } @y \def\botofcontents{\vfill\titlefalse} -\def\contentspagenumber{63} +\def\contentspagenumber{66} \def\title{APPENDIX E: CTANGLE} \let\K=\leftarrow @z diff --git a/source/texk/web2c/cwebdir/ctang-pc.ch b/source/texk/web2c/cwebdir/ctang-pc.ch index 67f32fae0..ddf281b3f 100644 --- a/source/texk/web2c/cwebdir/ctang-pc.ch +++ b/source/texk/web2c/cwebdir/ctang-pc.ch @@ -9,16 +9,16 @@ that allows >64K arrays. If you need lots of bytes and toks, try the alternate change files with -bs suffix instead of -pc. @x section 1 -@d banner "This is CTANGLE (Version 3.64)\n" +@d banner "This is CTANGLE (Version 4.2)" @y -@d banner "This is CTANGLE (Version 3.64pc)\n" +@d banner "This is CTANGLE (Version 4.2pc)" @z @x section 4 -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names; used in |"common.w"| */ -@d max_toks 270000 /* number of bytes in compressed \CEE/ code */ +@d max_bytes 1000000 /* the number of bytes in identifiers, + index entries, and section names */ +@d max_toks 1000000 /* number of bytes in compressed \CEE/ code */ @y (note that CWEAVE itself needs only about 42K toks) @d max_bytes (unsigned)60000 /* the number of bytes in identifiers, - index entries, and section names; used in |"common.w"| */ + index entries, and section names */ @d max_toks (unsigned)60000 /* number of bytes in compressed \CEE/ code */ @z diff --git a/source/texk/web2c/cwebdir/ctang-ql.ch b/source/texk/web2c/cwebdir/ctang-ql.ch index a0920243a..64f0e81a7 100644 --- a/source/texk/web2c/cwebdir/ctang-ql.ch +++ b/source/texk/web2c/cwebdir/ctang-ql.ch @@ -7,15 +7,15 @@ ex cc;"-v -h -c -=500000 ctangle_c" @x -\def\title{CTANGLE (Version 3.64)} +\def\title{CTANGLE (Version 4.2)} @y -\def\title{CTANGLE (QL Version 3.64)} +\def\title{CTANGLE (QL Version 4.2)} @z @x section 1 -@d banner "This is CTANGLE (Version 3.64)\n" +@d banner "This is CTANGLE (Version 4.2)" @y -@d banner "This is CTANGLE (QL Version 3.64)\n" +@d banner "This is CTANGLE (QL Version 4.2)" @z @x diff --git a/source/texk/web2c/cwebdir/ctang-vms.ch b/source/texk/web2c/cwebdir/ctang-vms.ch index 7e538abc2..5686c66b9 100644 --- a/source/texk/web2c/cwebdir/ctang-vms.ch +++ b/source/texk/web2c/cwebdir/ctang-vms.ch @@ -10,26 +10,26 @@ created: (these changes not necessary for initial bootstrapping) @x section 1 (01-FEB-1992 ST) -@d banner "This is CTANGLE (Version 3.64)\n" +@d banner "This is CTANGLE (Version 4.2)" @y -@d banner "This is CTANGLE (VAX/VMS Version 3.64)\n" +@d banner "This is CTANGLE (VAX/VMS Version 4.2)" @z -@x section 6 (from common.h) (01-FEB-1992 ST) -#include +@x section 3 (01-FEB-1992 ST) +#include /* definition of |@!isalpha|, |@!isdigit| and so on */ +#include /* definition of |@!bool|, |@!true| and |@!false| */ +#include /* definition of |@!ptrdiff_t| */ +#include /* definition of |@!uint8_t| and |@!uint16_t| */ +#include /* definition of |@!getenv| and |@!exit| */ +#include /* definition of |@!printf| and friends */ +#include /* definition of |@!strlen|, |@!strcmp| and so on */ @y -#include stdio /* VMS searches Textlibraries faster */ -@z - -@x section 62 (01-FEB-1992 ST) -#include /* definition of |isalpha|, |isdigit| and so on */ -@y -#include ctype /* definition of |isalpha|, |isdigit| and so on */ +#include ctype /* definition of |@!isalpha|, |@!isdigit| and so on */ /* VMS searches text libraries faster */ -@z - -@x section 63 (01-FEB-1992 ST) -@d isxalpha(c) ((c)=='_') /* non-alpha character allowed in identifier */ -@y -@d isxalpha(c) ((c)=='_' || (c)=='$') /* non-alpha characters allowed in id */ +#include stdbool /* definition of |@!bool|, |@!true| and |@!false| */ +#include stddef /* definition of |@!ptrdiff_t| */ +#include stdint /* definition of |@!uint8_t| and |@!uint16_t| */ +#include stdlib /* definition of |@!getenv| and |@!exit| */ +#include stdio /* definition of |@!printf| and friends */ +#include string /* definition of |@!strlen|, |@!strcmp| and so on */ @z diff --git a/source/texk/web2c/cwebdir/ctang-w2c.ch b/source/texk/web2c/cwebdir/ctang-w2c.ch index 29a525aaf..4fcbe7b16 100644 --- a/source/texk/web2c/cwebdir/ctang-w2c.ch +++ b/source/texk/web2c/cwebdir/ctang-w2c.ch @@ -1,30 +1,31 @@ -@q Changes for CWEB in TeX Live from numerous contributors. @> -@q This file is in the Public Domain. @> +@q Changes for CWEB in TeX Live from numerous contributors. @> +@q This file is in the Public Domain. @> -@q Most of the original Kpathsea changes by Wlodek Bzyl and Olaf Weber @> -@q were merged with the set of change files of the CWEBbin project; @> -@q see https://github.com/ascherer/cwebbin for the original parts. @> +@q Most of the original Kpathsea changes by Wlodek Bzyl and Olaf Weber @> +@q were merged with the set of change files of the CWEBbin project; @> +@q see https://github.com/ascherer/cwebbin for the original parts. @> -@q This stripped change file {comm,ctang,cweav,ctwill}-w2c.ch has been @> -@q created from the set of change files {comm,ctang,cweav}-patch.ch, @> -@q {comm,ctang,cweav}-ansi.ch, {comm,ctang,cweav}-extensions.ch, @> -@q {comm,ctang,cweav}-output.ch, {comm,ctang,cweav}-i18n.ch, and @> -@q cweav-twill.ch for CTWILL, and {comm,ctang,cweav,ctwill}-texlive.ch @> -@q with the 'tie' processor and is used as a monolithic changefile for @> -@q {common,ctangle,cweave}.w in TeX Live. @> +@q This stripped change file {comm,ctang,cweav,ctwill,cwebman}-w2c.ch @> +@q has been created from the elaborate set of change files @> +@q {comm,ctang,cweav,cwebman}-patch.ch, @> +@q {comm,cweav,cwebman}-extensions.ch, {comm,ctang,cweav}-output.ch, @> +@q {comm,ctang,cweav}-i18n.ch, and cweav-twill.ch for CTWILL, and @> +@q {comm,ctang,cweav,ctwill,cwebman}-texlive.ch with the 'tie' processor @> +@q and is used as a monolithic changefile for {common,ctangle,cweave}.w @> +@q and cwebman.tex in TeX Live. @> -@q Please send comments, suggestions, etc. to tex-k@@tug.org. @> +@q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CTANGLE (Version 3.64)} +\def\title{CTANGLE (Version 4.2)} @y -\def\title{CTANGLE (Version 3.64 [\TeX~Live])} +\def\title{CTANGLE (Version 4.2 [\TeX~Live])} @z @x - \centerline{(Version 3.64)} + \centerline{(Version 4.2)} @y - \centerline{(Version 3.64 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -36,178 +37,34 @@ @x } @y -}} -\datecontentspage +}}\datecontentspage @z @x -@s not_eq normal @q unreserve a C++ keyword @> +@d banner "This is CTANGLE (Version 4.2)" @y -@z - -@x -@d banner "This is CTANGLE (Version 3.64)\n" -@y -@d banner "This is CTANGLE, Version 3.64" +@d banner "This is CTANGLE, Version 4.2" /* will be extended by the \TeX~Live |versionstring| */ @z @x -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ -@y -@ For string handling we include the {\mc ANSI C} system header file instead -of predeclaring the standard system functions |@!strlen|, |@!strcmp|, -|@!strcpy|, |@!strncmp|, and |@!strncpy|. -@^system dependencies@> - -@= -#include -@z - -@x -int main (ac, av) -int ac; -char **av; -@y -int main ( -int ac, -char **av) -@z - -@x - if (show_banner) printf(banner); /* print a ``banner line'' */ + if (show_banner) puts(banner); /* print a ``banner line'' */ @y if (show_banner) cb_show_banner(); /* print a ``banner line'' */ @z -@x -@d max_bytes 90000 /* the number of bytes in identifiers, -@y -@d max_bytes 1000000 /* the number of bytes in identifiers, -@z - -@x -@d max_toks 270000 /* number of bytes in compressed \CEE/ code */ -@d max_names 4000 /* number of identifiers, strings, section names; -@y -@d max_toks 1000000 /* number of bytes in compressed \CEE/ code */ -@d max_names 10239 /* number of identifiers, strings, section names; -@z - -@x -@d max_texts 2500 /* number of replacement texts, must be less than 10240 */ -@d hash_size 353 /* should be prime; used in |"common.w"| */ -@y -@d max_texts 10239 /* number of replacement texts, must be less than 10240 */ -@d hash_size 8501 /* should be prime; used in |"common.w"| */ -@z - -@x -@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ -@y -@d buf_size 1000 /* for \.{CWEAVE} and \.{CTANGLE} */ -@z - @x @i common.h @y @i comm-w2c.h @z -@x -the array |text_info|, and we use a |text_pointer| variable to refer -@y -the array |text_info|, and we use a \&{text\_pointer} variable to refer -@z - -@x -If your machine does not support |unsigned char| you should change -the definition of \&{eight\_bits} to |unsigned short|. -@^system dependencies@> -@y -@z - -@x -name_dir->equiv=(char *)text_info; /* the undefined section has no replacement text */ -@y -init_node(name_dir); /* the undefined section has no replacement text */ -@z - -@x -int names_match(p,first,l) -name_pointer p; /* points to the proposed match */ -char *first; /* position of first character of string */ -int l; /* length of identifier */ -{ -@y -boolean names_match(@t\1\1@> -name_pointer p, /* points to the proposed match */ -const char *first, /* position of first character of string */ -size_t l, /* length of identifier */ -eight_bits t@t\2\2@>) /* not used by \.{TANGLE} */ -{@+(void)t; -@z - -@x -void -init_node(node) -name_pointer node; -@y -void -init_node( -name_pointer node) -@z - -@x - node->equiv=(char *)text_info; -@y - node->equiv=(void *)text_info; -@z - -@x -void -init_p() {} -@y -void -init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+} -@z - -@x -void -store_two_bytes(x) -sixteen_bits x; -@y -static void -store_two_bytes( -sixteen_bits x) -@z - @x if (tok_ptr+2>tok_mem_end) overflow("token"); @y if (tok_ptr+2>tok_mem_end) overflow(_("token")); @z -@x -void -push_level(p) /* suspends the current level */ -name_pointer p; -@y -static void -push_level(@t\1\1@> /* suspends the current level */ -name_pointer p@t\2\2@>) -@z - @x if (stack_ptr==stack_end) overflow("stack"); @y @@ -215,43 +72,11 @@ name_pointer p@t\2\2@>) @z @x -void -pop_level(flag) /* do this when |cur_byte| reaches |cur_end| */ -int flag; /* |flag==0| means we are in |output_defs| */ -@y -static void -pop_level(@t\1\1@> /* do this when |cur_byte| reaches |cur_end| */ -int flag@t\2\2@>) /* |flag==0| means we are in |output_defs| */ -@z - -@x -void -get_output() /* sends next token to |out_char| */ -@y -static void -get_output(void) /* sends next token to |out_char| */ -@z - -@x - if ((a+name_dir)->equiv!=(char *)text_info) push_level(a+name_dir); -@y - if ((a+name_dir)->equiv!=(void *)text_info) push_level(a+name_dir); -@z - -@x - printf("\n! Not present: <"); + fputs("\n! Not present: <",stdout); @y fputs(_("\n! Not present: <"),stdout); @z -@x -void -flush_buffer() /* writes one line to output file */ -@y -static void -flush_buffer(void) /* writes one line to output file */ -@z - @x overflow("output files"); @y @@ -259,21 +84,7 @@ flush_buffer(void) /* writes one line to output file */ @z @x -void phase_two(); -@y -static void phase_two(void);@/ -@z - -@x -void -phase_two () { -@y -static void -phase_two (void) { -@z - -@x - printf("\n! No program text was specified."); mark_harmless; + fputs("\n! No program text was specified.",stdout); mark_harmless; @y fputs(_("\n! No program text was specified."),stdout); mark_harmless; @z @@ -285,18 +96,15 @@ phase_two (void) { @z @x - printf("\nWriting the output files:"); + fputs("\nWriting the output files:",stdout); @y fputs(_("\nWriting the output files:"),stdout); @z @x - if(show_happiness) printf("\nDone."); + fputs("Done.",stdout); @y - if (show_happiness) { - if (show_progress) new_line; fputs(_("Done."),stdout); - } @z @x @@ -305,10 +113,10 @@ for (an_output_file=end_output_files; an_output_file>cur_out_file;) { an_output_file--; sprint_section_name(output_file_name,*an_output_file); fclose(C_file); - C_file=fopen(output_file_name,"w"); - if (C_file ==0) fatal("! Cannot open output file:",output_file_name); + C_file=fopen(output_file_name,"wb"); + if (C_file ==0) fatal("! Cannot open output file ",output_file_name); @.Cannot open output file@> - printf("\n(%s)",output_file_name); update_terminal; + if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; } cur_line=1; stack_ptr=stack+1; cur_name= (*an_output_file); @@ -345,98 +153,12 @@ for (an_output_file=end_output_files; an_output_file>cur_out_file;) { strcpy(check_file_name,""); /* We want to get rid of the temporary file */ @z -@x -void output_defs(); -@y -static void output_defs(void);@/ -@z - -@x -void -output_defs() -@y -static void -output_defs(void) -@z - @x else if (a<050000) { confusion("macro defs have strange char");} @y else if (a<050000) { confusion(_("macro defs have strange char"));} @z -@x -static void out_char(); -@y -static void out_char(eight_bits);@/ -@z - -@x -static void -out_char(cur_char) -eight_bits cur_char; -@y -static void -out_char( -eight_bits cur_char) -@z - -@x -@ @= -case plus_plus: C_putc('+'); C_putc('+'); out_state=normal; break; -case minus_minus: C_putc('-'); C_putc('-'); out_state=normal; break; -case minus_gt: C_putc('-'); C_putc('>'); out_state=normal; break; -case gt_gt: C_putc('>'); C_putc('>'); out_state=normal; break; -case eq_eq: C_putc('='); C_putc('='); out_state=normal; break; -case lt_lt: C_putc('<'); C_putc('<'); out_state=normal; break; -case gt_eq: C_putc('>'); C_putc('='); out_state=normal; break; -case lt_eq: C_putc('<'); C_putc('='); out_state=normal; break; -case not_eq: C_putc('!'); C_putc('='); out_state=normal; break; -case and_and: C_putc('&'); C_putc('&'); out_state=normal; break; -case or_or: C_putc('|'); C_putc('|'); out_state=normal; break; -case dot_dot_dot: C_putc('.'); C_putc('.'); C_putc('.'); out_state=normal; - break; -case colon_colon: C_putc(':'); C_putc(':'); out_state=normal; break; -case period_ast: C_putc('.'); C_putc('*'); out_state=normal; break; -case minus_gt_ast: C_putc('-'); C_putc('>'); C_putc('*'); out_state=normal; - break; -@y -@ @= -case plus_plus: C_putc('+');@+C_putc('+'); out_state=normal; break; -case minus_minus: C_putc('-');@+C_putc('-'); out_state=normal; break; -case minus_gt: C_putc('-');@+C_putc('>'); out_state=normal; break; -case gt_gt: C_putc('>');@+C_putc('>'); out_state=normal; break; -case eq_eq: C_putc('=');@+C_putc('='); out_state=normal; break; -case lt_lt: C_putc('<');@+C_putc('<'); out_state=normal; break; -case gt_eq: C_putc('>');@+C_putc('='); out_state=normal; break; -case lt_eq: C_putc('<');@+C_putc('='); out_state=normal; break; -case non_eq: C_putc('!');@+C_putc('='); out_state=normal; break; -case and_and: C_putc('&');@+C_putc('&'); out_state=normal; break; -case or_or: C_putc('|');@+C_putc('|'); out_state=normal; break; -case dot_dot_dot: C_putc('.');@+C_putc('.');@+C_putc('.'); out_state=normal; - break; -case colon_colon: C_putc(':');@+C_putc(':'); out_state=normal; break; -case period_ast: C_putc('.');@+C_putc('*'); out_state=normal; break; -case minus_gt_ast: C_putc('-');@+C_putc('>');@+C_putc('*'); out_state=normal; - break; -@z - -@x -eight_bits -skip_ahead() /* skip to next control code */ -@y -static eight_bits -skip_ahead(void) /* skip to next control code */ -@z - -@x -int skip_comment(is_long_comment) /* skips over comments */ -boolean is_long_comment; -@y -static boolean skip_comment(@t\1\1@> /* skips over comments */ -boolean is_long_comment@t\2\2@>) -@z - @x err_print("! Input ended in mid-comment"); @y @@ -449,54 +171,6 @@ boolean is_long_comment@t\2\2@>) err_print(_("! Section name ended in mid-comment")); loc--; @z -@x -eight_bits -get_next() /* produces the next input token */ -@y -static eight_bits -get_next(void) /* produces the next input token */ -@z - -@x - else if (c=='\'' || c=='"' || (c=='L'&&(*loc=='\'' || *loc=='"'))) -@y - else if (c=='\'' || c=='"'@| - || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| - || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))) -@z - -@x - else if (*loc=='>') if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} - else compress(minus_gt); break; -@y - else { if (*loc=='>') { if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} - else compress(minus_gt); } } break; -@z - -@x - case '!': if (*loc=='=') compress(not_eq); break; -@y - case '!': if (*loc=='=') compress(non_eq); break; -@z - -@x - while (isalpha(*++loc) || isdigit(*loc) || isxalpha(*loc) || ishigh(*loc)); -@y - while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @| - || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); -@z - -@x - if (delim=='L') { /* wide character constant */ - delim=*loc++; *++id_loc=delim; - } -@y - if (delim=='L' || delim=='u' || delim=='U') { /* wide character constant */ - if (delim=='u' && *loc=='8') { *++id_loc=*loc++; } - delim=*loc++; *++id_loc=delim; - } -@z - @x err_print("! String didn't end"); loc=limit; break; @y @@ -510,7 +184,7 @@ get_next(void) /* produces the next input token */ @z @x - printf("\n! String too long: "); + fputs("\n! String too long: ",stdout); @y fputs(_("\n! String too long: "),stdout); @z @@ -546,7 +220,7 @@ get_next(void) /* produces the next input token */ @z @x - printf("\n! Section name too long: "); + fputs("\n! Section name too long: ",stdout); @y fputs(_("\n! Section name too long: "),stdout); @z @@ -575,30 +249,12 @@ get_next(void) /* produces the next input token */ @d app_repl(c) {if (tok_ptr==tok_mem_end) overflow(_("token")); *tok_ptr++=c;} @z -@x -void -scan_repl(t) /* creates a replacement text */ -eight_bits t; -@y -static void -scan_repl(@t\1\1@> /* creates a replacement text */ -eight_bits t@t\2\2@>) -@z - @x if (text_ptr>text_info_end) overflow("text"); @y if (text_ptr>text_info_end) overflow(_("text")); @z -@x -{int a=id_lookup(id_first,id_loc,0)-name_dir; app_repl((a / 0400)+0200); - app_repl(a % 0400);} -@y -{int a_l=id_lookup(id_first,id_loc,0)-name_dir; app_repl((a_l / 0400)+0200); - app_repl(a_l % 0400);} -@z - @x case output_defs_code: if (t!=section_name) err_print("! Misplaced @@h"); @y @@ -623,72 +279,18 @@ case output_defs_code: if (t!=section_name) err_print(_("! Misplaced @@h")); else err_print(_("! Double @@ should be used in string")); @z -@x - c=toupper(*id_first)-'A'+10; -@y - c=toupper((eight_bits)*id_first)-'A'+10; -@z - -@x - c=16*c+toupper(*id_first)-'A'+10; -@y - c=16*c+toupper((eight_bits)*id_first)-'A'+10; -@z - @x default: err_print("! Unrecognized escape sequence"); @y default: err_print(_("! Unrecognized escape sequence")); @z -@x -void -scan_section() -@y -static void -scan_section(void) -@z - @x err_print("! Definition flushed, must start with identifier"); @y err_print(_("! Definition flushed, must start with identifier")); @z -@x -else if (p->equiv==(char *)text_info) p->equiv=(char *)cur_text; -@y -else if (p->equiv==(void *)text_info) p->equiv=(void *)cur_text; -@z - -@x -void phase_one(); -@y -static void phase_one(void);@/ -@z - -@x -void -phase_one() { -@y -static void -phase_one(void) { -@z - -@x -void skip_limbo(); -@y -static void skip_limbo(void);@/ -@z - -@x -void -skip_limbo() -@y -static void -skip_limbo(void) -@z - @x err_print("! Double @@ should be used in control text"); @y @@ -714,66 +316,34 @@ skip_limbo(void) @z @x - strncpy(translit[i-0200],beg,loc-beg); -@y - strncpy(translit[i-0200],beg,(size_t)(loc-beg)); -@z - -@x -void -print_stats() { -@y -void -print_stats(void) { -@z - -@x - printf("\nMemory usage statistics:\n"); + puts("\nMemory usage statistics:"); printf("%ld names (out of %ld)\n", - (long)(name_ptr-name_dir),(long)max_names); + (ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf("%ld replacement texts (out of %ld)\n", - (long)(text_ptr-text_info),(long)max_texts); + (ptrdiff_t)(text_ptr-text_info),(long)max_texts); printf("%ld bytes (out of %ld)\n", - (long)(byte_ptr-byte_mem),(long)max_bytes); + (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); printf("%ld tokens (out of %ld)\n", @y puts(_("\nMemory usage statistics:")); printf(_("%ld names (out of %ld)\n"), - (long)(name_ptr-name_dir),(long)max_names); + (ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf(_("%ld replacement texts (out of %ld)\n"), - (long)(text_ptr-text_info),(long)max_texts); + (ptrdiff_t)(text_ptr-text_info),(long)max_texts); printf(_("%ld bytes (out of %ld)\n"), - (long)(byte_ptr-byte_mem),(long)max_bytes); + (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); printf(_("%ld tokens (out of %ld)\n"), @z @x @** Index. @y -@** Extensions for modern \.{CWEB}. The following sections introduce changes -and extensions to the code that have been created by numerous contributors over -the course of a quarter century. They make \.{CWEB} adhere to modern coding -standards and introduce new or improved features. +@** Extensions to \.{CWEB}. The following sections introduce new or improved +features that have been created by numerous contributors over the course of a +quarter century. Care has been taken to keep the original section numbering intact, so this new -section should have the same number as the original ``\&{96.~Index},'' and -additional material follows below. - -@* Function declarations. Here are declarations---conforming to -{\mc ANSI~C}---of all functions in this code, as far as they are -not already in |"common.h"|. These are private to \.{CTANGLE}. - -@= -static eight_bits get_next(void);@/ -static eight_bits skip_ahead(void);@/ -static boolean skip_comment(boolean);@/ -static void flush_buffer(void);@/ -static void get_output(void);@/ -static void pop_level(int);@/ -static void push_level(name_pointer);@/ -static void scan_repl(eight_bits);@/ -static void scan_section(void);@/ -static void store_two_bytes(sixteen_bits);@/ +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 diff --git a/source/texk/web2c/cwebdir/ctang-w32.ch b/source/texk/web2c/cwebdir/ctang-w32.ch index 523985ce3..1c687e5eb 100644 --- a/source/texk/web2c/cwebdir/ctang-w32.ch +++ b/source/texk/web2c/cwebdir/ctang-w32.ch @@ -4,63 +4,41 @@ This is the change file for CWEB's CTANGLE under Win32 Changes necessary for compiling with Borland C/C++ @x section 1 -@d banner "This is CTANGLE (Version 3.64)\n" +@d banner "This is CTANGLE (Version 4.2)" @y -@d banner "This is CTANGLE (Version 3.64win32)\n" +@d banner "This is CTANGLE (Version 4.2win32)" @z @x -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ -@y -@z - -@x -int names_match(p,first,l) -name_pointer p; /* points to the proposed match */ -char *first; /* position of first character of string */ +boolean names_match(@t\1\1@> +name_pointer p, /* points to the proposed match */ +const char *first, /* position of first character of string */ +size_t l, /* length of identifier */ +eight_bits t@t\2\2@>) /* not used by \.{TANGLE} */ @y -int __cdecl names_match(p,first,l) -name_pointer p; /* points to the proposed match */ -char *first; /* position of first character of string */ +boolean __cdecl names_match(@t\1\1@> +name_pointer p, /* points to the proposed match */ +const char *first, /* position of first character of string */ +size_t l, /* length of identifier */ +eight_bits t@t\2\2@>) /* not used by \.{TANGLE} */ @z @x void -init_node(node) -name_pointer node; +init_node( +name_pointer node) { - node->equiv=(char *)text_info; + node->equiv=(void *)text_info; } void -init_p() {} +init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+} @y void -init_node(node) -name_pointer node; +init_node( +name_pointer node) { - node->equiv=(char *)text_info; + node->equiv=(void *)text_info; } void __cdecl -init_p() {} -@z - -@x -@ @= -#include /* definition of |isalpha|, |isdigit| and so on */ -#include /* definition of |exit| */ -@y -@ @= -#include /* definition of |isalpha|, |isdigit| and so on */ -#include /* definition of |exit| */ -#include +init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+} @z diff --git a/source/texk/web2c/cwebdir/ctangle.c b/source/texk/web2c/cwebdir/ctangle.c index b7a1b553c..d955da9d5 100644 --- a/source/texk/web2c/cwebdir/ctangle.c +++ b/source/texk/web2c/cwebdir/ctangle.c @@ -1,35 +1,24 @@ /*1:*/ -#line 64 "ctangle.w" - -/*6:*/ -#line 35 "common.h" - -#include +#line 66 "ctangle.w" -/*:6*//*62:*/ -#line 888 "ctangle.w" +/*4:*/ +#line 46 "common.h" #include +#include +#include +#include #include +#include +#include -/*:62*/ -#line 65 "ctangle.w" - -#define banner "This is CTANGLE (Version 3.64)\n" \ - -#define max_bytes 90000 \ - -#define max_toks 270000 -#define max_names 4000 \ +/*:4*/ +#line 67 "ctangle.w" -#define max_texts 2500 -#define hash_size 353 -#define longest_name 10000 -#define stack_size 50 -#define buf_size 100 \ +#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 @@ -37,7 +26,7 @@ #define plus_plus 013 #define minus_minus 01 #define minus_gt 031 -#define not_eq 032 +#define non_eq 032 #define lt_eq 034 #define gt_eq 035 #define eq_eq 036 @@ -47,20 +36,28 @@ #define period_ast 026 #define minus_gt_ast 027 \ -#define xisalpha(c) (isalpha(c) &&((eight_bits) c<0200) ) -#define xisdigit(c) (isdigit(c) &&((eight_bits) c<0200) ) -#define xisspace(c) (isspace(c) &&((eight_bits) c<0200) ) -#define xislower(c) (islower(c) &&((eight_bits) c<0200) ) -#define xisupper(c) (isupper(c) &&((eight_bits) c<0200) ) -#define xisxdigit(c) (isxdigit(c) &&((eight_bits) c<0200) ) \ +#define xisalpha(c) (isalpha((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisdigit(c) (isdigit((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisspace(c) (isspace((eight_bits) c) &&((eight_bits) c<0200) ) +#define xislower(c) (islower((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisupper(c) (isupper((eight_bits) c) &&((eight_bits) c<0200) ) +#define xisxdigit(c) (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \ -#define length(c) (c+1) ->byte_start-(c) ->byte_start +#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 @@ -69,16 +66,13 @@ #define mark_harmless {if(history==spotless) history= harmless_message;} #define mark_error history= error_message #define confusion(s) fatal("! This can't happen: ",s) \ - -#define max_file_name_length 60 -#define cur_file file[include_depth] -#define cur_file_name file_name[include_depth] -#define web_file_name file_name[0] -#define cur_line line[include_depth] \ + \ #define show_banner flags['b'] #define show_progress flags['p'] -#define show_happiness flags['h'] \ +#define show_stats flags['s'] +#define show_happiness flags['h'] +#define make_xrefs flags['x'] \ #define update_terminal fflush(stdout) #define new_line putchar('\n') @@ -87,6 +81,18 @@ #define C_printf(c,a) fprintf(C_file,c,a) #define C_putc(c) putc(c,C_file) \ +#define max_bytes 1000000 \ + +#define max_toks 1000000 +#define max_names 10239 \ + +#define max_sections 4000 +#define max_texts 10239 +#define longest_name 10000 +#define stack_size 500 +#define buf_size 1000 +#define long_buf_size (buf_size+longest_name) \ + #define equiv equiv_or_xref \ #define section_flag max_texts \ @@ -128,43 +134,68 @@ #define isxalpha(c) ((c) =='_'||(c) =='$') \ -#define ishigh(c) ((unsigned char) (c) > 0177) \ +#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;} \ -#line 66 "ctangle.w" +#line 68 "ctangle.w" -/*5:*/ -#line 29 "common.h" +/*3:*/ +#line 37 "common.h" -typedef short boolean; -typedef char unsigned eight_bits; +typedef bool boolean; +typedef uint8_t eight_bits; +typedef uint16_t sixteen_bits; extern boolean program; extern int phase; -/*:5*//*7:*/ -#line 57 "common.h" +/*:3*//*5:*/ +#line 74 "common.h" -char section_text[longest_name+1]; -char*section_text_end= section_text+longest_name; -char*id_first; -char*id_loc; +extern char section_text[]; +extern char*section_text_end; +extern char*id_first; +extern char*id_loc; -/*:7*//*8:*/ -#line 72 "common.h" +/*:5*//*6:*/ +#line 88 "common.h" extern char buffer[]; extern char*buffer_end; extern char*loc; extern char*limit; -/*:8*//*9:*/ -#line 87 "common.h" +/*:6*//*7:*/ +#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; @@ -174,73 +205,38 @@ struct name_info*Rlink; char Ilk; }dummy; -char*equiv_or_xref; +void*equiv_or_xref; }name_info; typedef name_info*name_pointer; typedef name_pointer*hash_pointer; extern char byte_mem[]; extern char*byte_mem_end; +extern char*byte_ptr; extern name_info name_dir[]; extern name_pointer name_dir_end; extern name_pointer name_ptr; -extern char*byte_ptr; extern name_pointer hash[]; extern hash_pointer hash_end; extern hash_pointer h; -extern name_pointer id_lookup(); -extern name_pointer section_lookup(); -extern void print_section_name(),sprint_section_name(); -/*:9*//*10:*/ -#line 122 "common.h" +/*:10*//*12:*/ +#line 183 "common.h" -extern history; -extern err_print(); -extern wrap_up(); -extern void fatal(); -extern void overflow(); +extern int history; -/*:10*//*11:*/ -#line 137 "common.h" +/*:12*//*14:*/ +#line 199 "common.h" -extern 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 line[]; -extern change_line; -extern change_depth; -extern boolean input_has_ended; -extern boolean changing; -extern boolean web_file_open; -extern reset_input(); -extern get_line(); -extern check_complete(); - -/*:11*//*12:*/ -#line 159 "common.h" - -typedef unsigned short sixteen_bits; -extern sixteen_bits section_count; -extern boolean changed_section[]; -extern boolean change_pending; -extern boolean print_where; - -/*:12*//*13:*/ -#line 171 "common.h" - -extern int argc; -extern char**argv; extern boolean flags[]; -/*:13*//*14:*/ -#line 183 "common.h" +/*:14*//*15:*/ +#line 215 "common.h" extern FILE*C_file; extern FILE*tex_file; @@ -248,17 +244,11 @@ extern FILE*idx_file; extern FILE*scn_file; extern FILE*active_file; -/*:14*//*15:*/ -#line 192 "common.h" - -extern void common_init(); -#line 128 "ctangle.w" - /*:15*/ -#line 67 "ctangle.w" +#line 69 "ctangle.w" -/*16:*/ -#line 152 "ctangle.w" +/*19:*/ +#line 122 "ctangle.w" typedef struct{ eight_bits*tok_start; @@ -266,8 +256,8 @@ sixteen_bits text_link; }text; typedef text*text_pointer; -/*:16*//*27:*/ -#line 296 "ctangle.w" +/*:19*//*31:*/ +#line 269 "ctangle.w" typedef struct{ eight_bits*end_field; @@ -278,170 +268,219 @@ sixteen_bits section_field; }output_state; typedef output_state*stack_pointer; -/*:27*/ -#line 68 "ctangle.w" +/*:31*/ +#line 70 "ctangle.w" -/*17:*/ -#line 159 "ctangle.w" +/*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; -/*:17*//*23:*/ -#line 227 "ctangle.w" +/*:20*//*26:*/ +#line 198 "ctangle.w" -text_pointer last_unnamed; +static text_pointer last_unnamed; -/*:23*//*28:*/ -#line 312 "ctangle.w" +/*:26*//*32:*/ +#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; -/*:28*//*32:*/ -#line 384 "ctangle.w" +/*:32*//*37:*/ +#line 361 "ctangle.w" -int cur_val; +static int cur_val; -/*:32*//*36:*/ -#line 473 "ctangle.w" +/*:37*//*42:*/ +#line 452 "ctangle.w" -eight_bits out_state; -boolean protect; +static eight_bits out_state; +static boolean protect; -/*:36*//*38:*/ -#line 502 "ctangle.w" +/*:42*//*45:*/ +#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]; +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]; -/*:38*//*45:*/ -#line 599 "ctangle.w" +/*:45*//*52:*/ +#line 582 "ctangle.w" -boolean output_defs_seen= 0; +static boolean output_defs_seen= false; -/*:45*//*51:*/ -#line 710 "ctangle.w" +/*:52*//*57:*/ +#line 691 "ctangle.w" -char translit[128][translit_length]; +static char translit[128][translit_length]; -/*:51*//*56:*/ -#line 789 "ctangle.w" +/*:57*//*62:*/ +#line 770 "ctangle.w" -eight_bits ccode[256]; +static eight_bits ccode[256]; -/*:56*//*59:*/ -#line 845 "ctangle.w" +/*:62*//*66:*/ +#line 830 "ctangle.w" -boolean comment_continues= 0; +static boolean comment_continues= false; -/*:59*//*61:*/ -#line 884 "ctangle.w" +/*:66*//*68:*/ +#line 869 "ctangle.w" -name_pointer cur_section_name; -int no_where; +static name_pointer cur_section_name; +static boolean no_where; -/*:61*//*75:*/ -#line 1195 "ctangle.w" +/*:68*//*82:*/ +#line 1182 "ctangle.w" -text_pointer cur_text; -eight_bits next_control; +static text_pointer cur_text; +static eight_bits next_control; -/*:75*//*82:*/ -#line 1353 "ctangle.w" +/*:82*/ +#line 71 "ctangle.w" -extern sixteen_bits section_count; +/*8:*/ +#line 119 "common.h" -/*:82*/ -#line 69 "ctangle.w" +extern boolean get_line(void); +extern void check_complete(void); +extern void reset_input(void); -/*2:*/ -#line 77 "ctangle.w" +/*:8*//*11:*/ +#line 162 "common.h" -extern int strlen(); -extern int strcmp(); -extern char*strcpy(); -extern int strncmp(); -extern char*strncpy(); +extern boolean names_match(name_pointer,const char*,size_t,eight_bits); +extern name_pointer id_lookup(const char*,const char*,char); -/*:2*//*41:*/ -#line 533 "ctangle.w" +extern name_pointer section_lookup(char*,char*,int); +extern void init_node(name_pointer); +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); -void phase_two(); +/*:11*//*13:*/ +#line 186 "common.h" -/*:41*//*46:*/ -#line 602 "ctangle.w" +extern int wrap_up(void); +extern void err_print(const char*); +extern void fatal(const char*,const char*); +extern void overflow(const char*); -void output_defs(); +/*:13*//*16:*/ +#line 223 "common.h" -/*:46*//*48:*/ -#line 648 "ctangle.w" +extern void common_init(void); +extern void print_stats(void); -static void out_char(); +/*:16*//*30:*/ +#line 241 "ctangle.w" +static void store_two_bytes(sixteen_bits); -/*:48*//*90:*/ -#line 1460 "ctangle.w" +/*:30*//*35:*/ +#line 324 "ctangle.w" -void phase_one(); +static void push_level(name_pointer); +static void pop_level(boolean); -/*:90*//*92:*/ -#line 1478 "ctangle.w" +/*:35*//*39:*/ +#line 397 "ctangle.w" +static void get_output(void); -void skip_limbo(); +/*:39*//*44:*/ +#line 473 "ctangle.w" +static void flush_buffer(void); -/*:92*/ -#line 70 "ctangle.w" +/*:44*//*49:*/ +#line 549 "ctangle.w" +static void phase_two(void); + +/*:49*//*53:*/ +#line 585 "ctangle.w" + +static void output_defs(void); +static void out_char(eight_bits); + +/*:53*//*65:*/ +#line 810 "ctangle.w" +static eight_bits skip_ahead(void); +static boolean skip_comment(boolean); -/*:1*//*3:*/ -#line 91 "ctangle.w" +/*:65*//*70:*/ +#line 924 "ctangle.w" +static eight_bits get_next(void); + +/*:70*//*84:*/ +#line 1208 "ctangle.w" +static void scan_repl(eight_bits); + +/*:84*//*91:*/ +#line 1379 "ctangle.w" +static void scan_section(void); + +/*:91*//*99:*/ +#line 1460 "ctangle.w" +static void phase_one(void); + +/*:99*//*101:*/ +#line 1494 "ctangle.w" +static void skip_limbo(void); + +/*:101*/ +#line 72 "ctangle.w" -int main(ac,av) -int ac; -char**av; + +/*:1*//*2:*/ +#line 81 "ctangle.w" + +int main( +int ac, +char**av) { argc= ac;argv= av; program= ctangle; -/*18:*/ -#line 167 "ctangle.w" +/*21:*/ +#line 137 "ctangle.w" text_info->tok_start= tok_ptr= tok_mem; text_ptr= text_info+1;text_ptr->tok_start= tok_mem; -/*:18*//*20:*/ -#line 177 "ctangle.w" +/*:21*//*23:*/ +#line 147 "ctangle.w" -name_dir->equiv= (char*)text_info; +init_node(name_dir); -/*:20*//*24:*/ -#line 230 "ctangle.w" +/*:23*//*27:*/ +#line 201 "ctangle.w" last_unnamed= text_info;text_info->text_link= 0; -/*:24*//*39:*/ -#line 512 "ctangle.w" +/*:27*//*46:*/ +#line 493 "ctangle.w" cur_out_file= end_output_files= output_files+max_files; -/*:39*//*52:*/ -#line 713 "ctangle.w" +/*:46*//*58:*/ +#line 694 "ctangle.w" { int i; -for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i)); +for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i)); } -/*:52*//*57:*/ -#line 792 "ctangle.w" +/*:58*//*63:*/ +#line 773 "ctangle.w" { int c; for(c= 0;c<256;c++)ccode[c]= ignore; @@ -460,62 +499,63 @@ ccode['<']= ccode['(']= section_name; ccode['\'']= ord; } -/*:57*//*71:*/ -#line 1116 "ctangle.w" +/*:63*//*78:*/ +#line 1103 "ctangle.w" section_text[0]= ' '; -/*:71*/ -#line 98 "ctangle.w" -; +/*:78*/ +#line 88 "ctangle.w" + common_init(); -if(show_banner)printf(banner); +if(show_banner)puts(banner); phase_one(); phase_two(); return wrap_up(); } -/*:3*//*21:*/ -#line 183 "ctangle.w" +/*:2*//*24:*/ +#line 153 "ctangle.w" -int names_match(p,first,l) -name_pointer p; -char*first; -int l; -{ -if(length(p)!=l)return 0; +boolean names_match( +name_pointer p, +const char*first, +size_t l, +eight_bits t) +{(void)t; +if(length(p)!=l)return false; return!strncmp(first,p->byte_start,l); } -/*:21*//*22:*/ -#line 198 "ctangle.w" +/*:24*//*25:*/ +#line 169 "ctangle.w" void -init_node(node) -name_pointer node; +init_node( +name_pointer node) { -node->equiv= (char*)text_info; +node->equiv= (void*)text_info; } void -init_p(){} +init_p(name_pointer p,eight_bits t){(void)p;(void)t;} -/*:22*//*26:*/ -#line 260 "ctangle.w" +/*:25*//*29:*/ +#line 231 "ctangle.w" -void -store_two_bytes(x) -sixteen_bits x; +static void +store_two_bytes( +sixteen_bits x) { if(tok_ptr+2> tok_mem_end)overflow("token"); *tok_ptr++= x>>8; *tok_ptr++= x&0377; } -/*:26*//*30:*/ -#line 336 "ctangle.w" +/*:29*//*34:*/ +#line 309 "ctangle.w" -void -push_level(p) -name_pointer p; +static void +push_level( +name_pointer p) { if(stack_ptr==stack_end)overflow("stack"); *stack_ptr= cur_state; @@ -527,12 +567,12 @@ cur_section= 0; } } -/*:30*//*31:*/ -#line 355 "ctangle.w" +/*:34*//*36:*/ +#line 332 "ctangle.w" -void -pop_level(flag) -int flag; +static void +pop_level( +boolean flag) { if(flag&&cur_repl->text_linktext_link+text_info; @@ -543,17 +583,17 @@ stack_ptr--; if(stack_ptr> stack)cur_state= *stack_ptr; } -/*:31*//*33:*/ -#line 391 "ctangle.w" +/*:36*//*38:*/ +#line 368 "ctangle.w" -void -get_output() +static void +get_output(void) { sixteen_bits a; 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; } @@ -566,23 +606,23 @@ a= (a-0200)*0400+*cur_byte++; switch(a/024000){ case 0:cur_val= a;out_char(identifier);break; case 1:if(a==output_defs_flag)output_defs(); -else/*34:*/ -#line 423 "ctangle.w" +else/*40:*/ +#line 402 "ctangle.w" { a-= 024000; -if((a+name_dir)->equiv!=(char*)text_info)push_level(a+name_dir); +if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir); else if(a!=0){ -printf("\n! Not present: <"); +fputs("\n! Not present: <",stdout); print_section_name(a+name_dir);err_print(">"); } goto restart; } -/*:34*/ -#line 412 "ctangle.w" -; +/*:40*/ +#line 389 "ctangle.w" + break; default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; out_char(section_number); @@ -590,11 +630,11 @@ out_char(section_number); } } -/*:33*//*37:*/ -#line 481 "ctangle.w" +/*:38*//*43:*/ +#line 460 "ctangle.w" -void -flush_buffer() +static void +flush_buffer(void) { C_putc('\n'); if(cur_line%100==0&&show_progress){ @@ -605,33 +645,33 @@ update_terminal; cur_line++; } -/*:37*//*42:*/ -#line 536 "ctangle.w" +/*:43*//*48:*/ +#line 514 "ctangle.w" -void -phase_two(){ -web_file_open= 0; +static void +phase_two(void){ +web_file_open= false; cur_line= 1; -/*29:*/ -#line 325 "ctangle.w" +/*33:*/ +#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; -/*:29*/ -#line 541 "ctangle.w" -; -/*44:*/ -#line 595 "ctangle.w" +/*:33*/ +#line 519 "ctangle.w" + +/*51:*/ +#line 578 "ctangle.w" if(!output_defs_seen) output_defs(); -/*:44*/ -#line 542 "ctangle.w" -; +/*:51*/ +#line 520 "ctangle.w" + if(text_info->text_link==0&&cur_out_file==end_output_files){ -printf("\n! No program text was specified.");mark_harmless; +fputs("\n! No program text was specified.",stdout);mark_harmless; } else{ @@ -641,7 +681,7 @@ printf("\nWriting the output file (%s):",C_file_name); } else{ if(show_progress){ -printf("\nWriting the output files:"); +fputs("\nWriting the output files:",stdout); printf(" (%s)",C_file_name); update_terminal; @@ -650,17 +690,17 @@ if(text_info->text_link==0)goto writeloop; } while(stack_ptr> stack)get_output(); flush_buffer(); -writeloop:/*43:*/ -#line 572 "ctangle.w" +writeloop:/*50:*/ +#line 555 "ctangle.w" for(an_output_file= end_output_files;an_output_file> cur_out_file;){ an_output_file--; sprint_section_name(output_file_name,*an_output_file); fclose(C_file); -C_file= fopen(output_file_name,"w"); -if(C_file==0)fatal("! Cannot open output file:",output_file_name); +C_file= fopen(output_file_name,"wb"); +if(C_file==0)fatal("! Cannot open output file ",output_file_name); -printf("\n(%s)",output_file_name);update_terminal; +if(show_progress){printf("\n(%s)",output_file_name);update_terminal;} cur_line= 1; stack_ptr= stack+1; cur_name= (*an_output_file); @@ -671,18 +711,21 @@ while(stack_ptr> stack)get_output(); flush_buffer(); } -/*:43*/ -#line 563 "ctangle.w" -; -if(show_happiness)printf("\nDone."); +/*:50*/ +#line 541 "ctangle.w" + +if(show_happiness){ +if(show_progress)new_line; +fputs("Done.",stdout); +} } } -/*:42*//*47:*/ -#line 605 "ctangle.w" +/*:48*//*54:*/ +#line 589 "ctangle.w" -void -output_defs() +static void +output_defs(void) { sixteen_bits a; push_level(NULL); @@ -692,7 +735,7 @@ cur_byte= cur_text->tok_start; cur_end= (cur_text+1)->tok_start; C_printf("%s","#define "); out_state= normal; -protect= 1; +protect= true; while(cur_bytebyte_start; k= (cur_val+name_dir+1)->byte_start; while(j 0)C_printf("/*%d:*/",cur_val); @@ -776,11 +819,11 @@ C_printf("%s","\"\n"); } break; -/*:54*/ -#line 663 "ctangle.w" -; -/*50:*/ -#line 681 "ctangle.w" +/*:60*/ +#line 644 "ctangle.w" + +/*56:*/ +#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; @@ -790,7 +833,7 @@ case eq_eq:C_putc('=');C_putc('=');out_state= normal;break; case lt_lt:C_putc('<');C_putc('<');out_state= normal;break; case gt_eq:C_putc('>');C_putc('=');out_state= normal;break; case lt_eq:C_putc('<');C_putc('=');out_state= normal;break; -case not_eq:C_putc('!');C_putc('=');out_state= normal;break; +case non_eq:C_putc('!');C_putc('=');out_state= normal;break; case and_and:C_putc('&');C_putc('&');out_state= normal;break; case or_or:C_putc('|');C_putc('|');out_state= normal;break; case dot_dot_dot:C_putc('.');C_putc('.');C_putc('.');out_state= normal; @@ -800,9 +843,9 @@ case period_ast:C_putc('.');C_putc('*');out_state= normal;break; case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal; break; -/*:50*/ -#line 664 "ctangle.w" -; +/*:56*/ +#line 645 "ctangle.w" + case'=':case'>':C_putc(cur_char);C_putc(' '); out_state= normal;break; case join:out_state= unbreakable;break; @@ -819,74 +862,74 @@ default:C_putc(cur_char);out_state= normal;break; } } -/*:49*//*58:*/ -#line 813 "ctangle.w" +/*:55*//*64:*/ +#line 794 "ctangle.w" -eight_bits -skip_ahead() +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; } } } -/*:58*//*60:*/ -#line 848 "ctangle.w" +/*:64*//*67:*/ +#line 833 "ctangle.w" -int skip_comment(is_long_comment) -boolean is_long_comment; +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++; } } } -/*:60*//*63:*/ -#line 900 "ctangle.w" +/*:67*//*69:*/ +#line 881 "ctangle.w" -eight_bits -get_next() +static eight_bits +get_next(void) { 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; -/*77:*/ -#line 1225 "ctangle.w" +print_where= false; +/*85:*/ +#line 1214 "ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -897,25 +940,25 @@ id_first= cur_file_name; store_two_bytes((sixteen_bits)cur_line); } id_loc= id_first+strlen(id_first); -{int a= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a/0400)+0200); -app_repl(a%0400);} +{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200); +app_repl(a_l%0400);} + +/*:85*/ +#line 893 "ctangle.w" -/*:77*/ -#line 912 "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=='.')/*66:*/ -#line 978 "ctangle.w" +if(xisdigit(c)||c=='.')/*73:*/ +#line 964 "ctangle.w" { id_first= loc-1; if(*id_first=='.'&&!xisdigit(*loc))goto mistake; @@ -936,29 +979,32 @@ while(xisdigit(*loc))loc++; found:while(*loc=='u'||*loc=='U'||*loc=='l'||*loc=='L' ||*loc=='f'||*loc=='F')loc++; id_loc= loc; -return(constant); +return constant; } -/*:66*/ -#line 924 "ctangle.w" +/*:73*/ +#line 905 "ctangle.w" -else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"'))) -/*67:*/ -#line 1006 "ctangle.w" +else if(c=='\''||c=='"' +||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"')) +||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"'))) +/*74:*/ +#line 992 "ctangle.w" { char delim= c; id_first= section_text+1; id_loc= section_text;*++id_loc= delim; -if(delim=='L'){ +if(delim=='L'||delim=='u'||delim=='U'){ +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; } @@ -977,32 +1023,33 @@ c= *loc++; if(++id_loc<=section_text_end)*id_loc= c; } if(id_loc>=section_text_end){ -printf("\n! String too long: "); +fputs("\n! String too long: ",stdout); term_write(section_text+1,25); err_print("..."); } id_loc++; -return(string); +return string; } -/*:67*/ -#line 926 "ctangle.w" +/*:74*/ +#line 909 "ctangle.w" else if(isalpha(c)||isxalpha(c)||ishigh(c)) -/*65:*/ -#line 972 "ctangle.w" +/*72:*/ +#line 957 "ctangle.w" { id_first= --loc; -while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc)); -id_loc= loc;return(identifier); +while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc) +||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc)); +id_loc= loc;return identifier; } -/*:65*/ -#line 928 "ctangle.w" +/*:72*/ +#line 911 "ctangle.w" -else if(c=='@')/*68:*/ -#line 1050 "ctangle.w" +else if(c=='@')/*75:*/ +#line 1037 "ctangle.w" { c= ccode[(eight_bits)*loc++]; switch(c){ @@ -1017,23 +1064,23 @@ err_print("! Double @ should be used in control text"); continue; case section_name: cur_section_name_char= *(loc-1); -/*70:*/ -#line 1098 "ctangle.w" +/*77:*/ +#line 1085 "ctangle.w" { char*k; -/*72:*/ -#line 1118 "ctangle.w" +/*79:*/ +#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; } c= *loc; -/*73:*/ -#line 1142 "ctangle.w" +/*80:*/ +#line 1129 "ctangle.w" if(c=='@'){ c= *(loc+1); @@ -1051,9 +1098,9 @@ err_print("! Nesting of section names not allowed");break; *(++k)= '@';loc++; } -/*:73*/ -#line 1127 "ctangle.w" -; +/*:80*/ +#line 1114 "ctangle.w" + loc++;if(k=section_text_end){ -printf("\n! Section name too long: "); +fputs("\n! Section name too long: ",stdout); term_write(section_text+1,25); printf("...");mark_harmless; } if(*k==' '&&k> section_text)k--; -/*:72*/ -#line 1100 "ctangle.w" -; +/*:79*/ +#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); else cur_section_name= section_lookup(section_text+1,k,0); if(cur_section_name_char=='(') -/*40:*/ -#line 516 "ctangle.w" +/*47:*/ +#line 497 "ctangle.w" { for(an_output_file= cur_out_file; @@ -1091,31 +1138,31 @@ overflow("output files"); } } -/*:40*/ -#line 1106 "ctangle.w" -; -return(section_name); +/*:47*/ +#line 1093 "ctangle.w" + +return section_name; } -/*:70*/ -#line 1064 "ctangle.w" -; -case string:/*74:*/ -#line 1164 "ctangle.w" +/*:77*/ +#line 1051 "ctangle.w" + +case string:/*81:*/ +#line 1151 "ctangle.w" { id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; while(*loc!='@'||*(loc+1)!='>')loc++; if(loc>=limit)err_print("! Verbatim string didn't end"); id_loc= loc;loc+= 2; -return(string); +return string; } -/*:74*/ -#line 1065 "ctangle.w" -; -case ord:/*69:*/ -#line 1077 "ctangle.w" +/*:81*/ +#line 1052 "ctangle.w" + +case ord:/*76:*/ +#line 1064 "ctangle.w" id_first= loc; if(*loc=='\\'){ @@ -1135,32 +1182,32 @@ err_print("! String didn't end");loc= limit-1;break; } } loc++; -return(ord); +return ord; + +/*:76*/ +#line 1053 "ctangle.w" -/*:69*/ -#line 1066 "ctangle.w" -; -default:return(c); +default:return c; } } -/*:68*/ -#line 929 "ctangle.w" +/*:75*/ +#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:/*64:*/ -#line 950 "ctangle.w" +mistake:/*71:*/ +#line 935 "ctangle.w" switch(c){ case'+':if(*loc=='+')compress(plus_plus);break; case'-':if(*loc=='-'){compress(minus_minus);} -else if(*loc=='>')if(*(loc+1)=='*'){loc++;compress(minus_gt_ast);} -else compress(minus_gt);break; +else{if(*loc=='>'){if(*(loc+1)=='*'){loc++;compress(minus_gt_ast);} +else compress(minus_gt);}}break; case'.':if(*loc=='*'){compress(period_ast);} else if(*loc=='.'&&*(loc+1)=='.'){ loc++;compress(dot_dot_dot); @@ -1174,26 +1221,26 @@ case'<':if(*loc=='='){compress(lt_eq);} else if(*loc=='<')compress(lt_lt);break; case'&':if(*loc=='&')compress(and_and);break; case'|':if(*loc=='|')compress(or_or);break; -case'!':if(*loc=='=')compress(not_eq);break; +case'!':if(*loc=='=')compress(non_eq);break; } -/*:64*/ -#line 936 "ctangle.w" +/*:71*/ +#line 919 "ctangle.w" -return(c); +return c; } } -/*:63*//*76:*/ -#line 1199 "ctangle.w" +/*:69*//*83:*/ +#line 1186 "ctangle.w" -void -scan_repl(t) -eight_bits t; +static void +scan_repl( +eight_bits t) { sixteen_bits a; -if(t==section_name){/*77:*/ -#line 1225 "ctangle.w" +if(t==section_name){/*85:*/ +#line 1214 "ctangle.w" store_two_bytes(0150000); if(changing&&include_depth==change_depth){ @@ -1204,23 +1251,23 @@ id_first= cur_file_name; store_two_bytes((sixteen_bits)cur_line); } id_loc= id_first+strlen(id_first); -{int a= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a/0400)+0200); -app_repl(a%0400);} +{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200); +app_repl(a_l%0400);} -/*:77*/ -#line 1205 "ctangle.w" -;} -while(1)switch(a= get_next()){ -/*78:*/ -#line 1238 "ctangle.w" +/*:85*/ +#line 1192 "ctangle.w" +} +while(true)switch(a= get_next()){ +/*86:*/ +#line 1227 "ctangle.w" case identifier:a= id_lookup(id_first,id_loc,0)-name_dir; app_repl((a/0400)+0200); app_repl(a%0400);break; case section_name:if(t!=section_name)goto done; else{ -/*79:*/ -#line 1271 "ctangle.w" +/*87:*/ +#line 1260 "ctangle.w" { char*try_loc= loc; while(*try_loc==' '&&try_loc text_info_end)overflow("text"); cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; } -/*:76*//*83:*/ -#line 1360 "ctangle.w" +/*:83*//*90:*/ +#line 1346 "ctangle.w" -void -scan_section() +static void +scan_section(void) { 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){ -/*84:*/ -#line 1399 "ctangle.w" +while(true){ +/*92:*/ +#line 1387 "ctangle.w" while(next_controltext_link= 0; +cur_text->text_link= macro; } -/*:85*/ -#line 1376 "ctangle.w" +/*:93*/ +#line 1362 "ctangle.w" continue; } @@ -1434,41 +1481,41 @@ p= name_dir;break; } if(next_control==section_name){ p= cur_section_name; -/*86:*/ -#line 1431 "ctangle.w" +/*94:*/ +#line 1419 "ctangle.w" while((next_control= get_next())=='+'); if(next_control!='='&&next_control!=eq_eq) continue; -/*:86*/ -#line 1384 "ctangle.w" -; +/*:94*/ +#line 1370 "ctangle.w" + break; } return; } -no_where= print_where= 0; -/*87:*/ -#line 1436 "ctangle.w" +no_where= print_where= false; +/*95:*/ +#line 1424 "ctangle.w" -/*88:*/ -#line 1441 "ctangle.w" +/*96:*/ +#line 1429 "ctangle.w" store_two_bytes((sixteen_bits)(0150000+section_count)); -/*:88*/ -#line 1437 "ctangle.w" -; +/*:96*/ +#line 1425 "ctangle.w" + scan_repl(section_name); -/*89:*/ -#line 1445 "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; } -else if(p->equiv==(char*)text_info)p->equiv= (char*)cur_text; +else if(p->equiv==(void*)text_info)p->equiv= (void*)cur_text; else{ q= (text_pointer)p->equiv; @@ -1479,20 +1526,20 @@ q->text_link= cur_text-text_info; cur_text->text_link= section_flag; -/*:89*/ -#line 1439 "ctangle.w" -; +/*:97*/ +#line 1427 "ctangle.w" + + +/*:95*/ +#line 1376 "ctangle.w" -/*:87*/ -#line 1390 "ctangle.w" -; } -/*:83*//*91:*/ -#line 1463 "ctangle.w" +/*:90*//*98:*/ +#line 1448 "ctangle.w" -void -phase_one(){ +static void +phase_one(void){ phase= 1; section_count= 0; reset_input(); @@ -1502,23 +1549,23 @@ check_complete(); phase= 2; } -/*:91*//*93:*/ -#line 1481 "ctangle.w" +/*:98*//*100:*/ +#line 1465 "ctangle.w" -void -skip_limbo() +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){ c= *loc++; if(ccode[(eight_bits)c]==new_section)break; switch(ccode[(eight_bits)c]){ -case translit_code:/*94:*/ -#line 1510 "ctangle.w" +case translit_code:/*102:*/ +#line 1496 "ctangle.w" while(xisspace(*loc)&&loc limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2)) err_print("! Improper hex number following @l"); else{ -unsigned i; +unsigned int i; char*beg; sscanf(loc-3,"%x",&i); while(xisspace(*loc)&&loc=translit_length) err_print("! Replacement string in @l too long"); else{ -strncpy(translit[i-0200],beg,loc-beg); +strncpy(translit[i-0200],beg,(size_t)(loc-beg)); translit[i-0200][loc-beg]= '\0'; } } -/*:94*/ -#line 1494 "ctangle.w" -;break; +/*:102*/ +#line 1478 "ctangle.w" +break; case format_code:case'@':break; case control_text:if(c=='q'||c=='Q'){ while((c= skip_ahead())=='@'); @@ -1560,20 +1607,20 @@ default:err_print("! Double @ should be used in limbo"); } } -/*:93*//*95:*/ -#line 1536 "ctangle.w" +/*:100*//*103:*/ +#line 1522 "ctangle.w" void -print_stats(){ -printf("\nMemory usage statistics:\n"); +print_stats(void){ +puts("\nMemory usage statistics:"); printf("%ld names (out of %ld)\n", -(long)(name_ptr-name_dir),(long)max_names); +(ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf("%ld replacement texts (out of %ld)\n", -(long)(text_ptr-text_info),(long)max_texts); +(ptrdiff_t)(text_ptr-text_info),(long)max_texts); printf("%ld bytes (out of %ld)\n", -(long)(byte_ptr-byte_mem),(long)max_bytes); +(ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); printf("%ld tokens (out of %ld)\n", -(long)(tok_ptr-tok_mem),(long)max_toks); +(ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } -/*:95*/ +/*:103*/ diff --git a/source/texk/web2c/cwebdir/ctangle.w b/source/texk/web2c/cwebdir/ctangle.w index 130800210..e7e2d311f 100644 --- a/source/texk/web2c/cwebdir/ctangle.w +++ b/source/texk/web2c/cwebdir/ctangle.w @@ -2,9 +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 3.64 --- February 2002 -% (same as Version 3.5 except for minor corrections) -% (also quotes backslashes in file names of #line directives) +% Version 4.2 --- February 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -17,6 +15,11 @@ % entire resulting derived work is given a different name and distributed % under the terms of a permission notice identical to this one. +% Amendments to 'ctangle.w' resulting in this updated version were created +% by numerous collaborators over the course of many years. + +% Please send comments, suggestions, etc. to tex-k@@tug.org. + % Here is TeX material that gets inserted after \input cwebmac \def\hang{\hangindent 3em\indent\ignorespaces} \def\pb{$\.|\ldots\.|$} % C brackets (|...|) @@ -24,11 +27,11 @@ \mathchardef\RA="3221 % right arrow \mathchardef\BA="3224 % double arrow -\def\title{CTANGLE (Version 3.64)} +\def\title{CTANGLE (Version 4.2)} \def\topofcontents{\null\vfill \centerline{\titlefont The {\ttitlefont CTANGLE} processor} \vskip 15pt - \centerline{(Version 3.64)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -46,7 +49,6 @@ under the terms of a permission notice identical to this one. } \pageno=\contentspagenumber \advance\pageno by 1 \let\maybe=\iftrue -@s not_eq normal @q unreserve a C++ keyword @> @** Introduction. This is the \.{CTANGLE} program by Silvio Levy and Donald E. Knuth, @@ -59,27 +61,15 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 3.64)\n" +@d banner "This is CTANGLE (Version 4.2)" @c @@/ @h @@/ @@/ -@@/ -@@/ - -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ +@@/ +@ @ \.{CTANGLE} has a fairly straightforward outline. It operates in two phases: First it reads the source file, saving the \CEE/ code in @@ -89,40 +79,24 @@ Please read the documentation for \.{common}, the set of routines common to \.{CTANGLE} and \.{CWEAVE}, before proceeding further. @c -int main (ac, av) -int ac; -char **av; +int main ( +int ac, +char **av) { argc=ac; argv=av; program=ctangle; - @; + @@; common_init(); - if (show_banner) printf(banner); /* print a ``banner line'' */ + if (show_banner) puts(banner); /* print a ``banner line'' */ phase_one(); /* read all the user's text and compress it into |tok_mem| */ phase_two(); /* output the contents of the compressed tables */ return wrap_up(); /* and exit gracefully */ } -@ The following parameters were sufficient in the original \.{TANGLE} to -handle \TEX/, -so they should be sufficient for most applications of \.{CTANGLE}. -If you change |max_bytes|, |max_names|, or |hash_size| you should also -change them in the file |"common.w"|. - -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names; used in |"common.w"| */ -@d max_toks 270000 /* number of bytes in compressed \CEE/ code */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240; used in |"common.w"| */ -@d max_texts 2500 /* number of replacement texts, must be less than 10240 */ -@d hash_size 353 /* should be prime; used in |"common.w"| */ -@d longest_name 10000 /* section names and strings shouldn't be longer than this */ -@d stack_size 50 /* number of simultaneous levels of macro expansion */ -@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ - @ The next few sections contain stuff from the file |"common.w"| that must be included in both |"ctangle.w"| and |"cweave.w"|. It appears in -file |"common.h"|, which needs to be updated when |"common.w"| changes. +file |"common.h"|, which is also included in |"common.w"| to propagate +possible changes from this \.{COMMON} interface consistently. @i common.h @@ -137,7 +111,7 @@ A \&{text} variable is a structure containing a pointer into |tok_mem|, which tells where the corresponding text starts, and an integer |text_link|, which, as we shall see later, is used to connect pieces of text that have the same name. All the \&{text}s are stored in -the array |text_info|, and we use a |text_pointer| variable to refer +the array |text_info|, and we use a \&{text\_pointer} variable to refer to them. The first position of |tok_mem| that is unoccupied by @@ -145,10 +119,6 @@ replacement text is called |tok_ptr|, and the first unused location of |text_info| is called |text_ptr|. Thus we usually have the identity |text_ptr->tok_start==tok_ptr|. -If your machine does not support |unsigned char| you should change -the definition of \&{eight\_bits} to |unsigned short|. -@^system dependencies@> - @= typedef struct { eight_bits *tok_start; /* pointer into |tok_mem| */ @@ -156,13 +126,13 @@ typedef struct { } 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; @@ -175,18 +145,19 @@ replacement text, an element of the array |text_info|. @d equiv equiv_or_xref /* info corresponding to names */ @ @= -name_dir->equiv=(char *)text_info; /* the undefined section has no replacement text */ +init_node(name_dir); /* the undefined section has no replacement text */ @ Here's the procedure that decides whether a name of length |l| starting at position |first| equals the identifier pointed to by |p|: @c -int names_match(p,first,l) -name_pointer p; /* points to the proposed match */ -char *first; /* position of first character of string */ -int l; /* length of identifier */ -{ - if (length(p)!=l) return 0; +boolean names_match(@t\1\1@> +name_pointer p, /* points to the proposed match */ +const char *first, /* position of first character of string */ +size_t l, /* length of identifier */ +eight_bits t@t\2\2@>) /* not used by \.{TANGLE} */ +{@+(void)t; + if (length(p)!=l) return false; return !strncmp(first,p->byte_start,l); } @@ -197,13 +168,13 @@ the loader won't complain of its absence. @c void -init_node(node) -name_pointer node; +init_node( +name_pointer node) { - node->equiv=(char *)text_info; + node->equiv=(void *)text_info; } void -init_p() {} +init_p(name_pointer p,eight_bits t) {@+(void)p;@+(void)t;@+} @* Tokens. Replacement texts, which represent \CEE/ code in a compressed format, @@ -224,8 +195,8 @@ The replacement text pointer for the first unnamed section appears in @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; @@ -258,15 +229,17 @@ construction or numerical constant. |tok_mem| when a replacement text is being generated. @c -void -store_two_bytes(x) -sixteen_bits x; +static void +store_two_bytes( +sixteen_bits x) { if (tok_ptr+2>tok_mem_end) overflow("token"); *tok_ptr++=x>>8; /* store high byte */ *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: @@ -309,12 +282,12 @@ typedef output_state *stack_pointer; @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, @@ -334,9 +307,9 @@ We assume that the \CEE/ compiler can copy structures. @^system dependencies@> @c -void -push_level(p) /* suspends the current level */ -name_pointer p; +static void +push_level(@t\1\1@> /* suspends the current level */ +name_pointer p@t\2\2@>) { if (stack_ptr==stack_end) overflow("stack"); *stack_ptr=cur_state; @@ -348,14 +321,18 @@ name_pointer p; } } +@ @= +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. @c -void -pop_level(flag) /* do this when |cur_byte| reaches |cur_end| */ -int flag; /* |flag==0| means we are in |output_defs| */ +static void +pop_level(@t\1\1@> /* do this when |cur_byte| reaches |cur_end| */ +boolean flag@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 */ @@ -381,22 +358,22 @@ if the next output is an identifier, in which case @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@> @c -void -get_output() /* sends next token to |out_char| */ +static void +get_output(void) /* sends next token to |out_char| */ { sixteen_bits a; /* value of current byte */ 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; } @@ -409,7 +386,7 @@ get_output() /* sends next token to |out_char| */ switch (a/024000) { /* |024000==(0250-0200)*0400| */ case 0: cur_val=a; out_char(identifier); break; case 1: if (a==output_defs_flag) output_defs(); - else @; + else @@; break; default: cur_val=a-050000; if (cur_val>0) cur_section=cur_val; out_char(section_number); @@ -417,15 +394,17 @@ get_output() /* sends next token to |out_char| */ } } +@ @=@+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. @= { a-=024000; - if ((a+name_dir)->equiv!=(char *)text_info) push_level(a+name_dir); + if ((a+name_dir)->equiv!=(void *)text_info) push_level(a+name_dir); else if (a!=0) { - printf("\n! Not present: <"); + fputs("\n! Not present: <",stdout); print_section_name(a+name_dir); err_print(">"); @.Not present:
@> } @@ -461,7 +440,7 @@ strings, verbatim constructions and numerical constants. \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 */ @@ -470,17 +449,17 @@ are preceded by a `\.\\'. @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. @c -void -flush_buffer() /* writes one line to output file */ +static void +flush_buffer(void) /* writes one line to output file */ { C_putc('\n'); if (cur_line % 100 == 0 && show_progress) { @@ -491,6 +470,8 @@ flush_buffer() /* writes one line to output file */ 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 \.{@@(} @@ -499,11 +480,11 @@ All these special sections are saved on a stack, |output_files|. 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]; /* 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 @@ -530,18 +511,15 @@ complain we're out of room@>= @* The big output switch. Here then is the routine that does the output. -@= -void phase_two(); - -@ @c -void -phase_two () { - web_file_open=0; +@c +static void +phase_two (void) { + web_file_open=false; cur_line=1; - @; - @; + @@; + @@; if (text_info->text_link==0 && cur_out_file==end_output_files) { - printf("\n! No program text was specified."); mark_harmless; + fputs("\n! No program text was specified.",stdout); mark_harmless; @.No program text...@> } else { @@ -551,7 +529,7 @@ phase_two () { } else { if (show_progress) { - printf("\nWriting the output files:"); + fputs("\nWriting the output files:",stdout); @.Writing the output...@> printf(" (%s)",C_file_name); update_terminal; @@ -560,11 +538,16 @@ phase_two () { } while (stack_ptr>stack) get_output(); flush_buffer(); -writeloop: @; - if(show_happiness) printf("\nDone."); +writeloop: @@; + if (show_happiness) { + if (show_progress) new_line; + fputs("Done.",stdout); + } } } +@ @=@+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. @@ -574,10 +557,10 @@ for (an_output_file=end_output_files; an_output_file>cur_out_file;) { an_output_file--; sprint_section_name(output_file_name,*an_output_file); fclose(C_file); - C_file=fopen(output_file_name,"w"); - if (C_file ==0) fatal("! Cannot open output file:",output_file_name); + C_file=fopen(output_file_name,"wb"); + if (C_file ==0) fatal("! Cannot open output file ",output_file_name); @.Cannot open output file@> - printf("\n(%s)",output_file_name); update_terminal; + if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; } cur_line=1; stack_ptr=stack+1; cur_name= (*an_output_file); @@ -596,15 +579,16 @@ that refer to macros, preceded by the \.{\#define} preprocessor command. if (!output_defs_seen) output_defs(); -@ @= -boolean output_defs_seen=0; +@ @= +static boolean output_defs_seen=false; @ @= -void output_defs(); +static void output_defs(void);@/ +static void out_char(eight_bits); @ @c -void -output_defs() +static void +output_defs(void) { sixteen_bits a; push_level(NULL); @@ -614,7 +598,7 @@ output_defs() 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= -static void out_char(); - -@ @c +@c static void -out_char(cur_char) -eight_bits cur_char; +out_char( +eight_bits cur_char) { char *j, *k; /* pointer into |byte_mem| */ restart: @@ -659,9 +640,9 @@ restart: case '\n': if (protect && out_state!=verbatim) C_putc(' '); if (protect || out_state==verbatim) C_putc('\\'); flush_buffer(); if (out_state!=verbatim) out_state=normal; break; - @/@t\4@>@; - @/@t\4@>@; - @/@t\4@>@; + @/@t\4@>@@; + @/@t\4@>@@; + @/@t\4@>@@; case '=': case '>': C_putc(cur_char); C_putc(' '); out_state=normal; break; case join: out_state=unbreakable; break; @@ -679,22 +660,22 @@ restart: } @ @= -case plus_plus: C_putc('+'); C_putc('+'); out_state=normal; break; -case minus_minus: C_putc('-'); C_putc('-'); out_state=normal; break; -case minus_gt: C_putc('-'); C_putc('>'); out_state=normal; break; -case gt_gt: C_putc('>'); C_putc('>'); out_state=normal; break; -case eq_eq: C_putc('='); C_putc('='); out_state=normal; break; -case lt_lt: C_putc('<'); C_putc('<'); out_state=normal; break; -case gt_eq: C_putc('>'); C_putc('='); out_state=normal; break; -case lt_eq: C_putc('<'); C_putc('='); out_state=normal; break; -case not_eq: C_putc('!'); C_putc('='); out_state=normal; break; -case and_and: C_putc('&'); C_putc('&'); out_state=normal; break; -case or_or: C_putc('|'); C_putc('|'); out_state=normal; break; -case dot_dot_dot: C_putc('.'); C_putc('.'); C_putc('.'); out_state=normal; +case plus_plus: C_putc('+');@+C_putc('+'); out_state=normal; break; +case minus_minus: C_putc('-');@+C_putc('-'); out_state=normal; break; +case minus_gt: C_putc('-');@+C_putc('>'); out_state=normal; break; +case gt_gt: C_putc('>');@+C_putc('>'); out_state=normal; break; +case eq_eq: C_putc('=');@+C_putc('='); out_state=normal; break; +case lt_lt: C_putc('<');@+C_putc('<'); out_state=normal; break; +case gt_eq: C_putc('>');@+C_putc('='); out_state=normal; break; +case lt_eq: C_putc('<');@+C_putc('='); out_state=normal; break; +case non_eq: C_putc('!');@+C_putc('='); out_state=normal; break; +case and_and: C_putc('&');@+C_putc('&'); out_state=normal; break; +case or_or: C_putc('|');@+C_putc('|'); out_state=normal; break; +case dot_dot_dot: C_putc('.');@+C_putc('.');@+C_putc('.'); out_state=normal; break; -case colon_colon: C_putc(':'); C_putc(':'); out_state=normal; break; -case period_ast: C_putc('.'); C_putc('*'); out_state=normal; break; -case minus_gt_ast: C_putc('-'); C_putc('>'); C_putc('*'); out_state=normal; +case colon_colon: C_putc(':');@+C_putc(':'); out_state=normal; break; +case period_ast: C_putc('.');@+C_putc('*'); out_state=normal; break; +case minus_gt_ast: C_putc('-');@+C_putc('>');@+C_putc('*'); out_state=normal; break; @ When an identifier is output to the \CEE/ file, characters in the @@ -707,13 +688,13 @@ This makes debugging a lot less confusing. @d translit_length 10 -@= -char translit[128][translit_length]; +@= +static char translit[128][translit_length]; @ @= { int i; - for (i=0;i<128;i++) sprintf(translit[i],"X%02X",(unsigned)(128+i)); + for (i=0;i<128;i++) sprintf(translit[i],"X%02X",(unsigned int)(128+i)); } @ @= @@ -722,9 +703,9 @@ case identifier: j=(cur_val+name_dir)->byte_start; k=(cur_val+name_dir+1)->byte_start; while (j - else C_printf("%s",translit[(unsigned char)(*j)-0200]); + else C_printf("%s",translit[(eight_bits)(*j)-0200]); j++; } out_state=num_or_id; break; @@ -786,8 +767,8 @@ milestones. @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 */ @@ -811,21 +792,25 @@ eight_bits ccode[256]; /* meaning of a char following \.{@@} */ until finding the next non-ignorable control code, which it returns. @c -eight_bits -skip_ahead() /* skip to next control code */ +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| @@ -842,35 +827,35 @@ the two types of comments. 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 -int skip_comment(is_long_comment) /* skips over comments */ -boolean is_long_comment; +static boolean skip_comment(@t\1\1@> /* skips over comments */ +boolean is_long_comment@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++; } @@ -881,48 +866,46 @@ boolean is_long_comment; @d constant 03 -@= -name_pointer cur_section_name; /* name of section just scanned */ -int no_where; /* suppress |print_where|? */ - -@ @= -#include /* definition of |isalpha|, |isdigit| and so on */ -#include /* definition of |exit| */ +@= +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. @d isxalpha(c) ((c)=='_' || (c)=='$') /* non-alpha characters allowed in identifier */ -@d ishigh(c) ((unsigned char)(c)>0177) +@d ishigh(c) ((eight_bits)(c)>0177) @^high-bit character handling@> @c -eight_bits -get_next() /* produces the next input token */ +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++; if (xisdigit(c) || c=='.') @@; - else if (c=='\'' || c=='"' || (c=='L'&&(*loc=='\'' || *loc=='"'))) + else if (c=='\'' || c=='"'@| + || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| + || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))) @@; else if (isalpha(c) || isxalpha(c) || ishigh(c)) @@; @@ -930,14 +913,16 @@ get_next() /* produces the next input token */ 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/ @@ -945,14 +930,14 @@ combinations \.{...}, \.{::}, \.{.*} and \.{->*}. The compound assignment operators (e.g., \.{+=}) are treated as separate tokens. -@d compress(c) if (loc++<=limit) return(c) +@d compress(c) if (loc++<=limit) return c @= switch(c) { case '+': if (*loc=='+') compress(plus_plus); break; case '-': if (*loc=='-') {compress(minus_minus);} - else if (*loc=='>') if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} - else compress(minus_gt); break; + else { if (*loc=='>') { if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} + else compress(minus_gt); } } break; case '.': if (*loc=='*') {compress(period_ast);} else if (*loc=='.' && *(loc+1)=='.') { loc++; compress(dot_dot_dot); @@ -966,13 +951,14 @@ switch(c) { else if (*loc=='<') compress(lt_lt); break; case '&': if (*loc=='&') compress(and_and); break; case '|': if (*loc=='|') compress(or_or); break; - case '!': if (*loc=='=') compress(not_eq); break; + case '!': if (*loc=='=') compress(non_eq); break; } @ @= { id_first=--loc; - while (isalpha(*++loc) || isdigit(*loc) || isxalpha(*loc) || ishigh(*loc)); - id_loc=loc; return(identifier); + while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @| + || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); + id_loc=loc; return identifier; } @ @= { @@ -995,7 +981,7 @@ switch(c) { 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 @@ -1007,16 +993,17 @@ convention, but do not allow the string to be longer than |longest_name|. char delim = c; /* what started the string */ id_first = section_text+1; id_loc = section_text; *++id_loc=delim; - if (delim=='L') { /* wide character constant */ + if (delim=='L' || delim=='u' || delim=='U') { /* wide character constant */ + 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@> } @@ -1035,13 +1022,13 @@ convention, but do not allow the string to be longer than |longest_name|. if (++id_loc<=section_text_end) *id_loc=c; } if (id_loc>=section_text_end) { - printf("\n! String too long: "); + fputs("\n! String too long: ",stdout); @.String too long@> term_write(section_text+1,25); err_print("..."); } id_loc++; - return(string); + return string; } @ After an \.{@@} sign has been scanned, the next character tells us @@ -1061,10 +1048,10 @@ whether there is more work to do. continue; case section_name: cur_section_name_char=*(loc-1); - @; - case string: @; - case ord: @; - default: return(c); + @@; + case string: @@; + case ord: @@; + default: return c; } } @@ -1093,18 +1080,18 @@ thus, \.{@@'\\nopq'} gives the same result as \.{@@'\\n'}. } } loc++; - return(ord); + return ord; @ @= { char *k; /* pointer into |section_text| */ - @; + @@; if (k-section_text>3 && strncmp(k-2,"...",3)==0) cur_section_name=section_lookup(section_text+1,k-3,1); /* 1 means is a prefix */ else cur_section_name=section_lookup(section_text+1,k,0); if (cur_section_name_char=='(') @; - return(section_name); + complain we're out of room@>@; + return section_name; } @ Section names are placed into the |section_text| array with consecutive spaces, @@ -1117,14 +1104,14 @@ character of the name.) @ @= 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; } c=*loc; - @; + @@; loc++; if (k=section_text_end) { - printf("\n! Section name too long: "); + fputs("\n! Section name too long: ",stdout); @.Section name too long@> term_write(section_text+1,25); printf("..."); mark_harmless; @@ -1167,7 +1154,7 @@ buffer. We also set |loc| to the position just after the ending delimiter. 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. @@ -1192,18 +1179,18 @@ acted, |cur_text| will point to the replacement text just generated, and @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; @ @c -void -scan_repl(t) /* creates a replacement text */ -eight_bits t; +static void +scan_repl(@t\1\1@> /* creates a replacement text */ +eight_bits t@t\2\2@>) { sixteen_bits a; /* the current token */ - if (t==section_name) {@;} - while (1) switch (a=get_next()) { + if (t==section_name) {@@;} + 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. @@ -1232,8 +1221,8 @@ if (changing && include_depth==change_depth) { /* correction made Feb 2017 */ store_two_bytes((sixteen_bits)cur_line); } id_loc=id_first+strlen(id_first); -{int a=id_lookup(id_first,id_loc,0)-name_dir; app_repl((a / 0400)+0200); - app_repl(a % 0400);} +{int a_l=id_lookup(id_first,id_loc,0)-name_dir; app_repl((a_l / 0400)+0200); + app_repl(a_l % 0400);} @ @= case identifier: a=id_lookup(id_first,id_loc,0)-name_dir; @@ -1241,26 +1230,26 @@ case identifier: a=id_lookup(id_first,id_loc,0)-name_dir; 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); - @; break; + @@; break; } 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); - @; + @@; } break; case constant: case string: - @; + @@; case ord: - @; + @@; case definition: case format_code: case begin_C: if (t!=section_name) goto done; else { err_print("! @@d, @@f and @@c are ignored in C text"); continue; @@ -1268,7 +1257,7 @@ case definition: case format_code: case begin_C: if (t!=section_name) goto done; } 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. @c -void -scan_section() +static void +scan_section(void) { 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) { @; + \.{@@\ } or the like@>@; if (next_control == definition) { /* \.{@@d} */ @@; continue; @@ -1381,15 +1367,17 @@ scan_section() } if (next_control == section_name) { /* \.{@@<} or \.{@@(} */ p=cur_section_name; - @; + @@; break; } 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 @@ -1404,7 +1392,7 @@ while (next_control= { - while ((next_control=get_next())=='\n'); /*allow newline before definition */ + while ((next_control=get_next())=='\n'); /* allow newline before definition */ if (next_control!=identifier) { err_print("! Definition flushed, must start with identifier"); @.Definition flushed...@> @@ -1417,7 +1405,7 @@ while (next_controltext_link=0; /* |text_link==0| characterizes a macro */ + cur_text->text_link=macro; } @ If the section name is not followed by \.{=} or \.{+=}, no \CEE/ @@ -1434,9 +1422,9 @@ if (next_control!='=' && next_control!=eq_eq) continue; @ @= -@; +@@; scan_repl(section_name); /* now |cur_text| points to the replacement text */ -@; +@@; @ @= store_two_bytes((sixteen_bits)(0150000+section_count)); @@ -1446,7 +1434,7 @@ store_two_bytes((sixteen_bits)(0150000+section_count)); if (p==name_dir||p==0) { /* unnamed section, or bad section name */ (last_unnamed)->text_link=cur_text-text_info; last_unnamed=cur_text; } -else if (p->equiv==(char *)text_info) p->equiv=(char *)cur_text; +else if (p->equiv==(void *)text_info) p->equiv=(void *)cur_text; /* first section of this name */ else { q=(text_pointer)p->equiv; @@ -1457,12 +1445,9 @@ else { cur_text->text_link=section_flag; /* mark this replacement text as a nonmacro */ -@ @= -void phase_one(); - @ @c -void -phase_one() { +static void +phase_one(void) { phase=1; section_count=0; reset_input(); @@ -1472,26 +1457,25 @@ phase_one() { phase=2; } +@ @=@+static void phase_one(void); + @ Only a small subset of the control codes is legal in limbo, so limbo processing is straightforward. -@= -void skip_limbo(); - -@ @c -void -skip_limbo() +@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) { c=*loc++; if (ccode[(eight_bits)c]==new_section) break; switch (ccode[(eight_bits)c]) { - case translit_code: @; break; + case translit_code: @@; break; case format_code: case '@@': break; case control_text: if (c=='q' || c=='Q') { while ((c=skip_ahead())=='@@'); @@ -1507,6 +1491,8 @@ skip_limbo() } } +@ @=@+static void skip_limbo(void); + @ @= while(xisspace(*loc)&&loc else { - unsigned i; + unsigned int i; char *beg; sscanf(loc-3,"%x",&i); while(xisspace(*loc)&&loc else{ - strncpy(translit[i-0200],beg,loc-beg); + strncpy(translit[i-0200],beg,(size_t)(loc-beg)); translit[i-0200][loc-beg]='\0'; } } -@ Because on some systems the difference between two pointers is a |long| +@ Because on some systems the difference between two pointers is a |ptrdiff_t| but not an |int|, we use \.{\%ld} to print these quantities. @c void -print_stats() { - printf("\nMemory usage statistics:\n"); +print_stats(void) { + puts("\nMemory usage statistics:"); printf("%ld names (out of %ld)\n", - (long)(name_ptr-name_dir),(long)max_names); + (ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf("%ld replacement texts (out of %ld)\n", - (long)(text_ptr-text_info),(long)max_texts); + (ptrdiff_t)(text_ptr-text_info),(long)max_texts); printf("%ld bytes (out of %ld)\n", - (long)(byte_ptr-byte_mem),(long)max_bytes); + (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); printf("%ld tokens (out of %ld)\n", - (long)(tok_ptr-tok_mem),(long)max_toks); + (ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } @** Index. diff --git a/source/texk/web2c/cwebdir/cweav-bs.ch b/source/texk/web2c/cwebdir/cweav-bs.ch index 8c4c1fe8f..bf2752881 100644 --- a/source/texk/web2c/cwebdir/cweav-bs.ch +++ b/source/texk/web2c/cwebdir/cweav-bs.ch @@ -20,17 +20,17 @@ This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94. The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 3.64)\n" +@d banner "This is CWEAVE (Version 4.2)" @y The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 3.64pc/big)\n" +@d banner "This is CWEAVE (Version 4.2pc/big)" @z -@x Section 9. -@d chunk_marker 0 +@x Section 7. + for section names */ @= typedef struct name_info { @@ -41,24 +41,21 @@ typedef struct name_info { names */ char Ilk; /* used by identifiers in \.{CWEAVE} only */ } dummy; - char *equiv_or_xref; /* info corresponding to names */ + void *equiv_or_xref; /* info corresponding to names */ } name_info; /* contains information about an identifier or section name */ typedef name_info *name_pointer; /* pointer into array of \&{name\_info}s */ 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 */ -extern name_pointer id_lookup(); /* looks up a string in the identifier table */ -extern name_pointer section_lookup(); /* finds section name */ -extern void print_section_name(), sprint_section_name(); @y -@d chunk_marker 0 + for section names */ @f huge extern @@ -87,13 +84,10 @@ extern char huge* 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 */ -extern name_pointer id_lookup(); /* looks up a string in the identifier table */ -extern name_pointer section_lookup(); /* finds section name */ -extern void print_section_name(), sprint_section_name(); @z -@x Section 18. +@x Section 22. typedef struct xref_info { sixteen_bits num; /* section number plus zero or |def_flag| */ struct xref_info *xlink; /* pointer to the previous cross-reference */ @@ -108,81 +102,54 @@ typedef xref_info huge* xref_pointer; @z -@x Section 19. -xref_info xmem[max_refs]; /* contains cross-reference information */ -xref_pointer xmem_end = xmem+max_refs-1; +@x Section 23. +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 -@x Section 20. +@x Section 24. @d xref equiv_or_xref @y @d xref ptr_union.xref_member @z -@x Section 20. -xref_ptr=xmem; name_dir->xref=(char*)xmem; xref_switch=0; section_xref_switch=0; +@x Section 24. +xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0; xmem->num=0; /* sentinel value */ @y xmem_end = xmem + max_refs - 1; -xref_ptr=xmem; name_dir->xref=(char*)xmem; xref_switch=0; section_xref_switch=0; +xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0; xmem->num=0; /* sentinel value */ @z -@x Section 21. - append_xref(m); xref_ptr->xlink=q; p->xref=(char*)xref_ptr; -@y - append_xref(m); xref_ptr->xlink=q; p->xref=(char huge*)xref_ptr; -@z - - -@x Section 22. - if (r==xmem) p->xref=(char*)xref_ptr; -@y - if (r==xmem) p->xref=(char huge*)xref_ptr; -@z - - -@x Section 23. - q=(xref_pointer)p->xref; - if (q->num==file_flag) return; - append_xref(file_flag); - xref_ptr->xlink = q; - p->xref = (char *)xref_ptr; +@x Section 30. (to please Borland's C++, version 4.02) +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 - q=(xref_pointer)p->xref; - if (q->num==file_flag) return; - append_xref(file_flag); - xref_ptr->xlink = q; - p->xref = (char huge*)xref_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 25. (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| */ -@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| */ -@z - -@x Section 26. (goes with the previous change) -tok_start[1]=tok_mem+1; -max_tok_ptr=tok_mem+1; max_text_ptr=tok_start+1; +@x Section 31. (goes with the previous change) +tok_ptr=max_tok_ptr=tok_mem+1;@/ +tok_start[0]=tok_start[1]=tok_mem+1;@/ +text_ptr=max_text_ptr=tok_start+1; @y tok_start[1]=tok_mem+1; tok_mem_end=tok_mem+max_toks-1; @@ -191,27 +158,20 @@ max_tok_ptr=tok_mem+1; max_text_ptr=tok_start+1; @z -@x Section 27. - p->ilk=t; p->xref=(char*)xmem; -@y - p->ilk=t; p->xref=(char huge*)xmem; -@z - - -@x Section 27. - p->xref=(char*)xmem; +@x Section 32. + p->xref=(void *)xmem; @y - p->xref=(char huge*)xmem; + p->xref=(void huge*)xmem; @z -@x Section 70. +@x Section 74. if (unindexed(lhs)) { /* retain only underlined entries */ xref_pointer q,r=NULL; for (q=(xref_pointer)lhs->xref;q>xmem;q=q->xlink) if (q->numxlink=q->xlink; - else lhs->xref=(char*)q->xlink; + else lhs->xref=(void *)q->xlink; else r=q; } @y @@ -220,13 +180,13 @@ max_tok_ptr=tok_mem+1; max_text_ptr=tok_start+1; for (q=(xref_pointer)lhs->xref;q>xmem;q=q->xlink) if (q->numxlink=q->xlink; - else lhs->xref=(char huge*)q->xlink; + else lhs->xref=(void huge*)q->xlink; else r=q; } @z -@x Section 87. +@x Section 93. char *k, *k_end=(p+1)->byte_start; /* pointers into |byte_mem| */ out('{'); for (k=p->byte_start; kxlink=(xref_pointer)p->xref; r=xref_ptr; - p->xref=(char*)xref_ptr; - while (r->xlink!=q) {r->num=r->xlink->num; r=r->xlink;} - r->num=m; /* everything from |q| on is left undisturbed */ -@y - append_xref(0); /* this number doesn't matter */ - xref_ptr->xlink=(xref_pointer)p->xref; r=xref_ptr; - p->xref=(char huge*)xref_ptr; - while (r->xlink!=q) {r->num=r->xlink->num; r=r->xlink;} - r->num=m; /* everything from |q| on is left undisturbed */ -@z - - -@x Section 163. -@ @= -@y -@ @= -#ifdef __MSDOS__ -if (d<0 && pp+d>pp) pp=scrap_base; /* segmented architecture caused wrap */ -else -#endif -@z - - -@x Section 194. +@x Section 209. char *p; /* index into |byte_mem| */ @y char huge *p; /* index into |byte_mem| */ @z -@x Section 229. - if (cur_name->xref!=(char*)xmem) { +@x Section 244. + if (cur_name->xref!=(void *)xmem) { @y - if (cur_name->xref!=(char huge*)xmem) { + if (cur_name->xref!=(void huge*)xmem) { @z -@x Section 232. -char *cur_byte; /* index into |byte_mem| */ +@x Section 246. +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 -@x Section 241. +@x Section 255. switch (cur_name->ilk) { - case normal: if (is_tiny(cur_name)) out_str("\\|"); + case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|"); else {char *j; @y switch (cur_name->ilk) { - case normal: if (is_tiny(cur_name)) out_str("\\|"); + case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|"); else {char huge* j; @z -@x Section 241. - case custom: case quoted: {char *j; out_str("$\\"); +@x Section 255. + case custom: {char *j; out_str("$\\"); @y - case custom: case quoted: {char huge* j; out_str("$\\"); + case custom: {char huge* j; out_str("$\\"); @z diff --git a/source/texk/web2c/cwebdir/cweav-man.ch b/source/texk/web2c/cwebdir/cweav-man.ch index 6cfcc8fe2..b72360944 100644 --- a/source/texk/web2c/cwebdir/cweav-man.ch +++ b/source/texk/web2c/cwebdir/cweav-man.ch @@ -16,7 +16,7 @@ under the terms of a permission notice identical to this one. } @y \def\botofcontents{\vfill\titlefalse} -\def\contentspagenumber{109} +\def\contentspagenumber{111} \def\title{APPENDIX F: CWEAVE} \let\K=\leftarrow @z diff --git a/source/texk/web2c/cwebdir/cweav-pc.ch b/source/texk/web2c/cwebdir/cweav-pc.ch index 28cd94f5a..b37f9f2ec 100644 --- a/source/texk/web2c/cwebdir/cweav-pc.ch +++ b/source/texk/web2c/cwebdir/cweav-pc.ch @@ -11,29 +11,18 @@ that allows >64K arrays. (If you need lots more bytes, try the alternate change files that have -bs in their name instead of -pc.) @x section 1 -@d banner "This is CWEAVE (Version 3.64)\n" +@d banner "This is CWEAVE (Version 4.2)" @y -@d banner "This is CWEAVE (Version 3.64pc)\n" +@d banner "This is CWEAVE (Version 4.2pc)" @z @x section 4 -@d max_bytes 90000 /* the number of bytes in identifiers, +@d max_bytes 1000000 /* the number of bytes in identifiers, @y @d max_bytes (unsigned)60000 /* the number of bytes in identifiers, @z @x -@d max_refs 20000 /* number of cross-references; must be less than 65536 */ +@d max_refs 65535 /* number of cross-references; must be less than 65536 */ @y @d max_refs 10000 /* number of cross-references; must be less than 65536 */ @z - -@x section 163 -@ @= -@y -@ @= -#ifdef __MSDOS__ -if (d<0 && pp+d>pp) pp=scrap_base; /* segmented architecture caused wrap */ -else -#endif -@z - diff --git a/source/texk/web2c/cwebdir/cweav-ql.ch b/source/texk/web2c/cwebdir/cweav-ql.ch index 3e37ba235..28053eb15 100644 --- a/source/texk/web2c/cwebdir/cweav-ql.ch +++ b/source/texk/web2c/cwebdir/cweav-ql.ch @@ -7,15 +7,15 @@ ex cc;"-v -h -c =500000 cweave_c" @x -\def\title{CWEAVE (Version 3.64)} +\def\title{CWEAVE (Version 4.2)} @y -\def\title{CWEAVE (QL Version 3.64)} +\def\title{CWEAVE (QL Version 4.2)} @z @x section 1 -@d banner "This is CWEAVE (Version 3.64)\n" +@d banner "This is CWEAVE (Version 4.2)" @y -@d banner "This is CWEAVE (QL Version 3.64)\n" +@d banner "This is CWEAVE (QL Version 4.2)" @z @x diff --git a/source/texk/web2c/cwebdir/cweav-vms.ch b/source/texk/web2c/cwebdir/cweav-vms.ch index b6f46559c..7d80d57c1 100644 --- a/source/texk/web2c/cwebdir/cweav-vms.ch +++ b/source/texk/web2c/cwebdir/cweav-vms.ch @@ -13,25 +13,26 @@ modified: (also modified by Don Knuth to keep version numbers uptodate) @x section 1 (01-FEB-1992 ST) -@d banner "This is CWEAVE (Version 3.64)\n" +@d banner "This is CWEAVE (Version 4.2)" @y -@d banner "This is CWEAVE (VAX/VMS Version 3.64)\n" +@d banner "This is CWEAVE (VAX/VMS Version 4.2)" @z -@x section 6 (from common.h) (01-FEB-1992 ST) -#include +@x section 3 (01-FEB-1992 ST) +#include /* definition of |@!isalpha|, |@!isdigit| and so on */ +#include /* definition of |@!bool|, |@!true| and |@!false| */ +#include /* definition of |@!ptrdiff_t| */ +#include /* definition of |@!uint8_t| and |@!uint16_t| */ +#include /* definition of |@!getenv| and |@!exit| */ +#include /* definition of |@!printf| and friends */ +#include /* definition of |@!strlen|, |@!strcmp| and so on */ @y -#include stdio /* VMS searches Textlibraries faster */ -@z - -@x section 38 (1991 JM) (01-FEB-1992 ST) -#include /* definition of |isalpha|, |isdigit| and so on */ -@y -#include ctype /* VMS searches Textlibraries faster */ -@z - -@x section 39 (01-FEB-1992 ST) -@d isxalpha(c) ((c)=='_') /* non-alpha character allowed in identifier */ -@y -@d isxalpha(c) ((c)=='_' || (c)=='$') /* non-alpha characters allowed in id */ +#include ctype /* definition of |@!isalpha|, |@!isdigit| and so on */ + /* VMS searches text libraries faster */ +#include stdbool /* definition of |@!bool|, |@!true| and |@!false| */ +#include stddef /* definition of |@!ptrdiff_t| */ +#include stdint /* definition of |@!uint8_t| and |@!uint16_t| */ +#include stdlib /* definition of |@!getenv| and |@!exit| */ +#include stdio /* definition of |@!printf| and friends */ +#include string /* definition of |@!strlen|, |@!strcmp| and so on */ @z diff --git a/source/texk/web2c/cwebdir/cweav-w2c.ch b/source/texk/web2c/cwebdir/cweav-w2c.ch index 22e44e5a2..3f6310507 100644 --- a/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -1,30 +1,31 @@ -@q Changes for CWEB in TeX Live from numerous contributors. @> -@q This file is in the Public Domain. @> +@q Changes for CWEB in TeX Live from numerous contributors. @> +@q This file is in the Public Domain. @> -@q Most of the original Kpathsea changes by Wlodek Bzyl and Olaf Weber @> -@q were merged with the set of change files of the CWEBbin project; @> -@q see https://github.com/ascherer/cwebbin for the original parts. @> +@q Most of the original Kpathsea changes by Wlodek Bzyl and Olaf Weber @> +@q were merged with the set of change files of the CWEBbin project; @> +@q see https://github.com/ascherer/cwebbin for the original parts. @> -@q This stripped change file {comm,ctang,cweav,ctwill}-w2c.ch has been @> -@q created from the set of change files {comm,ctang,cweav}-patch.ch, @> -@q {comm,ctang,cweav}-ansi.ch, {comm,ctang,cweav}-extensions.ch, @> -@q {comm,ctang,cweav}-output.ch, {comm,ctang,cweav}-i18n.ch, and @> -@q cweav-twill.ch for CTWILL, and {comm,ctang,cweav,ctwill}-texlive.ch @> -@q with the 'tie' processor and is used as a monolithic changefile for @> -@q {common,ctangle,cweave}.w in TeX Live. @> +@q This stripped change file {comm,ctang,cweav,ctwill,cwebman}-w2c.ch @> +@q has been created from the elaborate set of change files @> +@q {comm,ctang,cweav,cwebman}-patch.ch, @> +@q {comm,cweav,cwebman}-extensions.ch, {comm,ctang,cweav}-output.ch, @> +@q {comm,ctang,cweav}-i18n.ch, and cweav-twill.ch for CTWILL, and @> +@q {comm,ctang,cweav,ctwill,cwebman}-texlive.ch with the 'tie' processor @> +@q and is used as a monolithic changefile for {common,ctangle,cweave}.w @> +@q and cwebman.tex in TeX Live. @> -@q Please send comments, suggestions, etc. to tex-k@@tug.org. @> +@q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CWEAVE (Version 3.64)} +\def\title{CWEAVE (Version 4.2)} @y -\def\title{CWEAVE (Version 3.64 [\TeX~Live])} +\def\title{CWEAVE (Version 4.2 [\TeX~Live])} @z @x - \centerline{(Version 3.64)} + \centerline{(Version 4.2)} @y - \centerline{(Version 3.64 [\TeX~Live])} + \centerline{(Version 4.2 [\TeX~Live])} @z @x @@ -36,347 +37,34 @@ @x } @y -}} -\datecontentspage +}}\datecontentspage @z @x -@s not_eq normal @q unreserve a C++ keyword @> +@d banner "This is CWEAVE (Version 4.2)" @y -@z - -@x -@d banner "This is CWEAVE (Version 3.64)\n" -@y -@d banner "This is CWEAVE, Version 3.64" +@d banner "This is CWEAVE, Version 4.2" /* will be extended by the \TeX~Live |versionstring| */ @z @x -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ -@y -@ For string handling we include the {\mc ANSI C} system header file instead -of predeclaring the standard system functions |@!strlen|, |@!strcmp|, -|@!strcpy|, |@!strncmp|, and |@!strncpy|. -@^system dependencies@> - -@= -#include -@z - -@x -int main (ac, av) -int ac; /* argument count */ -char **av; /* argument values */ -@y -int main (@t\1\1@> -int ac, /* argument count */ -char **av@t\2\2@>) /* argument values */ -@z - -@x - make_xrefs=force_lines=make_pb=1; /* controlled by command-line options */ - common_init(); - @; -@y - @; - common_init(); - @; -@z - -@x - if (show_banner) printf(banner); /* print a ``banner line'' */ + if (show_banner) puts(banner); /* print a ``banner line'' */ @y if (show_banner) cb_show_banner(); /* print a ``banner line'' */ @z -@x -@d max_bytes 90000 /* the number of bytes in identifiers, -@y -@d max_bytes 1000000 /* the number of bytes in identifiers, -@z - -@x -@d max_names 4000 /* number of identifiers, strings, section names; -@y -@d max_names 10239 /* number of identifiers, strings, section names; -@z - -@x -@d max_sections 2000 /* greater than the total number of sections */ -@d hash_size 353 /* should be prime */ -@d buf_size 100 /* maximum length of input line, plus one */ -@y -@d max_sections 10239 /* greater than the total number of sections */ -@d hash_size 8501 /* should be prime */ -@d buf_size 1000 /* maximum length of input line, plus one */ -@z - -@x -@d max_refs 20000 /* number of cross-references; must be less than 65536 */ -@d max_toks 20000 /* number of symbols in \CEE/ texts being parsed; -@y -@d max_refs 65535 /* number of cross-references; must be less than 65536 */ -@d max_toks 65535 /* number of symbols in \CEE/ texts being parsed; -@z - -@x -@d max_texts 4000 /* number of phrases in \CEE/ texts being parsed; -@y -@d max_texts 10239 /* number of phrases in \CEE/ texts being parsed; -@z - -@x -@d max_scraps 2000 /* number of tokens in \CEE/ texts being parsed */ -@d stack_size 400 /* number of simultaneous output levels */ -@y -@d max_scraps 10000 /* number of tokens in \CEE/ texts being parsed */ -@d stack_size 2000 /* number of simultaneous output levels */ -@z - @x @i common.h @y @i comm-w2c.h @z -@x -xref_ptr=xmem; name_dir->xref=(char*)xmem; xref_switch=0; section_xref_switch=0; -@y -xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0; -@z - @x @d append_xref(c) if (xref_ptr==xmem_end) overflow("cross-reference"); @y @d append_xref(c) if (xref_ptr==xmem_end) overflow(_("cross-reference")); @z -@x -@d no_xref (flags['x']==0) -@d make_xrefs flags['x'] /* should cross references be output? */ -@y -@d no_xref (!make_xrefs) /* should cross references be suppressed? */ -@z - -@x -void -new_xref(p) -name_pointer p; -@y -static void -new_xref( -name_pointer p) -@z - -@x - append_xref(m); xref_ptr->xlink=q; p->xref=(char*)xref_ptr; -@y - append_xref(m); xref_ptr->xlink=q; update_node(p); -@z - -@x -void -new_section_xref(p) -name_pointer p; -@y -static void -new_section_xref( -name_pointer p) -@z - -@x - if (r==xmem) p->xref=(char*)xref_ptr; -@y - if (r==xmem) update_node(p); -@z - -@x -void -set_file_flag(p) -name_pointer p; -@y -static void -set_file_flag( -name_pointer p) -@z - -@x - p->xref = (char *)xref_ptr; -@y - update_node(p); -@z - -@x -further details about them will be explained later. A |text_pointer| variable -is an index into |tok_start|. -@y -further details about them will be explained later. A \&{text\_pointer} -variable is an index into |tok_start|. -@z - -@x -tok_ptr=tok_mem+1; text_ptr=tok_start+1; tok_start[0]=tok_mem+1; -tok_start[1]=tok_mem+1; -max_tok_ptr=tok_mem+1; max_text_ptr=tok_start+1; -@y -tok_ptr=max_tok_ptr=tok_mem+1;@/ -tok_start[0]=tok_start[1]=tok_mem+1;@/ -text_ptr=max_text_ptr=tok_start+1; -@z - -@x -int names_match(p,first,l,t) -name_pointer p; /* points to the proposed match */ -char *first; /* position of first character of string */ -int l; /* length of identifier */ -eight_bits t; /* desired ilk */ -@y -boolean names_match(@t\1\1@> -name_pointer p, /* points to the proposed match */ -const char *first, /* position of first character of string */ -size_t l, /* length of identifier */ -eight_bits t@t\2\2@>) /* desired |ilk| */ -@z - -@x -void -init_p(p,t) -name_pointer p; -eight_bits t; -@y -void -init_p( -name_pointer p, -eight_bits t) -@z - -@x - p->ilk=t; p->xref=(char*)xmem; -@y - p->ilk=t; init_node(p); -@z - -@x -void -init_node(p) -name_pointer p; -@y -void -init_node( -name_pointer p) -@z - -@x - p->xref=(char*)xmem; -} -@y - p->xref=(void *)xmem; -} - -static void -update_node( -name_pointer p) -{ - p->xref=(void *)xref_ptr; -} -@z - -@x -void skip_limbo(); -@y -static void skip_limbo(void);@/ -@z - -@x -void -skip_limbo() { -@y -static void -skip_limbo(void) { -@z - -@x -unsigned -skip_TeX() /* skip past pure \TEX/ code */ -@y -static eight_bits -skip_TeX(void) /* skip past pure \TEX/ code */ -@z - -@x -eight_bits get_next(); -@y -static eight_bits get_next(void);@/ -@z - -@x -eight_bits -get_next() /* produces the next input token */ -{@+eight_bits c; /* the current character */ -@y -static eight_bits -get_next(void) /* produces the next input token */ -{ - eight_bits c; /* the current character */ -@z - -@x - else if (c=='\'' || c=='"' || (c=='L'&&(*loc=='\'' || *loc=='"'))@| -@y - else if (c=='\'' || c=='"'@| - || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| - || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))@| -@z - -@x - else if (*loc=='>') if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} - else compress(minus_gt); break; -@y - else { if (*loc=='>') { if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} - else compress(minus_gt); } } break; -@z - -@x - case '!': if (*loc=='=') compress(not_eq); break; -@y - case '!': if (*loc=='=') compress(non_eq); break; -@z - -@x - while (isalpha(*++loc) || isdigit(*loc) || isxalpha(*loc) || ishigh(*loc)); -@y - while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @| - || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); -@z - -@x - *id_loc++='$'; *id_loc++=toupper(*loc); loc++; -@y - *id_loc++='$'; *id_loc++=toupper((eight_bits)*loc); loc++; -@z - -@x - if (delim=='L') { /* wide character constant */ - delim=*loc++; *++id_loc=delim; - } -@y - if (delim=='L' || delim=='u' || delim=='U') { /* wide character constant */ - if (delim=='u' && *loc=='8') { *++id_loc=*loc++; } - delim=*loc++; *++id_loc=delim; - } -@z - @x err_print("! String didn't end"); loc=limit; break; @y @@ -390,19 +78,7 @@ get_next(void) /* produces the next input token */ @z @x - if (c=='\\') if (loc>=limit) continue; - else if (++id_loc<=section_text_end) { - *id_loc = '\\'; c=*loc++; - } -@y - if (c=='\\') { if (loc>=limit) continue; - else { if (++id_loc<=section_text_end) { - *id_loc = '\\'; c=*loc++; - } } } -@z - -@x - printf("\n! String too long: "); + fputs("\n! String too long: ",stdout); @y fputs(_("\n! String too long: "),stdout); @z @@ -413,14 +89,6 @@ get_next(void) /* produces the next input token */ case translit_code: err_print(_("! Use @@l in limbo only")); continue; @z -@x - case xref_roman: case xref_wildcard: case xref_typewriter: - case noop: case TeX_string: c=ccode[c]; skip_restricted(); return(c); -@y - case xref_roman: case xref_wildcard: case xref_typewriter: case noop: - case TeX_string: c=ccode[(eight_bits)c]; skip_restricted(); return(c); -@z - @x err_print("! Input ended in section name"); @y @@ -428,7 +96,7 @@ get_next(void) /* produces the next input token */ @z @x - printf("\n! Section name too long: "); + fputs("\n! Section name too long: ",stdout); @y fputs(_("\n! Section name too long: "),stdout); @z @@ -445,20 +113,6 @@ get_next(void) /* produces the next input token */ err_print(_("! Control codes are forbidden in section name")); break; @z -@x -void skip_restricted(); -@y -void skip_restricted(void);@/ -@z - -@x -void -skip_restricted() -@y -void -skip_restricted(void) -@z - @x err_print("! Control text didn't end"); loc=limit; @y @@ -477,68 +131,18 @@ skip_restricted(void) if (loc>=limit) err_print(_("! Verbatim string didn't end")); @z -@x -void phase_one(); -@y -static void phase_one(void);@/ -@z - -@x -void -phase_one() { -@y -static void -phase_one(void) { -@z - @x if (++section_count==max_sections) overflow("section number"); @y if (++section_count==max_sections) overflow(_("section number")); @z -@x -void C_xref(); -@y -static void C_xref(eight_bits);@/ -@z - -@x -void -C_xref( spec_ctrl ) /* makes cross-references for \CEE/ identifiers */ - eight_bits spec_ctrl; -@y -static void -C_xref(@t\1\1@> /* makes cross-references for \CEE/ identifiers */ - eight_bits spec_ctrl@t\2\2@>) -@z - -@x -void outer_xref(); -@y -static void outer_xref(void);@/ -@z - -@x -void -outer_xref() /* extension of |C_xref| */ -@y -static void -outer_xref(void) /* extension of |C_xref| */ -@z - @x case translit_code: err_print("! Use @@l in limbo only"); continue; @y case translit_code: err_print(_("! Use @@l in limbo only")); continue; @z -@x - else lhs->xref=(char*)q->xlink; -@y - else lhs->xref=(void *)q->xlink; -@z - @x err_print("! Missing left identifier of @@s"); @y @@ -552,81 +156,28 @@ outer_xref(void) /* extension of |C_xref| */ @z @x -void section_check(); -@y -static void section_check(name_pointer);@/ -@z - -@x -void -section_check(p) -name_pointer p; /* print anomalies in subtree |p| */ -@y -static void -section_check( -name_pointer p) /* print anomalies in subtree |p| */ -@z - -@x - printf("\n! Never defined: <"); print_section_name(p); putchar('>'); mark_harmless; + fputs("\n! Never defined: <",stdout); + print_section_name(p); putchar('>'); mark_harmless; @y fputs(_("\n! Never defined: <"),stdout); print_section_name(p); putchar('>'); mark_harmless; @z @x - printf("\n! Never used: <"); print_section_name(p); putchar('>'); mark_harmless; + fputs("\n! Never used: <",stdout); + print_section_name(p); putchar('>'); mark_harmless; @y fputs(_("\n! Never used: <"),stdout); print_section_name(p); putchar('>'); mark_harmless; @z -@x -If the |per_cent| parameter is 1 a |'%'| is appended to the line -@y -If the |per_cent| parameter is 1, a |'%'| is appended to the line -@z - -@x -@d tex_printf(c) fprintf(active_file,c) -@y -@d tex_printf(c) fprintf(active_file,"%s",c) -@d tex_puts(c) fputs(c,active_file) -@z - -@x -void -flush_buffer(b,per_cent,carryover) -char *b; /* outputs from |out_buf+1| to |b|,where |b<=out_ptr| */ -boolean per_cent,carryover; -@y -static void -flush_buffer(@t\1\1@> -char *b, /* outputs from |out_buf+1| to |b|, where |b<=out_ptr| */ -boolean per_cent,boolean carryover@t\2\2@>) -@z - -@x - if (b= +@= out_ptr=out_buf+1; out_line=1; active_file=tex_file; *out_ptr='c'; tex_printf("\\input cwebma"); @y @@ -639,299 +190,92 @@ the user language set by the `\.{+l}' option and its argument. If you call prepended to `\.{cwebmac.tex}', e.g., if you call \.{CWEAVE} with `\.{+ldeutsch}', you will receive the line `\.{\\input deutschcwebmac}'. Without this option the first line of the output file will be -`\.{\\input cwebmac}'. - -@= -out_ptr=out_buf+1; out_line=1; active_file=tex_file; *out_ptr='c'; -tex_puts("\\input "); -tex_printf(use_language); -tex_puts("cwebma"); -@z - -@x -void -out_str(s) /* output characters from |s| to end of string */ -char *s; -@y -static void -out_str(@t\1\1@> /* output characters from |s| to end of string */ -const char*s@t\2\2@>) -@z - -@x -void break_out(); -@y -static void break_out(void);@/ -@z - -@x -void -break_out() /* finds a way to break the output line */ -@y -static void -break_out(void) /* finds a way to break the output line */ -@z - -@x - printf("\n! Line had to be broken (output l. %d):\n",out_line); -@y - printf(_("\n! Line had to be broken (output l. %d):\n"),out_line); -@z - -@x -void -out_section(n) -sixteen_bits n; -@y -static void -out_section( -sixteen_bits n) -@z - -@x -void -out_name(p,quote_xalpha) -name_pointer p; -boolean quote_xalpha; -@y -static void -out_name( -name_pointer p, -boolean quote_xalpha) -@z - -@x -void -copy_limbo() -@y -static void -copy_limbo(void) -@z - -@x - default: err_print("! Double @@ should be used in limbo"); -@y - default: err_print(_("! Double @@ should be used in limbo")); -@z - -@x -eight_bits -copy_TeX() -@y -static eight_bits -copy_TeX(void) -@z - -@x -@d app_tok(c) {if (tok_ptr+2>tok_mem_end) overflow("token"); *(tok_ptr++)=c;} -@y -@d app_tok(c) {if (tok_ptr+2>tok_mem_end) overflow(_("token")); *(tok_ptr++)=c;} -@z - -@x -int copy_comment(); -@y -static int copy_comment(boolean,int);@/ -@z - -@x -int copy_comment(is_long_comment,bal) /* copies \TEX/ code in comments */ -boolean is_long_comment; /* is this a traditional \CEE/ comment? */ -int bal; /* brace balance */ -@y -static int copy_comment(@t\1\1@> /* copies \TeX\ code in comments */ -boolean is_long_comment, /* is this a traditional \CEE/ comment? */ -int bal@t\2\2@>) /* brace balance */ -@z - -@x - err_print("! Input ended in mid-comment"); -@y - err_print(_("! Input ended in mid-comment")); -@z - -@x - if (bal>1) err_print("! Missing } in comment"); -@y - if (bal>1) err_print(_("! Missing } in comment")); -@z - -@x - else {err_print("! Extra } in comment"); -@y - else {err_print(_("! Extra } in comment")); -@z - -@x - if (bal>1) err_print("! Missing } in comment"); -@y - if (bal>1) err_print(_("! Missing } in comment")); -@z - -@x - err_print("! Illegal use of @@ in comment"); -@y - err_print(_("! Illegal use of @@ in comment")); -@z - -@x -else if (c=='\\' && *loc!='@@') - if (phase==2) app_tok(*(loc++))@; else loc++; -@y -else { if (c=='\\' && *loc!='@@') { - if (phase==2) app_tok(*(loc++))@; else loc++; } } -@z - -@x -eight_bits cat_index; - -@ @= - for (cat_index=0;cat_index<255;cat_index++) - strcpy(cat_name[cat_index],"UNKNOWN"); -@y - -@ @= -{int c; for (c=0;c<256;c++) strcpy(cat_name[c],"UNKNOWN");} -@z - -@x -void -print_cat(c) /* symbolic printout of a category */ -eight_bits c; -@y -static void -print_cat(@t\1\1@> /* symbolic printout of a category */ -eight_bits c@t\2\2@>) -@z - -@x - printf(cat_name[c]); -@y - fputs(cat_name[c],stdout); -@z +`\.{\\input cwebmac}'. -@x -void -print_text(p) /* prints a token list for debugging; not used in |main| */ -text_pointer p; -@y -#ifdef DEAD_CODE /* not used in |main| */ -static void -print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ -text_pointer p@t\2\2@>) +@= +out_ptr=out_buf+1; out_line=1; active_file=tex_file; *out_ptr='c'; +tex_puts("\\input "); +tex_printf(use_language); +tex_puts("cwebma"); @z @x - fflush(stdout); -} + printf("\n! Line had to be broken (output l. %d):\n",out_line); @y - update_terminal; -} -#endif /* |DEAD_CODE| */ + printf(_("\n! Line had to be broken (output l. %d):\n"),out_line); @z @x -@d app(a) *(tok_ptr++)=a -@d app1(a) *(tok_ptr++)=tok_flag+(int)((a)->trans-tok_start) + default: err_print("! Double @@ should be used in limbo"); @y -@d app(a) *(tok_ptr++)=(token)(a) -@d app1(a) *(tok_ptr++)=(token)(tok_flag+(int)((a)->trans-tok_start)) + default: err_print(_("! Double @@ should be used in limbo")); @z @x -void -app_str(s) -char *s; +@d app_tok(c) {if (tok_ptr+2>tok_mem_end) overflow("token"); *(tok_ptr++)=c;} @y -static void -app_str( -const char *s) +@d app_tok(c) {if (tok_ptr+2>tok_mem_end) overflow(_("token")); *(tok_ptr++)=c;} @z @x -void -big_app(a) -token a; + err_print("! Input ended in mid-comment"); @y -static void -big_app( -token a) + err_print(_("! Input ended in mid-comment")); @z @x -void -big_app1(a) -scrap_pointer a; + if (bal>1) err_print("! Missing } in comment"); @y -static void -big_app1( -scrap_pointer a) + if (bal>1) err_print(_("! Missing } in comment")); @z @x - && pp->cat!=prerangle + else {err_print("! Extra } in comment"); @y - && pp->cat!=prerangle @| + else {err_print(_("! Extra } in comment")); @z @x - && pp->cat!=ftemplate + if (bal>1) err_print("! Missing } in comment"); @y - && pp->cat!=ftemplate @| + if (bal>1) err_print(_("! Missing } in comment")); @z @x -token_pointer -find_first_ident(p) -text_pointer p; + err_print("! Illegal use of @@ in comment"); @y -static token_pointer -find_first_ident( -text_pointer p) + err_print(_("! Illegal use of @@ in comment")); @z @x -void -make_reserved(p) /* make the first identifier in |p->trans| like |int| */ -scrap_pointer p; -@y -static void -make_reserved(@t\1\1@> /* make the first identifier in |p->trans| like |int| */ -scrap_pointer p@t\2\2@>) -@z +@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ -@x -void -make_underlined(p) -/* underline the entry for the first identifier in |p->trans| */ -scrap_pointer p; -@y +@c static void -make_underlined(@t\1\1@> -/* underline the entry for the first identifier in |p->trans| */ -scrap_pointer p@t\2\2@>) -@z - -@x -void underline_xref(); +print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @y -static void underline_xref(name_pointer);@/ +@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ + +@c +#if 0 +static void +print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ @z @x -void -underline_xref(p) -name_pointer p; +} @y -static void -underline_xref( -name_pointer p) +} +#endif @z @x - p->xref=(char*)xref_ptr; +@ @=@+static void print_text(text_pointer p); @y - update_node(p); +@ @= +#if 0 +static void print_text(text_pointer p); +#endif @z @x @@ -941,12 +285,6 @@ if (cat1==lbrace || cat1==int_like || cat1==decl) { reduce(pp,1,fn_decl,0,1); } @y -\.{CWEAVE} indents declarations after old-style function definitions. -With the \.{-i} option they will come out flush left. You won't see -any difference if you use ANSI-style function definitions. - -@d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ - @= if(cat1==lbrace || cat1==int_like || cat1==decl) { make_underlined(pp); big_app1(pp); @@ -1014,14 +352,7 @@ else if (cat1==stmt || cat1==function) { big_app1(pp+1); reduce(pp,2,cat1,-1,41); } @y -@ The original manual described the \.{-o} option for \.{CWEAVE}, but this was -not yet present. Here is a simple implementation. The purpose is to suppress -the extra space between local variable declarations and the first statement in -a function block. - -@d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ - -@= +@ @= if (cat1==decl) { big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,decl,-1,40); @@ -1044,9 +375,7 @@ else if (cat1==stmt) { big_app1(pp+1); reduce(pp,2,function,-1,52); } @y -@ Outdent after parameter declarations with option \.{-i}. - -@= +@ @= if (cat1==decl) { big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51); } @@ -1060,34 +389,6 @@ else if (cat1==stmt) { } @z -@x -void -reduce(j,k,c,d,n) -scrap_pointer j; -eight_bits c; -short k, d, n; -@y -static void -reduce( -scrap_pointer j, short k, -eight_bits c, -short d, short n) -@z - -@x -void -squash(j,k,c,d,n) -scrap_pointer j; -eight_bits c; -short k, d, n; -@y -static void -squash( -scrap_pointer j, short k, -eight_bits c, -short d, short n) -@z - @x overflow("token"); @y @@ -1100,38 +401,6 @@ short d, short n) overflow(_("text")); @z -@x -{ scrap_pointer k; /* pointer into |scrap_info| */ - if (tracing==2) { - printf("\n%d:",n); - for (k=scrap_base; k<=lo_ptr; k++) { - if (k==pp) putxchar('*'); else putxchar(' '); - if (k->mathness %4 == yes_math) putchar('+'); - else if (k->mathness %4 == no_math) putchar('-'); - print_cat(k->cat); - if (k->mathness /4 == yes_math) putchar('+'); - else if (k->mathness /4 == no_math) putchar('-'); -@y -{ scrap_pointer k_l; /* pointer into |scrap_info| */ - if (tracing==2) { - printf("\n%d:",n); - for (k_l=scrap_base; k_l<=lo_ptr; k_l++) { - if (k_l==pp) putxchar('*'); else putxchar(' '); - if (k_l->mathness %4 == yes_math) putchar('+'); - else if (k_l->mathness %4 == no_math) putchar('-'); - print_cat(k_l->cat); - if (k_l->mathness /4 == yes_math) putchar('+'); - else if (k_l->mathness /4 == no_math) putchar('-'); -@z - -@x -text_pointer -translate() /* converts a sequence of scraps */ -@y -static text_pointer -translate(void) /* converts a sequence of scraps */ -@z - @x if (tok_ptr+6>tok_mem_end) overflow("token"); @y @@ -1150,228 +419,24 @@ translate(void) /* converts a sequence of scraps */ printf(_("\nTracing after l. %d:\n"),cur_line); mark_harmless; @z -@x -void -C_parse(spec_ctrl) /* creates scraps from \CEE/ tokens */ - eight_bits spec_ctrl; -@y -static void -C_parse(@t\1\1@> /* creates scraps from \CEE/ tokens */ - eight_bits spec_ctrl@t\2\2@>) -@z - -@x -switch (next_control) { - case section_name: - app(section_flag+(int)(cur_section-name_dir)); - app_scrap(section_scrap,maybe_math); - app_scrap(exp,yes_math);@+break; - case string: case constant: case verbatim: @; - @+break; - case identifier: app_cur_id(1);@+break; - case TeX_string: @;@+break; - case '/': case '.': - app(next_control); app_scrap(binop,yes_math);@+break; - case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break; -@.\\langle@> - case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break; -@.\\rangle@> - case '=': app_str("\\K"); app_scrap(binop,yes_math);@+break; -@.\\K@> - case '|': app_str("\\OR"); app_scrap(binop,yes_math);@+break; -@.\\OR@> - case '^': app_str("\\XOR"); app_scrap(binop,yes_math);@+break; -@.\\XOR@> - case '%': app_str("\\MOD"); app_scrap(binop,yes_math);@+break; -@.\\MOD@> - case '!': app_str("\\R"); app_scrap(unop,yes_math);@+break; -@.\\R@> - case '~': app_str("\\CM"); app_scrap(unop,yes_math);@+break; -@.\\CM@> - case '+': case '-': app(next_control); app_scrap(ubinop,yes_math);@+break; - case '*': app(next_control); app_scrap(raw_ubin,yes_math);@+break; - case '&': app_str("\\AND"); app_scrap(raw_ubin,yes_math);@+break; -@.\\AND@> - case '?': app_str("\\?"); app_scrap(question,yes_math);@+break; -@.\\?@> - case '#': app_str("\\#"); app_scrap(ubinop,yes_math);@+break; -@.\\\#@> - case ignore: case xref_roman: case xref_wildcard: - case xref_typewriter: case noop:@+break; - case '(': case '[': app(next_control); app_scrap(lpar,maybe_math);@+break; - case ')': case ']': app(next_control); app_scrap(rpar,maybe_math);@+break; - case '{': app_str("\\{"@q}@>); app_scrap(lbrace,yes_math);@+break; -@.\\\{@>@q}@> - case '}': app_str(@q{@>"\\}"); app_scrap(rbrace,yes_math);@+break; -@q{@>@.\\\}@> - case ',': app(','); app_scrap(comma,yes_math);@+break; - case ';': app(';'); app_scrap(semi,maybe_math);@+break; - case ':': app(':'); app_scrap(colon,no_math);@+break;@/ - @t\4@> @@; - case thin_space: app_str("\\,"); app_scrap(insert,maybe_math);@+break; -@.\\,@> - case math_break: app(opt); app_str("0"); - app_scrap(insert,maybe_math);@+break; - case line_break: app(force); app_scrap(insert,no_math);@+break; - case left_preproc: app(force); app(preproc_line); - app_str("\\#"); app_scrap(lproc,no_math);@+break; -@.\\\#@> - case right_preproc: app(force); app_scrap(rproc,no_math);@+break; - case big_line_break: app(big_force); app_scrap(insert,no_math);@+break; - case no_line_break: app(big_cancel); app(noop); app(break_space); - app(noop); app(big_cancel); - app_scrap(insert,no_math);@+break; - case pseudo_semi: app_scrap(semi,maybe_math);@+break; - case macro_arg_open: app_scrap(begin_arg,maybe_math);@+break; - case macro_arg_close: app_scrap(end_arg,maybe_math);@+break; - case join: app_str("\\J"); app_scrap(insert,no_math);@+break; -@.\\J@> - case output_defs_code: app(force); app_str("\\ATH"); app(force); - app_scrap(insert,no_math);@+break; -@.\\ATH@> - default: app(inserted); app(next_control); - app_scrap(insert,maybe_math);@+break; -} -@y -switch (next_control) { - case section_name: - app(section_flag+(int)(cur_section-name_dir)); - app_scrap(section_scrap,maybe_math); - app_scrap(exp,yes_math);@+break; - case string: case constant: case verbatim: - @;@+break; - case identifier: app_cur_id(1);@+break; - case TeX_string: - @;@+break; - case '/': case '.': - app(next_control);@+app_scrap(binop,yes_math);@+break; - case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break; -@.\\langle@> - case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break; -@.\\rangle@> - case '=': app_str("\\K");@+app_scrap(binop,yes_math);@+break; -@.\\K@> - case '|': app_str("\\OR");@+app_scrap(binop,yes_math);@+break; -@.\\OR@> - case '^': app_str("\\XOR");@+app_scrap(binop,yes_math);@+break; -@.\\XOR@> - case '%': app_str("\\MOD");@+app_scrap(binop,yes_math);@+break; -@.\\MOD@> - case '!': app_str("\\R");@+app_scrap(unop,yes_math);@+break; -@.\\R@> - case '~': app_str("\\CM");@+app_scrap(unop,yes_math);@+break; -@.\\CM@> - case '+': case '-': app(next_control);@+app_scrap(ubinop,yes_math);@+break; - case '*': app(next_control);@+app_scrap(raw_ubin,yes_math);@+break; - case '&': app_str("\\AND");@+app_scrap(raw_ubin,yes_math);@+break; -@.\\AND@> - case '?': app_str("\\?");@+app_scrap(question,yes_math);@+break; -@.\\?@> - case '#': app_str("\\#");@+app_scrap(ubinop,yes_math);@+break; -@.\\\#@> - case ignore: case xref_roman: case xref_wildcard: - case xref_typewriter: case noop:@+break; - case '(': case '[': app(next_control);@+app_scrap(lpar,maybe_math);@+break; - case ')': case ']': app(next_control);@+app_scrap(rpar,maybe_math);@+break; - case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break; -@.\\\{@>@q}@> - case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break; -@q{@>@.\\\}@> - case ',': app(',');@+app_scrap(comma,yes_math);@+break; - case ';': app(';');@+app_scrap(semi,maybe_math);@+break; - case ':': app(':');@+app_scrap(colon,no_math);@+break;@/ - @t\4@> @@; - case thin_space: app_str("\\,");@+app_scrap(insert,maybe_math);@+break; -@.\\,@> - case math_break: app(opt);@+app_str("0");@+ - app_scrap(insert,maybe_math);@+break; - case line_break: app(force);@+app_scrap(insert,no_math);@+break; - case left_preproc: app(force);@+app(preproc_line);@+app_str("\\#"); - app_scrap(lproc,no_math);@+break; -@.\\\#@> - case right_preproc: app(force);@+app_scrap(rproc,no_math);@+break; - case big_line_break: app(big_force);@+app_scrap(insert,no_math);@+break; - case no_line_break: app(big_cancel);@+app(noop);@+app(break_space);@+ - app(noop);@+app(big_cancel); app_scrap(insert,no_math);@+break; - case pseudo_semi: app_scrap(semi,maybe_math);@+break; - case macro_arg_open: app_scrap(begin_arg,maybe_math);@+break; - case macro_arg_close: app_scrap(end_arg,maybe_math);@+break; - case join: app_str("\\J");@+app_scrap(insert,no_math);@+break; -@.\\J@> - case output_defs_code: app(force);@+app_str("\\ATH");@+app(force); - app_scrap(insert,no_math);@+break; -@.\\ATH@> - default: app(inserted);@+app(next_control); - app_scrap(insert,maybe_math);@+break; -} -@z - @x overflow("scrap/token/text"); @y overflow(_("scrap/token/text")); @z -@x -case not_eq: app_str("\\I");@+app_scrap(binop,yes_math);@+break; -@y -case non_eq: app_str("\\I");@+app_scrap(binop,yes_math);@+break; -@z - @x else err_print("! Double @@ should be used in strings"); @y else err_print(_("! Double @@ should be used in strings")); @z -@x -void app_cur_id(); -@y -void app_cur_id(boolean);@/ -@z - -@x -void -app_cur_id(scrapping) -boolean scrapping; /* are we making this into a scrap? */ -@y -void -app_cur_id(@t\1\1@> -boolean scrapping@t\2\2@>) /* are we making this into a scrap? */ -@z - -@x -text_pointer -C_translate() -@y -static text_pointer -C_translate(void) -@z - @x if (next_control!='|') err_print("! Missing '|' after C text"); @y if (next_control!='|') err_print(_("! Missing '|' after C text")); @z -@x -void -outer_parse() /* makes scraps from \CEE/ tokens and comments */ -@y -static void -outer_parse(void) /* makes scraps from \CEE/ tokens and comments */ -@z - -@x -void -push_level(p) /* suspends the current level */ -text_pointer p; -@y -static void -push_level(@t\1\1@> /* suspends the current level */ -text_pointer p@t\2\2@>) -@z - @x if (stack_ptr==stack_end) overflow("stack"); @y @@ -1379,87 +444,17 @@ text_pointer p@t\2\2@>) @z @x -void -pop_level() -@y -static void -pop_level(void) -@z - -@x -eight_bits -get_output() /* returns the next token of output */ -@y -static eight_bits -get_output(void) /* returns the next token of output */ -@z - -@x - return(a); -@y - return((eight_bits)a); -@z - -@x -void -output_C() /* outputs the current token list */ -@y -static void -output_C(void) /* outputs the current token list */ -@z - -@x -void make_output(); -@y -static void make_output(void);@/ -@z - -@x -void -make_output() /* outputs the equivalents of tokens */ -{ - eight_bits a, /* current output byte */ -@y -static void -make_output(void) /* outputs the equivalents of tokens */ -{ - eight_bits a=0, /* current output byte */ -@z - -@x - else if (b!='|') out(b)@; -@y - else { if (b!='|') out(b)@; -@z - -@x - } -@y - } } -@z - -@x - printf("\n! Illegal control code in section name: <"); + fputs("\n! Illegal control code in section name: <",stdout); @y fputs(_("\n! Illegal control code in section name: <"),stdout); @z @x - printf("\n! C text in section name didn't end: <"); + fputs("\n! C text in section name didn't end: <",stdout); @y fputs(_("\n! C text in section name didn't end: <"),stdout); @z -@x - if (b=='\'' || b=='"') - if (delim==0) delim=b; - else if (delim==b) delim=0; -@y - if (b=='\'' || b=='"') { - if (delim==0) delim=b; - else if (delim==b) delim=0; } -@z - @x if (j>buffer+long_buf_size-3) overflow("buffer"); @y @@ -1473,21 +468,7 @@ make_output(void) /* outputs the equivalents of tokens */ @z @x -void phase_two(); -@y -static void phase_two(void);@/ -@z - -@x -void -phase_two() { -@y -static void -phase_two(void) { -@z - -@x -reset_input(); if (show_progress) printf("\nWriting the output file..."); +reset_input(); if (show_progress) fputs("\nWriting the output file...",stdout); @y reset_input(); if (show_progress) fputs(_("\nWriting the output file..."),stdout); @z @@ -1504,42 +485,6 @@ reset_input(); if (show_progress) fputs(_("\nWriting the output file..."),stdout err_print(_("! You can't do that in TeX text")); break; @z -@x -void finish_C(); -@y -static void finish_C(boolean);@/ -@z - -@x -void -finish_C(visible) /* finishes a definition or a \CEE/ part */ - boolean visible; /* nonzero if we should produce \TEX/ output */ -@y -static void -finish_C(@t\1\1@> /* finishes a definition or a \Cee\ part */ - boolean visible@t\2\2@>) /* nonzero if we should produce \TeX\ output */ -@z - -@x - if (out_ptr>out_buf+1) - if (*(out_ptr-1)=='\\') -@.\\6@> -@.\\7@> -@.\\Y@> - if (*out_ptr=='6') out_ptr-=2; - else if (*out_ptr=='7') *out_ptr='Y'; -@y - if (out_ptr>out_buf+1) { - if (*(out_ptr-1)=='\\') { -@.\\6@> -@.\\7@> -@.\\Y@> - if (*out_ptr=='6') out_ptr-=2; - else if (*out_ptr=='7') *out_ptr='Y'; - } - } -@z - @x err_print("! Improper macro definition"); @y @@ -1570,36 +515,6 @@ finish_C(@t\1\1@> /* finishes a definition or a \Cee\ part */ err_print(_("! You can't do that in C text")); @z -@x -void footnote(); -@y -static void footnote(sixteen_bits);@/ -@z - -@x -void -footnote(flag) /* outputs section cross-references */ -sixteen_bits flag; -@y -static void -footnote(@t\1\1@> /* outputs section cross-references */ -sixteen_bits flag@t\2\2@>) -@z - -@x -void phase_three(); -@y -static void phase_three(void);@/ -@z - -@x -void -phase_three() { -@y -static void -phase_three(void) { -@z - @x if (no_xref) { finish_line(); @@ -1617,55 +532,23 @@ if (no_xref) { @z @x - phase=3; if (show_progress) printf("\nWriting the index..."); + phase=3; if (show_progress) fputs("\nWriting the index...",stdout); @y phase=3; if (show_progress) fputs(_("\nWriting the index..."),stdout); @z -@x - if ((idx_file=fopen(idx_file_name,"w"))==NULL) -@y - if ((idx_file=fopen(idx_file_name,"wb"))==NULL) -@z - @x fatal("! Cannot open index file ",idx_file_name); @y fatal(_("! Cannot open index file "),idx_file_name); @z -@x - @; finish_line(); finish_line(); -@y - @@; finish_line(); finish_line(); -@z - -@x - @; - @; -@y - @@; - @@; -@z - -@x - if ((scn_file=fopen(scn_file_name,"w"))==NULL) -@y - if ((scn_file=fopen(scn_file_name,"wb"))==NULL) -@z - @x fatal("! Cannot open section file ",scn_file_name); @y fatal(_("! Cannot open section file "),scn_file_name); @z -@x - @; -@y - @@; -@z - @x @.\\end@> finish_line(); @@ -1679,106 +562,9 @@ finish_line(); fclose(active_file); active_file=NULL; @z @x -if (show_happiness) printf("\nDone."); + fputs("Done.",stdout); @y -if (show_happiness) { - if (show_progress) new_line; fputs(_("Done."),stdout); -} -@z - -@x -for (c=0; c<=255; c++) bucket[c]=NULL; -@y -for (c=0; c<256; c++) bucket[c]=NULL; -@z - -@x - if (cur_name->xref!=(char*)xmem) { -@y - if (cur_name->xref!=(void *)xmem) { -@z - -@x -collate[0]=0; -strcpy(collate+1," \1\2\3\4\5\6\7\10\11\12\13\14\15\16\17"); -/* 16 characters + 1 = 17 */ -strcpy(collate+17,"\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"); -/* 16 characters + 17 = 33 */ -strcpy(collate+33,"!\42#$%&'()*+,-./:;<=>?@@[\\]^`{|}~_"); -/* 32 characters + 33 = 65 */ -strcpy(collate+65,"abcdefghijklmnopqrstuvwxyz0123456789"); -/* (26 + 10) characters + 65 = 101 */ -strcpy(collate+101,"\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"); -/* 16 characters + 101 = 117 */ -strcpy(collate+117,"\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"); -/* 16 characters + 117 = 133 */ -strcpy(collate+133,"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"); -/* 16 characters + 133 = 149 */ -strcpy(collate+149,"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"); -/* 16 characters + 149 = 165 */ -strcpy(collate+165,"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"); -/* 16 characters + 165 = 181 */ -strcpy(collate+181,"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"); -/* 16 characters + 181 = 197 */ -strcpy(collate+197,"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"); -/* 16 characters + 197 = 213 */ -strcpy(collate+213,"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"); -/* 16 characters + 213 = 229 */ -@y -collate[0]=0; -strcpy((char *)collate+1, - " \1\2\3\4\5\6\7\10\11\12\13\14\15\16\17"); -/* 16 characters + 1 = 17 */ -strcpy((char *)collate+17, - "\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"); -/* 16 characters + 17 = 33 */ -strcpy((char *)collate+33, - "!\42#$%&'()*+,-./:;<=>?@@[\\]^`{|}~_"); -/* 32 characters + 33 = 65 */ -strcpy((char *)collate+65, - "abcdefghijklmnopqrstuvwxyz0123456789"); -/* (26 + 10) characters + 65 = 101 */ -strcpy((char *)collate+101, - "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"); -/* 16 characters + 101 = 117 */ -strcpy((char *)collate+117, - "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"); -/* 16 characters + 117 = 133 */ -strcpy((char *)collate+133, - "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"); -/* 16 characters + 133 = 149 */ -strcpy((char *)collate+149, - "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"); -/* 16 characters + 149 = 165 */ -strcpy((char *)collate+165, - "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"); -/* 16 characters + 165 = 181 */ -strcpy((char *)collate+181, - "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"); -/* 16 characters + 181 = 197 */ -strcpy((char *)collate+197, - "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"); -/* 16 characters + 197 = 213 */ -strcpy((char *)collate+213, - "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"); -/* 16 characters + 213 = 229 */ -@z - -@x -void unbucket(); -@y -static void unbucket(eight_bits);@/ -@z - -@x -void -unbucket(d) /* empties buckets having depth |d| */ -eight_bits d; -@y -static void -unbucket(@t\1\1@> /* empties buckets having depth |d| */ -eight_bits d@t\2\2@>) @z @x @@ -1788,144 +574,78 @@ eight_bits d@t\2\2@>) @z @x -void section_print(); -@y -static void section_print(name_pointer);@/ -@z - -@x -void -section_print(p) /* print all section names in subtree |p| */ -name_pointer p; -@y -static void -section_print(@t\1\1@> /* print all section names in subtree |p| */ -name_pointer p@t\2\2@>) -@z - -@x -@ @=section_print(root) -@y -@ @=section_print(root); -@z - -@x -void -print_stats() { -@y -void -print_stats(void) { -@z - -@x - printf("\nMemory usage statistics:\n"); + puts("\nMemory usage statistics:"); @.Memory usage statistics:@> printf("%ld names (out of %ld)\n", - (long)(name_ptr-name_dir),(long)max_names); + (ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf("%ld cross-references (out of %ld)\n", - (long)(xref_ptr-xmem),(long)max_refs); + (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); printf("%ld bytes (out of %ld)\n", - (long)(byte_ptr-byte_mem),(long)max_bytes); - printf("Parsing:\n"); + (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); + puts("Parsing:"); printf("%ld scraps (out of %ld)\n", - (long)(max_scr_ptr-scrap_info),(long)max_scraps); + (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); printf("%ld texts (out of %ld)\n", - (long)(max_text_ptr-tok_start),(long)max_texts); + (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); printf("%ld tokens (out of %ld)\n", - (long)(max_tok_ptr-tok_mem),(long)max_toks); + (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); printf("%ld levels (out of %ld)\n", - (long)(max_stack_ptr-stack),(long)stack_size); - printf("Sorting:\n"); + (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); + puts("Sorting:"); printf("%ld levels (out of %ld)\n", - (long)(max_sort_ptr-scrap_info),(long)max_scraps); -} + (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @y puts(_("\nMemory usage statistics:")); @.Memory usage statistics:@> printf(_("%ld names (out of %ld)\n"), - (long)(name_ptr-name_dir),(long)max_names); + (ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf(_("%ld cross-references (out of %ld)\n"), - (long)(xref_ptr-xmem),(long)max_refs); + (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); printf(_("%ld bytes (out of %ld)\n"), - (long)(byte_ptr-byte_mem),(long)max_bytes); + (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); puts(_("Parsing:")); printf(_("%ld scraps (out of %ld)\n"), - (long)(max_scr_ptr-scrap_info),(long)max_scraps); + (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); printf(_("%ld texts (out of %ld)\n"), - (long)(max_text_ptr-tok_start),(long)max_texts); + (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); printf(_("%ld tokens (out of %ld)\n"), - (long)(max_tok_ptr-tok_mem),(long)max_toks); + (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); printf(_("%ld levels (out of %ld)\n"), - (long)(max_stack_ptr-stack),(long)stack_size); + (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts(_("Sorting:")); printf(_("%ld levels (out of %ld)\n"), - (long)(max_sort_ptr-scrap_info),(long)max_scraps); -} + (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @z @x @** Index. @y -@** Extensions for modern {\tt CWEB}. The following sections introduce changes -and extensions to the code that have been created by numerous contributors over -the course of a quarter century. They make \.{CWEB} adhere to modern coding -standards and introduce new or improved features. +@** Extensions to \.{CWEB}. The following sections introduce new or improved +features that have been created by numerous contributors over the course of a +quarter century. Care has been taken to keep the original section numbering intact, so this new -section should have the same number as the original ``\&{250.~Index},'' and -additional material follows below. +material should nicely integrate with the original ``\&{263.~Index}.'' + +@* Formatting alternatives. +\.{CWEAVE} indents declarations after old-style function definitions. +With the \.{-i} option they will come out flush left. You won't see +any difference if you use ANSI-style function definitions. -@* Set {\tt CWEAVE} flags. -At least one of these is already used in \.{COMMON}. +@d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ @= - make_xrefs=force_lines=make_pb=indent_param_decl=order_decl_stmt=1; - /* controlled by command-line options */ - -@* Function declarations. Here are declarations---conforming to -{\mc ANSI~C}---of all functions in this code, as far as they are -not already in |"common.h"|. These are private to \.{CWEAVE}. - -@= -static eight_bits copy_TeX(void);@/ -static eight_bits get_output(void);@/ -static eight_bits skip_TeX(void);@/ -static text_pointer C_translate(void);@/ -static text_pointer translate(void);@/ -static token_pointer find_first_ident(text_pointer);@/ -static void app_str(const char *);@/ -static void big_app(token);@/ -static void big_app1(scrap_pointer);@/ -static void copy_limbo(void);@/ -static void C_parse(eight_bits);@/ -static void finish_line(void);@/ -static void flush_buffer(char *,boolean,boolean);@/ -static void make_reserved(scrap_pointer);@/ -static void make_underlined(scrap_pointer);@/ -static void new_section_xref(name_pointer);@/ -static void new_xref(name_pointer);@/ -static void outer_parse(void);@/ -static void output_C(void);@/ -static void out_name(name_pointer,boolean);@/ -static void out_section(sixteen_bits);@/ -static void out_str(const char *);@/ -static void pop_level(void);@/ -static void print_cat(eight_bits);@/ -#ifdef DEAD_CODE -static void print_text(text_pointer p);@/ -#endif -static void push_level(text_pointer);@/ -static void reduce(scrap_pointer,short,eight_bits,short,short);@/ -static void set_file_flag(name_pointer);@/ -static void skip_limbo(void);@/ -static void squash(scrap_pointer,short,eight_bits,short,short);@/ -static void update_node(name_pointer p);@/ - -@* Language setting. This global variable is defined and set in \.{COMMON} by -the `\.{+l}' (or `\.{-l}') command-line option. - -@= -extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */ +indent_param_decl=true; + +@ The original manual described the \.{-o} option for \.{CWEAVE}, but this was +not yet present. Here is a simple implementation. The purpose is to suppress +the extra space between local variable declarations and the first statement in +a function block. + +@d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ + +@= +order_decl_stmt=true; @* Output file update. Most \CEE/ projects are controlled by a \.{Makefile} that automatically takes care of the temporal dependecies diff --git a/source/texk/web2c/cwebdir/cweav-w32.ch b/source/texk/web2c/cwebdir/cweav-w32.ch index 26825b0bf..346d00771 100644 --- a/source/texk/web2c/cwebdir/cweav-w32.ch +++ b/source/texk/web2c/cwebdir/cweav-w32.ch @@ -2,51 +2,33 @@ This is the change file for CWEB's CWEAVE under Win32 (Contributed by Fabrice Popineau, February 2002) @x section 1 -@d banner "This is CWEAVE (Version 3.64)\n" +@d banner "This is CWEAVE (Version 4.2)" @y -@d banner "This is CWEAVE (Version 3.64win32)\n" +@d banner "This is CWEAVE (Version 4.2win32)" @z @x -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ -@y -@z - -@x -int names_match(p,first,l,t) -name_pointer p; /* points to the proposed match */ +boolean names_match(@t\1\1@> +name_pointer p, /* points to the proposed match */ +const char *first, /* position of first character of string */ +size_t l, /* length of identifier */ +eight_bits t@t\2\2@>) /* desired |ilk| */ @y -int __cdecl names_match(p,first,l,t) -name_pointer p; /* points to the proposed match */ +boolean __cdecl names_match(@t\1\1@> +name_pointer p, /* points to the proposed match */ +const char *first, /* position of first character of string */ +size_t l, /* length of identifier */ +eight_bits t@t\2\2@>) /* desired |ilk| */ @z @x void -init_p(p,t) -name_pointer p; +init_p( +name_pointer p, +eight_bits t) @y void __cdecl -init_p(p,t) -name_pointer p; -@z - -@x -@ @= -#include /* definition of |isalpha|, |isdigit| and so on */ -#include /* definition of |exit| */ -@y -@ @= -#include /* definition of |isalpha|, |isdigit| and so on */ -#include /* definition of |exit| */ -#include /* definition of |strncmp| and |strncpy| */ +init_p( +name_pointer p, +eight_bits t) @z diff --git a/source/texk/web2c/cwebdir/cweave.w b/source/texk/web2c/cwebdir/cweave.w index e06762b1f..a8e31055b 100644 --- a/source/texk/web2c/cwebdir/cweave.w +++ b/source/texk/web2c/cwebdir/cweave.w @@ -2,10 +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 3.64 --- February 2002 -% (essentially the same as version 3.6, which added -% recently introduced features of standard C++ to version 3.4) -% (In November 2016 I made minor adjustments but changed no code -- DEK) +% Version 4.2 --- February 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -18,6 +15,11 @@ % entire resulting derived work is given a different name and distributed % under the terms of a permission notice identical to this one. +% Amendments to 'cweave.w' resulting in this updated version were created +% by numerous collaborators over the course of many years. + +% Please send comments, suggestions, etc. to tex-k@@tug.org. + % Here is TeX material that gets inserted after \input cwebmac \def\hang{\hangindent 3em\indent\ignorespaces} \def\pb{$\.|\ldots\.|$} % C brackets (|...|) @@ -30,11 +32,11 @@ \def\skipxTeX{\\{skip\_\TEX/}} \def\copyxTeX{\\{copy\_\TEX/}} -\def\title{CWEAVE (Version 3.64)} +\def\title{CWEAVE (Version 4.2)} \def\topofcontents{\null\vfill \centerline{\titlefont The {\ttitlefont CWEAVE} processor} \vskip 15pt - \centerline{(Version 3.64)} + \centerline{(Version 4.2)} \vfill} \def\botofcontents{\vfill \noindent @@ -52,7 +54,6 @@ under the terms of a permission notice identical to this one. } \pageno=\contentspagenumber \advance\pageno by 1 \let\maybe=\iftrue -@s not_eq normal @q unreserve a C++ keyword @> @** Introduction. This is the \.{CWEAVE} program by Silvio Levy and Donald E. Knuth, @@ -66,27 +67,15 @@ Crusius, and others who have contributed improvements. The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 3.64)\n" +@d banner "This is CWEAVE (Version 4.2)" @c @@/ @h @@/ @@/ -@@/ +@@/ @ -@ We predeclare several standard system functions here instead of including -their system header files, because the names of the header files are not as -standard as the names of the functions. (For example, some \CEE/ environments -have \.{} where others have \.{}.) - -@= -extern int strlen(); /* length of string */ -extern int strcmp(); /* compare strings lexicographically */ -extern char* strcpy(); /* copy one string to another */ -extern int strncmp(); /* compare up to $n$ string characters */ -extern char* strncpy(); /* copy up to $n$ string characters */ - @ \.{CWEAVE} has a fairly straightforward outline. It operates in three phases: First it inputs the source file and stores cross-reference data, then it inputs the source once again and produces the \TEX/ output @@ -96,52 +85,40 @@ Please read the documentation for \.{common}, the set of routines common to \.{CTANGLE} and \.{CWEAVE}, before proceeding further. @c -int main (ac, av) -int ac; /* argument count */ -char **av; /* argument values */ +int main (@t\1\1@> +int ac, /* argument count */ +char **av@t\2\2@>) /* argument values */ { argc=ac; argv=av; program=cweave; - make_xrefs=force_lines=make_pb=1; /* controlled by command-line options */ + @@; common_init(); - @; - if (show_banner) printf(banner); /* print a ``banner line'' */ - @; + @@; + if (show_banner) puts(banner); /* print a ``banner line'' */ + @@; 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 */ } +@ The next few sections contain stuff from the file |"common.w"| that must +be included in both |"ctangle.w"| and |"cweave.w"|. It appears in +file |"common.h"|, which is also included in |"common.w"| to propagate +possible changes from this \.{COMMON} interface consistently. + +@i common.h + @ The following parameters were sufficient in the original \.{WEAVE} to handle \TEX/, so they should be sufficient for most applications of \.{CWEAVE}. -If you change |max_bytes|, |max_names|, |hash_size|, or |buf_size| -you have to change them also in the file |"common.w"|. - -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240; used in |"common.w"| */ -@d max_sections 2000 /* greater than the total number of sections */ -@d hash_size 353 /* should be prime */ -@d buf_size 100 /* maximum length of input line, plus one */ -@d longest_name 10000 /* section names and strings shouldn't be longer than this */ -@d long_buf_size (buf_size+longest_name) + @d line_length 80 /* lines of \TEX/ output have at most this many characters; should be less than 256 */ -@d max_refs 20000 /* number of cross-references; must be less than 65536 */ -@d max_toks 20000 /* number of symbols in \CEE/ texts being parsed; - must be less than 65536 */ -@d max_texts 4000 /* number of phrases in \CEE/ texts being parsed; +@d max_refs 65535 /* number of cross-references; must be less than 65536 */ +@d max_texts 10239 /* number of phrases in \CEE/ texts being parsed; must be less than 10240 */ -@d max_scraps 2000 /* number of tokens in \CEE/ texts being parsed */ -@d stack_size 400 /* number of simultaneous output levels */ - -@ The next few sections contain stuff from the file |"common.w"| that must -be included in both |"ctangle.w"| and |"cweave.w"|. It appears in -file |"common.h"|, which needs to be updated when |"common.w"| changes. - -@i common.h +@d max_scraps 10000 /* number of tokens in \CEE/ texts being parsed */ @* Data structures exclusive to {\tt CWEAVE}. As explained in \.{common.w}, the field of a |name_info| structure @@ -205,8 +182,8 @@ is the total number of sections that have started. Sections which have 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 @@ -237,11 +214,11 @@ typedef struct xref_info { } 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|. @@ -252,7 +229,7 @@ has a special first cross-reference whose |num| field is |file_flag|. @d xref equiv_or_xref @= -xref_ptr=xmem; name_dir->xref=(char*)xmem; xref_switch=0; section_xref_switch=0; +xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0; xmem->num=0; /* sentinel value */ @ A new cross-reference for an identifier is formed by calling |new_xref|, @@ -266,16 +243,20 @@ If one were careful, one could probably make more changes around section @d append_xref(c) if (xref_ptr==xmem_end) overflow("cross-reference"); else (++xref_ptr)->num=c; -@d no_xref (flags['x']==0) -@d make_xrefs flags['x'] /* should cross references be output? */ +@d no_xref (!make_xrefs) @d is_tiny(p) ((p+1)->byte_start==(p)->byte_start+1) @d unindexed(a) (ailk>=custom) /* tells if uses of a name are to be indexed */ -@c -void -new_xref(p) -name_pointer p; +@= +static void new_xref(name_pointer);@/ +static void new_section_xref(name_pointer);@/ +static void set_file_flag(name_pointer); + +@ @c +static void +new_xref( +name_pointer p) { xref_pointer q; /* pointer to previous cross-reference */ sixteen_bits m, n; /* new and previous cross-reference value */ @@ -289,7 +270,7 @@ name_pointer p; q->num=m; return; } } - append_xref(m); xref_ptr->xlink=q; p->xref=(char*)xref_ptr; + append_xref(m); xref_ptr->xlink=q; update_node(p); } @ The cross-reference lists for section names are slightly different. @@ -304,9 +285,9 @@ the length of the list, under foreseeable uses of \.{CWEAVE} this inefficiency is insignificant. @c -void -new_section_xref(p) -name_pointer p; +static void +new_section_xref( +name_pointer p) { xref_pointer q,r; /* pointers to previous cross-references */ q=(xref_pointer)p->xref; r=xmem; @@ -316,7 +297,7 @@ name_pointer p; return; /* don't duplicate entries */ append_xref(section_count+section_xref_switch); xref_ptr->xlink=q; section_xref_switch=0; - if (r==xmem) p->xref=(char*)xref_ptr; + if (r==xmem) update_node(p); else r->xlink=xref_ptr; } @@ -324,23 +305,23 @@ name_pointer p; |file_flag|. Here's how that flag gets put~in. @c -void -set_file_flag(p) -name_pointer p; +static void +set_file_flag( +name_pointer p) { xref_pointer q; q=(xref_pointer)p->xref; if (q->num==file_flag) return; append_xref(file_flag); xref_ptr->xlink = q; - p->xref = (char *)xref_ptr; + update_node(p); } @ A third large area of memory is used for sixteen-bit `tokens', which appear in short lists similar to the strings of characters in |byte_mem|. Token lists are used to contain the result of \CEE/ code translated into \TEX/ form; -further details about them will be explained later. A |text_pointer| variable -is an index into |tok_start|. +further details about them will be explained later. A \&{text\_pointer} +variable is an index into |tok_start|. @= typedef sixteen_bits token; @@ -352,49 +333,58 @@ that is unoccupied by replacement text is called |tok_ptr|, and the first 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=tok_mem+1; text_ptr=tok_start+1; tok_start[0]=tok_mem+1; -tok_start[1]=tok_mem+1; -max_tok_ptr=tok_mem+1; max_text_ptr=tok_start+1; +tok_ptr=max_tok_ptr=tok_mem+1;@/ +tok_start[0]=tok_start[1]=tok_mem+1;@/ +text_ptr=max_text_ptr=tok_start+1; @ Here are the three procedures needed to complete |id_lookup|: @c -int names_match(p,first,l,t) -name_pointer p; /* points to the proposed match */ -char *first; /* position of first character of string */ -int l; /* length of identifier */ -eight_bits t; /* desired ilk */ +boolean names_match(@t\1\1@> +name_pointer p, /* points to the proposed match */ +const char *first, /* position of first character of string */ +size_t l, /* length of identifier */ +eight_bits t@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); } void -init_p(p,t) -name_pointer p; -eight_bits t; +init_p( +name_pointer p, +eight_bits t) { - p->ilk=t; p->xref=(char*)xmem; + p->ilk=t; init_node(p); } void -init_node(p) -name_pointer p; +init_node( +name_pointer p) { - p->xref=(char*)xmem; + p->xref=(void *)xmem; } +static void +update_node( +name_pointer p) +{ + p->xref=(void *)xref_ptr; +} + +@ @=@+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 to insert them every time \.{CWEAVE} is run. Fortunately there are relatively @@ -499,8 +489,7 @@ id_lookup("volatile",NULL,const_like); 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); @@ -556,8 +545,8 @@ scanning routines. @ 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;} @@ -598,19 +587,20 @@ operation appears in limbo, we want to use it to adjust the default interpretation of identifiers. @= -void skip_limbo(); +static void skip_limbo(void);@/ +static eight_bits skip_TeX(void); @ @c -void -skip_limbo() { - while(1) { - if (loc>limit && get_line()==0) return; +static void +skip_limbo(void) { + 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(); - else if (c==format_code) @; + else if (c==format_code) @@; } } } @@ -623,15 +613,15 @@ assumed to exist at the very end of the file. @f skip_TeX TeX @c -unsigned -skip_TeX() /* skip past pure \TEX/ code */ +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++)]; } } @@ -675,13 +665,9 @@ it sets |xref_switch| to |def_flag| and goes on to the next token. @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 */ - -@ @= -#include /* definition of |isalpha|, |isdigit| and so on */ -#include /* definition of |exit| */ +@= +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. @@ -693,31 +679,33 @@ compilers even allow the dollar sign. @d ishigh(c) ((eight_bits)(c)>0177) @^high-bit character handling@> -@= -eight_bits get_next(); - -@ @c -eight_bits -get_next() /* produces the next input token */ -{@+eight_bits c; /* the current character */ - while (1) { - @; - if (loc>limit && get_line()==0) return(new_section); +@c +static eight_bits +get_next(void) /* produces the next input token */ +{ + eight_bits c; /* the current character */ + while (true) { + @@; + if (loc>limit && get_line()==false) return new_section; c=*(loc++); if (xisdigit(c) || c=='.') @@; - else if (c=='\'' || c=='"' || (c=='L'&&(*loc=='\'' || *loc=='"'))@| - || (c=='<' && sharp_include_line==1)) + else if (c=='\'' || c=='"'@| + || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| + || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))@| + || (c=='<' && sharp_include_line==true)) @@; else if (xisalpha(c) || isxalpha(c) || ishigh(c)) @@; else if (c=='@@') @@; else if (xisspace(c)) continue; /* ignore spaces and tabs */ - if (c=='#' && loc==buffer+1) @; + 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 @@ -731,25 +719,25 @@ for |ord|, since |get_next| changes |ord| into a string. @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; - @; - return (left_preproc); + preprocessing=true; + @@; + return left_preproc; } @ An additional complication is the freakish use of \.< and \.> to delimit 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 @@ -757,10 +745,10 @@ the last character was a \.\\. @= 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 \.{++}, @@ -770,7 +758,7 @@ combinations \.{...}, \.{::}, \.{.*} and \.{->*}. The compound assignment operators (e.g., \.{+=}) are treated as separate tokens. -@d compress(c) if (loc++<=limit) return(c) +@d compress(c) if (loc++<=limit) return c @= switch(c) { @@ -778,8 +766,8 @@ switch(c) { else if (*loc=='/') compress(begin_short_comment); break; case '+': if (*loc=='+') compress(plus_plus); break; case '-': if (*loc=='-') {compress(minus_minus);} - else if (*loc=='>') if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} - else compress(minus_gt); break; + else { if (*loc=='>') { if (*(loc+1)=='*') {loc++; compress(minus_gt_ast);} + else compress(minus_gt); } } break; case '.': if (*loc=='*') {compress(period_ast);} else if (*loc=='.' && *(loc+1)=='.') { loc++; compress(dot_dot_dot); @@ -793,13 +781,14 @@ switch(c) { else if (*loc=='<') compress(lt_lt); break; case '&': if (*loc=='&') compress(and_and); break; case '|': if (*loc=='|') compress(or_or); break; - case '!': if (*loc=='=') compress(not_eq); break; + case '!': if (*loc=='=') compress(non_eq); break; } @ @= { id_first=--loc; - while (isalpha(*++loc) || isdigit(*loc) || isxalpha(*loc) || ishigh(*loc)); - id_loc=loc; return(identifier); + while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @| + || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); + id_loc=loc; return identifier; } @ Different conventions are followed by \TEX/ and \CEE/ to express octal @@ -833,9 +822,9 @@ are pointers into the array |section_text|, not into |buffer|. } while (*loc=='u' || *loc=='U' || *loc=='l' || *loc=='L' || *loc=='f' || *loc=='F') { - *id_loc++='$'; *id_loc++=toupper(*loc); loc++; + *id_loc++='$'; *id_loc++=toupper((eight_bits)*loc); loc++; } - return(constant); + return constant; } @ \CEE/ strings and character constants, delimited by double and single @@ -849,17 +838,18 @@ convention, but do not allow the string to be longer than |longest_name|. id_loc = section_text; if (delim=='\'' && *(loc-2)=='@@') {*++id_loc='@@'; *++id_loc='@@';} *++id_loc=delim; - if (delim=='L') { /* wide character constant */ + if (delim=='L' || delim=='u' || delim=='U') { /* wide character constant */ + 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@> } @@ -868,20 +858,20 @@ convention, but do not allow the string to be longer than |longest_name|. if (++id_loc<=section_text_end) *id_loc=c; break; } - if (c=='\\') if (loc>=limit) continue; - else if (++id_loc<=section_text_end) { + if (c=='\\') { if (loc>=limit) continue; + else { if (++id_loc<=section_text_end) { *id_loc = '\\'; c=*loc++; - } + } } } if (++id_loc<=section_text_end) *id_loc=c; } if (id_loc>=section_text_end) { - printf("\n! String too long: "); + fputs("\n! String too long: ",stdout); @.String too long@> term_write(section_text+1,25); printf("..."); mark_error; } id_loc++; - return(string); + return string; } @ After an \.{@@} sign has been scanned, the next character tells us @@ -894,13 +884,13 @@ whether there is more work to do. @.Use @@l in limbo...@> 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[c]; skip_restricted(); return(c); + case xref_roman: case xref_wildcard: case xref_typewriter: case noop: + 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]); + @@; + case verbatim: @@; + case ord: @@; + default: return ccode[(eight_bits)c]; } } @@ -910,11 +900,11 @@ because the section name might (for example) follow \&{int}. @= { char *k; /* pointer into |section_text| */ cur_section_char=*(loc-1); - @; + @@; 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, @@ -927,14 +917,14 @@ character of the name.) @ @= 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; } c=*loc; - @; + @@; loc++; if (k=section_text_end) { - printf("\n! Section name too long: "); + fputs("\n! Section name too long: ",stdout); @.Section name too long@> term_write(section_text+1,25); printf("..."); mark_harmless; @@ -968,12 +958,9 @@ if (c=='@@') { @ This function skips over a restricted context at relatively high speed. -@= -void skip_restricted(); - -@ @c -void -skip_restricted() +@c +static void +skip_restricted(void) { id_first=loc; *(limit+1)='@@'; false_alarm: @@ -991,6 +978,8 @@ false_alarm: } } +@ @=@+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 @@ -1002,7 +991,7 @@ buffer. We also set |loc| to the position just after the ending delimiter. 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. @@ -1015,41 +1004,40 @@ The global variable |next_control| often contains the most recent output of |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. -@= -void phase_one(); - -@ @c -void -phase_one() { +@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; /* the index changes if anything does */ phase=2; /* prepare for second phase */ - @; + @@; } +@ @=@+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 */ } - @; - @; - @; - 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 @@ -1074,12 +1062,13 @@ the relations |xref_roman==identifier+roman| and |xref_wildcard==identifier as well as |normal==0|. @= -void C_xref(); +static void C_xref(eight_bits);@/ +static void outer_xref(void); @ @c -void -C_xref( spec_ctrl ) /* makes cross-references for \CEE/ identifiers */ - eight_bits spec_ctrl; +static void +C_xref(@t\1\1@> /* makes cross-references for \CEE/ identifiers */ + eight_bits spec_ctrl@t\2\2@>) { name_pointer p; /* a referenced name */ while (next_control=format_code|. Thus, it handles \CEE/ text with embedded comments. -@= -void outer_xref(); - -@ @c -void -outer_xref() /* extension of |C_xref| */ +@c +static void +outer_xref(void) /* extension of |C_xref| */ { int bal; /* brace level in comment */ while (next_control} or \.{@@.}$\,\ldots\,$\.{@@>} 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...@> @@ -1171,9 +1157,9 @@ entirely, even if it contains \pb\ constructions. 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|. @@ -1182,7 +1168,7 @@ while (next_control<=definition) { /* |format_code| or |definition| */ if (next_control==definition) { xref_switch=def_flag; /* implied \.{@@!} */ next_control=get_next(); - } else @; + } else @@; outer_xref(); } @@ -1205,7 +1191,7 @@ discover should be unindexed. for (q=(xref_pointer)lhs->xref;q>xmem;q=q->xlink) if (q->numxlink=q->xlink; - else lhs->xref=(char*)q->xlink; + else lhs->xref=(void *)q->xlink; else r=q; } next_control=get_next(); @@ -1255,41 +1241,42 @@ if (next_control<=section_name) { /* |begin_C| or |section_name| */ 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@> -@= -void section_check(); - -@ @c -void -section_check(p) -name_pointer p; /* print anomalies in subtree |p| */ +@c +static void +section_check( +name_pointer p) /* print anomalies in subtree |p| */ { 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; + fputs("\n! Never defined: <",stdout); + print_section_name(p); putchar('>'); mark_harmless; @.Never defined:
@> } while (cur_xref->num >=cite_flag) cur_xref=cur_xref->xlink; if (cur_xref==xmem && !an_output) { - printf("\n! Never used: <"); print_section_name(p); putchar('>'); mark_harmless; + fputs("\n! Never used: <",stdout); + print_section_name(p); putchar('>'); mark_harmless; @.Never used:
@> } section_check(p->rlink); } } -@ @=section_check(root) +@ @=@+static void section_check(name_pointer); + +@ @=section_check(root); @* Low-level output routines. The \TEX/ output is supposed to appear in lines at most |line_length| @@ -1297,17 +1284,17 @@ characters long, so we place it into an output buffer. During the output 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 @@ -1317,13 +1304,18 @@ of commented-out text). @d c_line_write(c) fflush(active_file),fwrite(out_buf+1,sizeof(char),c,active_file) @d tex_putc(c) putc(c,active_file) @d tex_new_line putc('\n',active_file) -@d tex_printf(c) fprintf(active_file,c) +@d tex_printf(c) fprintf(active_file,"%s",c) +@d tex_puts(c) fputs(c,active_file) -@c -void -flush_buffer(b,per_cent,carryover) -char *b; /* outputs from |out_buf+1| to |b|,where |b<=out_ptr| */ -boolean per_cent,carryover; +@= +static void flush_buffer(char *,boolean,boolean);@/ +static void finish_line(void); + +@ @c +static void +flush_buffer(@t\1\1@> +char *b, /* outputs from |out_buf+1| to |b|, where |b<=out_ptr| */ +boolean per_cent,boolean carryover@t\2\2@>) { char *j; j=b; /* pointer into |out_buf| */ if (! per_cent) /* remove trailing blanks */ @@ -1336,7 +1328,7 @@ boolean per_cent,carryover; if (*j--=='%' && (j==out_buf || *j!='\\')) { *b--='%'; break; } - if (bout_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); } } @@ -1366,7 +1358,7 @@ beginning of phase two. We initialize the output variables in a slightly tricky way so that the first line of the output file will be `\.{\\input cwebmac}'. -@= +@= out_ptr=out_buf+1; out_line=1; active_file=tex_file; *out_ptr='c'; tex_printf("\\input cwebma"); @@ -1380,10 +1372,14 @@ A line break will occur at a space or after a single-nonletter @d out(c) {if (out_ptr>=out_buf_end) break_out(); *(++out_ptr)=c;} -@c -void -out_str(s) /* output characters from |s| to end of string */ -char *s; +@= +static void out_str(const char *);@/ +static void break_out(void); + +@ @c +static void +out_str(@t\1\1@> /* output characters from |s| to end of string */ +const char*s@t\2\2@>) { while (*s) out(*s++); } @@ -1399,21 +1395,18 @@ out_buf[0]='\\'; preceded by another backslash. In the latter case, a |'%'| is output at the break. -@= -void break_out(); - -@ @c -void -break_out() /* finds a way to break the output line */ +@c +static void +break_out(void) /* finds a way to break the output line */ { char *k=out_ptr; /* pointer into |out_buf| */ - while (1) { - if (k==out_buf) @; + 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; } } } @@ -1429,7 +1422,7 @@ line by putting a |'%'| just before the last character. @.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,10 +1430,14 @@ The number to be converted by |out_section| is known to be less than |def_flag|, so it cannot have more than five decimal digits. If the section is changed, we output `\.{\\*}' just after the number. -@c -void -out_section(n) -sixteen_bits n; +@= +static void out_section(sixteen_bits);@/ +static void out_name(name_pointer,boolean); + +@ @c +static void +out_section( +sixteen_bits n) { char s[6]; sprintf(s,"%d",n); out_str(s); @@ -1452,10 +1449,10 @@ sixteen_bits n; entry, enclosing it in braces. @c -void -out_name(p,quote_xalpha) -name_pointer p; -boolean quote_xalpha; +static void +out_name( +name_pointer p, +boolean quote_xalpha) { char *k, *k_end=(p+1)->byte_start; /* pointers into |byte_mem| */ out('{'); @@ -1469,11 +1466,9 @@ boolean quote_xalpha; } @* Routines that copy \TEX/ material. -During phase two, we use subroutines |copy_limbo|, |copy_TeX|, and -|copy_comment| in place of the analogous |skip_limbo|, |skip_TeX|, and -|skip_comment| that were used in phase one. (Well, |copy_comment| -was actually written in such a way that it functions as |skip_comment| -in phase one.) +During phase two, we use the subroutines |copy_limbo| and |copy_TeX| (and +|copy_comment|) in place of the analogous |skip_limbo| and |skip_TeX| +that were used in phase one. The |copy_limbo| routine, for example, takes \TEX/ material that is not part of any section and transcribes it almost verbatim to the output file. @@ -1481,13 +1476,18 @@ The use of `\.{@@}' signs is severely restricted in such material: `\.{@@@@}' pairs are replaced by singletons; `\.{@@l}' and `\.{@@q}' and `\.{@@s}' are interpreted. -@c -void -copy_limbo() +@= +static void copy_limbo(void);@/ +static eight_bits copy_TeX(void);@/ +static int copy_comment(boolean,int); + +@ @c +static void +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) { @@ -1515,21 +1515,21 @@ way. It returns the next control code or `\.{\v}' found in the input. We don't copy spaces or tab marks into the beginning of a line. This makes the test for empty lines in |finish_line| work. -@ @f copy_TeX TeX +@f copy_TeX TeX @c -eight_bits -copy_TeX() +static eight_bits +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++)]; } } @@ -1545,19 +1545,16 @@ one further token without overflow. @d app_tok(c) {if (tok_ptr+2>tok_mem_end) overflow("token"); *(tok_ptr++)=c;} -@= -int copy_comment(); - -@ @c -int copy_comment(is_long_comment,bal) /* copies \TEX/ code in comments */ -boolean is_long_comment; /* is this a traditional \CEE/ comment? */ -int bal; /* brace balance */ +@c +static int copy_comment(@t\1\1@> /* copies \TeX\ code in comments */ +boolean is_long_comment, /* is this a traditional \CEE/ comment? */ +int bal@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; @@ -1570,13 +1567,13 @@ int bal; /* brace balance */ } } c=*(loc++); - if (c=='|') return(bal); - if (is_long_comment) @; + if (c=='|') return bal; + if (is_long_comment) @@; if (phase==2) { if (ishigh(c)) app_tok(quoted_char); app_tok(c); } - @; + @@; if (c=='{') bal++; else if (c=='}') { if(bal>1) bal--; @@ -1586,7 +1583,7 @@ int bal; /* brace balance */ } } } -done:@; +done:@@; } @ @= @@ -1605,15 +1602,15 @@ if (c=='@@') { loc-=2; if (phase==2) *(tok_ptr-1)=' '; goto done; } } -else if (c=='\\' && *loc!='@@') - if (phase==2) app_tok(*(loc++))@; else loc++; +else { if (c=='\\' && *loc!='@@') { + if (phase==2) app_tok(*(loc++))@; else loc++; } } @ We output enough right braces to keep \TEX/ happy. @= if (phase==2) while (bal-- >0) app_tok('}'); -return(0); +return 0; @** Parsing. The most intricate part of \.{CWEAVE} is its mechanism for converting @@ -1660,9 +1657,12 @@ In the \TEX/ file, this will specify an optional line break after the comma, with penalty 90. At each opportunity the longest possible production is applied. For -example, if the current sequence of scraps is |int_like| |cast| -|lbrace|, rule 31 is applied; but if the sequence is |int_like| |cast| -followed by anything other than |lbrace|, rule 32 takes effect. +example, if the current sequence of scraps is |if_clause| |stmt| +|else_like| |if_like|, rule 63 is applied; but if the sequence is +|if_clause| |stmt| |else_like| followed by anything other than +|if_like|, rule 64 takes effect; and if the sequence is |if_clause| +|stmt| followed by anything other than |else_like|, rule 65 takes +effect. Translation rules such as `$E_1C\,\\{opt}9\,E_2$' above use subscripts to distinguish between translations of scraps whose categories have the @@ -1711,13 +1711,11 @@ same initial letter; these subscripts are assigned from left to right. @d begin_arg 61 /* \.{@@[} */ @d end_arg 62 /* \.{@@]} */ -@= -char cat_name[256][12]; -eight_bits cat_index; +@= +static char cat_name[256][12]; @ @= - for (cat_index=0;cat_index<255;cat_index++) - strcpy(cat_name[cat_index],"UNKNOWN"); +{int c; for (c=0;c<256;c++) strcpy(cat_name[c],"UNKNOWN");} @.UNKNOWN@> strcpy(cat_name[exp],"exp"); strcpy(cat_name[unop],"unop"); @@ -1781,13 +1779,15 @@ eight_bits cat_index; @ This code allows \.{CWEAVE} to display its parsing steps. @c -void -print_cat(c) /* symbolic printout of a category */ -eight_bits c; +static void +print_cat(@t\1\1@> /* symbolic printout of a category */ +eight_bits c@t\2\2@>) { - printf(cat_name[c]); + 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. @@ -2098,15 +2098,15 @@ typedef scrap *scrap_pointer; @ @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; @@ -2136,9 +2136,9 @@ translated without line-break controls. @d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */ @c -void -print_text(p) /* prints a token list for debugging; not used in |main| */ -text_pointer p; +static void +print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */ +text_pointer p@t\2\2@>) { token_pointer j; /* index into |tok_mem| */ sixteen_bits r; /* remainder of token after the flag has been stripped off */ @@ -2154,12 +2154,14 @@ text_pointer p; break; /* |section_flag| */ case 4: printf("[[%d]]",r); break; /* |tok_flag| */ case 5: printf("|[[%d]]|",r); break; /* |inner_tok_flag| */ - default: @; + default: @@; } } - fflush(stdout); + update_terminal; } +@ @=@+static void print_text(text_pointer p); + @ @= switch (r) { case math_rel: printf("\\mathrel{"@q}@>); break; @@ -2173,7 +2175,7 @@ switch (r) { case force: printf("[force]"); break; case big_force: printf("[fforce]"); break; case preproc_line: printf("[preproc]"); break; - case quoted_char: j++; printf("[%o]",(unsigned)*j); break; + case quoted_char: j++; printf("[%o]",(unsigned int)*j); break; case end_translation: printf("[quit]"); break; case inserted: printf("[inserted]"); break; default: putxchar(r); @@ -2219,7 +2221,7 @@ example, `|squash(pp,3,exp,-2,3)|' is an abbreviation for `\\{app3}|(pp); 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 @@ -2253,24 +2255,28 @@ productions as they were listed earlier. @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) -@d big_app4(a) big_app3(a);big_app1(a+3) -@d app(a) *(tok_ptr++)=a -@d app1(a) *(tok_ptr++)=tok_flag+(int)((a)->trans-tok_start) +@d app(a) *(tok_ptr++)=(token)(a) +@d app1(a) *(tok_ptr++)=(token)(tok_flag+(int)((a)->trans-tok_start)) + +@= +static int cur_mathness, init_mathness; -@= -int cur_mathness, init_mathness; +@ @= +static void app_str(const char *);@/ +static void big_app(token);@/ +static void big_app1(scrap_pointer); @ @c -void -app_str(s) -char *s; +static void +app_str( +const char *s) { while (*s) app_tok(*(s++)); } -void -big_app(a) -token a; +static void +big_app( +token a) { if (a==' ' || (a>=big_cancel && a<=big_force)) /* non-math token */ { if (cur_mathness==maybe_math) init_mathness=no_math; @@ -2285,9 +2291,9 @@ token a; app(a); } -void -big_app1(a) -scrap_pointer a; +static void +big_app1( +scrap_pointer a) { switch (a->mathness % 4) { /* left boundary */ case (no_math): @@ -2316,11 +2322,11 @@ code needs to be provided with a proper environment. @d lhs_not_simple (pp->cat!=public_like && pp->cat!=semi && pp->cat!=prelangle - && pp->cat!=prerangle + && pp->cat!=prerangle @| && pp->cat!=template_like && pp->cat!=new_like && pp->cat!=new_exp - && pp->cat!=ftemplate + && pp->cat!=ftemplate @| && pp->cat!=raw_ubin && pp->cat!=const_like && pp->cat!=raw_int @@ -2336,53 +2342,53 @@ code needs to be provided with a proper environment. else if (cat3==insert) squash(pp+2,2,(pp+2)->cat,0,0); else switch (pp->cat) { - case exp: @; @+break; - case lpar: @; @+break; - case unop: @; @+break; - case ubinop: @; @+break; - case binop: @; @+break; - case cast: @; @+break; - case sizeof_like: @; @+break; - case int_like: @; @+break; - case public_like: @; @+break; - case colcol: @; @+break; - case decl_head: @; @+break; - case decl: @; @+break; - case base: @; @+break; - case struct_like: @; @+break; - case struct_head: @; @+break; - case fn_decl: @; @+break; - case function: @; @+break; - case lbrace: @; @+break; - case if_like: @; @+break; - case else_like: @; @+break; - case else_head: @; @+break; - case if_clause: @; @+break; - case if_head: @; @+break; - case do_like: @; @+break; - case case_like: @; @+break; - case catch_like: @; @+break; - case tag: @; @+break; - case stmt: @; @+break; - case semi: @; @+break; - case lproc: @; @+break; - case section_scrap: @; @+break; - case insert: @; @+break; - case prelangle: @; @+break; - case prerangle: @; @+break; - case langle: @; @+break; - case template_like: @; @+break; - case new_like: @; @+break; - case new_exp: @; @+break; - case ftemplate: @; @+break; - case for_like: @; @+break; - case raw_ubin: @; @+break; - case const_like: @; @+break; - case raw_int: @; @+break; - case operator_like: @; @+break; - case typedef_like: @; @+break; - case delete_like: @; @+break; - case question: @; @+break; + case exp: @@; @+break; + case lpar: @@; @+break; + case unop: @@; @+break; + case ubinop: @@; @+break; + case binop: @@; @+break; + case cast: @@; @+break; + case sizeof_like: @@; @+break; + case int_like: @@; @+break; + case public_like: @@; @+break; + case colcol: @@; @+break; + case decl_head: @@; @+break; + case decl: @@; @+break; + case base: @@; @+break; + case struct_like: @@; @+break; + case struct_head: @@; @+break; + case fn_decl: @@; @+break; + case function: @@; @+break; + case lbrace: @@; @+break; + case if_like: @@; @+break; + case else_like: @@; @+break; + case else_head: @@; @+break; + case if_clause: @@; @+break; + case if_head: @@; @+break; + case do_like: @@; @+break; + case case_like: @@; @+break; + case catch_like: @@; @+break; + case tag: @@; @+break; + case stmt: @@; @+break; + case semi: @@; @+break; + case lproc: @@; @+break; + case section_scrap: @@; @+break; + case insert: @@; @+break; + case prelangle: @@; @+break; + case prerangle: @@; @+break; + case langle: @@; @+break; + case template_like: @@; @+break; + case new_like: @@; @+break; + case new_exp: @@; @+break; + case ftemplate: @@; @+break; + case for_like: @@; @+break; + case raw_ubin: @@; @+break; + case const_like: @@; @+break; + case raw_int: @@; @+break; + case operator_like: @@; @+break; + case typedef_like: @@; @+break; + case delete_like: @@; @+break; + case question: @@; @+break; } pp++; /* if no match was found, we move to the right */ } @@ -2404,17 +2410,23 @@ of identifiers in case labels. 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 */ @d case_found (token_pointer)1 /* likewise */ @d operator_found (token_pointer)2 /* likewise */ -@c -token_pointer -find_first_ident(p) -text_pointer p; +@= +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); + +@ @c +static token_pointer +find_first_ident( +text_pointer p) { token_pointer q; /* token to be returned */ token_pointer j; /* token being looked at */ @@ -2444,11 +2456,11 @@ occurrence of the identifier that we're making reserved; hence the |for| loop below. @c -void -make_reserved(p) /* make the first identifier in |p->trans| like |int| */ -scrap_pointer p; +static void +make_reserved(@t\1\1@> /* make the first identifier in |p->trans| like |int| */ +scrap_pointer p@t\2\2@>) { - sixteen_bits tok_value; /* the name of this identifier, plus its flag*/ + sixteen_bits tok_value; /* the name of this identifier, plus its flag */ token_pointer tok_loc; /* pointer to |tok_value| */ if ((tok_loc=find_first_ident(p->trans))<=operator_found) return; /* this should not happen */ @@ -2475,10 +2487,10 @@ of a function, we find out that the identifier is being defined only after it has been swallowed up by an |exp|. @c -void -make_underlined(p) +static void +make_underlined(@t\1\1@> /* underline the entry for the first identifier in |p->trans| */ -scrap_pointer p; +scrap_pointer p@t\2\2@>) { token_pointer tok_loc; /* where the first identifier appears */ if ((tok_loc=find_first_ident(p->trans))<=operator_found) @@ -2492,13 +2504,10 @@ because this would just make a new cross-reference at the end of the list. We actually have to search through the list for the existing cross-reference. -@= -void underline_xref(); - -@ @c -void -underline_xref(p) -name_pointer p; +@c +static void +underline_xref( +name_pointer p) { xref_pointer q=(xref_pointer)p->xref; /* pointer to cross-reference being examined */ xref_pointer r; /* temporary pointer for permuting cross-references */ @@ -2515,7 +2524,7 @@ name_pointer p; else if (n>=def_flag && nxlink; } - @; + @@; } @ We get to this section only when the identifier is one letter long, @@ -2528,7 +2537,7 @@ to insert the new cross-reference not at the beginning of the list @= append_xref(0); /* this number doesn't matter */ xref_ptr->xlink=(xref_pointer)p->xref; r=xref_ptr; - p->xref=(char*)xref_ptr; + update_node(p); while (r->xlink!=q) {r->num=r->xlink->num; r=r->xlink;} r->num=m; /* everything from |q| on is left undisturbed */ @@ -2818,7 +2827,11 @@ else if (cat1==stmt||cat1==decl||cat1==function) { grouped together on the same line. @d force_lines flags['f'] /* should each statement be on its own line? */ -@= + +@= +force_lines=true; + +@ @= if (cat1==stmt||cat1==decl||cat1==function) { big_app1(pp); if (cat1==function) big_app(big_force); @@ -3000,12 +3013,16 @@ too large, since it is assumed that this test was done beforehand. @d freeze_text *(++text_ptr)=tok_ptr -@c -void -reduce(j,k,c,d,n) -scrap_pointer j; -eight_bits c; -short k, d, n; +@= +static void reduce(scrap_pointer,short,eight_bits,short,short);@/ +static void squash(scrap_pointer,short,eight_bits,short,short); + +@ @c +static void +reduce( +scrap_pointer j, short k, +eight_bits c, +short d, short n) { scrap_pointer i, i1; /* pointers into scrap memory */ j->cat=c; j->trans=text_ptr; @@ -3019,7 +3036,7 @@ short k, d, n; lo_ptr=lo_ptr-k+1; } pp=(pp+d; + @@; pp--; /* we next say |pp++| */ } @@ -3027,16 +3044,16 @@ short k, d, n; takes advantage of the simplification that occurs when |k==1|. @c -void -squash(j,k,c,d,n) -scrap_pointer j; -eight_bits c; -short k, d, n; +static void +squash( +scrap_pointer j, short k, +eight_bits c, +short d, short n) { scrap_pointer i; /* pointers into scrap memory */ if (k==1) { j->cat=c; pp=(pp+d; + @@; pp--; /* we next say |pp++| */ return; } @@ -3058,8 +3075,8 @@ than to squeeze the last bit of space from the memory arrays. @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; overflow("token"); @@ -3070,7 +3087,7 @@ while (1) { } if (pp>lo_ptr) break; init_mathness=cur_mathness=maybe_math; - @; + @@; } @ If we get to the end of the scrap list, category codes equal to zero are @@ -3090,22 +3107,22 @@ current stack categories will be printed out when |tracing| is set to 2; 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; /* pointer into |scrap_info| */ +{ scrap_pointer k_l; /* pointer into |scrap_info| */ if (tracing==2) { printf("\n%d:",n); - for (k=scrap_base; k<=lo_ptr; k++) { - if (k==pp) putxchar('*'); else putxchar(' '); - if (k->mathness %4 == yes_math) putchar('+'); - else if (k->mathness %4 == no_math) putchar('-'); - print_cat(k->cat); - if (k->mathness /4 == yes_math) putchar('+'); - else if (k->mathness /4 == no_math) putchar('-'); + for (k_l=scrap_base; k_l<=lo_ptr; k_l++) { + if (k_l==pp) putxchar('*'); else putxchar(' '); + if (k_l->mathness %4 == yes_math) putchar('+'); + else if (k_l->mathness %4 == no_math) putchar('-'); + print_cat(k_l->cat); + if (k_l->mathness /4 == yes_math) putchar('+'); + else if (k_l->mathness /4 == no_math) putchar('-'); } - if (hi_ptr<=scrap_ptr) printf("..."); /* indicate that more is coming */ + if (hi_ptr<=scrap_ptr) fputs("...",stdout); /* indicate that more is coming */ } } @@ -3123,24 +3140,26 @@ since |translate| might add a new text and a new scrap before it checks for overflow. @c -text_pointer -translate() /* converts a sequence of scraps */ +static text_pointer +translate(void) /* converts a sequence of scraps */ { scrap_pointer i, /* index into |cat| */ j; /* runs through final scraps */ pp=scrap_base; lo_ptr=pp-1; hi_ptr=pp; - @; - @; - @; + @@; + @@; + @@; } +@ @=@+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 where appropriate. @= { - @; + @@; for (j=scrap_base; j<=lo_ptr; j++) { if (j!=scrap_base) app(' '); if (j->mathness % 4 == yes_math) app('$'); @@ -3148,7 +3167,7 @@ where appropriate. 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; } @ @= @@ -3188,19 +3207,21 @@ what it reads are appended into the |cat| and |trans| arrays, and |scrap_ptr| is advanced. @c -void -C_parse(spec_ctrl) /* creates scraps from \CEE/ tokens */ - eight_bits spec_ctrl; +static void +C_parse(@t\1\1@> /* creates scraps from \CEE/ tokens */ + eight_bits spec_ctrl@t\2\2@>) { int count; /* characters remaining before string break */ while (next_control; + @@; next_control=get_next(); if (next_control=='|' || next_control==begin_comment || next_control==begin_short_comment) return; } } +@ @=@+static void C_parse(eight_bits); + @ The following macro is used to append a scrap whose tokens have just been appended: @@ -3211,76 +3232,77 @@ been appended: } @ @= -@; +@@; switch (next_control) { case section_name: app(section_flag+(int)(cur_section-name_dir)); app_scrap(section_scrap,maybe_math); app_scrap(exp,yes_math);@+break; - case string: case constant: case verbatim: @; - @+break; - case identifier: app_cur_id(1);@+break; - case TeX_string: @;@+break; + case string: case constant: case verbatim: + @@;@+break; + case identifier: app_cur_id(true);@+break; + case TeX_string: + @@;@+break; case '/': case '.': - app(next_control); app_scrap(binop,yes_math);@+break; + app(next_control);@+app_scrap(binop,yes_math);@+break; case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break; @.\\langle@> case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break; @.\\rangle@> - case '=': app_str("\\K"); app_scrap(binop,yes_math);@+break; + case '=': app_str("\\K");@+app_scrap(binop,yes_math);@+break; @.\\K@> - case '|': app_str("\\OR"); app_scrap(binop,yes_math);@+break; + case '|': app_str("\\OR");@+app_scrap(binop,yes_math);@+break; @.\\OR@> - case '^': app_str("\\XOR"); app_scrap(binop,yes_math);@+break; + case '^': app_str("\\XOR");@+app_scrap(binop,yes_math);@+break; @.\\XOR@> - case '%': app_str("\\MOD"); app_scrap(binop,yes_math);@+break; + case '%': app_str("\\MOD");@+app_scrap(binop,yes_math);@+break; @.\\MOD@> - case '!': app_str("\\R"); app_scrap(unop,yes_math);@+break; + case '!': app_str("\\R");@+app_scrap(unop,yes_math);@+break; @.\\R@> - case '~': app_str("\\CM"); app_scrap(unop,yes_math);@+break; + case '~': app_str("\\CM");@+app_scrap(unop,yes_math);@+break; @.\\CM@> - case '+': case '-': app(next_control); app_scrap(ubinop,yes_math);@+break; - case '*': app(next_control); app_scrap(raw_ubin,yes_math);@+break; - case '&': app_str("\\AND"); app_scrap(raw_ubin,yes_math);@+break; + case '+': case '-': app(next_control);@+app_scrap(ubinop,yes_math);@+break; + case '*': app(next_control);@+app_scrap(raw_ubin,yes_math);@+break; + case '&': app_str("\\AND");@+app_scrap(raw_ubin,yes_math);@+break; @.\\AND@> - case '?': app_str("\\?"); app_scrap(question,yes_math);@+break; + case '?': app_str("\\?");@+app_scrap(question,yes_math);@+break; @.\\?@> - case '#': app_str("\\#"); app_scrap(ubinop,yes_math);@+break; + case '#': app_str("\\#");@+app_scrap(ubinop,yes_math);@+break; @.\\\#@> case ignore: case xref_roman: case xref_wildcard: case xref_typewriter: case noop:@+break; - case '(': case '[': app(next_control); app_scrap(lpar,maybe_math);@+break; - case ')': case ']': app(next_control); app_scrap(rpar,maybe_math);@+break; - case '{': app_str("\\{"@q}@>); app_scrap(lbrace,yes_math);@+break; + case '(': case '[': app(next_control);@+app_scrap(lpar,maybe_math);@+break; + case ')': case ']': app(next_control);@+app_scrap(rpar,maybe_math);@+break; + case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break; @.\\\{@>@q}@> - case '}': app_str(@q{@>"\\}"); app_scrap(rbrace,yes_math);@+break; + case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break; @q{@>@.\\\}@> - case ',': app(','); app_scrap(comma,yes_math);@+break; - case ';': app(';'); app_scrap(semi,maybe_math);@+break; - case ':': app(':'); app_scrap(colon,no_math);@+break;@/ + case ',': app(',');@+app_scrap(comma,yes_math);@+break; + case ';': app(';');@+app_scrap(semi,maybe_math);@+break; + case ':': app(':');@+app_scrap(colon,no_math);@+break;@/ @t\4@> @@; - case thin_space: app_str("\\,"); app_scrap(insert,maybe_math);@+break; + case thin_space: app_str("\\,");@+app_scrap(insert,maybe_math);@+break; @.\\,@> - case math_break: app(opt); app_str("0"); + case math_break: app(opt);@+app_str("0");@+ app_scrap(insert,maybe_math);@+break; - case line_break: app(force); app_scrap(insert,no_math);@+break; - case left_preproc: app(force); app(preproc_line); - app_str("\\#"); app_scrap(lproc,no_math);@+break; + case line_break: app(force);@+app_scrap(insert,no_math);@+break; + case left_preproc: app(force);@+app(preproc_line);@+app_str("\\#"); + app_scrap(lproc,no_math);@+break; @.\\\#@> - case right_preproc: app(force); app_scrap(rproc,no_math);@+break; - case big_line_break: app(big_force); app_scrap(insert,no_math);@+break; - case no_line_break: app(big_cancel); app(noop); app(break_space); - app(noop); app(big_cancel); + case right_preproc: app(force);@+app_scrap(rproc,no_math);@+break; + case big_line_break: app(big_force);@+app_scrap(insert,no_math);@+break; + case no_line_break: app(big_cancel);@+app(noop);@+app(break_space);@+ + app(noop);@+app(big_cancel); app_scrap(insert,no_math);@+break; case pseudo_semi: app_scrap(semi,maybe_math);@+break; case macro_arg_open: app_scrap(begin_arg,maybe_math);@+break; case macro_arg_close: app_scrap(end_arg,maybe_math);@+break; - case join: app_str("\\J"); app_scrap(insert,no_math);@+break; + case join: app_str("\\J");@+app_scrap(insert,no_math);@+break; @.\\J@> - case output_defs_code: app(force); app_str("\\ATH"); app(force); + case output_defs_code: app(force);@+app_str("\\ATH");@+app(force); app_scrap(insert,no_math);@+break; @.\\ATH@> - default: app(inserted); app(next_control); + default: app(inserted);@+app(next_control); app_scrap(insert,maybe_math);@+break; } @@ -3299,7 +3321,7 @@ standard ones. They are converted to \TEX/ control sequences so that it is possible to keep \.{CWEAVE} from outputting unusual |char| codes. @= -case not_eq: app_str("\\I");@+app_scrap(binop,yes_math);@+break; +case non_eq: app_str("\\I");@+app_scrap(binop,yes_math);@+break; @.\\I@> case lt_eq: app_str("\\Z");@+app_scrap(binop,yes_math);@+break; @.\\Z@> @@ -3416,15 +3438,17 @@ while (id_first'}'); @ 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|. @= -void app_cur_id(); +static void app_cur_id(boolean);@/ +static text_pointer C_translate(void);@/ +static void outer_parse(void); @ @c -void -app_cur_id(scrapping) -boolean scrapping; /* are we making this into a scrap? */ +static void +app_cur_id(@t\1\1@> +boolean scrapping@t\2\2@>) /* are we making this into a scrap? */ { name_pointer p=id_lookup(id_first,id_loc,normal); if (p->ilk<=custom) { /* not a reserved word */ @@ -3447,8 +3471,8 @@ that text. If scraps exist in |scrap_info|, they are unaffected by this translation process. @c -text_pointer -C_translate() +static text_pointer +C_translate(void) { text_pointer p; /* points to the translation */ scrap_pointer save_base; /* holds original value of |scrap_base| */ @@ -3461,7 +3485,7 @@ C_translate() 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| @@ -3476,9 +3500,12 @@ program text. @d make_pb flags['e'] -@c -void -outer_parse() /* makes scraps from \CEE/ tokens and comments */ +@= +make_pb=true; + +@ @c +static void +outer_parse(void) /* makes scraps from \CEE/ tokens and comments */ { int bal; /* brace level in comment */ text_pointer p, q; /* partial comments */ @@ -3487,7 +3514,7 @@ outer_parse() /* makes scraps from \CEE/ tokens and comments */ C_parse(ignore); else { boolean is_long_comment=(next_control==begin_comment); - @; + @@; app(cancel); app(inserted); if (is_long_comment) app_str("\\C{"@q}@>); @.\\C@> @@ -3568,12 +3595,12 @@ typedef output_state *stack_pointer; @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; @@ -3582,10 +3609,14 @@ max_stack_ptr=stack; is called; it saves the old level of output and gets a new one going. The value of |cur_mode| is not changed. -@c -void -push_level(p) /* suspends the current level */ -text_pointer p; +@= +static void push_level(text_pointer);@/ +static void pop_level(void); + +@ @c +static void +push_level(@t\1\1@> /* suspends the current level */ +text_pointer p@t\2\2@>) { if (stack_ptr==stack_end) overflow("stack"); if (stack_ptr>stack) { /* save current state */ @@ -3603,8 +3634,8 @@ force when the current level was begun. This subroutine will never be called when |stack_ptr==1|. @c -void -pop_level() +static void +pop_level(void) { cur_end=(--stack_ptr)->end_field; cur_tok=stack_ptr->tok_field; cur_mode=stack_ptr->mode_field; @@ -3618,15 +3649,20 @@ by a complex routine that might generate additional levels of output). 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 */ -@c -eight_bits -get_output() /* returns the next token of output */ +@= +static eight_bits get_output(void);@/ +static void output_C(void);@/ +static void make_output(void); + +@ @c +static eight_bits +get_output(void) /* returns the next token of output */ { sixteen_bits a; /* current item read from |tok_mem| */ restart: while (cur_tok==cur_end) pop_level(); @@ -3634,16 +3670,16 @@ get_output() /* returns the next token of output */ 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(a); + return (eight_bits)a; } @ The real work associated with token output is done by |make_output|. @@ -3662,8 +3698,8 @@ while outputting the name of a section. @^recursion@> @c -void -output_C() /* outputs the current token list */ +static void +output_C(void) /* outputs the current token list */ { token_pointer save_tok_ptr; text_pointer save_text_ptr; @@ -3684,17 +3720,14 @@ output_C() /* outputs the current token list */ @ Here is \.{CWEAVE}'s major output handler. -@= -void make_output(); - -@ @c -void -make_output() /* outputs the equivalents of tokens */ +@c +static void +make_output(void) /* outputs the equivalents of tokens */ { - eight_bits a, /* current output byte */ + eight_bits a=0, /* current output byte */ b; /* next output byte */ int c; /* count of |indent| and |outdent| tokens */ - char scratch[longest_name]; /* scratch area for section names */ + char scratch[longest_name+1]; /* scratch area for section names */ char *k, *k_limit; /* indices into |scratch| */ char *j; /* index into |buffer| */ char *p; /* index into |byte_mem| */ @@ -3704,28 +3737,28 @@ make_output() /* outputs the equivalents of tokens */ 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; - case identifier: case res_word: @; break; - case section_code: @; break; + case identifier: case res_word: @@; break; + case section_code: @@; break; case math_rel: out_str("\\MRL{"@q}@>); @.\\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; if (a==indent) c++; else if (a==outdent) c--; else if (a==opt) a=get_output(); } - @; + @@; goto reswitch; case indent: case outdent: case opt: case backup: case break_space: case force: case big_force: case preproc_line: @; break; + look ahead in case of line breaks, possibly |goto reswitch|@>@; break; case quoted_char: out(*(cur_tok++)); case qualifier: break; default: out(a); /* otherwise |a| is an ordinary character */ @@ -3767,7 +3800,7 @@ if (is_tiny(cur_name)) { 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. @@ -3783,7 +3816,7 @@ if (a 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| */ @@ -3798,18 +3831,18 @@ is suppressed (i.e., a line break that follows `\.{\\Y\\B}'). @= { 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) { - @; + @@; goto reswitch; /* |cancel| overrides everything */ } if ((a!=' ' && abig_force) { if (save_mode==outer) { if (out_ptr>out_buf+3 && strncmp(out_ptr-3,"\\Y\\B",4)==0) goto reswitch; - @; + @@; out('\\'); out(b-cancel+'0'); @.\\5@> @.\\6@> @@ -3843,8 +3876,8 @@ input buffer and the translation process uses the end of the active 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) { @@ -3860,7 +3893,7 @@ input buffer and the translation process uses the end of the active out(':'); if (an_output) out_str("\\.{"@q}@>); @.\\.@> - @; + @@; if (an_output) out_str(@q{@>" }"); out_str("\\X"); } @@ -3872,7 +3905,7 @@ k_limit=scratch+strlen(scratch); cur_section_name=cur_name; while (k; + if (b=='@@') @@; if (an_output) switch (b) { case ' ':case '\\':case '#':case '%':case '$':case '^': @@ -3891,18 +3924,18 @@ while (k default: out(b); } - else if (b!='|') out(b)@; + else { if (b!='|') out(b)@; else { - @; + @@; save_loc=loc; save_limit=limit; loc=limit+2; limit=j+1; *limit='|'; output_C(); loc=save_loc; limit=save_limit; - } + } } } @ @= if (*k++!='@@') { - printf("\n! Illegal control code in section name: <"); + fputs("\n! Illegal control code in section name: <",stdout); @.Illegal control code...@> print_section_name(cur_section_name); printf("> "); mark_error; } @@ -3915,9 +3948,9 @@ equals the delimiter that began the string being copied. @= j=limit+1; *j='|'; delim=0; -while (1) { +while (true) { if (k>=k_limit) { - printf("\n! C text in section name didn't end: <"); + fputs("\n! C text in section name didn't end: <",stdout); @.C text...didn't end@> print_section_name(cur_section_name); printf("> "); mark_error; break; } @@ -3925,9 +3958,9 @@ while (1) { if (b=='@@' || (b=='\\' && delim!=0)) @@; else { - if (b=='\'' || b=='"') + if (b=='\'' || b=='"') { if (delim==0) delim=b; - else if (delim==b) delim=0; + else if (delim==b) delim=0; } if (b!='|' || delim!=0) { if (j>buffer+long_buf_size-3) overflow("buffer"); *(++j)=b; @@ -3948,19 +3981,18 @@ is analogous to phase one, except that more work is involved because we must actually output the \TEX/ material instead of merely looking at the \.{CWEB} specifications. -@= -void phase_two(); - -@ @c -void -phase_two() { -reset_input(); if (show_progress) printf("\nWriting the output file..."); +@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 */ -while (!input_has_ended) @; +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 @@ -3972,27 +4004,27 @@ and `|emit_space_if_needed|' are able to handle the situation: @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++; - @; + @@; save_position; - @; - @; - @; - @; - @; + @@; + @@; + @@; + @@; + @@; } @ Sections beginning with the \.{CWEB} control sequence `\.{@@\ }' start in the @@ -4016,7 +4048,7 @@ else { 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);@+} @@ -4052,13 +4084,13 @@ index entries are not copied and \CEE/ text within \pb\ is translated. 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; + else @@; + outer_parse(); finish_C(format_visible); format_visible=true; + doing_format=false; } @ The |finish_C| procedure outputs the translation of the current @@ -4071,13 +4103,10 @@ takes place, so that the translation will normally end with \.{\\6} or \.{\\7} (the \TEX/ macros for |force| and |big_force|). This \.{\\6} or \.{\\7} is replaced by the concluding \.{\\par} or by \.{\\Y\\par}. -@= -void finish_C(); - -@ @c -void -finish_C(visible) /* finishes a definition or a \CEE/ part */ - boolean visible; /* nonzero if we should produce \TEX/ output */ +@c +static void +finish_C(@t\1\1@> /* finishes a definition or a \CEE/ part */ + boolean visible@t\2\2@>) /* nonzero if we should produce \TeX\ output */ { text_pointer p; /* translation of the scraps */ if (visible) { @@ -4085,13 +4114,15 @@ finish_C(visible) /* finishes a definition or a \CEE/ part */ p=translate(); @.\\B@> app(tok_flag+(int)(p-tok_start)); make_output(); /* output the list */ - if (out_ptr>out_buf+1) - if (*(out_ptr-1)=='\\') + if (out_ptr>out_buf+1) { + if (*(out_ptr-1)=='\\') { @.\\6@> @.\\7@> @.\\Y@> if (*out_ptr=='6') out_ptr-=2; else if (*out_ptr=='7') *out_ptr='Y'; + } + } out_str("\\par"); finish_line(); } if (text_ptr>max_text_ptr) max_text_ptr=text_ptr; @@ -4101,6 +4132,8 @@ finish_C(visible) /* finishes a definition or a \CEE/ part */ /* 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 @@ -4118,11 +4151,11 @@ it starts after we scan the matching `\.)'. 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; } @@ -4133,8 +4166,8 @@ it starts after we scan the matching `\.)'. } @ @= { - 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@> @@ -4158,8 +4191,8 @@ it starts after we scan the matching `\.)'. |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; @@ -4169,13 +4202,13 @@ if (next_control<=section_name) { else { this_section=cur_section; @ @@ -4223,8 +4256,8 @@ after the section ends. @= 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); @@ -4242,13 +4275,10 @@ leaves |cur_xref| pointing to the first element not printed. Typical outputs: Note that the output of \.{CWEAVE} is not English-specific; users may supply new definitions for the macros \.{\\A}, \.{\\As}, etc. -@= -void footnote(); - -@ @c -void -footnote(flag) /* outputs section cross-references */ -sixteen_bits flag; +@c +static void +footnote(@t\1\1@> /* outputs section cross-references */ +sixteen_bits flag@t\2\2@>) { xref_pointer q; /* cross-reference pointer variable */ if (cur_xref->num<=flag) return; @@ -4257,17 +4287,19 @@ sixteen_bits flag; @.\\Q@> @.\\U@> out(flag==0? 'U': flag==cite_flag? 'Q': 'A'); - @; + @@; 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. @= 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; @@ -4281,7 +4313,7 @@ while (1) { @ @= 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 @@ -4291,12 +4323,9 @@ If the user has set the |no_xref| flag (the \.{-x} option on the command line), just finish off the page, omitting the index, section name list, and table of contents. -@= -void phase_three(); - -@ @c -void -phase_three() { +@c +static void +phase_three(void) { if (no_xref) { finish_line(); out_str("\\end"); @@ -4304,29 +4333,29 @@ if (no_xref) { finish_line(); } else { - phase=3; if (show_progress) printf("\nWriting the index..."); + phase=3; if (show_progress) fputs("\nWriting the index...",stdout); @.Writing the index...@> finish_line(); - if ((idx_file=fopen(idx_file_name,"w"))==NULL) + if ((idx_file=fopen(idx_file_name,"wb"))==NULL) fatal("! Cannot open index file ",idx_file_name); @.Cannot open index file@> if (change_exists) { - @; finish_line(); finish_line(); + @@; finish_line(); finish_line(); } out_str("\\inx"); finish_line(); @.\\inx@> active_file=idx_file; /* change active file to the index file */ - @; - @; + @@; + @@; finish_line(); fclose(active_file); /* finished with |idx_file| */ active_file=tex_file; /* switch back to |tex_file| for a tic */ out_str("\\fin"); finish_line(); @.\\fin@> - if ((scn_file=fopen(scn_file_name,"w"))==NULL) + if ((scn_file=fopen(scn_file_name,"wb"))==NULL) fatal("! Cannot open section file ",scn_file_name); @.Cannot open section file@> active_file=scn_file; /* change active file to section listing file */ - @; + @@; finish_line(); fclose(active_file); /* finished with |scn_file| */ active_file=tex_file; if (group_found) out_str("\\con");@+else out_str("\\end"); @@ -4335,15 +4364,20 @@ else { finish_line(); fclose(active_file); } -if (show_happiness) printf("\nDone."); +if (show_happiness) { + if (show_progress) new_line; + fputs("Done.",stdout); +} 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 */ @@ -4362,28 +4396,28 @@ sixteen_bits k_section; /* runs through the sections */ @ A left-to-right radix sorting method is used, since this makes it easy to adjust the collating sequence and since the running time will be at worst proportional to the total length of all entries in the index. We put the -identifiers into 102 different lists based on their first characters. +identifiers into different lists based on their first characters. (Uppercase letters are put into the same list as the corresponding lowercase letters, since we want to have `$t<\\{TeX}<\&{to}$'.) The 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. @= { int c; -for (c=0; c<=255; c++) bucket[c]=NULL; +for (c=0; c<256; c++) bucket[c]=NULL; for (h=hash; h<=hash_end; h++) { next_name=*h; while (next_name) { cur_name=next_name; next_name=cur_name->link; - if (cur_name->xref!=(char*)xmem) { + if (cur_name->xref!=(void *)xmem) { c=(eight_bits)((cur_name->byte_start)[0]); if (xisupper(c)) c=tolower(c); blink[cur_name-name_dir]=bucket[c]; bucket[c]=cur_name; @@ -4401,7 +4435,7 @@ present; the lists are output in reverse order (first |sort_ptr|, then |k| characters of all entries on this list are known to be equal we have |depth[j]==k|. -@ @= +@= name_pointer Head; @ @d depth cat /* reclaims memory that is no longer needed for parsing */ @@ -4411,11 +4445,11 @@ name_pointer Head; @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; @@ -4423,8 +4457,8 @@ max_sort_ptr=scrap_info; @ The desired alphabetic order is specified by the |collate| array; namely, $|collate|[0]<|collate|[1]<\cdots<|collate|[100]$. -@= -eight_bits collate[102+128]; /* collation order */ +@= +static eight_bits collate[101+128]; /* collation order */ @^high-bit character handling@> @ We use the order $\hbox{null}<\.\ <\hbox{other characters}<{}$\.\_${}< @@ -4438,29 +4472,41 @@ some \CEE/ compilers choke on long strings. @= collate[0]=0; -strcpy(collate+1," \1\2\3\4\5\6\7\10\11\12\13\14\15\16\17"); +memcpy((char *)collate+1, + " \1\2\3\4\5\6\7\10\11\12\13\14\15\16\17",16); /* 16 characters + 1 = 17 */ -strcpy(collate+17,"\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37"); +memcpy((char *)collate+17, + "\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37",16); /* 16 characters + 17 = 33 */ -strcpy(collate+33,"!\42#$%&'()*+,-./:;<=>?@@[\\]^`{|}~_"); +memcpy((char *)collate+33, + "!\42#$%&'()*+,-./:;<=>?@@[\\]^`{|}~_",32); /* 32 characters + 33 = 65 */ -strcpy(collate+65,"abcdefghijklmnopqrstuvwxyz0123456789"); +memcpy((char *)collate+65, + "abcdefghijklmnopqrstuvwxyz0123456789",36); /* (26 + 10) characters + 65 = 101 */ -strcpy(collate+101,"\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"); +memcpy((char *)collate+101, + "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217",16); /* 16 characters + 101 = 117 */ -strcpy(collate+117,"\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"); +memcpy((char *)collate+117, + "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237",16); /* 16 characters + 117 = 133 */ -strcpy(collate+133,"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"); +memcpy((char *)collate+133, + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257",16); /* 16 characters + 133 = 149 */ -strcpy(collate+149,"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"); +memcpy((char *)collate+149, + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277",16); /* 16 characters + 149 = 165 */ -strcpy(collate+165,"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"); +memcpy((char *)collate+165, + "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317",16); /* 16 characters + 165 = 181 */ -strcpy(collate+181,"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"); +memcpy((char *)collate+181, + "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337",16); /* 16 characters + 181 = 197 */ -strcpy(collate+197,"\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"); +memcpy((char *)collate+197, + "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357",16); /* 16 characters + 197 = 213 */ -strcpy(collate+213,"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"); +memcpy((char *)collate+213, + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377",16); /* 16 characters + 213 = 229 */ @ Procedure |unbucket| goes through the buckets and adds nonempty lists @@ -4471,16 +4517,13 @@ regarded as identical. @d infinity 255 /* $\infty$ (approximately) */ -@= -void unbucket(); - -@ @c -void -unbucket(d) /* empties buckets having depth |d| */ -eight_bits d; +@c +static void +unbucket(@t\1\1@> /* empties buckets having depth |d| */ +eight_bits d@t\2\2@>) { int c; /* index into |bucket|; cannot be a simple |char| because of sign - comparison below*/ + comparison below */ for (c=100+128; c>= 0; c--) if (bucket[collate[c]]) { @^high-bit character handling@> if (sort_ptr>=scrap_info_end) overflow("sorting"); @@ -4492,13 +4535,15 @@ eight_bits d; } } +@ @=@+static void unbucket(eight_bits); + @ @= sort_ptr=scrap_info; unbucket(1); while (sort_ptr>scrap_info) { cur_depth=sort_ptr->depth; if (blink[sort_ptr->head-name_dir]==0 || cur_depth==infinity) @@; - else @; + else @@; } @ @= { @@ -4522,8 +4567,8 @@ while (sort_ptr>scrap_info) { do { out_str("\\I"); @.\\I@> - @; - @; + @@; + @@; cur_name=blink[cur_name-name_dir]; } while (cur_name); --sort_ptr; @@ -4546,7 +4591,7 @@ lowcase: out_str("\\\\"); @.\\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); @@ -4556,14 +4601,14 @@ lowcase: out_str("\\\\"); 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 `\.{\\[}$\,\ldots\,$\.]'. @= -@; +@@; do { out_str(", "); cur_val=cur_xref->num; if (cur_val= -xref_pointer next_xref, this_xref; +@= +static xref_pointer next_xref, this_xref; /* pointer variables for rearranging a list */ @ @= @@ -4591,13 +4636,10 @@ do { prints them. @^recursion@> -@= -void section_print(); - -@ @c -void -section_print(p) /* print all section names in subtree |p| */ -name_pointer p; +@c +static void +section_print(@t\1\1@> /* print all section names in subtree |p| */ +name_pointer p@t\2\2@>) { if (p) { section_print(p->llink); out_str("\\I"); @@ -4611,34 +4653,36 @@ name_pointer p; } } -@ @=section_print(root) +@ @=@+static void section_print(name_pointer); + +@ @=section_print(root); -@ Because on some systems the difference between two pointers is a |long| +@ Because on some systems the difference between two pointers is a |ptrdiff_t| rather than an |int|, we use \.{\%ld} to print these quantities. @c void -print_stats() { - printf("\nMemory usage statistics:\n"); +print_stats(void) { + puts("\nMemory usage statistics:"); @.Memory usage statistics:@> printf("%ld names (out of %ld)\n", - (long)(name_ptr-name_dir),(long)max_names); + (ptrdiff_t)(name_ptr-name_dir),(long)max_names); printf("%ld cross-references (out of %ld)\n", - (long)(xref_ptr-xmem),(long)max_refs); + (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); printf("%ld bytes (out of %ld)\n", - (long)(byte_ptr-byte_mem),(long)max_bytes); - printf("Parsing:\n"); + (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); + puts("Parsing:"); printf("%ld scraps (out of %ld)\n", - (long)(max_scr_ptr-scrap_info),(long)max_scraps); + (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); printf("%ld texts (out of %ld)\n", - (long)(max_text_ptr-tok_start),(long)max_texts); + (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); printf("%ld tokens (out of %ld)\n", - (long)(max_tok_ptr-tok_mem),(long)max_toks); + (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); printf("%ld levels (out of %ld)\n", - (long)(max_stack_ptr-stack),(long)stack_size); - printf("Sorting:\n"); + (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); + puts("Sorting:"); printf("%ld levels (out of %ld)\n", - (long)(max_sort_ptr-scrap_info),(long)max_scraps); + (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); } @** Index. diff --git a/source/texk/web2c/cwebdir/cweb.1 b/source/texk/web2c/cwebdir/cweb.1 index ad41c427e..a9aa69bf4 100644 --- a/source/texk/web2c/cwebdir/cweb.1 +++ b/source/texk/web2c/cwebdir/cweb.1 @@ -1,4 +1,4 @@ -.TH CWEB 1L 2002-Apr-13 +.TH CWEB 1 2018-Dec-16 . .SH NAME ctangle, cweave \- translate CWEB to C and/or TeX @@ -10,14 +10,14 @@ ctangle, cweave \- translate CWEB to C and/or TeX .B \-bhp ] [ .B +s -] webfile[.w] [changefile[.ch]] [outputfile[.c]] +] webfile[.w] [{changefile[.ch]|-} [outputfile[.c]]] .br .B cweave [ .B \-befhpx ] [ .B +s -] webfile[.w] [changefile[.ch]] [outputfile[.tex]] +] webfile[.w] [{changefile[.ch]|-} [outputfile[.tex]]] .ad . .SH DESCRIPTION @@ -78,8 +78,7 @@ If you say -bhp, you get nothing but error messages. .PP The .B +s -option prints statistics about memory usage at the end of a run -(assuming that the programs have been compiled with the -DSTAT switch). +option prints statistics about memory usage at the end of a run. .PP There are three other options applicable to .I cweave @@ -99,20 +98,15 @@ and similar programs. means omit the index and table of contents. . .SH FILES +The location of the files mentioned below varies from system to system. .TP -/usr/local/lib/tex/inputs/cwebmac.tex +cwebmac.tex TeX macros used by cweave output. .TP -/usr/local/src/cweb/cwebman.tex +cwebman.tex The user manual. .TP -/usr/local/src/cweb/examples/wc.w -An introductory example. -.TP -/usr/local/src/cweb/examples/wmerge.w -Patch program based on CWEB-style change files. -.TP -/usr/local/lib/cweb +/usr/lib/cweb Directory for cweb "include" files. . .SH "SEE ALSO" diff --git a/source/texk/web2c/cwebdir/cwebmac.tex b/source/texk/web2c/cwebdir/cwebmac.tex index 60f86ce5a..385dc474e 100644 --- a/source/texk/web2c/cwebdir/cwebmac.tex +++ b/source/texk/web2c/cwebdir/cwebmac.tex @@ -1,19 +1,20 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 3.70 --- July 2017 +% Version 4.2 --- February 2021 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros -\xdef\fmtversion{\fmtversion+CWEB3.70} -\chardef\cwebversion=3 \chardef\cwebrevision=70 +\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 %\ifx\pdf-\else\pdftrue\fi \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color +\ifx\undefined\XeTeXrevision\else\pdftrue\fi % XeTeX produces PDF output \newif\ifpdftex \ifx\pdfoutput\undefined \pdftexfalse \else\ifnum\pdfoutput=0 \pdftexfalse %\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 @@ -281,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 diff --git a/source/texk/web2c/cwebdir/cwebman.tex b/source/texk/web2c/cwebdir/cwebman.tex index 2e4ec65ea..df652232b 100644 --- a/source/texk/web2c/cwebdir/cwebman.tex +++ b/source/texk/web2c/cwebdir/cwebman.tex @@ -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 3.64)} +\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 3.64 --- February 2002)} +\vskip 18pt\centerline{(Version 4.2 --- February 2021)} \vskip 24pt \centerline{\authorfont Donald E. Knuth and Silvio Levy} \vfill @@ -87,6 +87,10 @@ Internet page \.{http://www-cs-faculty.stanford.edu/\char`\~knuth/cweb.html} contains current info about \.{CWEB} and related topics. +\smallskip\noindent +From there you can also reach the \.{CWEB} development page +\.{https://github.com/ascherer/cweb} with the really current news. + \pageno=0 \titletrue\eject \titletrue @@ -103,7 +107,7 @@ has been revised and enhanced in various ways, by both Knuth and Levy. We now believe that its evolution is near an end; however, bug reports, suggestions and comments are still welcome, and -should be sent to Levy (\.{levy@math.berkeley.edu}). +should be sent to the \TeX-related mailing list \.{tex-k@tug.org}. Readers who are familiar with Knuth's memo ``The \.{WEB} System of Structured Documentation'' will be able @@ -394,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}, @@ -521,7 +525,7 @@ \@@ [LTMCrc] A double \.@ denotes the single character `\.@'. This is the only control code that is legal everywhere. Note that you must use this convention if you are giving an internet -email address in a \.{CWEB} file (e.g., \.{levy@@math.berkeley.edu}). +email address in a \.{CWEB} file (e.g., \.{tex-k@@tug.org}). \subsec Here are the codes that introduce the \TEX/ part of a section. @@ -1007,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 @@ -1038,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 @@ -1151,6 +1155,8 @@ Alternatively, thanks to H\`an Th\^e\kern-.3em\raise.3ex\hbox{\'{}} Th\`anh and Andreas Scherer, you can generate \.{cob.pdf} in one step by simply saying `\.{pdftex}~\.{cob}'. +A third way to create PDF output from \.{CWEB} input is to say +`\.{xetex}~\.{cob}'. A more elaborate system called \.{CTWILL}, which extends the usual cross references of \.{CWEAVE} by preparing links from the uses of identifiers @@ -1184,17 +1190,16 @@ This appendix consists of four listings. The first shows the \.{CWEB} input that -generated sections 12--15 of the file \.{common.w}, which contains +generated sections 27--31 of the file \.{common.w}, which contains routines common to \.{CWEAVE} and \.{CTANGLE}. Note that some of the lines are indented to show the program structure; the indentation is ignored by \.{CWEAVE} and \.{CTANGLE}, but users find that \.{CWEB} files are quite readable if they have some such indentation. -The second and third listings -show corresponding parts -of the \CEE/ code output by \.{CTANGLE} and of -the corresponding \TEX/ code output by \.{CWEAVE}, when run on \.{common.w}. -The fourth listing shows how that output looks when printed out. +The second and third listings show corresponding parts of +the \CEE/ code output by \.{CTANGLE} and of +the \TEX/ code output by \.{CWEAVE}, when run on \.{common.w}. +The fourth listing shows how that output looks in print. \vskip 6pt \begingroup \def\tt{\eighttt} \baselineskip9pt @@ -1204,16 +1209,19 @@ 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 -void -prime_the_change_buffer() +@ @c +static void +prime_the_change_buffer(void) { change_limit=change_buffer; /* this value is used if the change file ends */ - @; - @; - @; + @@; + @@; + @@; } @ While looking for a line that begins with \.{@@x} in the change file, we @@ -1221,12 +1229,12 @@ \.{@@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= { - change_limit=change_buffer-buffer+limit; - strncpy(change_buffer,buffer,limit-buffer+1); + change_limit=change_buffer+(ptrdiff_t)(limit-buffer); + strncpy(change_buffer,buffer,(size_t)(limit-buffer+1)); } - !endgroup \endgroup \vfill\eject @@ -1260,28 +1267,28 @@ \def\runninghead{APPENDIX A --- TRANSLATION BY {\tentt CTANGLE}} Here's the portion of the \CEE/ code generated by \.{CTANGLE} that corresponds -to the source on the preceding page. Notice that sections~13, 14 and~15 -have been tangled into section~12. +to the source on the preceding page. Notice that sections~29, 30 and~31 +have been tangled into section~28. \vskip6pt \begingroup \def\tt{\eighttt} \baselineskip9pt \verbatim -/*:9*//*12:*/ -#line 247 "common.w" +/*:24*//*28:*/ +#line 234 "common.w" -void -prime_the_change_buffer() +static void +prime_the_change_buffer(void) { change_limit= change_buffer; -/*13:*/ -#line 261 "common.w" +/*29:*/ +#line 248 "common.w" -while(1){ +while(true){ change_line++; if(!!input_ln(change_file))return; if(limit. '-ipc' @@ -1191,22 +1199,18 @@ release. You can change which formats are automatically built by 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 @@ -1218,29 +1222,30 @@ context 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 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., 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 @@ -1627,15 +1632,15 @@ pdfTeX 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 @@ -2122,18 +2127,14 @@ code. This section merely describes the options available in the Web2c 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', 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] @@ -2418,9 +2419,9 @@ available in many other places, of course). * Menu: -* tangle invocation:: -* weave invocation:: -* pooltype invocation:: +* tangle invocation:: +* weave invocation:: +* pooltype invocation::  File: web2c.info, Node: tangle invocation, Next: weave invocation, Up: WEB @@ -2659,7 +2660,7 @@ program. * Menu: -* dvitype output example:: +* dvitype output example::  File: web2c.info, Node: dvitype output example, Up: dvitype invocation @@ -3340,11 +3341,7 @@ items: 'CTAN:/fonts/utilities/ps2pk'. * PostScript Type 1 font format conversion (i.e., between PFA and PFB - formats): . - - * Scanned image conversion: the (aging) GNU font utilities convert - type specimen images to Metafont, PostScript, etc.: - . + formats): . * Tracing bitmaps to fitted outlines: Autotrace (), Potrace @@ -3353,7 +3350,7 @@ items: 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 @@ -3396,10 +3393,11 @@ Appendix B References 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: . @@ -3494,8 +3492,8 @@ Index [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) @@ -3512,7 +3510,7 @@ Index (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. @@ -3533,35 +3531,36 @@ Index (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) @@ -3569,41 +3568,41 @@ Index * -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) * -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) @@ -3617,22 +3616,22 @@ Index * .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) @@ -3642,12 +3641,12 @@ Index * \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) @@ -3655,9 +3654,9 @@ Index * \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) @@ -3669,7 +3668,7 @@ Index (line 16) * accented character: TCX files. (line 6) * accents, hyphenating words with: MLTeX. (line 6) -* acknowledgements: Introduction. (line 53) +* acknowledgements: Introduction. (line 54) * acm.bst: Basic BibTeX style files. (line 19) * Ada, WEB for: WEB. (line 12) @@ -3684,8 +3683,8 @@ Index * 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. @@ -3695,7 +3694,7 @@ Index * 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) @@ -3711,8 +3710,9 @@ Index * batch languages: TeX. (line 9) * BDF and GF conversion: Font utilities available elsewhere. (line 15) -* beginfig: mpost invocation. (line 35) -* Berry, Karl: Introduction. (line 42) +* 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) * bibliography: References. (line 6) @@ -3724,15 +3724,15 @@ Index (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 8) +* 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) @@ -3741,12 +3741,12 @@ Index * 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) @@ -3763,7 +3763,7 @@ Index (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) @@ -3774,15 +3774,16 @@ Index * 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) * 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) @@ -3801,13 +3802,13 @@ Index * cross-references, omitting: weave invocation. (line 22) * current directory, used for output: Output file location. (line 6) -* Curtis, Pavel: Introduction. (line 42) +* Curtis, Pavel: Introduction. (line 43) * Cweb: WEB. (line 12) * CWEB: WEB. (line 12) * 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) @@ -3821,12 +3822,12 @@ Index * 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) @@ -3842,12 +3843,12 @@ Index * 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. @@ -3859,7 +3860,7 @@ Index * 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) @@ -3867,15 +3868,15 @@ Index * 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) @@ -3884,10 +3885,10 @@ Index * 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. @@ -3906,7 +3907,7 @@ Index * 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) @@ -3915,19 +3916,17 @@ Index * 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) -* freedom of Web2c: Introduction. (line 22) +* 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. @@ -3950,7 +3949,7 @@ Index * 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. @@ -3962,12 +3961,11 @@ Index * headerbyte information: tftopl invocation. (line 95) * height, in pixels: pktype invocation. (line 62) * help, online: Common options. (line 11) -* Henry, Patrick: Introduction. (line 22) * Herberts, Mathias: Online Metafont graphics. (line 20) * hex character codes, in TCX files: TCX files. (line 77) -* history: Introduction. (line 42) -* Hobby, John: Introduction. (line 8) +* history: Introduction. (line 43) +* Hobby, John: Introduction. (line 9) * horizontal escapement: pktype invocation. (line 57) * horizontal escapement <1>: gftype invocation. (line 106) * hp2627: Online Metafont graphics. @@ -3983,7 +3981,7 @@ Index * hyphenation and languages: Languages and hyphenation. (line 6) * hyphenation patterns, creating: patgen invocation. (line 6) -* ice cream: Introduction. (line 22) +* ice cream: Introduction. (line 23) * identifier case: tangle invocation. (line 35) * identifier collisions: tangle invocation. (line 46) * identifier length: tangle invocation. (line 27) @@ -3992,8 +3990,8 @@ Index (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) @@ -4005,44 +4003,44 @@ Index * 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) * 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 8) +* 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) * 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) * left side bearing <1>: gftype invocation. (line 82) * legalisms: Legalisms. (line 6) * libsigsegv library: Runtime options. (line 33) -* licensing terms: Introduction. (line 22) +* licensing terms: Introduction. (line 23) * 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) @@ -4060,8 +4058,8 @@ Index * magnification <1>: dvitype invocation. (line 28) * main_memory: Runtime options. (line 15) * Make targets, additional: Additional targets. (line 6) -* Martin, Rick: Introduction. (line 53) -* Mathematical Reviews: Formats. (line 39) +* Martin, Rick: Introduction. (line 54) +* Mathematical Reviews: Formats. (line 35) * mathematical typesetting: TeX. (line 6) * mem file, determining: Determining the memory dump to use. (line 6) @@ -4096,9 +4094,9 @@ Index * 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. @@ -4118,28 +4116,28 @@ Index * 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) -* Morgan, Tim: Introduction. (line 42) -* Morris, Bob: Introduction. (line 53) +* 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. @@ -4160,28 +4158,29 @@ Index * 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. @@ -4214,23 +4213,23 @@ Index * 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. (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. (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) @@ -4240,11 +4239,11 @@ Index * 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) @@ -4252,15 +4251,15 @@ Index * 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 61) +* reading, additional: Introduction. (line 62) * readonly directory, running TeX in: Output file location. (line 15) * readonly directory, running TeX in <1>: Output file location. @@ -4274,13 +4273,13 @@ Index (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) * right side bearing: pktype invocation. (line 66) * right side bearing <1>: gftype invocation. (line 82) -* Rokicki, Tomas: Introduction. (line 42) +* Rokicki, Tomas: Introduction. (line 43) * run length encoded bitmaps: pktype invocation. (line 76) * run length encoded bitmaps <1>: gftype invocation. (line 89) * runtime options: Runtime options. (line 6) @@ -4288,12 +4287,10 @@ Index * 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. @@ -4307,25 +4304,25 @@ Index * 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) * space-terminated filenames: \input filenames. (line 10) * Spiderweb: WEB. (line 12) -* Stallman, Richard: Introduction. (line 53) +* Stallman, Richard: Introduction. (line 54) * starting page: dvicopy invocation. (line 28) * 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) -* strategy, overall: Introduction. (line 16) +* 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) @@ -4341,8 +4338,9 @@ Index * 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) @@ -4370,12 +4368,12 @@ Index * TeX, input files found: tex invocation. (line 20) * TeX, invocation: tex invocation. (line 6) * TeX, Metafont, and MetaPost: Three programs. (line 6) -* TeX, Web2c implementation of: Introduction. (line 8) +* TeX, Web2c implementation of: Introduction. (line 9) * tex.fmt: Initial TeX. (line 13) * 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) @@ -4384,14 +4382,14 @@ Index (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) * 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) @@ -4399,25 +4397,26 @@ Index * 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 from WEB to C: Introduction. (line 16) +* 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) * trapman.tex: Triptrap. (line 6) -* Trickey, Howard: Introduction. (line 42) +* Trickey, Howard: Introduction. (line 43) * trip Make target: Additional targets. (line 41) * 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) @@ -4427,18 +4426,17 @@ Index * 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. (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) @@ -4452,7 +4450,7 @@ Index * 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) @@ -4464,7 +4462,7 @@ Index * WEB programs, compiling: tangle invocation. (line 6) * WEB programs, typesetting: weave invocation. (line 6) * WEB2C, search path for TCX files: TCX files. (line 35) -* Weber, Olaf: Introduction. (line 42) +* Weber, Olaf: Introduction. (line 43) * webmac.tex: weave invocation. (line 22) * webman.tex: WEB. (line 12) * whitespace, in TCX files: TCX files. (line 68) @@ -4508,77 +4506,82 @@ Index  Tag Table: Node: Top2759 -Node: Introduction3830 -Node: Installation7166 -Node: configure options9210 -Node: Compile-time options11232 -Node: Additional targets12334 -Node: Triptrap13611 -Node: Commonalities15114 -Node: Option conventions15647 -Node: Common options16870 -Node: Path searching21250 -Node: Output file location22222 -Node: Three programs23524 -Node: Runtime options24231 -Node: Initial and virgin27372 -Node: Memory dumps28321 -Node: Creating memory dumps28773 -Node: Determining the memory dump to use29980 -Node: Hardware and memory dumps31557 -Node: Editor invocation34003 -Node: \input filenames34866 -Node: \input quoted filename36419 -Node: \input braced filename37196 -Node: \input filename caveats38126 -Node: TeX39640 -Node: tex invocation40808 -Node: Initial TeX47711 -Node: Formats49075 -Node: Languages and hyphenation52001 -Node: MLTeX52431 -Node: \charsubdef54059 -Node: \tracingcharsubdef56382 -Node: TCX files56957 -Node: patgen invocation62397 -Node: Shell escapes63103 -Node: IPC and TeX66683 -Node: TeX extensions67253 -Node: Metafont69218 -Node: mf invocation70506 -Node: Initial Metafont74343 -Node: Modes75973 -Node: Online Metafont graphics78223 -Node: gftodvi invocation81648 -Node: mft invocation84468 -Node: MetaPost88466 -Node: mpost invocation89302 -Node: Initial MetaPost94478 -Node: dvitomp invocation95400 -Node: BibTeX96065 -Node: bibtex invocation96426 -Node: Basic BibTeX style files98900 -Node: WEB100230 -Node: tangle invocation101471 -Node: weave invocation103594 -Node: pooltype invocation105001 -Node: DVI utilities106131 -Node: dvicopy invocation107065 -Node: dvitype invocation108350 -Node: dvitype output example110687 -Node: Font utilities113740 -Node: Font file formats114920 -Node: gftopk invocation118189 -Node: pktogf invocation119380 -Node: pktype invocation120546 -Node: gftype invocation123369 -Node: tftopl invocation127872 -Node: pltotf invocation132465 -Node: vftovp invocation133516 -Node: vptovf invocation135751 -Node: Font utilities available elsewhere136778 -Node: Legalisms139158 -Node: References140604 -Node: Index144692 +Node: Introduction3834 +Node: Installation7174 +Node: configure options9218 +Node: Compile-time options11240 +Node: Additional targets12342 +Node: Triptrap13619 +Node: Commonalities15122 +Node: Option conventions15655 +Node: Common options16878 +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: diff --git a/source/texk/web2c/doc/web2c.texi b/source/texk/web2c/doc/web2c.texi index ace1dd28a..f96ed0d6a 100644 --- a/source/texk/web2c/doc/web2c.texi +++ b/source/texk/web2c/doc/web2c.texi @@ -11,8 +11,8 @@ The latest version is available from ftp://ftp.tug.org/tex/texinfo.tex.} \fi @end tex -@set version 2020 -@set month-year July 2020 +@set version 2021 +@set month-year February 2021 @c Define new indices for commands in auxiliary files, filenames, and options. @defcodeindex cm @@ -63,7 +63,7 @@ This file documents the installation and use of the programs in Web2c, 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 @@ except that this permission notice may be stated in a translation @subtitle @value{month-year} @author Karl Berry @author Olaf Weber -@author @url{http://tug.org/web2c} +@author @url{https://tug.org/web2c} @page @vskip 0pt plus 1filll @@ -162,7 +162,6 @@ Therefore, it will not work without change on an arbitrary WEB program. @cindex licensing terms @cindex freedom of Web2c @cindex ice cream -@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 @@ Print the version number to standard output, then exit successfully. common: @table @samp +@item -cnf-line=@var{str} +@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 @@ This is the recommended method for portability reasons. @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 @@ These options are common to @TeX{}, Metafont, and MetaPost. @cindex Unicode input @cindex UTF-8 input Enable enc@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 @@ current at the time of release. You can change which formats are 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, -@pxref{unixtex.ftp,,, kpathsea, Kpathsea}). The archive -@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@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@dmn{pt} Computer Modern italic font''. The @LaTeX{} home +page: @url{https://www.latex-project.org}. @item context +@cindex Con@TeX{}t Con@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 @@ other interesting features. The Con@TeX{}t home page: @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@TeX{} home page: -@url{http://www.ams.org/tex}. +@url{https://www.ams.org/tex}. @item texinfo @cindex Texinfo @@ -1373,7 +1379,7 @@ The documentation system developed and maintained by the Free 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: -@url{http://www.gnu.org/software/texinfo}. +@url{https://www.gnu.org/software/texinfo}. @item eplain @cindex Eplain @@ -1382,14 +1388,16 @@ The ``expanded plain'' format provides various common features (e.g., symbolic cross-referencing, tables of contents, indexing, citations using Bib@TeX{}), for those authors who prefer to handle their own high-level formatting. The Eplain home page: -@url{http://www.tug.org/eplain}. +@url{https://tug.org/eplain}. @item slitex @cindex Sli@TeX{} @cindex slides, producing +@flindex beamer@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}, -@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 @@ these additions available with DVI output. Home page: @item Lua@TeX{} @cindex Lua@TeX{} @cindex Lua +@cindex UTF-8 input, native +@cindex OpenType support +@cindex TrueType support +@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@TeX{} capabilities as a base. Also natively supports Unicode -input and OpenType- and system fonts. Home page: -@url{http://luatex.org}. +the pdf@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@TeX{} @cindex Xe@TeX{} -@cindex Unicode -Combines support for Unicode input and OpenType- and system fonts -with the capabilities of pdf@TeX{}, with the exception of the font -expansion part of micro-typography. +@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@TeX{}, +with the exception of the font expansion part of micro-typography. Home page: @url{https://tug.org/xetex}. @item p@TeX{} @@ -2590,29 +2602,23 @@ supported) and a number of other subsidiary programs, described below. @pindex mpost @cindex MetaPost invocation -@flindex mpman.ps +@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 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: -@itemize @bullet -@item @url{http://cm.bell-labs.com/who/hobby/MetaPost.html} (the - MetaPost author's home page); -@item @url{http://tug.org/metapost} (papers, packages, and - related information). -@end itemize +where @var{texmf} is the root of @TeX{} directory structure. +The MetaPost home page: @url{https://tug.org/metapost}. -@flindex mpgraph.ps +@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,,@code{tex} invocation}, and @pxref{Memory dumps}). Synopses: @@ -4253,15 +4259,7 @@ distribution. Alternatively, @code{ps2pk}, from @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}. - -@item -@cindex scanned images of fonts -@cindex typeface specimen sheets -@pindex fontutils -Scanned image conversion: the (aging) GNU font utilities convert type -specimen images to Metafont, PostScript, etc.: -@url{http://www.gnu.org/software/fontutils/}. +formats): @url{https://www.lcdf.org/type}. @item @pindex autotrace @@ -4276,7 +4274,7 @@ the two programs @code{mftrace} @item @cindex virtual font creation @pindex fontinst@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 @@ Kpathsea: @xref{Top, Introduction,, kpathsea, Kpathsea}. 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: +@url{https://tug.org/TUGboat}. @item @TeX{} and computer typesetting in general:@* diff --git a/source/texk/web2c/eptexdir/am/eptex.am b/source/texk/web2c/eptexdir/am/eptex.am index 447cfee8e..b49a28706 100644 --- a/source/texk/web2c/eptexdir/am/eptex.am +++ b/source/texk/web2c/eptexdir/am/eptex.am @@ -1,7 +1,7 @@ -## $Id: eptex.am 55874 2020-07-19 15:42:51Z karl $ +## $Id: eptex.am 57769 2021-02-17 03:03:54Z karl $ ## texk/web2c/eptexdir/am/eptex.am: Makefile fragment for e-pTeX. ## -## Copyright 2015-2020 Karl Berry +## Copyright 2015-2021 Karl Berry ## Copyright 2011-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. @@ -54,6 +54,7 @@ eptex_web_srcs = \ etexdir/etex.ch \ etexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch \ etexdir/tex.ech diff --git a/source/texk/web2c/eptexdir/eptex_version.h b/source/texk/web2c/eptexdir/eptex_version.h index 2081950eb..a79725d29 100644 --- a/source/texk/web2c/eptexdir/eptex_version.h +++ b/source/texk/web2c/eptexdir/eptex_version.h @@ -1 +1 @@ -#define EPTEX_VERSION "191112" +#define EPTEX_VERSION "210218" diff --git a/source/texk/web2c/etexdir/am/etex.am b/source/texk/web2c/etexdir/am/etex.am index aa6f9b1f8..e06aeaede 100644 --- a/source/texk/web2c/etexdir/am/etex.am +++ b/source/texk/web2c/etexdir/am/etex.am @@ -1,6 +1,7 @@ +## $Id: etex.am 57769 2021-02-17 03:03:54Z karl $ ## texk/web2c/etexdir/am/etex.am: Makefile fragment for e-TeX. ## -## Copyright 2015-2019 Karl Berry +## Copyright 2015-2021 Karl Berry ## Copyright 2009-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. @@ -60,7 +61,9 @@ etex_ch_srcs = \ etexdir/tex.ch0 \ tex.ch \ zlib-fmt.ch \ - enctex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-tex.ch \ + enctexdir/enctex2.ch \ $(etex_ch_synctex) \ etexdir/tex.ch1 \ etexdir/tex.ech \ diff --git a/source/texk/web2c/euptexdir/am/euptex.am b/source/texk/web2c/euptexdir/am/euptex.am index bfc67baa4..bc1921ccd 100644 --- a/source/texk/web2c/euptexdir/am/euptex.am +++ b/source/texk/web2c/euptexdir/am/euptex.am @@ -1,7 +1,7 @@ -## $Id: euptex.am 55874 2020-07-19 15:42:51Z karl $ +## $Id: euptex.am 57769 2021-02-17 03:03:54Z karl $ ## texk/web2c/euptexdir/am/euptex.am: Makefile fragment for e-upTeX. ## -## Copyright 2015-2020 Karl Berry +## Copyright 2015-2021 Karl Berry ## Copyright 2011-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. @@ -50,6 +50,7 @@ euptex_web_srcs = \ etexdir/etex.ch \ etexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch \ etexdir/tex.ech diff --git a/source/texk/web2c/lib/ChangeLog b/source/texk/web2c/lib/ChangeLog index be05b6cdc..baa54a525 100644 --- a/source/texk/web2c/lib/ChangeLog +++ b/source/texk/web2c/lib/ChangeLog @@ -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. diff --git a/source/texk/web2c/lib/texmfmp.c b/source/texk/web2c/lib/texmfmp.c index 8b898176e..eeb32eaf2 100644 --- a/source/texk/web2c/lib/texmfmp.c +++ b/source/texk/web2c/lib/texmfmp.c @@ -610,8 +610,18 @@ runsystem (const char *cmd) 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) diff --git a/source/texk/web2c/luatexdir/ChangeLog b/source/texk/web2c/luatexdir/ChangeLog index 3c3dc892b..e1b905d81 100644 --- a/source/texk/web2c/luatexdir/ChangeLog +++ b/source/texk/web2c/luatexdir/ChangeLog @@ -1,27 +1,43 @@ -2021-01-31 Luigi Scarso +2021-03-23 Karl Berry + * TL'21. + +2021-03-12 Luigi Scarso + * When restricted system commands is enabled os.setenv has no effect + * Patched Decompress to avoid execution of arbitrary commands + +2021-03-07 Luigi Scarso + * Fixed inclusion of PDF images with page /Metadata streams (M.F. Krüger) + +2021-02-14 Luigi Scarso + * callback for nesting level used in tracingmacros + +2021-02-01 Luigi Scarso + * two TeX January 2021 DEK buglet fixes (H.Hagen) + +2021-01-31 Luigi Scarso * mark math glyphs as protected (in order to prevent processing as text in base mode) (H.Hagen) * removed width/ic compensation for traditional math code path (see [Dev-luatex] Duplicated italic correction in do_delimiter ) (H.Hagen) -2021-01-30 Luigi Scarso +2021-01-30 Luigi Scarso * level_max and level_chr determing what gets put in front of macro tracing lines (variant on suggestion by PO on implementors list)(H. Hagen) -2021-01-13 Luigi Scarso +2021-01-13 Luigi Scarso * pdftex compatibility hack (H. Hagen) -2020-12-13 Luigi Scarso +2020-12-13 Luigi Scarso * fixed Hyphenation issue regarding frozen glyph nodes (M.F. Krüger) -2020-12-12 Luigi Scarso +2020-12-12 Luigi Scarso * fixed luatex segfault with huge romannumeral overfull (H. Hagen) * automake (GNU automake) 1.16.3 -2020-11-08 Luigi Scarso +2020-11-08 Luigi Scarso * convert assert(is_simple_character(wordstart)) to tex error -2020-10-30 Luigi Scarso +2020-10-30 Luigi Scarso * fixed a typo in w32 code in errors.c (A. Kakuto) 2020-10-04 Luigi Scarso @@ -40,7 +56,7 @@ * fixed: \tracinglostchars>=3 is an error (no fatal error) 2020-07-26 Luigi Scarso - * New value for \tracinglostchars: \tracinglostchars>=3 is a fatal error + * New value for \tracinglostchars: \tracinglostchars>=3 is a fatal error 2020-07-12 Luigi Scarso * Original reports: @@ -1229,7 +1245,7 @@ 2010-05-13 Taco Hoekwater - * utils/synctex.c, utils/synctex-luatex.h: update from Jérome + * utils/synctex.c, utils/synctex-luatex.h: update from Jérôme Laurens, bringing luatex in-line with the core synctex distribution * luatex_svnversion.h: updated to reflect the version of 0.60.x branch diff --git a/source/texk/web2c/luatexdir/NEWS b/source/texk/web2c/luatexdir/NEWS index a73d3850b..42f85aeb5 100644 --- a/source/texk/web2c/luatexdir/NEWS +++ b/source/texk/web2c/luatexdir/NEWS @@ -1,3 +1,20 @@ +============================================================== +LuaTeX 1.13.0 2021-03-12 +============================================================== + +This is the release for TeX live 2021. +Callback for nesting level used in tracingmacros. +It is is a variant of \tracingstacklevels +by Petr Olsak implemented in pdftex and xetex. +Two TeX January 2021 DEK buglet fixes (H.Hagen) +Mark math glyphs as protected (in order to prevent processing +as text in base mode). +Removed width/ic compensation for traditional math code path. +When restricted system commands is enabled os.setenv has no effect. +Minor clean-up and bugs fixed (see ChangeLog) + + + ============================================================== LuaTeX 1.12.0 2020-03-15 ============================================================== diff --git a/source/texk/web2c/luatexdir/font/writefont.c b/source/texk/web2c/luatexdir/font/writefont.c index 13fa8b754..d858086b2 100644 --- a/source/texk/web2c/luatexdir/font/writefont.c +++ b/source/texk/web2c/luatexdir/font/writefont.c @@ -634,6 +634,9 @@ static void write_fontdictionary(PDF pdf, fo_entry * fo) if (fo->fe != NULL) { fo->tounicode_objnum = write_tounicode(pdf, fo->fe->glyph_names, fo->fe->name); } else if (is_type1(fo->fm)) { + if (fo->fd->builtin_glyph_names==NULL) { + normal_error("font", "builtin glyph names is empty"); + } fo->tounicode_objnum = write_tounicode(pdf, fo->fd->builtin_glyph_names, fo->fm->tfm_name); } } diff --git a/source/texk/web2c/luatexdir/image/pdftoepdf.c b/source/texk/web2c/luatexdir/image/pdftoepdf.c index 78dab3a37..ca68ba8dc 100644 --- a/source/texk/web2c/luatexdir/image/pdftoepdf.c +++ b/source/texk/web2c/luatexdir/image/pdftoepdf.c @@ -868,7 +868,7 @@ void write_epdf(PDF pdf, image_dict * idict, int suppress_optional_info) copy selected items in Page dictionary */ for (i = 0; pagedictkeys[i] != NULL; i++) { - obj = ppdict_rget_obj(pageDict, pagedictkeys[i]); + obj = ppdict_get_obj(pageDict, pagedictkeys[i]); if (obj != NULL) { pdf_add_name(pdf, pagedictkeys[i]); /* diff --git a/source/texk/web2c/luatexdir/lua/lcallbacklib.c b/source/texk/web2c/luatexdir/lua/lcallbacklib.c index 4e0defd10..c4472c07f 100644 --- a/source/texk/web2c/luatexdir/lua/lcallbacklib.c +++ b/source/texk/web2c/luatexdir/lua/lcallbacklib.c @@ -85,6 +85,7 @@ static const char *const callbacknames[] = { "make_extensible", "process_pdf_image_content", "provide_charproc_data", + "input_level_string", NULL }; diff --git a/source/texk/web2c/luatexdir/lua/liolibext.c b/source/texk/web2c/luatexdir/lua/liolibext.c index ce1e78f6c..bb18531f5 100644 --- a/source/texk/web2c/luatexdir/lua/liolibext.c +++ b/source/texk/web2c/luatexdir/lua/liolibext.c @@ -579,7 +579,7 @@ static int readinteger3_s_le(lua_State *L) { static int readinteger4(lua_State *L) { FILE *f = tofile(L); - int a = getc(f); + lua_Integer a = getc(f); int b = getc(f); int c = getc(f); int d = getc(f); @@ -596,7 +596,7 @@ static int readinteger4_le(lua_State *L) { int d = getc(f); int c = getc(f); int b = getc(f); - int a = getc(f); + lua_Integer a = getc(f); if (a == EOF) lua_pushnil(L); else if (a >= 0x80) @@ -613,7 +613,7 @@ static int readinteger4_s(lua_State *L) { if (p+3 >= l) { lua_pushnil(L); } else { - int a = uchar(s[p++]); + lua_Integer a = uchar(s[p++]); int b = uchar(s[p++]); int c = uchar(s[p++]); int d = uchar(s[p]); @@ -634,7 +634,7 @@ static int readinteger4_s_le(lua_State *L) { int d = uchar(s[p++]); int c = uchar(s[p++]); int b = uchar(s[p++]); - int a = uchar(s[p]); + lua_Integer a = uchar(s[p]); if (a >= 0x80) lua_pushinteger(L, 0x1000000 * a + 0x10000 * b + 0x100 * c + d - 0x100000000); else @@ -694,7 +694,7 @@ static int readintegertable(lua_State *L) { break; case 4: for (i=1;i<=n;i++) { - int a = getc(f); + lua_Integer a = getc(f); int b = getc(f); int c = getc(f); int d = getc(f); @@ -777,7 +777,7 @@ static int readintegertable_s(lua_State *L) { if (p+3 >= l) { break; } else { - int a = uchar(s[p++]); + lua_Integer a = uchar(s[p++]); int b = uchar(s[p++]); int c = uchar(s[p++]); int d = uchar(s[p++]); diff --git a/source/texk/web2c/luatexdir/lua/luainit.c b/source/texk/web2c/luatexdir/lua/luainit.c index 11cfc2531..c88ebb096 100644 --- a/source/texk/web2c/luatexdir/lua/luainit.c +++ b/source/texk/web2c/luatexdir/lua/luainit.c @@ -2,7 +2,7 @@ luainit.w -Copyright 2006-2020 Taco Hoekwater +Copyright 2006-2021 Taco Hoekwater This file is part of LuaTeX. @@ -450,7 +450,7 @@ static void parse_options(int ac, char **av) "the terms of the GNU General Public License, version 2 or (at your option)\n" "any later version. For more information about these matters, see the file\n" "named COPYING and the LuaTeX source.\n\n" - "LuaTeX is Copyright 2020 Taco Hoekwater and the LuaTeX Team.\n"); + "LuaTeX is Copyright 2021 Taco Hoekwater and the LuaTeX Team.\n"); /* *INDENT-ON* */ uexit(0); } else if (ARGUMENT_IS("credits")) { diff --git a/source/texk/web2c/luatexdir/lua/luatex-core.c b/source/texk/web2c/luatexdir/lua/luatex-core.c index 95396765c..3073976c0 100644 --- a/source/texk/web2c/luatexdir/lua/luatex-core.c +++ b/source/texk/web2c/luatexdir/lua/luatex-core.c @@ -356,321 +356,325 @@ int load_luatex_core_lua (lua_State * L) 0x65, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x73, 0x5b, 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x72, 0x73, 0x5b, 0x33, 0x5d, 0x20, 0x3d, 0x20, - 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, 0x20, 0x72, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x27, 0x66, 0x66, 0x69, 0x27, 0x29, 0x0a, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x66, 0x66, 0x69, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6b, 0x2c, 0x20, 0x76, 0x20, - 0x69, 0x6e, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x66, 0x66, 0x69, 0x20, 0x64, 0x6f, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6b, - 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x67, 0x63, 0x27, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, - 0x69, 0x5b, 0x6b, 0x5d, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x65, - 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x64, 0x35, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x75, 0x6d, 0x20, 0x20, - 0x20, 0x20, 0x3d, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x67, 0x73, 0x75, 0x62, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x68, 0x65, - 0x78, 0x61, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, - 0x68, 0x65, 0x78, 0x61, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x67, 0x73, 0x75, 0x62, - 0x28, 0x73, 0x75, 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, 0x20, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x30, 0x32, 0x78, 0x22, 0x2c, 0x62, - 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, - 0x6d, 0x48, 0x45, 0x58, 0x41, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x64, 0x35, 0x2e, - 0x73, 0x75, 0x6d, 0x48, 0x45, 0x58, 0x41, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x67, - 0x73, 0x75, 0x62, 0x28, 0x73, 0x75, 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, 0x22, 0x2e, 0x22, 0x2c, - 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x30, 0x32, 0x58, - 0x22, 0x2c, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, - 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x69, - 0x67, 0x68, 0x74, 0x20, 0x67, 0x6f, 0x20, 0x61, 0x77, 0x61, 0x79, 0x0a, 0x0a, 0x69, 0x66, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x2e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, - 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x3d, - 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, - 0x72, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, - 0x6f, 0x61, 0x64, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, - 0x6c, 0x6f, 0x61, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x20, 0x74, 0x68, 0x69, 0x73, - 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, 0x73, 0x74, 0x61, 0x79, 0x0a, 0x0a, 0x69, 0x66, 0x20, - 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x2d, 0x2d, 0x20, 0x6c, 0x75, 0x61, 0x20, 0x35, 0x2e, 0x32, 0x3a, 0x20, 0x77, 0x65, 0x27, 0x72, - 0x65, 0x20, 0x6f, 0x6b, 0x61, 0x79, 0x0a, 0x0a, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x75, - 0x74, 0x66, 0x38, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, - 0x20, 0x6c, 0x75, 0x61, 0x20, 0x35, 0x2e, 0x33, 0x3a, 0x20, 0x20, 0x62, 0x69, 0x74, 0x77, 0x69, - 0x73, 0x65, 0x2e, 0x6c, 0x75, 0x61, 0x2c, 0x20, 0x76, 0x20, 0x31, 0x2e, 0x32, 0x34, 0x20, 0x32, - 0x30, 0x31, 0x34, 0x2f, 0x31, 0x32, 0x2f, 0x32, 0x36, 0x20, 0x31, 0x37, 0x3a, 0x32, 0x30, 0x3a, - 0x35, 0x33, 0x20, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x74, 0x6f, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x28, 0x20, 0x5b, - 0x5b, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x3d, - 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, - 0x61, 0x64, 0x20, 0x6f, 0x66, 0x3a, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, 0x20, 0x7b, 0x20, 0x2e, - 0x2e, 0x2e, 0x20, 0x7d, 0x0a, 0x0a, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x7b, 0x0a, - 0x20, 0x20, 0x62, 0x6e, 0x6f, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x28, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x20, 0x7e, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, - 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x20, 0x3d, - 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x20, 0x79, 0x2c, - 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x2d, - 0x31, 0x29, 0x20, 0x26, 0x20, 0x28, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x2d, 0x31, 0x29, 0x29, 0x20, - 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x26, 0x20, 0x79, 0x20, 0x26, 0x20, - 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, - 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, 0x22, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x20, - 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, - 0x20, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x69, 0x2c, - 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x20, - 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x6f, - 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, - 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x78, 0x20, 0x6f, - 0x72, 0x20, 0x30, 0x29, 0x20, 0x7c, 0x20, 0x28, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x29, 0x29, - 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x7c, 0x20, 0x79, 0x20, 0x7c, - 0x20, 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, - 0x2c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, 0x22, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, - 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x20, - 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x7c, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x69, - 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, - 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, - 0x78, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, - 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x78, - 0x20, 0x6f, 0x72, 0x20, 0x30, 0x29, 0x20, 0x7e, 0x20, 0x28, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x30, - 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, + 0x6e, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6f, 0x73, 0x2e, 0x73, + 0x65, 0x74, 0x65, 0x6e, 0x76, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x6f, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x65, 0x6e, 0x76, 0x20, 0x3d, 0x20, 0x66, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x65, 0x6e, 0x64, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, + 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x27, 0x66, 0x66, 0x69, 0x27, + 0x29, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x66, 0x66, 0x69, 0x20, 0x74, 0x68, + 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6b, + 0x2c, 0x20, 0x76, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x2c, 0x20, 0x66, 0x66, 0x69, + 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x69, 0x66, 0x20, 0x6b, 0x20, 0x7e, 0x3d, 0x20, 0x27, 0x67, 0x63, 0x27, 0x20, 0x74, 0x68, 0x65, + 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x66, 0x66, 0x69, 0x5b, 0x6b, 0x5d, 0x20, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, + 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x66, 0x69, 0x20, 0x3d, 0x20, 0x6e, 0x69, + 0x6c, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6d, 0x64, 0x35, 0x20, 0x74, + 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, + 0x75, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x67, 0x73, 0x75, 0x62, 0x20, 0x20, + 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x67, 0x73, 0x75, 0x62, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, + 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x20, + 0x20, 0x3d, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x0a, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x64, 0x35, 0x2e, 0x73, + 0x75, 0x6d, 0x68, 0x65, 0x78, 0x61, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x64, 0x35, + 0x2e, 0x73, 0x75, 0x6d, 0x68, 0x65, 0x78, 0x61, 0x28, 0x6b, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, + 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x75, 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, 0x22, 0x2e, 0x22, + 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, 0x25, 0x30, 0x32, + 0x78, 0x22, 0x2c, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, + 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x64, + 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x48, 0x45, 0x58, 0x41, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x6d, 0x64, 0x35, 0x2e, 0x73, 0x75, 0x6d, 0x48, 0x45, 0x58, 0x41, 0x28, 0x6b, 0x29, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x20, 0x28, 0x67, 0x73, 0x75, 0x62, 0x28, 0x73, 0x75, 0x6d, 0x28, 0x6b, 0x29, 0x2c, 0x20, + 0x22, 0x2e, 0x22, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x29, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x22, + 0x25, 0x30, 0x32, 0x58, 0x22, 0x2c, 0x62, 0x79, 0x74, 0x65, 0x28, 0x63, 0x29, 0x29, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x29, 0x29, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, 0x67, 0x6f, 0x20, 0x61, 0x77, 0x61, 0x79, 0x0a, + 0x0a, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x74, + 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x3d, + 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x0a, 0x65, 0x6e, + 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x65, 0x72, 0x73, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x69, 0x66, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, + 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, + 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, 0x73, 0x74, 0x61, 0x79, 0x0a, + 0x0a, 0x69, 0x66, 0x20, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6c, 0x75, 0x61, 0x20, 0x35, 0x2e, 0x32, 0x3a, 0x20, + 0x77, 0x65, 0x27, 0x72, 0x65, 0x20, 0x6f, 0x6b, 0x61, 0x79, 0x0a, 0x0a, 0x65, 0x6c, 0x73, 0x65, + 0x69, 0x66, 0x20, 0x75, 0x74, 0x66, 0x38, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6c, 0x75, 0x61, 0x20, 0x35, 0x2e, 0x33, 0x3a, 0x20, 0x20, 0x62, + 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x2e, 0x6c, 0x75, 0x61, 0x2c, 0x20, 0x76, 0x20, 0x31, 0x2e, + 0x32, 0x34, 0x20, 0x32, 0x30, 0x31, 0x34, 0x2f, 0x31, 0x32, 0x2f, 0x32, 0x36, 0x20, 0x31, 0x37, + 0x3a, 0x32, 0x30, 0x3a, 0x35, 0x33, 0x20, 0x72, 0x6f, 0x62, 0x65, 0x72, 0x74, 0x6f, 0x0a, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, + 0x20, 0x28, 0x20, 0x5b, 0x5b, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x20, 0x2d, 0x2d, 0x20, 0x69, + 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x3a, 0x20, 0x61, 0x72, 0x67, 0x20, 0x3d, + 0x20, 0x7b, 0x20, 0x2e, 0x2e, 0x2e, 0x20, 0x7d, 0x0a, 0x0a, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, + 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x62, 0x6e, 0x6f, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x7e, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x61, + 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, + 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x78, 0x20, + 0x6f, 0x72, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x26, 0x20, 0x28, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x2d, + 0x31, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x26, 0x20, + 0x79, 0x20, 0x26, 0x20, 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, + 0x69, 0x3d, 0x31, 0x2c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, 0x22, 0x2c, 0x2e, + 0x2e, 0x2e, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, + 0x65, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x28, 0x69, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, + 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, + 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, + 0x20, 0x20, 0x62, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x28, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, 0x68, 0x65, + 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, + 0x28, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x29, 0x20, 0x7c, 0x20, 0x28, 0x79, 0x20, 0x6f, 0x72, + 0x20, 0x30, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x7c, + 0x20, 0x79, 0x20, 0x7c, 0x20, 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, 0x22, 0x2c, + 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x7c, 0x20, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x28, 0x69, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x20, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, + 0x0a, 0x20, 0x20, 0x62, 0x78, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, + 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, + 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x20, 0x28, 0x28, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x30, 0x29, 0x20, 0x7e, 0x20, 0x28, 0x79, 0x20, + 0x6f, 0x72, 0x20, 0x30, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, + 0x20, 0x7e, 0x20, 0x79, 0x20, 0x7e, 0x20, 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, + 0x22, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x7e, 0x20, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x28, 0x69, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, + 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x74, 0x65, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, + 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x7a, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x28, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x2d, 0x31, 0x29, 0x20, + 0x26, 0x20, 0x28, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x2d, 0x31, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, + 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x7e, 0x20, 0x79, - 0x20, 0x7e, 0x20, 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x26, 0x20, 0x79, + 0x20, 0x26, 0x20, 0x7a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, 0x22, 0x2c, 0x2e, 0x2e, - 0x2e, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, - 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x7e, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x28, 0x69, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, - 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x72, - 0x65, 0x73, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, - 0x20, 0x62, 0x74, 0x65, 0x73, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x20, 0x79, 0x2c, 0x20, 0x7a, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x7a, 0x20, 0x74, 0x68, - 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, - 0x28, 0x28, 0x28, 0x78, 0x20, 0x6f, 0x72, 0x20, 0x2d, 0x31, 0x29, 0x20, 0x26, 0x20, 0x28, 0x79, - 0x20, 0x6f, 0x72, 0x20, 0x2d, 0x31, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, - 0x46, 0x46, 0x46, 0x46, 0x46, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x20, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x78, 0x20, 0x26, 0x20, 0x79, 0x20, 0x26, 0x20, 0x7a, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x22, 0x23, 0x22, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x64, - 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x20, - 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x28, 0x69, - 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x72, 0x65, - 0x73, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x29, 0x20, - 0x7e, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, - 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, 0x20, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x61, 0x20, 0x26, 0x20, - 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x29, 0x20, 0x3c, 0x3c, 0x20, 0x62, - 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, - 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, - 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, 0x62, 0x29, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x61, 0x20, - 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x29, 0x20, 0x3e, 0x3e, - 0x20, 0x62, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, - 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x61, 0x72, 0x73, 0x68, 0x69, 0x66, - 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, - 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x61, 0x20, 0x26, 0x20, - 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x62, 0x20, 0x3c, 0x3d, 0x20, 0x30, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x61, 0x20, 0x26, - 0x20, 0x30, 0x78, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x20, 0x3d, 0x3d, 0x20, - 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x62, 0x29, 0x20, 0x26, 0x20, 0x30, - 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, - 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, - 0x28, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x62, 0x29, 0x20, 0x7c, 0x20, 0x7e, 0x28, 0x30, 0x78, - 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x20, 0x3e, 0x3e, 0x20, 0x62, 0x29, 0x29, 0x20, - 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x6c, 0x72, - 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x28, 0x61, 0x20, 0x2c, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x3d, 0x20, - 0x62, 0x20, 0x26, 0x20, 0x33, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x61, + 0x2e, 0x29, 0x20, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x28, 0x69, 0x2c, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x20, 0x28, 0x72, 0x65, 0x73, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, + 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, + 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, + 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, + 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x29, 0x20, + 0x3c, 0x3c, 0x20, 0x62, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x73, 0x68, 0x69, + 0x66, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, + 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, + 0x28, 0x28, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x29, 0x20, 0x3e, 0x3e, 0x20, 0x62, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x61, 0x72, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x28, 0x61, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, + 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x62, 0x20, 0x3c, 0x3d, 0x20, 0x30, 0x20, 0x6f, 0x72, 0x20, + 0x28, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, + 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x62, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x28, 0x61, 0x20, 0x3c, 0x3c, 0x20, 0x62, 0x29, 0x20, 0x7c, - 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x28, 0x33, 0x32, 0x20, 0x2d, 0x20, 0x62, 0x29, 0x29, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20, 0x26, 0x20, - 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, - 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, - 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, 0x62, 0x29, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x62, 0x20, 0x3d, 0x20, 0x2d, 0x62, 0x20, 0x26, 0x20, 0x33, 0x31, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, - 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x28, 0x61, 0x20, - 0x3c, 0x3c, 0x20, 0x62, 0x29, 0x20, 0x7c, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x28, 0x33, - 0x32, 0x20, 0x2d, 0x20, 0x62, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x20, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, - 0x46, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, - 0x2c, 0x20, 0x66, 0x2c, 0x20, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x66, 0x29, 0x20, 0x26, 0x20, 0x7e, 0x28, + 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x62, 0x29, 0x20, 0x7c, 0x20, + 0x7e, 0x28, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x20, 0x3e, 0x3e, 0x20, + 0x62, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, + 0x20, 0x20, 0x6c, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x20, 0x2c, 0x62, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x62, 0x20, 0x3d, 0x20, 0x62, 0x20, 0x26, 0x20, 0x33, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, + 0x20, 0x3d, 0x20, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x28, 0x61, 0x20, 0x3c, 0x3c, 0x20, + 0x62, 0x29, 0x20, 0x7c, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x28, 0x33, 0x32, 0x20, 0x2d, + 0x20, 0x62, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, + 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, + 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, + 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, 0x62, + 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x3d, 0x20, 0x2d, 0x62, 0x20, 0x26, 0x20, 0x33, + 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, 0x20, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, + 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3d, + 0x20, 0x28, 0x61, 0x20, 0x3c, 0x3c, 0x20, 0x62, 0x29, 0x20, 0x7c, 0x20, 0x28, 0x61, 0x20, 0x3e, + 0x3e, 0x20, 0x28, 0x33, 0x32, 0x20, 0x2d, 0x20, 0x62, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, + 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x65, + 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, 0x66, 0x2c, 0x20, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x61, 0x20, 0x3e, 0x3e, 0x20, 0x66, 0x29, 0x20, + 0x26, 0x20, 0x7e, 0x28, 0x2d, 0x31, 0x20, 0x3c, 0x3c, 0x20, 0x28, 0x77, 0x20, 0x6f, 0x72, 0x20, + 0x31, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x28, 0x61, 0x2c, 0x20, 0x76, 0x2c, 0x20, 0x66, 0x2c, 0x20, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x3d, 0x20, 0x7e, 0x28, 0x2d, 0x31, 0x20, 0x3c, 0x3c, 0x20, 0x28, 0x77, 0x20, 0x6f, 0x72, 0x20, 0x31, 0x29, 0x29, 0x0a, - 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x61, 0x2c, 0x20, - 0x76, 0x2c, 0x20, 0x66, 0x2c, 0x20, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x3d, 0x20, 0x7e, 0x28, 0x2d, 0x31, 0x20, 0x3c, - 0x3c, 0x20, 0x28, 0x77, 0x20, 0x6f, 0x72, 0x20, 0x31, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x61, 0x20, 0x26, 0x20, 0x7e, 0x28, 0x6d, - 0x61, 0x73, 0x6b, 0x20, 0x3c, 0x3c, 0x20, 0x66, 0x29, 0x29, 0x20, 0x7c, 0x20, 0x28, 0x28, 0x76, - 0x20, 0x26, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x29, 0x20, 0x3c, 0x3c, 0x20, 0x66, 0x29, 0x29, 0x20, - 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x0a, 0x20, 0x20, 0x65, - 0x6e, 0x64, 0x2c, 0x0a, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x5d, - 0x20, 0x29, 0x0a, 0x0a, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x62, 0x69, 0x74, 0x20, 0x74, - 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6c, 0x75, 0x61, 0x6a, - 0x69, 0x74, 0x20, 0x28, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x77, 0x29, 0x0a, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x20, 0x28, - 0x20, 0x5b, 0x5b, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2c, 0x20, - 0x62, 0x6e, 0x6f, 0x74, 0x2c, 0x20, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x2c, 0x20, 0x6c, 0x73, - 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x2c, - 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, 0x6e, 0x6f, 0x74, 0x2c, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x72, - 0x73, 0x68, 0x69, 0x66, 0x74, 0x2c, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x6c, 0x73, 0x68, 0x69, 0x66, - 0x74, 0x0a, 0x0a, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x61, - 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x61, 0x72, 0x73, - 0x68, 0x69, 0x66, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x20, 0x20, 0x20, 0x20, - 0x3d, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x6e, 0x6f, 0x74, 0x20, 0x20, - 0x20, 0x20, 0x3d, 0x20, 0x62, 0x6e, 0x6f, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, 0x6f, 0x72, 0x2c, 0x0a, 0x20, - 0x20, 0x62, 0x78, 0x6f, 0x72, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, - 0x78, 0x6f, 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x74, 0x65, 0x73, 0x74, 0x20, 0x20, 0x20, 0x3d, - 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x28, 0x2e, - 0x2e, 0x2e, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, - 0x20, 0x20, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x2c, 0x66, 0x2c, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x28, 0x72, 0x73, 0x68, 0x69, - 0x66, 0x74, 0x28, 0x61, 0x2c, 0x66, 0x29, 0x2c, 0x32, 0x5e, 0x28, 0x77, 0x20, 0x6f, 0x72, 0x20, - 0x31, 0x29, 0x2d, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x6c, - 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x72, 0x6f, 0x6c, - 0x2c, 0x0a, 0x20, 0x20, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x20, 0x3d, 0x20, 0x6c, 0x73, - 0x68, 0x69, 0x66, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, - 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x2c, 0x76, 0x2c, 0x66, - 0x2c, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x61, - 0x73, 0x6b, 0x20, 0x3d, 0x20, 0x32, 0x5e, 0x28, 0x77, 0x20, 0x6f, 0x72, 0x20, 0x31, 0x29, 0x2d, - 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x6e, - 0x64, 0x28, 0x61, 0x2c, 0x62, 0x6e, 0x6f, 0x74, 0x28, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, 0x28, - 0x6d, 0x61, 0x73, 0x6b, 0x2c, 0x66, 0x29, 0x29, 0x29, 0x2b, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, - 0x28, 0x62, 0x61, 0x6e, 0x64, 0x28, 0x76, 0x2c, 0x6d, 0x61, 0x73, 0x6b, 0x29, 0x2c, 0x66, 0x29, - 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x72, 0x6f, 0x74, 0x61, 0x74, - 0x65, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x72, 0x6f, 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x72, - 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x20, 0x3d, 0x20, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x2c, - 0x0a, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, 0x5d, 0x20, 0x29, 0x0a, - 0x0a, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x68, 0x6f, - 0x70, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x73, 0x74, 0x20, - 0x6f, 0x72, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x69, 0x74, - 0x33, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x62, 0x69, - 0x74, 0x33, 0x32, 0x22, 0x29, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x2d, 0x2d, 0x20, 0x74, - 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, - 0x72, 0x20, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x20, 0x72, 0x69, 0x67, 0x68, - 0x74, 0x0a, 0x0a, 0x64, 0x6f, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, - 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5b, 0x22, - 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x5d, 0x20, 0x65, 0x6e, - 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x61, - 0x64, 0x65, 0x64, 0x2e, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x3d, 0x20, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5b, 0x22, 0x6d, 0x69, 0x6d, 0x65, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x22, 0x5d, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, - 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x6c, 0x66, 0x73, - 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x6c, 0x66, 0x73, - 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, - 0x0a, 0x64, 0x6f, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, - 0x66, 0x73, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x79, 0x6d, 0x6c, - 0x69, 0x6e, 0x6b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x20, 0x3d, 0x20, - 0x6c, 0x66, 0x73, 0x2e, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, - 0x65, 0x73, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x62, 0x65, 0x20, 0x64, - 0x6f, 0x6e, 0x65, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x66, 0x73, 0x20, 0x28, 0x77, - 0x61, 0x73, 0x20, 0x64, 0x65, 0x61, 0x64, 0x20, 0x73, 0x6c, 0x6f, 0x77, 0x20, 0x62, 0x65, 0x66, - 0x6f, 0x72, 0x65, 0x29, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x66, 0x69, 0x6c, 0x65, 0x28, 0x6e, 0x61, 0x6d, - 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x22, 0x6d, 0x6f, 0x64, - 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x66, 0x69, 0x6c, - 0x65, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x6c, 0x69, 0x6e, 0x6b, - 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x64, 0x69, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x64, 0x69, 0x72, 0x28, 0x6e, 0x61, 0x6d, 0x65, - 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x22, 0x6d, 0x6f, 0x64, 0x65, - 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x20, 0x3d, 0x3d, 0x20, 0x22, 0x64, 0x69, 0x72, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, - 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, - 0x2d, 0x2d, 0x20, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x68, 0x61, - 0x76, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x6f, 0x72, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, - 0x6b, 0x70, 0x73, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, - 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6e, 0x61, - 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, - 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, - 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x6e, 0x6f, 0x77, - 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x2e, 0x2e, 0x2e, - 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x66, 0x73, - 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x6c, 0x66, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x28, 0x6e, 0x61, 0x6d, - 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x22, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x22, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x69, 0x6c, 0x0a, 0x20, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, - 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x00 + 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x28, 0x28, 0x61, 0x20, 0x26, + 0x20, 0x7e, 0x28, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x3c, 0x3c, 0x20, 0x66, 0x29, 0x29, 0x20, 0x7c, + 0x20, 0x28, 0x28, 0x76, 0x20, 0x26, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x29, 0x20, 0x3c, 0x3c, 0x20, + 0x66, 0x29, 0x29, 0x20, 0x26, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, + 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x5d, 0x5d, 0x20, 0x29, 0x0a, 0x0a, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x62, + 0x69, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, + 0x6c, 0x75, 0x61, 0x6a, 0x69, 0x74, 0x20, 0x28, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x77, 0x29, + 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x6c, 0x6f, + 0x61, 0x64, 0x20, 0x28, 0x20, 0x5b, 0x5b, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x62, 0x61, + 0x6e, 0x64, 0x2c, 0x20, 0x62, 0x6e, 0x6f, 0x74, 0x2c, 0x20, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, + 0x2c, 0x20, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, + 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, 0x6e, 0x6f, 0x74, 0x2c, 0x20, 0x62, + 0x69, 0x74, 0x2e, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x2c, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x6c, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x0a, 0x0a, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x7b, + 0x0a, 0x20, 0x20, 0x61, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, + 0x2e, 0x61, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x61, 0x6e, 0x64, + 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x6e, + 0x6f, 0x74, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x62, 0x6e, 0x6f, 0x74, 0x2c, 0x0a, 0x20, 0x20, + 0x62, 0x6f, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x62, 0x6f, + 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x78, 0x6f, 0x72, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x62, + 0x69, 0x74, 0x2e, 0x62, 0x78, 0x6f, 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x62, 0x74, 0x65, 0x73, 0x74, + 0x20, 0x20, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x2e, 0x2e, + 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, + 0x6e, 0x64, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x65, + 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x20, 0x3d, 0x20, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, 0x2c, 0x66, 0x2c, 0x77, 0x29, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x62, 0x61, 0x6e, 0x64, 0x28, + 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x28, 0x61, 0x2c, 0x66, 0x29, 0x2c, 0x32, 0x5e, 0x28, 0x77, + 0x20, 0x6f, 0x72, 0x20, 0x31, 0x29, 0x2d, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, + 0x0a, 0x20, 0x20, 0x6c, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, + 0x2e, 0x72, 0x6f, 0x6c, 0x2c, 0x0a, 0x20, 0x20, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x20, + 0x3d, 0x20, 0x6c, 0x73, 0x68, 0x69, 0x66, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x61, + 0x2c, 0x76, 0x2c, 0x66, 0x2c, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x3d, 0x20, 0x32, 0x5e, 0x28, 0x77, 0x20, 0x6f, 0x72, + 0x20, 0x31, 0x29, 0x2d, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x20, 0x62, 0x61, 0x6e, 0x64, 0x28, 0x61, 0x2c, 0x62, 0x6e, 0x6f, 0x74, 0x28, 0x6c, 0x73, 0x68, + 0x69, 0x66, 0x74, 0x28, 0x6d, 0x61, 0x73, 0x6b, 0x2c, 0x66, 0x29, 0x29, 0x29, 0x2b, 0x6c, 0x73, + 0x68, 0x69, 0x66, 0x74, 0x28, 0x62, 0x61, 0x6e, 0x64, 0x28, 0x76, 0x2c, 0x6d, 0x61, 0x73, 0x6b, + 0x29, 0x2c, 0x66, 0x29, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2c, 0x0a, 0x20, 0x20, 0x72, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x62, 0x69, 0x74, 0x2e, 0x72, 0x6f, 0x72, 0x2c, + 0x0a, 0x20, 0x20, 0x72, 0x73, 0x68, 0x69, 0x66, 0x74, 0x20, 0x20, 0x3d, 0x20, 0x72, 0x73, 0x68, + 0x69, 0x66, 0x74, 0x2c, 0x0a, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5d, + 0x5d, 0x20, 0x29, 0x0a, 0x0a, 0x65, 0x6c, 0x73, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, + 0x2d, 0x20, 0x68, 0x6f, 0x70, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, + 0x65, 0x73, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x0a, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x62, 0x69, 0x74, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x28, 0x22, 0x62, 0x69, 0x74, 0x33, 0x32, 0x22, 0x29, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, + 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, + 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x28, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x29, 0x20, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x0a, 0x64, 0x6f, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x0a, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x61, 0x64, + 0x65, 0x64, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, + 0x65, 0x64, 0x5b, 0x22, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x22, + 0x5d, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x6d, 0x69, 0x6d, 0x65, 0x20, 0x20, 0x20, 0x74, + 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2e, 0x6d, 0x69, 0x6d, 0x65, 0x20, + 0x20, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x5b, 0x22, 0x6d, 0x69, 0x6d, 0x65, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x5d, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, + 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, + 0x2e, 0x6c, 0x66, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, + 0x2e, 0x6c, 0x66, 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, + 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x64, 0x6f, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x20, 0x6c, 0x66, 0x73, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, + 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, + 0x2d, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6e, 0x6f, 0x77, 0x20, + 0x62, 0x65, 0x20, 0x64, 0x6f, 0x6e, 0x65, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x66, + 0x73, 0x20, 0x28, 0x77, 0x61, 0x73, 0x20, 0x64, 0x65, 0x61, 0x64, 0x20, 0x73, 0x6c, 0x6f, 0x77, + 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x29, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x66, 0x69, 0x6c, 0x65, 0x20, + 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x66, 0x69, 0x6c, 0x65, + 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, + 0x22, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x20, 0x3d, 0x3d, 0x20, + 0x22, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x20, 0x3d, 0x3d, 0x20, 0x22, + 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, + 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, + 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x64, 0x69, 0x72, 0x20, + 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x69, 0x73, 0x64, 0x69, 0x72, 0x28, + 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x20, 0x3d, 0x20, 0x6c, 0x66, 0x73, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x22, + 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6d, 0x20, 0x3d, 0x3d, 0x20, 0x22, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, + 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, + 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x20, 0x66, + 0x72, 0x6f, 0x6d, 0x20, 0x6b, 0x70, 0x73, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, + 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, + 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2c, 0x20, 0x73, 0x6f, + 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x74, 0x68, + 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x66, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x6b, + 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x61, 0x6d, 0x65, + 0x2c, 0x22, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x69, + 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x20, 0x20, + 0x20, 0x20, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x0a, 0x0a, 0x00 }; return luaL_dostring(L, (const char*) luatex_core_lua); } \ No newline at end of file diff --git a/source/texk/web2c/luatexdir/lua/luatex-core.lua b/source/texk/web2c/luatexdir/lua/luatex-core.lua index 538d8f903..51cfa518d 100644 --- a/source/texk/web2c/luatexdir/lua/luatex-core.lua +++ b/source/texk/web2c/luatexdir/lua/luatex-core.lua @@ -198,6 +198,9 @@ if saferoption == 1 or shellescape ~= 1 then package.searchers[4] = nil package.searchers[3] = nil + if os.setenv then + os.setenv = function(...) end + end ffi = require('ffi') if ffi then diff --git a/source/texk/web2c/luatexdir/lua/mplibstuff.c b/source/texk/web2c/luatexdir/lua/mplibstuff.c index 1bc7c330a..f4845c0a4 100644 --- a/source/texk/web2c/luatexdir/lua/mplibstuff.c +++ b/source/texk/web2c/luatexdir/lua/mplibstuff.c @@ -2,7 +2,7 @@ mplibstuff.w -Copyright 2020 LuaTeX team +Copyright 2021 LuaTeX team This file is part of LuaTeX. diff --git a/source/texk/web2c/luatexdir/luaffi/ffi.c b/source/texk/web2c/luatexdir/luaffi/ffi.c index 03667d9f5..6d3c197e4 100644 --- a/source/texk/web2c/luatexdir/luaffi/ffi.c +++ b/source/texk/web2c/luatexdir/luaffi/ffi.c @@ -3576,7 +3576,7 @@ int luaopen_ffi(lua_State *L) "\n" "The ARM processor is currently not supported. There are subtle\n" "differences between this module and the one in luajitTeX \n" -"and we hope to be in sync around TeXLive 2020.\n" +"and we hope to be in sync around TeXLive 2022.\n" "Different OS can have different interfaces,\n" "for instance OS_WIN has not 'complex.h'. If you want portable\n" "code, stick to the most common concepts.\n" diff --git a/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c b/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c index c8122c2ca..10d72f861 100644 --- a/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c +++ b/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c @@ -60,7 +60,11 @@ #include #include #include /* for MAXPATHLEN */ - #define LFS_MAXPATHLEN MAXPATHLEN + #ifdef MAXPATHLEN + #define LFS_MAXPATHLEN MAXPATHLEN + #else + #define LFS_MAXPATHLEN 128 + #endif #endif #include diff --git a/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.c b/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.c index 84e062c01..e26666636 100644 --- a/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.c +++ b/source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/splinefont.c @@ -246,6 +246,12 @@ char *Decompress(char *name, int compression) { char buf[1500]; char *tmpfile; + if ( strchr(name,'$') || strchr(name,'!') || strchr(name,'*') || strchr(name,'?') + || strchr(name,'[') || strchr(name,'[') || strchr(name,']') || strchr(name,']') + || strchr(name,';') || strchr(name,'&') || strchr(name,'>') || strchr(name,'<') + || strchr(name,'`') || strchr(name,'"') || strchr(name,'|') || strchr(name,'\'') + || strchr(name,'\\')) +return( NULL ); if ( dir==NULL ) dir = P_tmpdir; tmpfile = galloc(strlen(dir)+strlen(GFileNameTail(name))+2); strcpy(tmpfile,dir); @@ -253,9 +259,9 @@ char *Decompress(char *name, int compression) { strcat(tmpfile,GFileNameTail(name)); *strrchr(tmpfile,'.') = '\0'; #if defined( _NO_SNPRINTF ) || defined( __VMS ) - sprintf( buf, "%s < %s > %s", compressors[compression].decomp, name, tmpfile ); + sprintf( buf, "%s < \"%s\" > \"%s\"", compressors[compression].decomp, name, tmpfile ); #else - snprintf( buf, sizeof(buf), "%s < %s > %s", compressors[compression].decomp, name, tmpfile ); + snprintf( buf, sizeof(buf), "%s < \"%s\" > \"%s\"", compressors[compression].decomp, name, tmpfile ); #endif if ( system(buf)==0 ) return( tmpfile ); diff --git a/source/texk/web2c/luatexdir/luatex_svnversion.h b/source/texk/web2c/luatexdir/luatex_svnversion.h index c91a2c84a..ef4ef84eb 100644 --- a/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1 +1 @@ -#define luatex_svn_revision 7402 +#define luatex_svn_revision 7420 diff --git a/source/texk/web2c/luatexdir/luatexcallbackids.h b/source/texk/web2c/luatexdir/luatexcallbackids.h index f06d5e0e0..7a56a86b9 100644 --- a/source/texk/web2c/luatexdir/luatexcallbackids.h +++ b/source/texk/web2c/luatexdir/luatexcallbackids.h @@ -77,6 +77,7 @@ typedef enum { make_extensible_callback, process_pdf_image_content_callback, provide_charproc_data_callback, + input_level_string_callback, total_callbacks, } callback_callback_types; diff --git a/source/texk/web2c/luatexdir/tex/printing.c b/source/texk/web2c/luatexdir/tex/printing.c index 9cfca1faf..31125d2eb 100644 --- a/source/texk/web2c/luatexdir/tex/printing.c +++ b/source/texk/web2c/luatexdir/tex/printing.c @@ -1304,24 +1304,39 @@ void end_diagnostic(boolean blank_line) void print_input_level(void) { - int m = level_max; - if (m) { - int l = input_ptr; - int c = level_chr > 0 ? level_chr : '.'; - if (l > m) { - tprint_nl("["); - print_int((l/m)*m); - print(']'); - l = l % m; + int callback_id = callback_defined(input_level_string_callback); + if (callback_id>0) { + char *s = NULL; + if (run_callback(callback_id, "d->S", input_ptr, &s)) { + if (s && strlen(s) > 0) { + tprint_nl(s); + free(s); + } else { + print_ln(); + } } else { print_ln(); } - while (l > 0) { - print(c); - l--; - } } else { - print_ln(); + int m = level_max; + if (m) { + int l = input_ptr; + int c = level_chr > 0 ? level_chr : '.'; + if (l > m) { + tprint_nl("["); + print_int((l/m)*m); + print(']'); + l = l % m; + } else { + print_ln(); + } + while (l > 0) { + print(c); + l--; + } + } else { + print_ln(); + } } } diff --git a/source/texk/web2c/luatexdir/tex/scanning.c b/source/texk/web2c/luatexdir/tex/scanning.c index 2ecb54bc2..f3313f065 100644 --- a/source/texk/web2c/luatexdir/tex/scanning.c +++ b/source/texk/web2c/luatexdir/tex/scanning.c @@ -19,6 +19,8 @@ LuaTeX; if not, see . #include "ptexlib.h" +static int nesting = 0; +# define max_nesting 1000 static void scan_expr(void); /*tex @@ -2093,7 +2095,8 @@ halfword scan_toks(boolean macro_def, boolean xpand) */ s = match_token + cur_chr; get_token(); - if (cur_cmd == left_brace_cmd) { + /* if (cur_cmd == left_brace_cmd) { */ + if (cur_tok < left_brace_limit) { hash_brace = cur_tok; store_new_token(cur_tok); store_new_token(end_match_token); @@ -2101,7 +2104,10 @@ halfword scan_toks(boolean macro_def, boolean xpand) } if (t == nine_token) { print_err("You already have nine parameters"); - help1("I'm going to ignore the # sign you just used."); + help2( + "I'm going to ignore the # sign you just used,", + "as well as the token that followed it." + ); error(); } else { incr(t); @@ -2515,7 +2521,17 @@ static void scan_expr(void) a = arith_error; b = false; p = null; - /*tex Scan and evaluate an expression |e| of type |l|. */ + /*tex + + Scan and evaluate an expression |e| of type |l|. + To avoid an infinite recursion we set|max_nesting| as upper limit. + This limit is unrelated to the expansion limit |expand_depth| and it cannot be modify at compile time. + + */ + nesting++; + if (nesting > max_nesting) { + formatted_error("tex", "\\*expr can only be nested %d deep",max_nesting); + } RESTART: r = expr_none; e = 0; @@ -2744,4 +2760,5 @@ static void scan_expr(void) arith_error = a; cur_val = e; cur_val_level = l; + nesting--; } diff --git a/source/texk/web2c/man/ChangeLog b/source/texk/web2c/man/ChangeLog index da98dd9e4..0808c91d1 100644 --- a/source/texk/web2c/man/ChangeLog +++ b/source/texk/web2c/man/ChangeLog @@ -1,3 +1,16 @@ +2021-03-04 Karl Berry + + * gftodvi.man: font and spacing fixes from Debian. + Add tex-k as bug reporting address. + +2021-02-25 Andreas Scherer + + * ctwill.man: CWEB 4.2 release. + +2021-02-20 Andreas Scherer + + * ctwill.man: CWEB 4.1 release. + 2020-09-23 Andreas Scherer * ctwill.man, diff --git a/source/texk/web2c/man/ctwill.man b/source/texk/web2c/man/ctwill.man index 07f13516a..c000d7dc0 100644 --- a/source/texk/web2c/man/ctwill.man +++ b/source/texk/web2c/man/ctwill.man @@ -1,6 +1,6 @@ -.\" Automatically generated by Pandoc 2.10.1 +.\" Automatically generated by Pandoc 2.11.4 .\" -.TH "CTWILL" "1" "September 23, 2020" "Web2c @VERSION@" "General Commands Manual" +.TH "CTWILL" "1" "February 6, 2021" "Web2c @VERSION@" "General Commands Manual" .hy .SH NAME .PP @@ -106,7 +106,7 @@ The present incarnation of \f[B]ctwill\f[R] and its utilities tries hard to be a drop-in replacement for the original package. There are, however, a few differences worth noting: .IP \[bu] 2 -This version is based on the most recent version of CWEB (3.64c). +This version is based on the most recent version of CWEB (4.2). .IP \[bu] 2 In TeX\ Live the utility programs are prefixed with \f[B]ctwill-\f[R] and the macro files with \f[B]ct\f[R] for technical reasons. diff --git a/source/texk/web2c/man/cweb.man b/source/texk/web2c/man/cweb.man index db6b5ef4d..1786b698e 100644 --- a/source/texk/web2c/man/cweb.man +++ b/source/texk/web2c/man/cweb.man @@ -1,4 +1,4 @@ -.\" Automatically generated by Pandoc 2.10.1 +.\" Automatically generated by Pandoc 2.11.4 .\" .TH "CWEB" "1" "September 23, 2020" "Web2c @VERSION@" "General Commands Manual" .hy diff --git a/source/texk/web2c/man/gftodvi.man b/source/texk/web2c/man/gftodvi.man index 656ee1b2a..b500e0336 100644 --- a/source/texk/web2c/man/gftodvi.man +++ b/source/texk/web2c/man/gftodvi.man @@ -1,4 +1,4 @@ -.TH GFTODVI 1 "25 March 2019" "Web2C @VERSION@" +.TH GFTODVI 1 "4 March 2021" "Web2C @VERSION@" .\"===================================================================== .if n .ds MF Metafont .if t .ds MF Metafont @@ -6,23 +6,17 @@ .if n .ds TX TeX .ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP .el .ds OX TeX -.\" BX definition must follow TX so BX can use TX -.if t .ds BX \fRB\s-2IB\s0\fP\*(TX -.if n .ds BX BibTeX -.\" LX definition must follow TX so LX can use TX -.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX -.if n .ds LX LaTeX .\"===================================================================== .SH NAME gftodvi \- make proof sheets from generic font files .SH SYNOPSIS .B gftodvi -.RB [ \-overflow-label-offset=\fIreal\fP ] +.RB [ \-overflow-label-offset=\fI\,real\/\fP ] .RB [ \-verbose ] .I gf_file_name .\"===================================================================== .SH DESCRIPTION -This manual page is not meant to be exhaustive. The complete +This manual page is not meant to be exhaustive. The complete documentation for this version of \*(TX can be found in the info file or manual .IR "Web2C: A TeX implementation" . @@ -91,7 +85,7 @@ a font for lines with slope 1/6 at the resolution of an Imagen printer). .PP The .I gf_file_name -on the command line must be complete. Because +on the command line must be complete. Because the resolution is part of the extension, it would not make sense to append a default extension as is done with \*(TX or DVI-reading software. The output file name uses the same @@ -109,14 +103,14 @@ The argument to .B \-overflow-label-offset specifies the distance from the right edge of the character bounding box at which the overflow equations (if any) are typeset. -The value is given in \*(TX points. The default is a little over two +The value is given in \*(TX points. The default is a little over two inches. .PP Without the .B \-verbose option, .B gftodvi -operates silently. With it, a banner and progress report are printed on +operates silently. With it, a banner and progress report are printed on .IR stdout . .\"===================================================================== .SH ENVIRONMENT @@ -124,7 +118,7 @@ operates silently. With it, a banner and progress report are printed on looks for .I gf_file_name using the -environment variable GFFONTS. If that is not set, it uses the variable +environment variable GFFONTS. If that is not set, it uses the variable TEXFONTS. If that is not set, it uses the system default. .PP See @@ -143,17 +137,18 @@ The \*(MF sources. .BR tex (1), .BR mf (1). .br -Donald E. Knuth, +Donald E.\& Knuth, .I "The \*(MFbook" (Volume C of .IR "Computers and Typesetting" ), Addison-Wesley, 1986, ISBN 0-201-13445-4. .br -Donald E. Knuth et al., +Donald E.\& Knuth et al., .IR \*(MFware . .\"===================================================================== .SH AUTHORS -Donald E. Knuth wrote the program. It was published as part of the +Donald E.\& Knuth wrote and still maintains the program. It was +published as part of the .I \*(MFware -technical report, available from the \*(TX Users Group. -Paul Richards ported it to Unix. +technical report. Paul Richards originally ported it to Unix. +Bug reports should go to tex-k@tug.org (https://lists.tug.org/tex-k). diff --git a/source/texk/web2c/mplibdir/ChangeLog b/source/texk/web2c/mplibdir/ChangeLog index 87b2fa9be..8085a9db2 100644 --- a/source/texk/web2c/mplibdir/ChangeLog +++ b/source/texk/web2c/mplibdir/ChangeLog @@ -1,3 +1,6 @@ +2021-03-23 Karl Berry + * TL'21. + 2020-12-28 Luigi Scarso * Temp, fix in mpx_copy_mpto, changed || with && to avoid a wrong final % diff --git a/source/texk/web2c/pdftexdir/am/pdftex.am b/source/texk/web2c/pdftexdir/am/pdftex.am index 1dc59c168..4a83cb306 100644 --- a/source/texk/web2c/pdftexdir/am/pdftex.am +++ b/source/texk/web2c/pdftexdir/am/pdftex.am @@ -1,7 +1,7 @@ -## $Id: pdftex.am 55874 2020-07-19 15:42:51Z karl $ +## $Id: pdftex.am 57736 2021-02-13 23:02:37Z karl $ ## texk/web2c/pdftexdir/am/pdftex.am: Makefile fragment for pdfTeX. ## -## Copyright 2016-2020 Karl Berry +## Copyright 2016-2021 Karl Berry ## Copyright 2009-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. @@ -70,8 +70,11 @@ pdftex_ch_srcs = \ pdftexdir/pdftex.web \ pdftexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch \ - enctex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-pdftex.ch \ + enctexdir/enctex2.ch \ $(pdftex_ch_synctex) \ pdftexdir/pdftex.ch \ pdftexdir/char-warning-pdftex.ch \ diff --git a/source/texk/web2c/pdftexdir/pdftex_version.h b/source/texk/web2c/pdftexdir/pdftex_version.h index 0191c09fa..026f967d1 100644 --- a/source/texk/web2c/pdftexdir/pdftex_version.h +++ b/source/texk/web2c/pdftexdir/pdftex_version.h @@ -1 +1 @@ -#define PDFTEX_VERSION "1.40.21" +#define PDFTEX_VERSION "1.40.22" diff --git a/source/texk/web2c/ptexdir/am/ptex.am b/source/texk/web2c/ptexdir/am/ptex.am index 3de571c7c..800af466b 100644 --- a/source/texk/web2c/ptexdir/am/ptex.am +++ b/source/texk/web2c/ptexdir/am/ptex.am @@ -1,6 +1,6 @@ ## texk/web2c/ptexdir/am/ptex.am: Makefile fragment for pTeX. ## -## Copyright 2015-2020 Karl Berry +## Copyright 2015-2021 Karl Berry ## Copyright 2010-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. @@ -74,6 +74,7 @@ ptex.web: tie$(EXEEXT) $(ptex_web_srcs) ptex_web_srcs = \ tex.web \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch # Generate ptex.ch diff --git a/source/texk/web2c/ptexdir/ptex_version.h b/source/texk/web2c/ptexdir/ptex_version.h index ca56cd57f..168afe751 100644 --- a/source/texk/web2c/ptexdir/ptex_version.h +++ b/source/texk/web2c/ptexdir/ptex_version.h @@ -1 +1 @@ -#define PTEX_VERSION "p3.8.3" +#define PTEX_VERSION "p3.9.0" diff --git a/source/texk/web2c/synctexdir/ChangeLog b/source/texk/web2c/synctexdir/ChangeLog index fd7452264..1b6b98405 100644 --- a/source/texk/web2c/synctexdir/ChangeLog +++ b/source/texk/web2c/synctexdir/ChangeLog @@ -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 diff --git a/source/texk/web2c/triptrap/trip.log b/source/texk/web2c/triptrap/trip.log index 13b2af19d..37d7c29d0 100644 --- a/source/texk/web2c/triptrap/trip.log +++ b/source/texk/web2c/triptrap/trip.log @@ -1836,6 +1836,7 @@ the \fontdimen values needed in math symbol fonts. {restoring \mathsurround=0.0pt} {restoring \fam=0} {horizontal mode: \par} + ! Infinite glue shrinkage found in a paragraph. l.210 ...round60pt\hbox{$$}$\par } diff --git a/source/texk/web2c/uptexdir/am/uptex.am b/source/texk/web2c/uptexdir/am/uptex.am index 941ec617d..8db4c4b8d 100644 --- a/source/texk/web2c/uptexdir/am/uptex.am +++ b/source/texk/web2c/uptexdir/am/uptex.am @@ -1,7 +1,7 @@ ## texk/web2c/uptexdir/am/uptex.am: Makefile fragment for upTeX. ## -## Copyright (C) 2016-2018 Karl Berry -## Copyright (C) 2011-2015 Peter Breitenlohner +## Copyright 2016-2021 Karl Berry +## Copyright 2011-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. uptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) $(ZLIB_INCLUDES) @@ -67,6 +67,7 @@ uptex.web: tie$(EXEEXT) $(uptex_web_srcs) uptex_web_srcs = \ tex.web \ tex.ch \ + tracingstacklevels.ch \ zlib-fmt.ch # Generate uptex.ch diff --git a/source/texk/web2c/web2c/ChangeLog b/source/texk/web2c/web2c/ChangeLog index 35e35a8e3..0fb6f5cd1 100644 --- a/source/texk/web2c/web2c/ChangeLog +++ b/source/texk/web2c/web2c/ChangeLog @@ -1,3 +1,7 @@ +2021-03-23 Karl Berry + + * TL'21. + 2019-08-09 Karl Berry * web2c.defines (texmfyes): new function. diff --git a/source/texk/web2c/web2c/configure b/source/texk/web2c/web2c/configure index 26b60e0ff..27c915da4 100755 --- a/source/texk/web2c/web2c/configure +++ b/source/texk/web2c/web2c/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Web2C Tools 2021/dev. +# Generated by GNU Autoconf 2.69 for Web2C Tools 2021. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Web2C Tools' PACKAGE_TARNAME='web2c-tools' -PACKAGE_VERSION='2021/dev' -PACKAGE_STRING='Web2C Tools 2021/dev' +PACKAGE_VERSION='2021' +PACKAGE_STRING='Web2C Tools 2021' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then # 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 Web2C Tools 2021/dev to adapt to many kinds of systems. +\`configure' configures Web2C Tools 2021 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1398,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Web2C Tools 2021/dev:";; + short | recursive ) echo "Configuration of Web2C Tools 2021:";; esac cat <<\_ACEOF @@ -1521,7 +1521,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Web2C Tools configure 2021/dev +Web2C Tools configure 2021 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2360,7 +2360,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Web2C Tools $as_me 2021/dev, which was +It was created by Web2C Tools $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -8042,7 +8042,7 @@ fi # Define the identity of the package. PACKAGE='web2c-tools' - VERSION='2021/dev' + VERSION='2021' cat >>confdefs.h <<_ACEOF @@ -14571,7 +14571,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Web2C Tools $as_me 2021/dev, which was +This file was extended by Web2C Tools $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14637,7 +14637,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Web2C Tools config.status 2021/dev +Web2C Tools config.status 2021 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/texk/web2c/xetexdir/am/xetex.am b/source/texk/web2c/xetexdir/am/xetex.am index 995f2e128..e314ced3c 100644 --- a/source/texk/web2c/xetexdir/am/xetex.am +++ b/source/texk/web2c/xetexdir/am/xetex.am @@ -1,7 +1,7 @@ -## $Id: xetex.am 55874 2020-07-19 15:42:51Z karl $ +## $Id: xetex.am 57724 2021-02-13 02:14:44Z karl $ ## texk/web2c/xetexdir/am/xetex.am: Makefile fragment for XeTeX. ## -## Copyright 2017-2020 Karl Berry +## Copyright 2017-2021 Karl Berry ## Copyright 2009-2015 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. @@ -113,6 +113,7 @@ xetex_ch_srcs = \ xetexdir/xetex.web \ xetexdir/tex.ch0 \ tex.ch \ + tracingstacklevels.ch \ $(xetex_ch_synctex) \ xetexdir/xetex.ch \ $(xetex_post_ch_synctex) \ diff --git a/source/texk/web2c/xetexdir/xetex_version.h b/source/texk/web2c/xetexdir/xetex_version.h index 925532d5b..b6e154754 100644 --- a/source/texk/web2c/xetexdir/xetex_version.h +++ b/source/texk/web2c/xetexdir/xetex_version.h @@ -1 +1 @@ -#define XETEX_VERSION "0.999992" +#define XETEX_VERSION "0.999993" diff --git a/source/utils/README b/source/utils/README index 030080683..52d1296f5 100644 --- a/source/utils/README +++ b/source/utils/README @@ -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 @@ texdoctk - reluctantly maintained here in TL 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 @@ vlna 1.5 - checked 10may12 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 @@ mkdir $clisp_toolsdir 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,13 +112,19 @@ cd $clisp_ver # 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 \ $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. diff --git a/source/utils/configure b/source/utils/configure index aaa23dcd2..5a4c8c462 100755 --- a/source/utils/configure +++ b/source/utils/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for TeX Live utils 2021/dev. +# Generated by GNU Autoconf 2.69 for TeX Live utils 2021. # # Report bugs to . # @@ -579,8 +579,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='TeX Live utils' PACKAGE_TARNAME='tex-live-utils' -PACKAGE_VERSION='2021/dev' -PACKAGE_STRING='TeX Live utils 2021/dev' +PACKAGE_VERSION='2021' +PACKAGE_STRING='TeX Live utils 2021' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1311,7 +1311,7 @@ if test "$ac_init_help" = "long"; then # 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 utils 2021/dev to adapt to many kinds of systems. +\`configure' configures TeX Live utils 2021 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1381,7 +1381,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live utils 2021/dev:";; + short | recursive ) echo "Configuration of TeX Live utils 2021:";; esac cat <<\_ACEOF @@ -1564,7 +1564,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live utils configure 2021/dev +TeX Live utils configure 2021 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1665,7 +1665,7 @@ cat >config.log <<_ACEOF 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 utils $as_me 2021/dev, which was +It was created by TeX Live utils $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4464,7 +4464,7 @@ fi # Define the identity of the package. PACKAGE='tex-live-utils' - VERSION='2021/dev' + VERSION='2021' cat >>confdefs.h <<_ACEOF @@ -5377,7 +5377,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live utils $as_me 2021/dev, which was +This file was extended by TeX Live utils $as_me 2021, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5434,7 +5434,7 @@ _ACEOF 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 utils config.status 2021/dev +TeX Live utils config.status 2021 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/version.ac b/source/version.ac index 948d5cc67..7c119b3ad 100644 --- a/source/version.ac +++ b/source/version.ac @@ -1,5 +1,5 @@ -dnl $Id: version.ac 54634 2020-04-10 00:57:04Z karl $ -dnl Copyright 2016-2020 Karl Berry +dnl $Id: version.ac 57769 2021-02-17 03:03:54Z 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 dnl m4-include this file to define the current TeX Live version -m4_define([tex_live_version], [2021/dev]) +m4_define([tex_live_version], [2021])