pdftex[855] branches/stable/source/src: sync with tl r59622

commits+karl at tug.org commits+karl at tug.org
Thu Jun 17 23:27:03 CEST 2021


Revision: 855
          http://tug.org/svn/pdftex?view=revision&revision=855
Author:   karl
Date:     2021-06-17 23:27:03 +0200 (Thu, 17 Jun 2021)
Log Message:
-----------
sync with tl r59622

Revision Links:
--------------
    http://tug.org/svn/pdftex?view=revision&revision=59622

Modified Paths:
--------------
    branches/stable/source/src/build-aux/config.guess
    branches/stable/source/src/build-aux/config.sub
    branches/stable/source/src/build-aux/texinfo.tex
    branches/stable/source/src/configure
    branches/stable/source/src/doc/ChangeLog
    branches/stable/source/src/doc/build-tools.txt
    branches/stable/source/src/doc/tlbuild-incl/install-tl.texi
    branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi
    branches/stable/source/src/doc/tlbuild.info
    branches/stable/source/src/libs/README
    branches/stable/source/src/libs/configure
    branches/stable/source/src/libs/xpdf/ChangeLog
    branches/stable/source/src/libs/xpdf/TLpatches/patch-bunched
    branches/stable/source/src/libs/xpdf/xpdf-src/xpdf/Error.cc
    branches/stable/source/src/texk/README
    branches/stable/source/src/texk/configure
    branches/stable/source/src/texk/kpathsea/ChangeLog
    branches/stable/source/src/texk/kpathsea/c-auto.in
    branches/stable/source/src/texk/kpathsea/configure
    branches/stable/source/src/texk/kpathsea/doc/kpathsea.info
    branches/stable/source/src/texk/kpathsea/doc/kpathsea.texi
    branches/stable/source/src/texk/kpathsea/knj.c
    branches/stable/source/src/texk/kpathsea/readable.c
    branches/stable/source/src/texk/kpathsea/texmf.cnf
    branches/stable/source/src/texk/kpathsea/version.ac
    branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm
    branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm
    branches/stable/source/src/texk/web2c/ChangeLog
    branches/stable/source/src/texk/web2c/Makefile.in
    branches/stable/source/src/texk/web2c/PROJECTS
    branches/stable/source/src/texk/web2c/README
    branches/stable/source/src/texk/web2c/am/cweb.am
    branches/stable/source/src/texk/web2c/configure
    branches/stable/source/src/texk/web2c/ctangleboot.cin
    branches/stable/source/src/texk/web2c/cwebboot.cin
    branches/stable/source/src/texk/web2c/cwebdir/ChangeLog
    branches/stable/source/src/texk/web2c/cwebdir/Makefile
    branches/stable/source/src/texk/web2c/cwebdir/README
    branches/stable/source/src/texk/web2c/cwebdir/comm-amiga.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-os2.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-pc.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch
    branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h
    branches/stable/source/src/texk/web2c/cwebdir/comm-w32.ch
    branches/stable/source/src/texk/web2c/cwebdir/common.c
    branches/stable/source/src/texk/web2c/cwebdir/common.h
    branches/stable/source/src/texk/web2c/cwebdir/common.w
    branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctang-man.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctangle.c
    branches/stable/source/src/texk/web2c/cwebdir/ctangle.w
    branches/stable/source/src/texk/web2c/cwebdir/ctproofmac.tex
    branches/stable/source/src/texk/web2c/cwebdir/cttwinxmac.tex
    branches/stable/source/src/texk/web2c/cwebdir/ctwill-mini.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch
    branches/stable/source/src/texk/web2c/cwebdir/ctwill.bux
    branches/stable/source/src/texk/web2c/cwebdir/ctwimac.tex
    branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweav-man.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch
    branches/stable/source/src/texk/web2c/cwebdir/cweave.w
    branches/stable/source/src/texk/web2c/cwebdir/cweb.1
    branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex
    branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch
    branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex
    branches/stable/source/src/texk/web2c/cwebdir/po/cweb-tl.pot
    branches/stable/source/src/texk/web2c/cwebdir/po/cweb.pot
    branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb-tl.po
    branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb.po
    branches/stable/source/src/texk/web2c/cwebdir/po/de/web2c-help.po
    branches/stable/source/src/texk/web2c/cwebdir/po/it/cweb.po
    branches/stable/source/src/texk/web2c/cwebdir/po/web2c-help.pot
    branches/stable/source/src/texk/web2c/cwebdir/prod-twill.w
    branches/stable/source/src/texk/web2c/cwebdir/prod.w
    branches/stable/source/src/texk/web2c/cwebdir/refsort.w
    branches/stable/source/src/texk/web2c/cwebdir/system.bux
    branches/stable/source/src/texk/web2c/cwebdir/texinputs/Xcwebmac.tex
    branches/stable/source/src/texk/web2c/cwebdir/texinputs/pdfctwimac.tex
    branches/stable/source/src/texk/web2c/cwebdir/twinx.w
    branches/stable/source/src/texk/web2c/doc/ref.txi
    branches/stable/source/src/texk/web2c/doc/web2c.info
    branches/stable/source/src/texk/web2c/doc/web2c.texi
    branches/stable/source/src/texk/web2c/help.h
    branches/stable/source/src/texk/web2c/lib/ChangeLog
    branches/stable/source/src/texk/web2c/lib/texmfmp.c
    branches/stable/source/src/texk/web2c/lib/usage.c
    branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
    branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
    branches/stable/source/src/texk/web2c/tex.ch
    branches/stable/source/src/texk/web2c/tiedir/ChangeLog
    branches/stable/source/src/texk/web2c/tiedir/tie-w2c.ch
    branches/stable/source/src/texk/web2c/web2c/configure
    branches/stable/source/src/utils/configure
    branches/stable/source/src/version.ac

Added Paths:
-----------
    branches/stable/source/src/texk/web2c/cwebdir/comm-mini.ch
    branches/stable/source/src/texk/web2c/cwebdir/common.bux
    branches/stable/source/src/texk/web2c/cwebdir/iso_types.w
    branches/stable/source/src/texk/web2c/cwebdir/refsort.ch
    branches/stable/source/src/texk/web2c/cwebdir/twinx-startup.tex
    branches/stable/source/src/texk/web2c/cwebdir/twinx.ch

Modified: branches/stable/source/src/build-aux/config.guess
===================================================================
--- branches/stable/source/src/build-aux/config.guess	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/build-aux/config.guess	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2021-01-25'
+timestamp='2021-05-24'
 
 # 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
@@ -136,7 +136,7 @@
 UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown
 UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown
 
-case "$UNAME_SYSTEM" in
+case $UNAME_SYSTEM in
 Linux|GNU|GNU/*)
 	LIBC=unknown
 
@@ -176,7 +176,7 @@
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -192,7 +192,7 @@
 	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
 	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
 	    echo unknown))
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    aarch64eb) machine=aarch64_be-unknown ;;
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
@@ -208,7 +208,7 @@
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently (or will in the future) and ABI.
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    earm*)
 		os=netbsdelf
 		;;
@@ -229,7 +229,7 @@
 		;;
 	esac
 	# Determine ABI tags.
-	case "$UNAME_MACHINE_ARCH" in
+	case $UNAME_MACHINE_ARCH in
 	    earm*)
 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
 		abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")
@@ -240,7 +240,7 @@
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "$UNAME_VERSION" in
+	case $UNAME_VERSION in
 	    Debian*)
 		release='-gnu'
 		;;
@@ -261,6 +261,10 @@
 	UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
 	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=$(arch | sed 's/SecBSD.//')
+	echo "$UNAME_MACHINE_ARCH"-unknown-secbsd"$UNAME_RELEASE"
+	exit ;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
 	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
@@ -296,6 +300,8 @@
 	echo mips-dec-osf1
 	exit ;;
     alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
 	case $UNAME_RELEASE in
 	*4.0)
 		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')
@@ -309,7 +315,7 @@
 	# covers most systems running today.  This code pipes the CPU
 	# types through head -n 1, so we only detect the type of CPU 0.
 	ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1)
-	case "$ALPHA_CPU_TYPE" in
+	case $ALPHA_CPU_TYPE in
 	    "EV4 (21064)")
 		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
@@ -347,10 +353,7 @@
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
-	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-	exitcode=$?
-	trap '' 0
-	exit $exitcode ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit ;;
@@ -431,7 +434,7 @@
 	echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
 	exit ;;
     sun4*:SunOS:*:*)
-	case "$(/usr/bin/arch -k)" in
+	case $(/usr/bin/arch -k) in
 	    Series*|S4*)
 		UNAME_RELEASE=$(uname -v)
 		;;
@@ -445,7 +448,7 @@
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null)
 	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
-	case "$(/bin/arch)" in
+	case $(/bin/arch) in
 	    sun3)
 		echo m68k-sun-sunos"$UNAME_RELEASE"
 		;;
@@ -661,7 +664,7 @@
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
-	case "$UNAME_MACHINE" in
+	case $UNAME_MACHINE in
 	    9000/31?)            HP_ARCH=m68000 ;;
 	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
@@ -668,11 +671,11 @@
 		if test -x /usr/bin/getconf; then
 		    sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null)
 		    sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null)
-		    case "$sc_cpu_version" in
+		    case $sc_cpu_version in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "$sc_kernel_bits" in
+			case $sc_kernel_bits in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
@@ -873,7 +876,7 @@
 	exit ;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=$(/usr/bin/uname -p)
-	case "$UNAME_PROCESSOR" in
+	case $UNAME_PROCESSOR in
 	    amd64)
 		UNAME_PROCESSOR=x86_64 ;;
 	    i386)
@@ -897,7 +900,7 @@
 	echo "$UNAME_MACHINE"-pc-pw32
 	exit ;;
     *:Interix*:*)
-	case "$UNAME_MACHINE" in
+	case $UNAME_MACHINE in
 	    x86)
 		echo i586-pc-interix"$UNAME_RELEASE"
 		exit ;;
@@ -949,7 +952,7 @@
 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
-    arc:Linux:*:* | arceb:Linux:*:*)
+    arc:Linux:*:* | arceb:Linux:*:* | arc64:Linux:*:*)
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arm*:Linux:*:*)
@@ -1434,10 +1437,9 @@
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	# shellcheck disable=SC2154
-	if test "$cputype" = 386; then
+	if test "${cputype-}" = 386; then
 	    UNAME_MACHINE=i386
-	else
+	elif test "x${cputype-}" != x; then
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo "$UNAME_MACHINE"-unknown-plan9
@@ -1468,7 +1470,7 @@
 	exit ;;
     *:*VMS:*:*)
 	UNAME_MACHINE=$( (uname -p) 2>/dev/null)
-	case "$UNAME_MACHINE" in
+	case $UNAME_MACHINE in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
 	    V*) echo vax-dec-vms ; exit ;;
@@ -1635,7 +1637,7 @@
 
 echo "$0: unable to guess system type" >&2
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+case $UNAME_MACHINE:$UNAME_SYSTEM in
     mips:Linux | mips64:Linux)
 	# If we got here on MIPS GNU/Linux, output extra information.
 	cat >&2 <<EOF

Modified: branches/stable/source/src/build-aux/config.sub
===================================================================
--- branches/stable/source/src/build-aux/config.sub	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/build-aux/config.sub	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2021-03-10'
+timestamp='2021-04-30'
 
 # 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
@@ -1165,7 +1165,7 @@
 			| alphapca5[67] | alpha64pca5[67] \
 			| am33_2.0 \
 			| amdgcn \
-			| arc | arceb \
+			| arc | arceb | arc64 \
 			| arm | arm[lb]e | arme[lb] | armv* \
 			| avr | avr32 \
 			| asmjs \
@@ -1204,9 +1204,13 @@
 			| mips64vr5900 | mips64vr5900el \
 			| mipsisa32 | mipsisa32el \
 			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
 			| mipsisa32r6 | mipsisa32r6el \
 			| mipsisa64 | mipsisa64el \
 			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
 			| mipsisa64r6 | mipsisa64r6el \
 			| mipsisa64sb1 | mipsisa64sb1el \
 			| mipsisa64sr71k | mipsisa64sr71kel \
@@ -1707,7 +1711,7 @@
 	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
 	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
 	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
-	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
 	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
 	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
 	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \

Modified: branches/stable/source/src/build-aux/texinfo.tex
===================================================================
--- branches/stable/source/src/build-aux/texinfo.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/build-aux/texinfo.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2021-02-20.11}
+\def\texinfoversion{2021-04-25.21}
 %
 % Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc.
 %
@@ -574,7 +574,7 @@
 
 
 % @end foo calls \checkenv and executes the definition of \Efoo.
-\parseargdef\end{
+\parseargdef\end{%
   \if 1\csname iscond.#1\endcsname
   \else
     % The general wording of \badenverr may not be ideal.
@@ -1002,7 +1002,15 @@
   \global\everypar = {}%
 }
 
+% leave vertical mode without cancelling any first paragraph indent
+\gdef\imageindent{%
+  \toks0=\everypar
+  \everypar={}%
+  \ptexnoindent
+  \global\everypar=\toks0
+}
 
+
 % @refill is a no-op.
 \let\refill=\relax
 
@@ -1862,19 +1870,23 @@
       \closein 1
     \endgroup
     %
-    \def\xetexpdfext{pdf}%
-    \ifx\xeteximgext\xetexpdfext
-      \XeTeXpdffile "#1".\xeteximgext ""
-    \else
-      \def\xetexpdfext{PDF}%
+    % Putting an \hbox around the image can prevent an over-long line
+    % after the image.
+    \hbox\bgroup
+      \def\xetexpdfext{pdf}%
       \ifx\xeteximgext\xetexpdfext
         \XeTeXpdffile "#1".\xeteximgext ""
       \else
-        \XeTeXpicfile "#1".\xeteximgext ""
+        \def\xetexpdfext{PDF}%
+        \ifx\xeteximgext\xetexpdfext
+          \XeTeXpdffile "#1".\xeteximgext ""
+        \else
+          \XeTeXpicfile "#1".\xeteximgext ""
+        \fi
       \fi
-    \fi
-    \ifdim \wd0 >0pt width \xeteximagewidth \fi
-    \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+      \ifdim \wd0 >0pt width \xeteximagewidth \fi
+      \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+    \egroup
   }
 \fi
 
@@ -4289,83 +4301,9 @@
   \doitemize{#1.}\flushcr
 }
 
-% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
-% to @enumerate.
-%
-\def\alphaenumerate{\enumerate{a}}
-\def\capsenumerate{\enumerate{A}}
-\def\Ealphaenumerate{\Eenumerate}
-\def\Ecapsenumerate{\Eenumerate}
 
-
 % @multitable macros
-% Amy Hendrickson, 8/18/94, 3/6/96
-%
-% @multitable ... @end multitable will make as many columns as desired.
-% Contents of each column will wrap at width given in preamble.  Width
-% can be specified either with sample text given in a template line,
-% or in percent of \hsize, the current width of text on page.
 
-% Table can continue over pages but will only break between lines.
-
-% To make preamble:
-%
-% Either define widths of columns in terms of percent of \hsize:
-%   @multitable @columnfractions .25 .3 .45
-%   @item ...
-%
-%   Numbers following @columnfractions are the percent of the total
-%   current hsize to be used for each column. You may use as many
-%   columns as desired.
-
-
-% Or use a template:
-%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-%   @item ...
-%   using the widest term desired in each column.
-
-% Each new table line starts with @item, each subsequent new column
-% starts with @tab. Empty columns may be produced by supplying @tab's
-% with nothing between them for as many times as empty columns are needed,
-% ie, @tab at tab@tab will produce two empty columns.
-
-% @item, @tab do not need to be on their own lines, but it will not hurt
-% if they are.
-
-% Sample multitable:
-
-%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-%   @item first col stuff @tab second col stuff @tab third col
-%   @item
-%   first col stuff
-%   @tab
-%   second col stuff
-%   @tab
-%   third col
-%   @item first col stuff @tab second col stuff
-%   @tab Many paragraphs of text may be used in any column.
-%
-%         They will wrap at the width determined by the template.
-%   @item at tab@tab This will be in third column.
-%   @end multitable
-
-% Default dimensions may be reset by user.
-% @multitableparskip is vertical space between paragraphs in table.
-% @multitableparindent is paragraph indent in table.
-% @multitablecolmargin is horizontal space to be left between columns.
-% @multitablelinespace is space to leave between table items, baseline
-%                                                            to baseline.
-%   0pt means it depends on current normal line spacing.
-%
-\newskip\multitableparskip
-\newskip\multitableparindent
-\newdimen\multitablecolspace
-\newskip\multitablelinespace
-\multitableparskip=0pt
-\multitableparindent=6pt
-\multitablecolspace=12pt
-\multitablelinespace=0pt
-
 % Macros used to set up halign preamble:
 %
 \let\endsetuptable\relax
@@ -4412,8 +4350,6 @@
   \go
 }
 
-% multitable-only commands.
-%
 % @headitem starts a heading row, which we typeset in bold.  Assignments
 % have to be global since we are inside the implicit group of an
 % alignment entry.  \everycr below resets \everytab so we don't have to
@@ -4430,14 +4366,8 @@
 % default for tables with no headings.
 \let\headitemcrhook=\relax
 %
-% A \tab used to include \hskip1sp.  But then the space in a template
-% line is not enough.  That is bad.  So let's go back to just `&' until
-% we again encounter the problem the 1sp was intended to solve.
-%					--karl, nathan at acm.org, 20apr99.
 \def\tab{\checkenv\multitable &\the\everytab}%
 
-% @multitable ... @end multitable definitions:
-%
 \newtoks\everytab  % insert after every tab.
 %
 \envdef\multitable{%
@@ -4452,9 +4382,8 @@
   %
   \tolerance=9500
   \hbadness=9500
-  \setmultitablespacing
-  \parskip=\multitableparskip
-  \parindent=\multitableparindent
+  \parskip=0pt
+  \parindent=6pt
   \overfullrule=0pt
   \global\colcount=0
   %
@@ -4484,47 +4413,24 @@
   % continue for many paragraphs if desired.
   \halign\bgroup &%
     \global\advance\colcount by 1
-    \multistrut
+    \strut
     \vtop{%
-      % Use the current \colcount to find the correct column width:
+      \advance\hsize by -1\leftskip
+      % Find the correct column width
       \hsize=\expandafter\csname col\the\colcount\endcsname
       %
-      % In order to keep entries from bumping into each other
-      % we will add a \leftskip of \multitablecolspace to all columns after
-      % the first one.
-      %
-      % If a template has been used, we will add \multitablecolspace
-      % to the width of each template entry.
-      %
-      % If the user has set preamble in terms of percent of \hsize we will
-      % use that dimension as the width of the column, and the \leftskip
-      % will keep entries from bumping into each other.  Table will start at
-      % left margin and final column will justify at right margin.
-      %
-      % Make sure we don't inherit \rightskip from the outer environment.
       \rightskip=0pt
       \ifnum\colcount=1
-	% The first column will be indented with the surrounding text.
-	\advance\hsize by\leftskip
+        \advance\hsize by\leftskip % Add indent of surrounding text
       \else
-	\ifsetpercent \else
-	  % If user has not set preamble in terms of percent of \hsize
-	  % we will advance \hsize by \multitablecolspace.
-	  \advance\hsize by \multitablecolspace
-	\fi
-       % In either case we will make \leftskip=\multitablecolspace:
-      \leftskip=\multitablecolspace
+        % In order to keep entries from bumping into each other.
+        \leftskip=12pt
+        \ifsetpercent \else
+          % If a template has been used
+          \advance\hsize by \leftskip
+        \fi
       \fi
-      % Ignoring space at the beginning and end avoids an occasional spurious
-      % blank line, when TeX decides to break the line at the space before the
-      % box from the multistrut, so the strut ends up on a line by itself.
-      % For example:
-      % @multitable @columnfractions .11 .89
-      % @item @code{#}
-      % @tab Legal holiday which is valid in major parts of the whole country.
-      % Is automatically provided with highlighting sequences respectively
-      % marking characters.
-      \noindent\ignorespaces##\unskip\multistrut
+      \noindent\ignorespaces##\unskip\strut
     }\cr
 }
 \def\Emultitable{%
@@ -4533,32 +4439,7 @@
   \global\setpercentfalse
 }
 
-\def\setmultitablespacing{%
-  \def\multistrut{\strut}% just use the standard line spacing
-  %
-  % Compute \multitablelinespace (if not defined by user) for use in
-  % \multitableparskip calculation.  We used define \multistrut based on
-  % this, but (ironically) that caused the spacing to be off.
-  % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
-\ifdim\multitablelinespace=0pt
-\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
-\global\advance\multitablelinespace by-\ht0
-\fi
-% Test to see if parskip is larger than space between lines of
-% table. If not, do nothing.
-%        If so, set to same dimension as multitablelinespace.
-\ifdim\multitableparskip>\multitablelinespace
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
-                                      % than skip between lines in the table.
-\fi%
-\ifdim\multitableparskip=0pt
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
-                                      % than skip between lines in the table.
-\fi}
 
-
 \message{conditionals,}
 
 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
@@ -5171,30 +5052,29 @@
   \let\lbracechar\{%
   \let\rbracechar\}%
   %
+  % Non-English letters.
+  \def\AA{AA}%
+  \def\AE{AE}%
+  \def\DH{DZZ}%
+  \def\L{L}%
+  \def\OE{OE}%
+  \def\O{O}%
+  \def\TH{TH}%
+  \def\aa{aa}%
+  \def\ae{ae}%
+  \def\dh{dzz}%
+  \def\exclamdown{!}%
+  \def\l{l}%
+  \def\oe{oe}%
+  \def\ordf{a}%
+  \def\ordm{o}%
+  \def\o{o}%
+  \def\questiondown{?}%
+  \def\ss{ss}%
+  \def\th{th}%
   %
   \let\do\indexnofontsdef
   %
-  % Non-English letters.
-  \do\AA{AA}%
-  \do\AE{AE}%
-  \do\DH{DZZ}%
-  \do\L{L}%
-  \do\OE{OE}%
-  \do\O{O}%
-  \do\TH{TH}%
-  \do\aa{aa}%
-  \do\ae{ae}%
-  \do\dh{dzz}%
-  \do\exclamdown{!}%
-  \do\l{l}%
-  \do\oe{oe}%
-  \do\ordf{a}%
-  \do\ordm{o}%
-  \do\o{o}%
-  \do\questiondown{?}%
-  \do\ss{ss}%
-  \do\th{th}%
-  %
   \do\LaTeX{LaTeX}%
   \do\TeX{TeX}%
   %
@@ -9537,7 +9417,7 @@
   % On the other hand, if we are in the case of @center @image, we don't
   %  want to start a paragraph, which will create a hsize-width box and
   %  eradicate the centering.
-  \ifx\centersub\centerV\else \noindent \fi
+  \ifx\centersub\centerV \else \imageindent \fi
   %
   % Output the image.
   \ifpdf
@@ -11729,3 +11609,4 @@
 @c vim:sw=2:
 
 @enablebackslashhack
+

Modified: branches/stable/source/src/configure
===================================================================
--- branches/stable/source/src/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -24882,11 +24882,11 @@
 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$with_banner_add):
+** Configuration summary for $PACKAGE_STRING (2022/dev$with_banner_add):
 
    $msg_compiling" >&5
 $as_echo "
-** Configuration summary for $PACKAGE_STRING (2021$with_banner_add):
+** Configuration summary for $PACKAGE_STRING (2022/dev$with_banner_add):
 
    $msg_compiling" >&6; }
 case $kpse_src$kpse_bld in

Modified: branches/stable/source/src/doc/ChangeLog
===================================================================
--- branches/stable/source/src/doc/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/doc/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,8 @@
+2021-04-22  Karl Berry  <karl at tug.org>
+
+	* tlbuild-incl/tlmgr.texi,
+	* tlbuild-incl/install-tl.texi: regenerate for https://mirror.ctan.org.
+
 2021-02-09  Karl Berry  <karl at freefriends.org>
 
 	* tlbuild.texi (Adding a new program module): emphasize requirement

Modified: branches/stable/source/src/doc/build-tools.txt
===================================================================
--- branches/stable/source/src/doc/build-tools.txt	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/doc/build-tools.txt	2021-06-17 21:27:03 UTC (rev 855)
@@ -3,5 +3,5 @@
 bison (GNU Bison) 3.7.4
 flex 2.6.0
 ltmain.sh (GNU libtool) 2.4.6
-m4 (GNU M4) 1.4.18
+m4 (GNU M4) 1.4.19
 makeinfo (GNU texinfo) 6.7

Modified: branches/stable/source/src/doc/tlbuild-incl/install-tl.texi
===================================================================
--- branches/stable/source/src/doc/tlbuild-incl/install-tl.texi	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/doc/tlbuild-incl/install-tl.texi	2021-06-17 21:27:03 UTC (rev 855)
@@ -127,7 +127,7 @@
 (@url{https://tug.org/texlive/doc/tlmgr.html#OPTIONS}).
 
 For installation, the default is to pick a mirror automatically, using
- at url{http://mirror.ctan.org/systems/texlive/tlnet}; the chosen mirror is
+ at url{https://mirror.ctan.org/systems/texlive/tlnet}; the chosen mirror is
 used for the entire download. You can use the special argument @code{ctan}
 as an abbreviation for this. (See @url{https://ctan.org} for more about CTAN
 and its mirrors.)
@@ -556,5 +556,5 @@
 distribution (@url{https://tug.org/texlive}) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: install-tl 57970 2021-02-27 14:17:34Z siepo $
+$Id: install-tl 58938 2021-04-21 21:26:24Z karl $
 

Modified: branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi
===================================================================
--- branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/doc/tlbuild-incl/tlmgr.texi	2021-06-17 21:27:03 UTC (rev 855)
@@ -60,8 +60,8 @@
 @item @code{tlmgr option repository ctan}
 @anchor{tlmgr @code{tlmgr option repository ctan}}
 
- at item @code{tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet}
- at anchor{tlmgr @code{tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet}}
+ at item @code{tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet}
+ at anchor{tlmgr @code{tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet}}
 
 Tell @code{tlmgr} to use a nearby CTAN mirror for future updates; useful if
 you installed TeX Live from the DVD image and want to have continuing
@@ -154,8 +154,8 @@
 @item @code{ctan}
 @anchor{tlmgr @code{ctan}}
 
- at item @code{http://mirror.ctan.org/systems/texlive/tlnet}
- at anchor{tlmgr @code{http://mirror.ctan.org/systems/texlive/tlnet}}
+ at item @code{https://mirror.ctan.org/systems/texlive/tlnet}
+ at anchor{tlmgr @code{https://mirror.ctan.org/systems/texlive/tlnet}}
 
 Pick a CTAN mirror automatically, trying for one that is both nearby and
 up-to-date. The chosen mirror is used for the entire download. The bare
@@ -1052,7 +1052,7 @@
 DVD.  To do this, you can run
 
 @verbatim
- tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet
+ tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet
 @end verbatim
 
 The @code{install-tl} documentation has more information about the possible
@@ -2764,5 +2764,5 @@
 distribution (@url{https://tug.org/texlive}) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: tlmgr.pl 57970 2021-02-27 14:17:34Z siepo $
+$Id: tlmgr.pl 58938 2021-04-21 21:26:24Z karl $
 

Modified: branches/stable/source/src/doc/tlbuild.info
===================================================================
--- branches/stable/source/src/doc/tlbuild.info	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/doc/tlbuild.info	2021-06-17 21:27:03 UTC (rev 855)
@@ -762,7 +762,7 @@
      bison (GNU Bison) 3.7.4
      flex 2.6.0
      ltmain.sh (GNU libtool) 2.4.6
-     m4 (GNU M4) 1.4.18
+     m4 (GNU M4) 1.4.19
      makeinfo (GNU texinfo) 6.7
 
    These versions should be used to update the generated files (e.g.,
@@ -2341,7 +2341,7 @@
      details (<https://tug.org/texlive/doc/tlmgr.html#OPTIONS>).
 
      For installation, the default is to pick a mirror automatically,
-     using <http://mirror.ctan.org/systems/texlive/tlnet>; the chosen
+     using <https://mirror.ctan.org/systems/texlive/tlnet>; the chosen
      mirror is used for the entire download.  You can use the special
      argument 'ctan' as an abbreviation for this.  (See
      <https://ctan.org> for more about CTAN and its mirrors.)
@@ -2729,7 +2729,7 @@
 distribution (<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-   $Id: install-tl 57970 2021-02-27 14:17:34Z siepo $
+   $Id: install-tl 58938 2021-04-21 21:26:24Z karl $
 
 
 File: tlbuild.info,  Node: tlmgr,  Next: Index,  Prev: install-tl,  Up: Top
@@ -2806,7 +2806,7 @@
 
 'tlmgr option repository ctan'
 
-'tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet'
+'tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet'
 
      Tell 'tlmgr' to use a nearby CTAN mirror for future updates; useful
      if you installed TeX Live from the DVD image and want to have
@@ -2888,7 +2888,7 @@
 
      'ctan'
 
-     'http://mirror.ctan.org/systems/texlive/tlnet'
+     'https://mirror.ctan.org/systems/texlive/tlnet'
 
           Pick a CTAN mirror automatically, trying for one that is both
           nearby and up-to-date.  The chosen mirror is used for the
@@ -3716,7 +3716,7 @@
 to get further updates from the Internet, after originally installing
 from DVD. To do this, you can run
 
- tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet
+ tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet
 
    The 'install-tl' documentation has more information about the
 possible values for 'repository'.  (For backward compatibility,
@@ -5339,7 +5339,7 @@
 distribution (<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-   $Id: tlmgr.pl 57970 2021-02-27 14:17:34Z siepo $
+   $Id: tlmgr.pl 58938 2021-04-21 21:26:24Z karl $
 
 
 File: tlbuild.info,  Node: Index,  Prev: tlmgr,  Up: Top
@@ -6026,52 +6026,52 @@
 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
+Ref: install-tl *-select-repository*94187
+Ref: install-tl *-all-options*94605
+Ref: install-tl *-custom-bin* _path_94860
+Ref: install-tl *-debug-translation*95694
+Ref: install-tl *-force-platform* _platform_95970
+Ref: install-tl *-help*, *--help*, *-?*96214
+Ref: install-tl *-in-place*96627
+Ref: install-tl *-init-from-profile* _profile_file_97172
+Ref: install-tl *-logfile* _file_97441
+Ref: install-tl *-no-cls*97792
+Ref: install-tl *-no-persistent-downloads*97940
+Ref: install-tl *-persistent-downloads*97965
+Ref: install-tl *-no-verify-downloads*98583
+Ref: install-tl *-non-admin*98946
+Ref: install-tl *-portable*99039
+Ref: install-tl *-print-platform*99178
+Ref: install-tl *-profile* _profile_file_99376
+Ref: install-tl *-q*99597
+Ref: install-tl *-scheme* _scheme_99659
+Ref: install-tl *-v*100133
+Ref: install-tl *-version*, *--version*100288
+Node: install-tl PROFILES100422
+Ref: install-tl instopt_adjustpath (default 0 on Unix, 1 on Windows)103288
+Ref: install-tl instopt_adjustrepo (default 1)103364
+Ref: install-tl instopt_letter (default 0)103501
+Ref: install-tl instopt_portable (default 0)103592
+Ref: install-tl instopt_write18_restricted (default 1)103688
+Node: install-tl ENVIRONMENT VARIABLES105027
+Ref: install-tl TEXLIVE_DOWNLOADER105405
+Ref: install-tl TL_DOWNLOAD_PROGRAM105428
+Ref: install-tl TL_DOWNLOAD_ARGS105448
+Ref: install-tl TEXLIVE_INSTALL_ENV_NOCHECK105652
+Ref: install-tl TEXLIVE_INSTALL_NO_CONTEXT_CACHE105854
+Ref: install-tl TEXLIVE_INSTALL_NO_RESUME105963
+Ref: install-tl TEXLIVE_INSTALL_NO_WELCOME106115
+Ref: install-tl TEXLIVE_INSTALL_PAPER106236
+Ref: install-tl TEXLIVE_INSTALL_PREFIX106382
+Ref: install-tl TEXLIVE_INSTALL_TEXDIR106408
+Ref: install-tl TEXLIVE_INSTALL_TEXMFCONFIG106439
+Ref: install-tl TEXLIVE_INSTALL_TEXMFVAR106467
+Ref: install-tl TEXLIVE_INSTALL_TEXMFHOME106496
+Ref: install-tl TEXLIVE_INSTALL_TEXMFLOCAL106526
+Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSCONFIG106560
+Ref: install-tl TEXLIVE_INSTALL_TEXMFSYSVAR106591
+Ref: install-tl NOPERLDOC106962
+Node: install-tl AUTHORS AND COPYRIGHT107026
 Node: tlmgr107439
 Node: tlmgr NAME107924
 Node: tlmgr SYNOPSIS108056
@@ -6078,261 +6078,261 @@
 Node: tlmgr DESCRIPTION108246
 Node: tlmgr EXAMPLES109345
 Ref: tlmgr tlmgr option repository ctan109596
-Ref: tlmgr tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet109668
-Ref: tlmgr tlmgr update --list110273
-Ref: tlmgr tlmgr update --all110366
-Ref: tlmgr tlmgr info _what_110523
-Node: tlmgr OPTIONS110785
-Ref: tlmgr *--repository* _url|path_111305
-Ref: tlmgr /some/local/dir112491
-Ref: tlmgr file:/some/local/dir112520
-Ref: tlmgr ctan112593
-Ref: tlmgr http://mirror.ctan.org/systems/texlive/tlnet112646
-Ref: tlmgr http://server/path/to/tlnet112987
-Ref: tlmgr https://server/path/to/tlnet113368
-Ref: tlmgr ftp://server/path/to/tlnet113836
-Ref: tlmgr user at machine:/path/to/tlnet113968
-Ref: tlmgr scp://user@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
+Ref: tlmgr tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet109669
+Ref: tlmgr tlmgr update --list110274
+Ref: tlmgr tlmgr update --all110367
+Ref: tlmgr tlmgr info _what_110524
+Node: tlmgr OPTIONS110786
+Ref: tlmgr *--repository* _url|path_111306
+Ref: tlmgr /some/local/dir112492
+Ref: tlmgr file:/some/local/dir112521
+Ref: tlmgr ctan112594
+Ref: tlmgr https://mirror.ctan.org/systems/texlive/tlnet112648
+Ref: tlmgr http://server/path/to/tlnet112989
+Ref: tlmgr https://server/path/to/tlnet113370
+Ref: tlmgr ftp://server/path/to/tlnet113838
+Ref: tlmgr user at machine:/path/to/tlnet113970
+Ref: tlmgr scp://user@machine/path/to/tlnet114011
+Ref: tlmgr ssh://user@machine/path/to/tlnet114052
+Ref: tlmgr *--gui* [_action_]114445
+Ref: tlmgr *--gui-lang* _llcode_115258
+Ref: tlmgr *--command-logfile* _file_115999
+Ref: tlmgr *--debug-translation*116265
+Ref: tlmgr *--machine-readable*116468
+Ref: tlmgr *--no-execute-actions*116736
+Ref: tlmgr *--package-logfile* _file_116929
+Ref: tlmgr *--pause*117183
+Ref: tlmgr *--persistent-downloads*117338
+Ref: tlmgr *--no-persistent-downloads*117366
+Ref: tlmgr *--pin-file*117860
+Ref: tlmgr *--usermode*118078
+Ref: tlmgr *--usertree* _dir_118198
+Ref: tlmgr *--verify-repo=[none|main|all]*118324
+Node: tlmgr ACTIONS119223
+Node: tlmgr help120084
+Node: tlmgr version120561
+Node: tlmgr backup120824
+Ref: tlmgr *backup [_option_...] --all*120995
+Ref: tlmgr *backup [_option_...] _pkg_...*121028
+Ref: tlmgr *--backupdir* _directory_122094
+Ref: tlmgr *--all*122311
+Ref: tlmgr *--clean*[=_N_]122563
+Ref: tlmgr *--dry-run*122890
+Node: tlmgr candidates _pkg_123020
+Node: tlmgr check [_option_...] [depends|executes|files|runfiles|texmfdbs|all]123375
+Ref: tlmgr *depends*123889
+Ref: tlmgr *executes*124231
+Ref: tlmgr *files*124346
+Ref: tlmgr *runfiles*124482
+Ref: tlmgr *texmfdbs*124619
+Ref: tlmgr - all items in TEXMFDBS have the !! prefix.124849
+Ref: tlmgr - all items in TEXMFBDS have an ls-R file (if they exist at all).124925
+Ref: tlmgr - all items in TEXMF with !! are listed in TEXMFDBS.124990
+Ref: tlmgr - all items in TEXMF with an ls-R file are listed in TEXMFDBS.125065
+Ref: tlmgr *--use-svn*125090
+Node: tlmgr conf125231
+Ref: tlmgr *conf [texmf|tlmgr|updmap [--conffile _file_] [--delete] [_key_ [_value_]]]*125519
+Ref: tlmgr *conf auxtrees [--conffile _file_] [show|add|remove] [_value_]*125583
+Node: tlmgr dump-tlpdb [_option_...] [--json]127998
+Ref: tlmgr *--local*128431
+Ref: tlmgr *--remote*128470
+Ref: tlmgr *--json*128508
+Node: tlmgr generate129079
+Ref: tlmgr *generate [_option_...] language*129275
+Ref: tlmgr *generate [_option_...] language.dat*129314
+Ref: tlmgr *generate [_option_...] language.def*129353
+Ref: tlmgr *generate [_option_...] language.dat.lua*129396
+Ref: tlmgr *--dest* _output_file_131723
+Ref: tlmgr *--localcfg* _local_conf_file_132299
+Ref: tlmgr *--rebuild-sys*132422
+Node: tlmgr gui133237
+Node: tlmgr info133415
+Ref: tlmgr *info [_option_...] _pkg_...*133577
+Ref: tlmgr *info [_option_...] collections*133611
+Ref: tlmgr *info [_option_...] schemes*133641
+Ref: tlmgr *--list*135171
+Ref: tlmgr *--only-installed*135485
+Ref: tlmgr *--only-remote*135673
+Ref: tlmgr *--data item1,item2,...*135977
+Ref: tlmgr *--json* 1137340
+Node: tlmgr init-usertree137723
+Node: tlmgr install [_option_...] _pkg_...138104
+Ref: tlmgr *--dry-run* 1138612
+Ref: tlmgr *--file*138729
+Ref: tlmgr *--force*138951
+Ref: tlmgr *--no-depends*139171
+Ref: tlmgr *--no-depends-at-all*139330
+Ref: tlmgr *--reinstall*139730
+Ref: tlmgr *--with-doc*140108
+Ref: tlmgr *--with-src*140121
+Node: tlmgr key140849
+Ref: tlmgr *key list*141007
+Ref: tlmgr *key add _file_*141025
+Ref: tlmgr *key remove _keyid_*141047
+Node: tlmgr list141641
+Node: tlmgr option141803
+Ref: tlmgr *option [--json] [show]*141958
+Ref: tlmgr *option [--json] showall|help*141989
+Ref: tlmgr *option _key_ [_value_]*142015
+Node: tlmgr paper146594
+Ref: tlmgr *paper [a4|letter]*146743
+Ref: tlmgr *<[xdvi|pdftex|dvips|dvipdfmx|context|psutils] paper [_papersize_|--list]*>146819
+Ref: tlmgr *paper --json*146834
+Node: tlmgr path148049
+Ref: tlmgr *path [--w32mode=user|admin] add*148210
+Ref: tlmgr *path [--w32mode=user|admin] remove*148247
+Node: tlmgr pinning149732
+Ref: tlmgr pinning show149973
+Ref: tlmgr pinning add _repo_ _pkgglob_...150046
+Ref: tlmgr pinning remove _repo_ _pkgglob_...150165
+Ref: tlmgr pinning remove _repo_ --all150318
+Node: tlmgr platform150372
+Ref: tlmgr *platform list|add|remove _platform_...*150558
+Ref: tlmgr *platform set _platform_*150585
+Ref: tlmgr *platform set auto*150606
+Ref: tlmgr *--dry-run* 2151483
+Node: tlmgr postaction151602
+Ref: tlmgr *postaction [_option_...] install [shortcut|fileassoc|script] [_pkg_...]*151832
+Ref: tlmgr *postaction [_option_...] remove [shortcut|fileassoc|script] [_pkg_...]*151906
+Ref: tlmgr *--w32mode=[user|admin]*152221
+Ref: tlmgr *--fileassocmode=[1|2]*152637
+Ref: tlmgr *--all* 1152922
+Node: tlmgr print-platform152977
+Node: tlmgr print-platform-info153308
+Node: tlmgr remove [_option_...] _pkg_...153608
+Ref: tlmgr *--all* 2154092
+Ref: tlmgr *--backup*154202
+Ref: tlmgr *--backupdir* _directory_ 1154228
+Ref: tlmgr *--no-depends* 1154633
+Ref: tlmgr *--no-depends-at-all* 1154695
+Ref: tlmgr *--force* 1154798
+Ref: tlmgr *--dry-run* 3155271
+Node: tlmgr repository155607
+Ref: tlmgr *repository list*155795
+Ref: tlmgr *repository list _path|url|tag_*155829
+Ref: tlmgr *repository add _path_ [_tag_]*155862
+Ref: tlmgr *repository remove _path|tag_*155894
+Ref: tlmgr *repository set _path_[#_tag_] [_path_[#_tag_] ...]*155948
+Ref: tlmgr *repository status*155969
+Ref: tlmgr The tag (which can be the same as the url);157196
+Node: tlmgr restore157674
+Ref: tlmgr *restore [_option_...] _pkg_ [_rev_]*157853
+Ref: tlmgr *restore [_option_...] --all*157883
+Ref: tlmgr *--all* 3158583
+Ref: tlmgr *--backupdir* _directory_ 2158797
+Ref: tlmgr *--dry-run* 4158978
+Ref: tlmgr *--force* 2159110
+Ref: tlmgr *--json* 2159156
+Node: tlmgr search159483
+Ref: tlmgr *search [_option_...] _what_*159647
+Ref: tlmgr *search [_option_...] --file _what_*159684
+Ref: tlmgr *search [_option_...] --all _what_*159720
+Ref: tlmgr *--file* 1159940
+Ref: tlmgr *--all* 4160002
+Ref: tlmgr *--global*160091
+Ref: tlmgr *--word*160218
+Node: tlmgr shell160533
+Ref: tlmgr protocol161268
+Ref: tlmgr help 1161332
+Ref: tlmgr version 1161385
+Ref: tlmgr quit, end, bye, byebye, EOF161453
+Ref: tlmgr restart161474
+Ref: tlmgr load [local|remote]161597
+Ref: tlmgr save161667
+Ref: tlmgr get [_var_] =item set [_var_ [_val_]]161790
+Node: tlmgr show162391
+Node: tlmgr uninstall162558
+Node: tlmgr update [_option_...] [_pkg_...]162788
+Ref: tlmgr *--all* 5163159
+Ref: tlmgr *--self*165338
+Ref: tlmgr *--dry-run* 5166102
+Ref: tlmgr *--list* [_pkg_]166279
+Ref: tlmgr *--exclude* _pkg_166968
+Ref: tlmgr *--no-auto-remove* [_pkg_...]167768
+Ref: tlmgr *--no-auto-install* [_pkg_...]168252
+Ref: tlmgr *--reinstall-forcibly-removed*169014
+Ref: tlmgr *--backup* 1169549
+Ref: tlmgr *--backupdir* _directory_ 3169575
+Ref: tlmgr *--no-depends* 2170741
+Ref: tlmgr *--no-depends-at-all* 2170944
+Ref: tlmgr *--force* 3171047
+Node: tlmgr CONFIGURATION FILE FOR TLMGR172038
+Ref: tlmgr auto-remove, value 0 or 1 (default 1), same as command-line option.173045
+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.173182
+Ref: tlmgr gui-lang _llcode_, with a language code value as with the command-line option.173264
+Ref: tlmgr no-checksums, value 0 or 1 (default 0, see below).173318
+Ref: tlmgr persistent-downloads, value 0 or 1 (default 1), same as command-line option.173398
+Ref: tlmgr require-verification, value 0 or 1 (default 0), same as command-line option.173478
+Ref: tlmgr tkfontscale, value any float. Controls the scaling of fonts in the Tk based frontends.173568
+Ref: tlmgr update-exclude, value: comma-separated list of packages (no space allowed). Same as the command line option --exclude for the action update.173716
+Ref: tlmgr verify-downloads, value 0 or 1 (default 1), same as command-line option.173792
+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).174061
+Node: tlmgr CRYPTOGRAPHIC VERIFICATION175149
+Node: tlmgr Configuration of GnuPG invocation177322
+Node: tlmgr USER MODE177960
+Node: tlmgr User mode install180806
+Node: tlmgr User mode backup, restore, remove, update181950
+Node: tlmgr User mode generate, option, paper182392
+Node: tlmgr MULTIPLE REPOSITORIES182768
+Node: tlmgr Pinning184497
+Node: tlmgr GUI FOR TLMGR186420
+Node: tlmgr Main display188069
+Node: tlmgr Display configuration area188321
+Ref: tlmgr Status188682
+Ref: tlmgr Category188846
+Ref: tlmgr Match189032
+Ref: tlmgr Selection189213
+Ref: tlmgr Display configuration buttons189417
+Node: tlmgr Package list area189600
+Ref: tlmgr a checkbox190184
+Ref: tlmgr package name190320
+Ref: tlmgr local revision (and version)190419
+Ref: tlmgr remote revision (and version)190794
+Ref: tlmgr short description191091
+Node: tlmgr Main display action buttons191136
+Ref: tlmgr Update all installed191402
+Ref: tlmgr Update191774
+Ref: tlmgr Install191824
+Ref: tlmgr Remove192010
+Ref: tlmgr Backup192188
+Node: tlmgr Menu bar192345
+Ref: tlmgr tlmgr menu192568
+Ref: tlmgr Options menu192876
+Ref: tlmgr Actions menu193959
+Ref: tlmgr Help menu194387
+Node: tlmgr GUI options194521
+Ref: tlmgr -background _color_194767
+Ref: tlmgr -font " _fontname_ _fontsize_ "194832
+Ref: tlmgr -foreground _color_194990
+Ref: tlmgr -geometry _geomspec_195042
+Ref: tlmgr -xrm _xresource_195234
+Node: tlmgr MACHINE-READABLE OUTPUT195503
+Node: tlmgr Machine-readable update and install output196313
+Ref: tlmgr location-url _location_197589
+Ref: tlmgr total-bytes _count_197805
+Ref: tlmgr _pkgname_198215
+Ref: tlmgr _status_198425
+Ref: tlmgr d198503
+Ref: tlmgr f198563
+Ref: tlmgr u198742
+Ref: tlmgr r198788
+Ref: tlmgr a198911
+Ref: tlmgr i199089
+Ref: tlmgr I199208
+Ref: tlmgr _localrev_199310
+Ref: tlmgr _serverrev_199417
+Ref: tlmgr _size_199529
+Ref: tlmgr _runtime_199698
+Ref: tlmgr _esttot_199768
+Node: tlmgr Machine-readable option output199801
+Node: tlmgr ENVIRONMENT VARIABLES200313
+Ref: tlmgr TEXLIVE_COMPRESSOR200824
+Ref: tlmgr TEXLIVE_DOWNLOADER201672
+Ref: tlmgr TL_DOWNLOAD_PROGRAM201695
+Ref: tlmgr TL_DOWNLOAD_ARGS201715
+Ref: tlmgr TEXLIVE_PREFER_OWN202741
+Node: tlmgr AUTHORS AND COPYRIGHT203565
+Node: Index203963
 
 End Tag Table
 

Modified: branches/stable/source/src/libs/README
===================================================================
--- branches/stable/source/src/libs/README	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/libs/README	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-$Id: README 57727 2021-02-13 17:46:14Z karl $
+$Id: README 59092 2021-05-05 22:28:05Z kakuto $
 Public domain.  Originally created by Karl Berry, 2005.
 
 Libraries we compile for TeX Live.
@@ -25,8 +25,8 @@
   http://sourceforge.net/projects/silgraphite/files/graphite2/
   (requires C++11)
 
-harfbuzz 2.7.4 - checked 27dec20
-  https://github.com/harfbuzz/harfbuzz/releases/download/2.7.4/
+harfbuzz 2.8.1 - checked 06may21
+  https://github.com/harfbuzz/harfbuzz/releases/download/2.8.1/
 
 icu 68.2 - checked 13feb21
   http://download.icu-project.org/files/icu4c/

Modified: branches/stable/source/src/libs/configure
===================================================================
--- branches/stable/source/src/libs/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/libs/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -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.
+# Generated by GNU Autoconf 2.69 for TeX Live libs 2022/dev.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='TeX Live libs'
 PACKAGE_TARNAME='tex-live-libs'
-PACKAGE_VERSION='2021'
-PACKAGE_STRING='TeX Live libs 2021'
+PACKAGE_VERSION='2022/dev'
+PACKAGE_STRING='TeX Live libs 2022/dev'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1394,7 +1394,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures TeX Live libs 2021 to adapt to many kinds of systems.
+\`configure' configures TeX Live libs 2022/dev to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1464,7 +1464,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of TeX Live libs 2021:";;
+     short | recursive ) echo "Configuration of TeX Live libs 2022/dev:";;
    esac
   cat <<\_ACEOF
 
@@ -1749,7 +1749,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-TeX Live libs configure 2021
+TeX Live libs configure 2022/dev
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1850,7 +1850,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by TeX Live libs $as_me 2021, which was
+It was created by TeX Live libs $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -6106,7 +6106,7 @@
 
 # Define the identity of the package.
  PACKAGE='tex-live-libs'
- VERSION='2021'
+ VERSION='2022/dev'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7127,7 +7127,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by TeX Live libs $as_me 2021, which was
+This file was extended by TeX Live libs $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7184,7 +7184,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-TeX Live libs config.status 2021
+TeX Live libs config.status 2022/dev
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: branches/stable/source/src/libs/xpdf/ChangeLog
===================================================================
--- branches/stable/source/src/libs/xpdf/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/libs/xpdf/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,8 @@
+2021-05-10  Karl Berry  <karl at freefriends.org>
+
+	* xpdf-src/xpdf/Error.cc (error): label error messages
+	as coming from libxpdf.
+
 2021-02-01  Akira Kakuto  <kakuto at w32tex.org>
 
 	* Import xpdf-4.03.

Modified: branches/stable/source/src/libs/xpdf/TLpatches/patch-bunched
===================================================================
--- branches/stable/source/src/libs/xpdf/TLpatches/patch-bunched	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/libs/xpdf/TLpatches/patch-bunched	2021-06-17 21:27:03 UTC (rev 855)
@@ -312,3 +312,23 @@
  #if defined(VMS) || defined(VMCMS) || defined(DOS) || defined(OS2) || defined(__EMX__) || defined(_WIN32) || defined(__DJGPP__)
  #define POPEN_READ_MODE "rb"
  #else
+diff -ur xpdf-4.03/xpdf/Error.cc xpdf-src/xpdf/Error.cc
+--- xpdf-4.03/xpdf/Error.cc	Thu Jan 28 07:23:52 2021
++++ xpdf-src/xpdf/Error.cc	Mon Feb 01 12:34:28 2021
+@@ -77,11 +77,14 @@
+     (*errorCbk)(errorCbkData, category, (int)pos, sanitized->getCString());
+   } else {
+     fflush(stdout);
++    /* Label the error messages for pdftex's use as libxpdf.
++       It would be cleaner to use the callback feature, but seems
++       like too much trouble at this late date. */
+     if (pos >= 0) {
+-      fprintf(stderr, "%s (%d): %s\n",
++      fprintf(stderr, "\nlibxpdf: %s (%d): %s\n",
+ 	      errorCategoryNames[category], (int)pos, sanitized->getCString());
+     } else {
+-      fprintf(stderr, "%s: %s\n",
++      fprintf(stderr, "\nlibxpdf: %s: %s\n",
+ 	      errorCategoryNames[category], sanitized->getCString());
+     }
+     fflush(stderr);

Modified: branches/stable/source/src/libs/xpdf/xpdf-src/xpdf/Error.cc
===================================================================
--- branches/stable/source/src/libs/xpdf/xpdf-src/xpdf/Error.cc	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/libs/xpdf/xpdf-src/xpdf/Error.cc	2021-06-17 21:27:03 UTC (rev 855)
@@ -77,11 +77,14 @@
     (*errorCbk)(errorCbkData, category, (int)pos, sanitized->getCString());
   } else {
     fflush(stdout);
+    /* Label the error messages for pdftex's use as libxpdf.
+       It would be cleaner to use the callback feature, but seems
+       like too much trouble at this late date. */
     if (pos >= 0) {
-      fprintf(stderr, "%s (%d): %s\n",
+      fprintf(stderr, "\nlibxpdf: %s (%d): %s\n",
 	      errorCategoryNames[category], (int)pos, sanitized->getCString());
     } else {
-      fprintf(stderr, "%s: %s\n",
+      fprintf(stderr, "\nlibxpdf: %s: %s\n",
 	      errorCategoryNames[category], sanitized->getCString());
     }
     fflush(stderr);

Modified: branches/stable/source/src/texk/README
===================================================================
--- branches/stable/source/src/texk/README	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/README	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-$Id: README 58117 2021-03-04 19:00:28Z karl $
+$Id: README 59264 2021-05-19 08:48:52Z takuji $
 Copyright 2006-2021 TeX Users Group.
 You may freely use, modify and/or distribute this file.
 
@@ -107,7 +107,7 @@
 
 ttfdump - maintained here, by us, since Taiwan upstream apparently gone.
 
-upmendex 0.54 - by Takuji Tanaka
+upmendex 0.56 - by Takuji Tanaka
   http://www.ctan.org/pkg/upmendex
   https://github.com/t-tk/upmendex-package
 

Modified: branches/stable/source/src/texk/configure
===================================================================
--- branches/stable/source/src/texk/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -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.
+# Generated by GNU Autoconf 2.69 for TeX Live texk 2022/dev.
 #
 # Report bugs to <tex-live at tug.org>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='TeX Live texk'
 PACKAGE_TARNAME='tex-live-texk'
-PACKAGE_VERSION='2021'
-PACKAGE_STRING='TeX Live texk 2021'
+PACKAGE_VERSION='2022/dev'
+PACKAGE_STRING='TeX Live texk 2022/dev'
 PACKAGE_BUGREPORT='tex-live at tug.org'
 PACKAGE_URL=''
 
@@ -1394,7 +1394,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures TeX Live texk 2021 to adapt to many kinds of systems.
+\`configure' configures TeX Live texk 2022/dev to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1464,7 +1464,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of TeX Live texk 2021:";;
+     short | recursive ) echo "Configuration of TeX Live texk 2022/dev:";;
    esac
   cat <<\_ACEOF
 
@@ -1749,7 +1749,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-TeX Live texk configure 2021
+TeX Live texk configure 2022/dev
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1850,7 +1850,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by TeX Live texk $as_me 2021, which was
+It was created by TeX Live texk $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -6106,7 +6106,7 @@
 
 # Define the identity of the package.
  PACKAGE='tex-live-texk'
- VERSION='2021'
+ VERSION='2022/dev'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7211,7 +7211,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by TeX Live texk $as_me 2021, which was
+This file was extended by TeX Live texk $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7268,7 +7268,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-TeX Live texk config.status 2021
+TeX Live texk config.status 2022/dev
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: branches/stable/source/src/texk/kpathsea/ChangeLog
===================================================================
--- branches/stable/source/src/texk/kpathsea/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,27 @@
+2021-05-14  Karl Berry  <karl at tug.org>
+
+	* texmf.cnf (TEXINPUTS.optex): new definition for new format.
+	Move some other definitions around for consistency, but no changes.
+
+2021-05-07  Karl Berry  <karl at freefriends.org>
+
+	* texmf.cnf (save_size): re-increase to 200000
+	with parallel change to tex.ch.
+
+2021-04-22  Karl Berry  <karl at freefriends.org>
+
+	* doc/kpathsea.texi (TeX directory structure): link to
+	ctan.org/pkg/tds instead of http://mirror.ctan.org.
+
+2021-04-17  Karl Berry  <karl at tug.org>
+
+	* version.ac: now 6.3.4/dev since TL'21 is released.
+
+2021-04-07  Akira Kakuto  <kakuto at w32tex.org>
+
+	* knj.c, readable.c: Fix a bug that the "nul" device given in
+	a full-path form, such as c:/usr/work/nul was not readable.
+
 2021-03-23  Karl Berry  <karl at tug.org>
 
 	* TL'21.

Modified: branches/stable/source/src/texk/kpathsea/c-auto.in
===================================================================
--- branches/stable/source/src/texk/kpathsea/c-auto.in	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/c-auto.in	2021-06-17 21:27:03 UTC (rev 855)
@@ -23,7 +23,7 @@
 #define KPATHSEA_C_AUTO_H
 
 /* kpathsea: the version string. */
-#define KPSEVERSION "kpathsea version 6.3.3"
+#define KPSEVERSION "kpathsea version 6.3.4/dev"
 
 /* Define to 1 if the `closedir' function returns void instead of `int'. */
 #undef CLOSEDIR_VOID

Modified: branches/stable/source/src/texk/kpathsea/configure
===================================================================
--- branches/stable/source/src/texk/kpathsea/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -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.
+# Generated by GNU Autoconf 2.69 for Kpathsea 6.3.4/dev.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='Kpathsea'
 PACKAGE_TARNAME='kpathsea'
-PACKAGE_VERSION='6.3.3'
-PACKAGE_STRING='Kpathsea 6.3.3'
+PACKAGE_VERSION='6.3.4/dev'
+PACKAGE_STRING='Kpathsea 6.3.4/dev'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1339,7 +1339,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Kpathsea 6.3.3 to adapt to many kinds of systems.
+\`configure' configures Kpathsea 6.3.4/dev to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1409,7 +1409,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Kpathsea 6.3.3:";;
+     short | recursive ) echo "Configuration of Kpathsea 6.3.4/dev:";;
    esac
   cat <<\_ACEOF
 
@@ -1537,7 +1537,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Kpathsea configure 6.3.3
+Kpathsea configure 6.3.4/dev
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2376,7 +2376,7 @@
 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, which was
+It was created by Kpathsea $as_me 6.3.4/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2757,14 +2757,14 @@
 
 
 
-KPSEVERSION=6.3.3
+KPSEVERSION=6.3.4/dev
 
 
-KPSE_LT_VERSINFO=9:3:3
+KPSE_LT_VERSINFO=9:4:3
 
 
 
- WEB2CVERSION=" (TeX Live 2021)"
+ WEB2CVERSION=" (TeX Live 2022/dev)"
 
 
 am__api_version='1.16'
@@ -8068,7 +8068,7 @@
 
 # Define the identity of the package.
  PACKAGE='kpathsea'
- VERSION='6.3.3'
+ VERSION='6.3.4/dev'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14697,7 +14697,7 @@
 # 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, which was
+This file was extended by Kpathsea $as_me 6.3.4/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14763,7 +14763,7 @@
 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
+Kpathsea config.status 6.3.4/dev
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: branches/stable/source/src/texk/kpathsea/doc/kpathsea.info
===================================================================
--- branches/stable/source/src/texk/kpathsea/doc/kpathsea.info	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/doc/kpathsea.info	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-This is kpathsea.info, produced by makeinfo version 5.1 from
+This is kpathsea.info, produced by makeinfo version 6.7 from
 kpathsea.texi.
 
 This file documents the Kpathsea library for path searching.
@@ -37,7 +37,7 @@
 ****************
 
 This manual documents the Kpathsea library for path searching.  It
-corresponds to version 6.3.3, released in February 2021.
+corresponds to version 6.3.3, released in April 2021.
 
 * Menu:
 
@@ -62,7 +62,7 @@
 **************
 
 This manual corresponds to version 6.3.3 of the Kpathsea library,
-released in February 2021.
+released in April 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
@@ -293,7 +293,7 @@
 directory structure (TDS) standard.  For rationale and further
 explanation, please see those documents.  The GNU document is available
 from <https://gnu.org/prep/standards>.  The TDS document is available
-from <http://mirror.ctan.org/tds> (*note unixtex.ftp::).
+from <https://ctan.org/pkg/tds> (*note unixtex.ftp::).
 
    In short, here is a skeleton of the default directory structure,
 extracted from the TDS document:
@@ -3038,7 +3038,7 @@
 * !! 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 @@
                                                               (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 @@
 * --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 @@
                                                               (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 @@
                                                               (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 @@
 * 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 @@
 * 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 @@
                                                               (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 @@
 * 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 @@
 * 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,9 +3320,8 @@
 * 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)
@@ -3346,7 +3345,7 @@
 * 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)
@@ -3373,7 +3372,7 @@
                                                               (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.
@@ -3402,7 +3401,7 @@
 * 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)
@@ -3488,7 +3487,7 @@
                                                               (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)
@@ -3591,9 +3590,9 @@
                                                               (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)
@@ -3603,7 +3602,7 @@
 * 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)
@@ -3624,9 +3623,9 @@
 * 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.
@@ -3739,7 +3738,7 @@
 * 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)
@@ -3774,7 +3773,7 @@
                                                               (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)
@@ -3840,7 +3839,7 @@
                                                               (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)
@@ -3885,7 +3884,7 @@
 * 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)
@@ -3911,7 +3910,7 @@
 * 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)
@@ -3929,8 +3928,8 @@
                                                               (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)
@@ -3957,61 +3956,66 @@
 
 Tag Table:
 Node: Top1480
-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
+Node: Introduction2260
+Node: History4327
+Node: unixtex.ftp8923
+Node: Security10393
+Node: TeX directory structure12897
+Node: Path searching16936
+Node: Searching overview17894
+Node: Path sources21713
+Node: Config files22939
+Node: Path expansion28202
+Node: Default expansion29155
+Node: Variable expansion31225
+Node: Tilde expansion32626
+Node: Brace expansion33606
+Node: KPSE_DOT expansion34545
+Node: Subdirectory expansion35058
+Node: Casefolding search37406
+Node: Casefolding rationale38175
+Node: Casefolding examples39521
+Node: Filename database44567
+Node: ls-R45549
+Node: Filename aliases49225
+Node: Database format50403
+Node: Invoking kpsewhich51416
+Node: Path searching options52371
+Node: Specially-recognized files61969
+Node: Auxiliary tasks63324
+Node: Standard options67049
+Node: TeX support67405
+Node: Supported file formats68759
+Node: File lookup76427
+Node: Glyph lookup78176
+Node: Basic glyph lookup79300
+Node: Fontmap80180
+Node: Fallback font82709
+Node: Suppressing warnings83621
+Node: mktex scripts84748
+Node: mktex configuration85963
+Node: mktex script names91766
+Node: mktex script arguments93152
+Node: Programming94031
+Node: Programming overview94604
+Node: Calling sequence97465
+Node: Program-specific files103994
+Node: Programming with config files105017
+Node: Reporting bugs106604
+Node: Bug checklist107282
+Node: Mailing lists110751
+Node: Debugging111428
+Node: Logging116505
+Node: Common problems118372
+Node: Unable to find files118849
+Node: Slow path searching121259
+Node: Unable to generate fonts122634
+Node: TeX or Metafont failing125106
+Node: Index126308
 
 End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:

Modified: branches/stable/source/src/texk/kpathsea/doc/kpathsea.texi
===================================================================
--- branches/stable/source/src/texk/kpathsea/doc/kpathsea.texi	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/doc/kpathsea.texi	2021-06-17 21:27:03 UTC (rev 855)
@@ -3,7 +3,7 @@
 @settitle Kpathsea: A library for path searching
 
 @set version 6.3.3
- at set month-year February 2021
+ at set month-year April 2021
 
 @copying
 This file documents the Kpathsea library for path searching.
@@ -358,7 +358,7 @@
 @TeX{} directory structure (TDS) standard.  For rationale and further
 explanation, please see those documents.  The GNU document is
 available from @url{https://gnu.org/prep/standards}.  The TDS
-document is available from @url{http://mirror.ctan.org/tds}
+document is available from @url{https://ctan.org/pkg/tds}
 (@pxref{unixtex.ftp}).
 
 In short, here is a skeleton of the default directory structure,

Modified: branches/stable/source/src/texk/kpathsea/knj.c
===================================================================
--- branches/stable/source/src/texk/kpathsea/knj.c	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/knj.c	2021-06-17 21:27:03 UTC (rev 855)
@@ -117,7 +117,7 @@
     wchar_t *fnamew, modew[4];
     int i;
     unsigned char *fnn;
-    unsigned char *p;
+    unsigned char *p = NULL;
     size_t len;
 
     assert(filename && mode);
@@ -129,10 +129,23 @@
   /./ , /../, \.\, \..\ should be excluded. (2020/06/06)
   More than one adjacent directory separators should be
   excluded. (2020/10/24)
+  The "nul" device should be excluded. (2021/04/07).
 */
     fnn = xmalloc(len + 10);
-    p = strstr(filename, ".\\");
+
+    if (stricmp(filename + len - 3, "nul") == 0)
+       p = (unsigned char *)filename;
+    else if (stricmp(filename + len - 4, "nul:") == 0)
+       p = (unsigned char *)filename;
+    else if (stricmp(filename + len - 7, "nul.tex") == 0)
+       p = (unsigned char *)filename;
+    else if (stricmp(filename + len - 8, "nul:.tex") == 0)
+       p = (unsigned char *)filename;
+
     if (!p) {
+       p = strstr(filename, ".\\");
+    }
+    if (!p) {
        p = strstr(filename, "./");
     }
     if (!p && len > 2) {
@@ -159,6 +172,7 @@
     } else {
        strcpy (fnn, filename);
     }
+
     for (p = fnn; *p; p++) {
       if (*p == '/')
          *p = '\\';
@@ -196,7 +210,7 @@
     wchar_t *fnamew, modew[4];
     int i;
     unsigned char *fnn;
-    unsigned char *p;
+    unsigned char *p = NULL;
     size_t len;
 
     assert(filename && mode);
@@ -208,10 +222,23 @@
   /./ , /../, \.\, \..\ should be excluded. (2020/06/06)
   More than one adjacent directory separators should be
   excluded. (2020/10/24)
+  The "nul" device should be excluded. (2021/04/07).
 */
     fnn = xmalloc(len + 10);
-    p = strstr(filename, ".\\");
+
+    if (stricmp(filename + len - 3, "nul") == 0)
+       p = (unsigned char *)filename;
+    else if (stricmp(filename + len - 4, "nul:") == 0)
+       p = (unsigned char *)filename;
+    else if (stricmp(filename + len - 7, "nul.tex") == 0)
+       p = (unsigned char *)filename;
+    else if (stricmp(filename + len - 8, "nul:.tex") == 0)
+       p = (unsigned char *)filename;
+
     if (!p) {
+       p = strstr(filename, ".\\");
+    }
+    if (!p) {
        p = strstr(filename, "./");
     }
     if (!p && len > 2) {
@@ -238,6 +265,7 @@
     } else {
        strcpy (fnn, filename);
     }
+
     for (p = fnn; *p; p++) {
       if (*p == '/')
          *p = '\\';
@@ -635,8 +663,10 @@
 {
     wchar_t *wstr;
 
-    if (kpse->File_system_codepage != CP_UTF8)
-        return perror(str);
+    if (kpse->File_system_codepage != CP_UTF8) {
+        perror(str);
+        return;
+    }
 
     wstr = get_wstring_from_utf8(str, wstr=NULL);
     _wperror(wstr);

Modified: branches/stable/source/src/texk/kpathsea/readable.c
===================================================================
--- branches/stable/source/src/texk/kpathsea/readable.c	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/readable.c	2021-06-17 21:27:03 UTC (rev 855)
@@ -42,7 +42,7 @@
 {
   wchar_t *fnw;
   unsigned char *fnn;
-  unsigned char *p;
+  unsigned char *p = NULL;
   size_t len = strlen(fn);
 
   fnn = xmalloc(len + 10);
@@ -53,9 +53,21 @@
   /../, /./, \..\, \.\ should be excluded (2020/06/06)
   More than one adjacent directory separators should be
   excluded. (2020/10/24)
+  The "nul" device should be excluded. (2021/04/07).
 */
-  p = strstr(fn, ".\\");
+  if (stricmp(fn + len - 3, "nul") == 0)
+    p = (unsigned char *)fn;
+  else if (stricmp(fn + len - 4, "nul:") == 0)
+    p = (unsigned char *)fn;
+  else if (stricmp(fn + len - 7, "nul.tex") == 0)
+    p = (unsigned char *)fn;
+  else if (stricmp(fn + len - 8, "nul:.tex") == 0)
+    p = (unsigned char *)fn;
+
   if (!p) {
+    p = strstr(fn, ".\\");
+  }
+  if (!p) {
     p = strstr(fn, "./");
   }
   if (!p && len > 2) {

Modified: branches/stable/source/src/texk/kpathsea/texmf.cnf
===================================================================
--- branches/stable/source/src/texk/kpathsea/texmf.cnf	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/texmf.cnf	2021-06-17 21:27:03 UTC (rev 855)
@@ -196,6 +196,10 @@
 TEXINPUTS.latex209      = $TEXMFDOTDIR;$TEXMF/tex/{latex209,generic,latex,}//
 TEXINPUTS.olatex        = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
 
+% e-TeX.
+TEXINPUTS.elatex        = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.etex          = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+
 % MLTeX.
 TEXINPUTS.frlatex       = $TEXMFDOTDIR;$TEXMF/tex/{french,latex,generic,}//
 TEXINPUTS.frtex         = $TEXMFDOTDIR;$TEXMF/tex/{french,plain,generic,latex,}//
@@ -202,10 +206,6 @@
 TEXINPUTS.mllatex       = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
 TEXINPUTS.mltex         = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
 
-% e-TeX.
-TEXINPUTS.elatex        = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
-TEXINPUTS.etex          = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
-
 % pdfTeX.
 TEXINPUTS.pdfcslatex    = $TEXMFDOTDIR;$TEXMF/tex/{cslatex,csplain,latex,generic,}//
 TEXINPUTS.pdfcsplain    = $TEXMFDOTDIR;$TEXMF/tex/{csplain,plain,generic,latex,}//
@@ -268,7 +268,7 @@
 TEXINPUTS.ptex-ng   = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}//
 TEXINPUTS.platex-ng = $TEXMFDOTDIR;$TEXMF/tex/{uplatex,platex,latex,generic,}//
 
-% (e)up(La)TeX, and for upmpost
+% (e)up(La)TeX, and for upmpost.
 TEXINPUTS.uplatex     = $TEXMFDOTDIR;$TEXMF/tex/{uplatex,platex,latex,generic,}//
 TEXINPUTS.uplatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,uplatex,platex,latex,generic,}//
 TEXINPUTS.uptex   = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}//
@@ -275,17 +275,12 @@
 TEXINPUTS.euptex  = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}//
 TEX.upmpost = euptex
 
-% pBibTeX bibliographies and style files.
-BIBINPUTS.pbibtex       = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bib//
-BSTINPUTS.pbibtex       = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bst//
-
-% upBibTeX bibliographies and style files.
-BIBINPUTS.upbibtex      = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bib//
-BSTINPUTS.upbibtex      = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bst//
-
 % ConTeXt.
 TEXINPUTS.context       = $TEXMFDOTDIR;$TEXMF/tex/{context,plain,generic,}//
 
+% OpTeX.
+TEXINPUTS.optex         = $TEXMFDOTDIR;$TEXMF/tex/{optex,plain,generic,}//
+
 % jadetex.
 TEXINPUTS.jadetex       = $TEXMFDOTDIR;$TEXMF/tex/{jadetex,latex,generic,latex,}//
 TEXINPUTS.pdfjadetex    = $TEXMFDOTDIR;$TEXMF/tex/{jadetex,latex,generic,latex,}//
@@ -303,9 +298,6 @@
 % Earlier entries override later ones, so put this generic one last.
 TEXINPUTS               = $TEXMFDOTDIR;$TEXMF/tex/{$progname,generic,latex,}//
 
-% ttf2tfm.
-TTF2TFMINPUTS =                 $TEXMFDOTDIR;$TEXMF/ttf2pk//
-
 % Metafont, MetaPost inputs.
 MFINPUTS = $TEXMFDOTDIR;$TEXMF/metafont//;{$TEXMF/fonts,$VARTEXFONTS}/source//
 MPINPUTS = $TEXMFDOTDIR;$TEXMF/metapost//
@@ -367,6 +359,14 @@
 MLBIBINPUTS = $TEXMFDOTDIR;$TEXMF/bibtex/bib/{mlbib,}//
 MLBSTINPUTS = $TEXMFDOTDIR;$TEXMF/bibtex/{mlbst,bst}//
 
+% pBibTeX bibliographies and style files.
+BIBINPUTS.pbibtex       = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bib//
+BSTINPUTS.pbibtex       = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bst//
+
+% upBibTeX bibliographies and style files.
+BIBINPUTS.upbibtex      = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bib//
+BSTINPUTS.upbibtex      = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bst//
+
 % .ris and .bltxml bibliography formats.
 RISINPUTS = $TEXMFDOTDIR;$TEXMF/biber/ris//
 BLTXMLINPUTS = $TEXMFDOTDIR;$TEXMF/biber/bltxml//
@@ -482,6 +482,9 @@
 TW_LIBPATH = $TEXMFCONFIG/texworks
 TW_INIPATH = $TW_LIBPATH
 
+% ttf2tfm.
+TTF2TFMINPUTS = $TEXMFDOTDIR;$TEXMF/ttf2pk//
+
 % For security, do not look in . for dvipdfmx.cfg, since the D option
 % would allow command execution.
 DVIPDFMXINPUTS = $TEXMF/dvipdfmx
@@ -832,7 +835,7 @@
 max_in_open = 15        % simultaneous input files and error insertions, 
                         % also applies to MetaPost
 param_size = 10000      % simultaneous macro parameters, also applies to MP
-save_size  = 80000      % for saving values outside current group
+save_size  = 200000     % for saving values outside current group
 stack_size = 5000       % simultaneous input sources
 
 % Limit on recursive expansion calls so TeX has a chance to quit nicely

Modified: branches/stable/source/src/texk/kpathsea/version.ac
===================================================================
--- branches/stable/source/src/texk/kpathsea/version.ac	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/kpathsea/version.ac	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-dnl $Id: version.ac 57769 2021-02-17 03:03:54Z karl $
+dnl $Id: version.ac 58897 2021-04-17 21:02:42Z karl $
 dnl   Copyright 2016-2021 Karl Berry <tex-live at tug.org>
 dnl   Copyright 2011-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
@@ -20,4 +20,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl This file is m4-included from configure.ac.
-m4_define([kpse_version], [6.3.3])
+m4_define([kpse_version], [6.3.4/dev])

Modified: branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm
===================================================================
--- branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/tests/TeXLive/TLConfig.pm	2021-06-17 21:27:03 UTC (rev 855)
@@ -5,7 +5,7 @@
 
 package TeXLive::TLConfig;
 
-my $svnrev = '$Revision: 57875 $';
+my $svnrev = '$Revision: 59122 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -34,6 +34,7 @@
     $BlockSize
     $Archive
     $TeXLiveServerURL
+    $TeXLiveServerURLRegexp
     $TeXLiveServerPath
     $TeXLiveURL
     @CriticalPackagesList
@@ -100,7 +101,8 @@
 our $MaxLWPReinitCount = 10;
 
 our $Archive = "archive";
-our $TeXLiveServerURL = "http://mirror.ctan.org";
+our $TeXLiveServerURL = "https://mirror.ctan.org";
+our $TeXLiveServerURLRegexp = 'https?://mirror\.ctan\.org';
 # from 2009 on we try to put them all into tlnet directly without any
 # release year since we hope that we can switch over to 2010 on the fly
 # our $TeXLiveServerPath = "systems/texlive/tlnet/$ReleaseYear";
@@ -122,10 +124,13 @@
 our @AcceptedFallbackDownloaders = qw/curl wget/;
 our %FallbackDownloaderProgram = ( 'wget' => 'wget', 'curl' => 'curl');
 our %FallbackDownloaderArgs = (
-  'curl' => ['--user-agent', 'texlive/curl', '--retry', '4', '--retry-delay', '5',
-             '--fail', '--location',
-             '--connect-timeout', "$NetworkTimeout", '--silent', '--output'],
+  'curl' => ['--user-agent', 'texlive/curl',
+             '--retry', '4', '--retry-delay', '4',
+             '--connect-timeout', "$NetworkTimeout", 
+             '--insecure',
+             '--fail', '--location', '--silent', '--output'],
   'wget' => ['--user-agent=texlive/wget', '--tries=4',
+             '--no-check-certificate',
              "--timeout=$NetworkTimeout", '-q', '-O'],
 );
 # the way we package things on the web
@@ -340,10 +345,11 @@
 These values specify where to find packages.
 
 =item C<$TeXLive::TLConfig::TeXLiveServerURL>
+=item C<$TeXLive::TLConfig::TeXLiveServerURLRegexp>
 =item C<$TeXLive::TLConfig::TeXLiveServerPath>
 
 C<TeXLiveURL> is concatenated from these values, with a string between.
-The defaults are respectively, C<http://mirror.ctan.org> and
+The defaults are respectively, C<https://mirror.ctan.org> and
 C<systems/texlive/tlnet/>.
 
 =item C<@TeXLive::TLConfig::CriticalPackagesList>

Modified: branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm
===================================================================
--- branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/tests/TeXLive/TLUtils.pm	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,3 @@
-# $Id: TLUtils.pm 58139 2021-03-05 00:26:37Z preining $
 # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live.
 # Copyright 2007-2021 Norbert Preining, Reinhard Kotucha
 # This file is licensed under the GNU General Public License version 2
@@ -6,7 +5,7 @@
 
 package TeXLive::TLUtils;
 
-my $svnrev = '$Revision: 58139 $';
+my $svnrev = '$Revision: 59149 $';
 my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown";
 sub module_revision { return $_modulerevision; }
 
@@ -656,8 +655,8 @@
 
 =item C<system_pipe($prog, $infile, $outfile, $removeIn, @extraargs)>
 
-Runs C<$prog> with C<@extraargs> redirecting stdin from C<$infile>, stdout to C<$outfile>.
-Removes C<$infile> if C<$removeIn> is true.
+Runs C<$prog> with C<@extraargs> redirecting stdin from C<$infile>,
+stdout to C<$outfile>. Removes C<$infile> if C<$removeIn> is true.
 
 =cut
 
@@ -2394,7 +2393,7 @@
   # quoting issues.
   # so fall back on chdir in Perl.
   #
-  debug("unpacking $tarfile in $targetdir\n");
+  debug("TLUtils::untar: unpacking $tarfile in $targetdir\n");
   my $cwd = cwd();
   chdir($targetdir) || die "chdir($targetdir) failed: $!";
 
@@ -2750,7 +2749,7 @@
       return \*RETFH;
     } else {
       if (-r $filetoopen) {
-        copy ($filetoopen, $par);
+        copy ("-f", "-L", $filetoopen, $dest);
         return 1;
       }
       return 0;
@@ -2910,7 +2909,7 @@
 =cut
 
 sub nulldev {
-  return (&win32)? 'nul' : '/dev/null';
+  return (&win32()) ? 'nul' : '/dev/null';
 }
 
 =item C<get_full_line ($fh)>
@@ -3913,16 +3912,59 @@
 default (specified in L<$TLConfig::TexLiveServerURL>) if we get a
 response, else the empty string.
 
-Neither C<TL_DOWNLOAD_PROGRAM> nor <TL_DOWNLOAD_ARGS> is honored (see
-L<download_file>), since certain options have to be set to do the job
-and the program has to be C<wget> since we parse the output.
+Use C<curl> if it is listed as a C<working_downloader>, else C<wget>,
+else give up. We can't support arbitrary downloaders here, as we do for
+regular package downloads, since certain options have to be set and the
+output has to be parsed.
 
+We try invoking the program three times (hardwired).
+
 =cut
 
 sub query_ctan_mirror {
+  my @working_downloaders = @{$::progs{'working_downloaders'}};
+  ddebug("query_ctan_mirror: working_downloaders: @working_downloaders\n");
+  if (TeXLive::TLUtils::member("curl", @working_downloaders)) {
+    return query_ctan_mirror_curl();
+  } elsif (TeXLive::TLUtils::member("wget", @working_downloaders)) {
+    return query_ctan_mirror_wget();
+  } else {
+    return;
+  }
+}
+
+# curl will follow the redirect chain for us.
+# 
+sub query_ctan_mirror_curl {
+  my $max_trial = 3;
+  my $warg = (win32() ? "-w %{url_effective} " : "-w '%{url_effective}' ");
+  for (my $i = 1; $i <= $max_trial; $i++) {
+    # -L -> follow redirects
+    # -s -> silent
+    # -w -> what to output after completion
+    my $cmd = "$::progs{'curl'} -Ls "
+              . "-o " . nulldev() . " "
+              . $warg
+              . "--connect-timeout $NetworkTimeout "
+              . "--max-time $NetworkTimeout "
+              . $TeXLiveServerURL;
+    ddebug("query_ctan_mirror_curl: cmd: $cmd\n");
+    my $url = `$cmd`;
+    if (length $url) {
+      # remove trailing slashes
+      $url =~ s,/*$,,;
+      ddebug("query_ctan_mirror_curl: returning url: $url\n");
+      return $url;
+    }
+    sleep(1);
+  }
+  return;
+}
+
+sub query_ctan_mirror_wget {
   my $wget = $::progs{'wget'};
   if (!defined ($wget)) {
-    tlwarn("query_ctan_mirror: Programs not set up, trying wget\n");
+    tlwarn("query_ctan_mirror_wget: Programs not set up, trying wget\n");
     $wget = "wget";
   }
 
@@ -3929,10 +3971,10 @@
   # we need the verbose output, so no -q.
   # do not reduce retries here, but timeout still seems desirable.
   my $mirror = $TeXLiveServerURL;
-  my $cmd = "$wget $mirror --timeout=$NetworkTimeout -O "
-            . (win32() ? "nul" : "/dev/null") . " 2>&1";
+  my $cmd = "$wget $mirror --timeout=$NetworkTimeout "
+            . "-O " . nulldev() . " 2>&1";
+  ddebug("query_ctan_mirror_wget: cmd is $cmd\n");
 
-  #
   # since we are reading the output of wget to find a mirror
   # we have to make sure that the locale is unset
   my $saved_lcall;
@@ -3950,6 +3992,7 @@
     foreach (@out) {
       if (m/^Location: (\S*)\s*.*$/) {
         (my $mhost = $1) =~ s,/*$,,;  # remove trailing slashes since we add it
+        ddebug("query_ctan_mirror_wget: returning url: $mhost\n");
         return $mhost;
       }
     }
@@ -4013,9 +4056,10 @@
 
 sub give_ctan_mirror_base {
   # only one backbone has existed for a while (2018).
-  my @backbone = qw!http://www.ctan.org/tex-archive!;
+  my @backbone = qw!https://www.ctan.org/tex-archive!;
 
   # start by selecting a mirror and test its operationality
+  ddebug("give_ctan_mirror_base: calling query_ctan_mirror\n");
   my $mirror = query_ctan_mirror();
   if (!defined($mirror)) {
     # three times calling mirror.ctan.org did not give anything useful,
@@ -4541,8 +4585,12 @@
 }
 
 

-=item C<check_sys_user_mode($user,$sys,$tmfc, $tmfsc, $tmfv, $tmfsv)>
+=item C<setup_sys_user_mode($prg, $optsref, $tmfc, $tmfsc, $tmfv, $tmfsv)>
 
+Return two-element list C<($texmfconfig,$texmfvar)> of which directories
+to use, either user or sys. If C<$prg> is C<mktexfmt>, and the system
+dirs are writable, use them even if we are in user mode.
+
 =cut
 
 sub setup_sys_user_mode {
@@ -4569,7 +4617,8 @@
       exit(1);
     }
     if (!$optsref->{'sys'}) {
-      print STDERR "$prg [WARNING]: hidden sys mode found, switching to sys mode.\n" if (!$optsref->{'quiet'});
+      print STDERR "$prg [WARNING]: hidden sys mode found, switching to sys mode.\n"
+        if (!$optsref->{'quiet'});
       $optsref->{'sys'} = 1;
     }
   }
@@ -4579,16 +4628,42 @@
     # we are running as updmap-sys, make sure that the right tree is used
     $texmfconfig = $TEXMFSYSCONFIG;
     $texmfvar    = $TEXMFSYSVAR;
+    &debug("TLUtils::setup_sys_user_mode: sys mode\n");
+
   } elsif ($optsref->{'user'}) {
     $texmfconfig = $TEXMFCONFIG;
     $texmfvar    = $TEXMFVAR;
+    &debug("TLUtils::setup_sys_user_mode: user mode\n");
+
+    # mktexfmt is run (accidentally or on purpose) by a user with
+    # missing formats; we want to put the resulting format dumps in
+    # TEXMFSYSVAR if possible, so that future format updates will just
+    # work. Until 2021, they were put in TEXMFVAR, causing problems.
+    # 
+    # We only do this for mktexfmt, not fmtutil; if fmtutil is called
+    # explicitly with fmtutil -user, ok, do what they said to do.
+    #
+    if ($prg eq "mktexfmt") {
+      my $switchit = 0;
+      if (-d "$TEXMFSYSVAR/web2c") {
+        $switchit = 1 if (-w "$TEXMFSYSVAR/web2c");
+      } elsif (-d $TEXMFSYSVAR && -w $TEXMFSYSVAR) {
+        $switchit = 1;
+      }
+      if ($switchit) {
+        $texmfvar = $TEXMFSYSVAR;
+        &ddebug("  switched to $texmfvar for mktexfmt\n");
+      }
+    }
   } else {
-    print STDERR "" .
+    print STDERR
       "$prg [ERROR]: Either -sys or -user mode is required.\n" .
       "$prg [ERROR]: In nearly all cases you should use $prg -sys.\n" .
       "$prg [ERROR]: For special cases see https://tug.org/texlive/scripts-sys-user.html\n" ;
     exit(1);
   }
+
+  &debug("  returning: ($texmfconfig,$texmfvar)\n");
   return ($texmfconfig, $texmfvar);
 }
 

Modified: branches/stable/source/src/texk/web2c/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,37 @@
+2021-06-15  Karl Berry  <karl at freefriends.org>
+
+	* dvicopy.web: erroneous '/'; also switch to "Unix" in text.
+
+2021-06-06  Andreas Scherer  <https://ascherer.github.io>
+
+	* ctangleboot.cin,
+	* cwebboot.cin: CWEB release 4.4.
+
+2021-05-18  Karl Berry  <karl at freefriends.org>
+
+	* README,
+	* PROJECTS: updates.
+
+2021-05-07  Karl Berry  <karl at freefriends.org>
+
+	* tex.ch (sup_save_size): increase to 30000000
+	(could be max_halfword). Found by Christian Schenk,
+	tex-live 18 Mar 2021 18:39:04.
+
+2021-05-07  Karl Berry  <karl at freefriends.org>
+
+	* doc/web2c.texi,
+	* doc/ref.txi: typos.
+
+2021-04-13  Andreas Scherer  <https://ascherer.github.io>
+
+	* ctangleboot.cin,
+	* cwebboot.cin: CWEB release 4.3.
+
+2021-03-24  Andreas Scherer  <https://ascherer.github.io>
+
+	* help.h: New options for CTANGLE, CWEAVE and CTWILL.
+
 2021-03-23  Karl Berry  <karl at tug.org>
 
 	* TL'21.
@@ -8,6 +42,11 @@
 	* doc/webman.tex: add these Knuth files here, since nowhere
 	else seems better. PDF output for them is in the knuth-pdf package.
 
+2021-03-06  Andreas Scherer  <https://ascherer.github.io>
+
+	* Makefile.in,
+	* am/cweb.am: Patch refsort and twinx with changefiles.
+
 2021-02-25  Andreas Scherer  <https://ascherer.github.io>
 
 	* ctangleboot.cin,

Modified: branches/stable/source/src/texk/web2c/Makefile.in
===================================================================
--- branches/stable/source/src/texk/web2c/Makefile.in	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/Makefile.in	2021-06-17 21:27:03 UTC (rev 855)
@@ -21196,10 +21196,10 @@
 	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) cweave cweav-w2c
 ctwill.c: ctangle$(EXEEXT) cwebdir/comm-w2c.h cwebdir/cweave.w cwebdir/prod-twill.w cwebdir/ctwill-w2c.ch
 	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) cweave ctwill-w2c ctwill.c
-ctwill-refsort.c: ctangle$(EXEEXT) cwebdir/refsort.w
-	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) refsort - ctwill-refsort.c
-ctwill-twinx.c: ctangle$(EXEEXT) cwebdir/twinx.w
-	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) twinx - ctwill-twinx.c
+ctwill-refsort.c: ctangle$(EXEEXT) cwebdir/refsort.w cwebdir/refsort.ch
+	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) refsort refsort ctwill-refsort.c
+ctwill-twinx.c: ctangle$(EXEEXT) cwebdir/twinx.w cwebdir/twinx.ch
+	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) twinx twinx ctwill-twinx.c
 tie.c: ctangle$(EXEEXT) tiedir/tie.w tiedir/tie-w2c.ch
 	$(ctangle_silent)CWEBINPUTS=$(srcdir)/tiedir $(ctangle) tie.w tie-w2c.ch
 ctiedir/ctie.log: ctie$(EXEEXT)

Modified: branches/stable/source/src/texk/web2c/PROJECTS
===================================================================
--- branches/stable/source/src/texk/web2c/PROJECTS	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/PROJECTS	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,41 +1,28 @@
+$Id: PROJECTS 59252 2021-05-18 16:58:12Z karl $
+This file is public domain.
+
 Here are some things left to do.  If you would like to contribute, send
-mail to me (olaf at infovore.xs4all.nl) first.
+mail to tex-k at tug.org (https://lists.tug.org/tex-k).
 
-* Use binary mode for all files (but do obey end-of-line conventions for
-  the specific platforms.
+* TeX/MF: change prompt from `\n*' (for simpler cut-and-paste).
 
-* Give TeX more options: 
-  output filename:lineno: msg on error
-  change prompt from `\n*' (for simpler cut-and-paste)
-
 * Have bibtex -verbose print full pathnames.
 
-* Make TeX--XeT a configure-time or runtime option?
-
-* Deal with the configure tests that prevent cross-compilation:
-  - Remove use of schar (in dvicopy, mf, pktogf, and tangle).
-  - Learn endianness at runtime, include both Big and LittleEndian
-    versions in code, call appropriate one.
-  - Figure out what to do about the sizeof long test.
-
 * Reallocate memory arrays as needed instead of just allocating once at
   the beginning.
 
-* Possibly use spiff when doing the triptrap comparisons, so acceptable
-  differences can be eliminated.
-  
 * Make web2c handle fields correctly, i.e., to put the field identifier
   in the symbol table of the type, instead of the global symbol table. 
   This would simplify the GFtoDVI change file a fair amount.
 
 * Make web2c handle variant records.  This would make the TeX, Metafont,
-  and GFtoDVI change files all simpler.
+  and GFtoDVI change files simpler.
 
 * Implement overflow checking for adding and subtracting dimensions.
   According to Knuth "a few dozen checks" would be needed (section 104).
   Knuth calls the chances of it occuring unlikely, but unfortunately you
   will get a bad DVI file when it does.  The following source demonstrates
-  the problem.
+  the problem. (Reported many times.)
 %
 \newcount \loopcount
 \newcount \limit
@@ -60,4 +47,3 @@
 \iftrue
 \repeat
 \end
-%

Modified: branches/stable/source/src/texk/web2c/README
===================================================================
--- branches/stable/source/src/texk/web2c/README	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/README	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-$Id: README 39724 2016-02-15 19:00:21Z karl $
+$Id: README 59252 2021-05-18 16:58:12Z karl $
 (This file is public domain.)
 
 This directory contains Web2c, a system which converts TeX, Metafont,
@@ -9,9 +9,9 @@
 Web2c no longer exists as a separate distribution.  It is maintained as
 part of TeX Live (http://tug.org/texlive).
 
-See `NEWS' for changes by release, `ChangeLog` for all changes.
-See `INSTALL' for installation instructions.
-See `PROJECTS' for future improvements you might like to work on.
+See `NEWS' for changes by release,
+`ChangeLog` for all changes.
+`PROJECTS' for some old rainy-day ideas.
 
 If present, see *dir/README for more details on each package.
 

Modified: branches/stable/source/src/texk/web2c/am/cweb.am
===================================================================
--- branches/stable/source/src/texk/web2c/am/cweb.am	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/am/cweb.am	2021-06-17 21:27:03 UTC (rev 855)
@@ -25,13 +25,13 @@
 DISTCLEANFILES += ctwill.c
 
 nodist_ctwill_refsort_SOURCES = ctwill-refsort.c
-ctwill-refsort.c: ctangle$(EXEEXT) cwebdir/refsort.w
-	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) refsort - ctwill-refsort.c
+ctwill-refsort.c: ctangle$(EXEEXT) cwebdir/refsort.w cwebdir/refsort.ch
+	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) refsort refsort ctwill-refsort.c
 DISTCLEANFILES += ctwill-refsort.c
 
 nodist_ctwill_twinx_SOURCES = ctwill-twinx.c
-ctwill-twinx.c: ctangle$(EXEEXT) cwebdir/twinx.w
-	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) twinx - ctwill-twinx.c
+ctwill-twinx.c: ctangle$(EXEEXT) cwebdir/twinx.w cwebdir/twinx.ch
+	$(ctangle_silent)CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) twinx twinx ctwill-twinx.c
 DISTCLEANFILES += ctwill-twinx.c
 
 nodist_tie_SOURCES = tie.c

Modified: branches/stable/source/src/texk/web2c/configure
===================================================================
--- branches/stable/source/src/texk/web2c/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Web2C 2021.
+# Generated by GNU Autoconf 2.69 for Web2C 2022/dev.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='Web2C'
 PACKAGE_TARNAME='web2c'
-PACKAGE_VERSION='2021'
-PACKAGE_STRING='Web2C 2021'
+PACKAGE_VERSION='2022/dev'
+PACKAGE_STRING='Web2C 2022/dev'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1618,7 +1618,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Web2C 2021 to adapt to many kinds of systems.
+\`configure' configures Web2C 2022/dev to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1692,7 +1692,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Web2C 2021:";;
+     short | recursive ) echo "Configuration of Web2C 2022/dev:";;
    esac
   cat <<\_ACEOF
 
@@ -1911,7 +1911,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Web2C configure 2021
+Web2C configure 2022/dev
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -3000,7 +3000,7 @@
 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, which was
+It was created by Web2C $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3381,7 +3381,7 @@
 
 
 
-WEB2CVERSION=2021
+WEB2CVERSION=2022/dev
 
 
 am__api_version='1.16'
@@ -8685,7 +8685,7 @@
 
 # Define the identity of the package.
  PACKAGE='web2c'
- VERSION='2021'
+ VERSION='2022/dev'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -23679,7 +23679,7 @@
 Report bugs to <bug-libtool at gnu.org>."
 
 lt_cl_version="\
-Web2C config.lt 2021
+Web2C config.lt 2022/dev
 configured by $0, generated by GNU Autoconf 2.69.
 
 Copyright (C) 2011 Free Software Foundation, Inc.
@@ -27092,7 +27092,7 @@
 # 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, which was
+This file was extended by Web2C $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -27162,7 +27162,7 @@
 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
+Web2C config.status 2022/dev
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: branches/stable/source/src/texk/web2c/ctangleboot.cin
===================================================================
--- branches/stable/source/src/texk/web2c/ctangleboot.cin	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/ctangleboot.cin	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 #line 66 "cwebdir/ctangle.w"
 
 /*4:*/
-#line 53 "cwebdir/comm-w2c.h"
+#line 51 "cwebdir/comm-w2c.h"
 
 #ifndef HAVE_GETTEXT
 #define HAVE_GETTEXT 0
@@ -11,7 +11,7 @@
 #if HAVE_GETTEXT
 #include <libintl.h> 
 #else
-#define gettext(A) A
+#define gettext(a) a
 #endif
 
 #include <ctype.h>  
@@ -25,10 +25,10 @@
 /*:4*/
 #line 67 "cwebdir/ctangle.w"
 
-#define banner "This is CTANGLE, Version 4.2" \
+#define banner "This is CTANGLE, Version 4.4" \
  \
 
-#define _(S) gettext(S)  \
+#define _(s) gettext(s)  \
 
 #define and_and 04
 #define lt_lt 020
@@ -46,13 +46,19 @@
 #define period_ast 026
 #define minus_gt_ast 027 \
 
-#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 compress(c) if(loc++<=limit) return c \
 
+#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 isxalpha(c) ((c) =='_'||(c) =='$')  \
+
+#define ishigh(c) ((eight_bits) (c) > 0177)  \
+ \
+
 #define max_include_depth 10 \
 
 #define max_file_name_length 1024
@@ -63,7 +69,7 @@
 #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 print_id(c) term_write((c) ->byte_start,length(c) ) 
 #define llink link
 #define rlink dummy.Rlink
 #define root name_dir->rlink \
@@ -73,7 +79,7 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless {if(history==spotless) history= harmless_message;}
+#define mark_harmless if(history==spotless) history= harmless_message
 #define mark_error history= error_message
 #define confusion(s) fatal(_("! This can't happen: ") ,s)  \
  \
@@ -80,38 +86,38 @@
 
 #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 temporary_output flags['t']
-#define make_xrefs flags['x'] \
+#define make_xrefs flags['x']
+#define check_for_change flags['c'] \
 
 #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 term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
+#define buf_size 1000
+#define longest_name 10000 \
+
+#define long_buf_size (buf_size+longest_name) 
 #define max_bytes 1000000 \
 
-#define max_toks 1000000
 #define max_names 10239 \
 
-#define max_sections 4000
+#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 max_toks 1000000
 #define equiv equiv_or_xref \
 
+#define macro 0
 #define section_flag max_texts \
 
 #define string 02
+#define constant 03
 #define join 0177
 #define output_defs_flag (2*024000-1)  \
 
+#define stack_size 50
 #define cur_end cur_state.end_field
 #define cur_byte cur_state.byte_field
 #define cur_name cur_state.name_field
@@ -128,9 +134,12 @@
 #define verbatim 4 \
 
 #define max_files 256
+#define C_printf(c,a) fprintf(C_file,c,a) 
+#define C_putc(c) putc(c,C_file)  \
+
 #define translit_length 10 \
 
-#define ignore 0
+#define ignore 00
 #define ord 0302
 #define control_text 0303
 #define translit_code 0304
@@ -141,18 +150,14 @@
 #define section_name 0311
 #define new_section 0312 \
 
-#define constant 03 \
+#define app_repl(c) {if(tok_ptr==tok_mem_end) overflow(_("token") ) ;*(tok_ptr++) = c;} \
 
-#define isxalpha(c) ((c) =='_'||(c) =='$')  \
+#define store_id(a) a= id_lookup(id_first,id_loc,0) -name_dir; \
+app_repl((a/0400) +0200) ; \
+app_repl(a%0400) ; \
 
-#define ishigh(c) ((eight_bits) (c) > 0177)  \
- \
+#define keep_digit_separators flags['k'] \
 
-#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;} \
-
 #define max_banner 50 \
 
 
@@ -159,7 +164,7 @@
 #line 68 "cwebdir/ctangle.w"
 
 /*3:*/
-#line 35 "cwebdir/comm-w2c.h"
+#line 33 "cwebdir/comm-w2c.h"
 
 typedef bool boolean;
 typedef uint8_t eight_bits;
@@ -179,7 +184,7 @@
 extern char*id_loc;
 
 /*:5*//*6:*/
-#line 105 "cwebdir/comm-w2c.h"
+#line 109 "cwebdir/comm-w2c.h"
 
 extern char buffer[];
 extern char*buffer_end;
@@ -187,7 +192,7 @@
 extern char*limit;
 
 /*:6*//*7:*/
-#line 122 "cwebdir/comm-w2c.h"
+#line 126 "cwebdir/comm-w2c.h"
 
 extern int include_depth;
 extern FILE*file[];
@@ -204,7 +209,7 @@
 extern boolean web_file_open;
 
 /*:7*//*9:*/
-#line 143 "cwebdir/comm-w2c.h"
+#line 147 "cwebdir/comm-w2c.h"
 
 extern sixteen_bits section_count;
 extern boolean changed_section[];
@@ -212,7 +217,7 @@
 extern boolean print_where;
 
 /*:9*//*10:*/
-#line 157 "cwebdir/comm-w2c.h"
+#line 161 "cwebdir/comm-w2c.h"
 
 typedef struct name_info{
 char*byte_start;
@@ -237,12 +242,12 @@
 extern hash_pointer h;
 
 /*:10*//*12:*/
-#line 201 "cwebdir/comm-w2c.h"
+#line 205 "cwebdir/comm-w2c.h"
 
 extern int history;
 
 /*:12*//*14:*/
-#line 218 "cwebdir/comm-w2c.h"
+#line 222 "cwebdir/comm-w2c.h"
 
 extern int argc;
 extern char**argv;
@@ -254,7 +259,7 @@
 extern const char*use_language;
 
 /*:14*//*15:*/
-#line 235 "cwebdir/comm-w2c.h"
+#line 237 "cwebdir/comm-w2c.h"
 
 extern FILE*C_file;
 extern FILE*tex_file;
@@ -264,7 +269,7 @@
 extern FILE*check_file;
 
 /*:15*//*115:*/
-#line 473 "cwebdir/ctang-w2c.ch"
+#line 481 "cwebdir/ctang-w2c.ch"
 
 extern char cb_banner[];
 
@@ -280,8 +285,9 @@
 }text;
 typedef text*text_pointer;
 
+#line 66 "cwebdir/ctang-w2c.ch"
 /*:19*//*31:*/
-#line 269 "cwebdir/ctangle.w"
+#line 274 "cwebdir/ctangle.w"
 
 typedef struct{
 eight_bits*end_field;
@@ -296,7 +302,7 @@
 #line 70 "cwebdir/ctangle.w"
 
 /*20:*/
-#line 129 "cwebdir/ctangle.w"
+#line 131 "cwebdir/ctangle.w"
 
 static text text_info[max_texts];
 static text_pointer text_info_end= text_info+max_texts-1;
@@ -306,12 +312,12 @@
 static eight_bits*tok_ptr;
 
 /*:20*//*26:*/
-#line 198 "cwebdir/ctangle.w"
+#line 200 "cwebdir/ctangle.w"
 
 static text_pointer last_unnamed;
 
 /*:26*//*32:*/
-#line 285 "cwebdir/ctangle.w"
+#line 291 "cwebdir/ctangle.w"
 
 static output_state cur_state;
 
@@ -320,18 +326,18 @@
 static stack_pointer stack_ptr;
 
 /*:32*//*37:*/
-#line 361 "cwebdir/ctangle.w"
+#line 367 "cwebdir/ctangle.w"
 
 static int cur_val;
 
 /*:37*//*42:*/
-#line 452 "cwebdir/ctangle.w"
+#line 458 "cwebdir/ctangle.w"
 
 static eight_bits out_state;
 static boolean protect;
 
 /*:42*//*45:*/
-#line 483 "cwebdir/ctangle.w"
+#line 489 "cwebdir/ctangle.w"
 
 static name_pointer output_files[max_files];
 static name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -339,33 +345,33 @@
 static char output_file_name[longest_name+1];
 
 /*:45*//*52:*/
-#line 582 "cwebdir/ctangle.w"
+#line 589 "cwebdir/ctangle.w"
 
 static boolean output_defs_seen= false;
 
 /*:52*//*57:*/
-#line 691 "cwebdir/ctangle.w"
+#line 701 "cwebdir/ctangle.w"
 
 static char translit[128][translit_length];
 
 /*:57*//*62:*/
-#line 770 "cwebdir/ctangle.w"
+#line 777 "cwebdir/ctangle.w"
 
 static eight_bits ccode[256];
 
 /*:62*//*66:*/
-#line 830 "cwebdir/ctangle.w"
+#line 837 "cwebdir/ctangle.w"
 
 static boolean comment_continues= false;
 
 /*:66*//*68:*/
-#line 869 "cwebdir/ctangle.w"
+#line 874 "cwebdir/ctangle.w"
 
 static name_pointer cur_section_name;
 static boolean no_where;
 
 /*:68*//*82:*/
-#line 1182 "cwebdir/ctangle.w"
+#line 1188 "cwebdir/ctangle.w"
 
 static text_pointer cur_text;
 static eight_bits next_control;
@@ -374,7 +380,7 @@
 #line 71 "cwebdir/ctangle.w"
 
 /*8:*/
-#line 137 "cwebdir/comm-w2c.h"
+#line 141 "cwebdir/comm-w2c.h"
 
 extern boolean get_line(void);
 extern void check_complete(void);
@@ -381,12 +387,12 @@
 extern void reset_input(void);
 
 /*:8*//*11:*/
-#line 180 "cwebdir/comm-w2c.h"
+#line 184 "cwebdir/comm-w2c.h"
 
 extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
 extern name_pointer id_lookup(const char*,const char*,char);
 
-extern name_pointer section_lookup(char*,char*,int);
+extern name_pointer section_lookup(char*,char*,boolean);
 extern void init_node(name_pointer);
 extern void init_p(name_pointer,eight_bits);
 extern void print_prefix_name(name_pointer);
@@ -394,7 +400,7 @@
 extern void sprint_section_name(char*,name_pointer);
 
 /*:11*//*13:*/
-#line 204 "cwebdir/comm-w2c.h"
+#line 208 "cwebdir/comm-w2c.h"
 
 extern int wrap_up(void);
 extern void err_print(const char*);
@@ -402,7 +408,7 @@
 extern void overflow(const char*);
 
 /*:13*//*16:*/
-#line 244 "cwebdir/comm-w2c.h"
+#line 246 "cwebdir/comm-w2c.h"
 
 extern void common_init(void);
 extern void print_stats(void);
@@ -409,35 +415,35 @@
 extern void cb_show_banner(void);
 
 /*:16*//*30:*/
-#line 241 "cwebdir/ctangle.w"
+#line 246 "cwebdir/ctangle.w"
 static void store_two_bytes(sixteen_bits);
 
 /*:30*//*35:*/
-#line 324 "cwebdir/ctangle.w"
+#line 330 "cwebdir/ctangle.w"
 
 static void push_level(name_pointer);
 static void pop_level(boolean);
 
 /*:35*//*39:*/
-#line 397 "cwebdir/ctangle.w"
+#line 403 "cwebdir/ctangle.w"
 static void get_output(void);
 
 /*:39*//*44:*/
-#line 473 "cwebdir/ctangle.w"
+#line 479 "cwebdir/ctangle.w"
 static void flush_buffer(void);
 
 /*:44*//*49:*/
-#line 549 "cwebdir/ctangle.w"
+#line 556 "cwebdir/ctangle.w"
 static void phase_two(void);
 
 /*:49*//*53:*/
-#line 585 "cwebdir/ctangle.w"
+#line 592 "cwebdir/ctangle.w"
 
 static void output_defs(void);
 static void out_char(eight_bits);
 
 /*:53*//*65:*/
-#line 810 "cwebdir/ctangle.w"
+#line 817 "cwebdir/ctangle.w"
 
 static eight_bits skip_ahead(void);
 static boolean skip_comment(boolean);
@@ -447,19 +453,19 @@
 static eight_bits get_next(void);
 
 /*:70*//*84:*/
-#line 1208 "cwebdir/ctangle.w"
+#line 1214 "cwebdir/ctangle.w"
 static void scan_repl(eight_bits);
 
 /*:84*//*91:*/
-#line 1379 "cwebdir/ctangle.w"
+#line 1397 "cwebdir/ctangle.w"
 static void scan_section(void);
 
 /*:91*//*99:*/
-#line 1460 "cwebdir/ctangle.w"
+#line 1474 "cwebdir/ctangle.w"
 static void phase_one(void);
 
 /*:99*//*101:*/
-#line 1494 "cwebdir/ctangle.w"
+#line 1507 "cwebdir/ctangle.w"
 static void skip_limbo(void);
 
 /*:101*/
@@ -476,7 +482,7 @@
 argc= ac;argv= av;
 program= ctangle;
 /*21:*/
-#line 137 "cwebdir/ctangle.w"
+#line 139 "cwebdir/ctangle.w"
 
 text_info->tok_start= tok_ptr= tok_mem;
 text_ptr= text_info+1;text_ptr->tok_start= tok_mem;
@@ -483,21 +489,21 @@
 
 
 /*:21*//*23:*/
-#line 147 "cwebdir/ctangle.w"
+#line 149 "cwebdir/ctangle.w"
 
 init_node(name_dir);
 
 /*:23*//*27:*/
-#line 201 "cwebdir/ctangle.w"
-last_unnamed= text_info;text_info->text_link= 0;
+#line 203 "cwebdir/ctangle.w"
+last_unnamed= text_info;text_info->text_link= macro;
 
 /*:27*//*46:*/
-#line 493 "cwebdir/ctangle.w"
+#line 499 "cwebdir/ctangle.w"
 
 cur_out_file= end_output_files= output_files+max_files;
 
 /*:46*//*58:*/
-#line 694 "cwebdir/ctangle.w"
+#line 704 "cwebdir/ctangle.w"
 
 {
 int i;
@@ -505,10 +511,11 @@
 }
 
 /*:58*//*63:*/
-#line 773 "cwebdir/ctangle.w"
+#line 780 "cwebdir/ctangle.w"
 {
 int c;
 for(c= 0;c<256;c++)ccode[c]= ignore;
+}
 ccode[' ']= ccode['\t']= ccode['\n']= ccode['\v']= ccode['\r']= ccode['\f']
 = ccode['*']= new_section;
 ccode['@']= '@';ccode['=']= string;
@@ -522,14 +529,13 @@
 ccode['&']= join;
 ccode['<']= ccode['(']= section_name;
 ccode['\'']= ord;
-}
 
 /*:63*//*78:*/
-#line 1103 "cwebdir/ctangle.w"
+#line 1112 "cwebdir/ctangle.w"
 section_text[0]= ' ';
 
 /*:78*//*116:*/
-#line 476 "cwebdir/ctang-w2c.ch"
+#line 484 "cwebdir/ctang-w2c.ch"
 
 strncpy(cb_banner,banner,max_banner-1);
 
@@ -546,7 +552,7 @@
 }
 
 /*:2*//*24:*/
-#line 153 "cwebdir/ctangle.w"
+#line 155 "cwebdir/ctangle.w"
 
 boolean names_match(
 name_pointer p,
@@ -554,12 +560,11 @@
 size_t l,
 eight_bits t)
 {(void)t;
-if(length(p)!=l)return false;
-return!strncmp(first,p->byte_start,l);
+return length(p)==l&&strncmp(first,p->byte_start,l)==0;
 }
 
 /*:24*//*25:*/
-#line 169 "cwebdir/ctangle.w"
+#line 170 "cwebdir/ctangle.w"
 
 void
 init_node(
@@ -571,29 +576,29 @@
 init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
 
 /*:25*//*29:*/
-#line 231 "cwebdir/ctangle.w"
+#line 236 "cwebdir/ctangle.w"
 
 static void
 store_two_bytes(
 sixteen_bits x)
 {
-#line 65 "cwebdir/ctang-w2c.ch"
+#line 73 "cwebdir/ctang-w2c.ch"
 if(tok_ptr+2> tok_mem_end)overflow(_("token"));
-#line 237 "cwebdir/ctangle.w"
+#line 242 "cwebdir/ctangle.w"
 *tok_ptr++= x>>8;
 *tok_ptr++= x&0377;
 }
 
 /*:29*//*34:*/
-#line 309 "cwebdir/ctangle.w"
+#line 315 "cwebdir/ctangle.w"
 
 static void
 push_level(
 name_pointer p)
 {
-#line 71 "cwebdir/ctang-w2c.ch"
+#line 79 "cwebdir/ctang-w2c.ch"
 if(stack_ptr==stack_end)overflow(_("stack"));
-#line 315 "cwebdir/ctangle.w"
+#line 321 "cwebdir/ctangle.w"
 *stack_ptr= cur_state;
 stack_ptr++;
 if(p!=NULL){
@@ -604,7 +609,7 @@
 }
 
 /*:34*//*36:*/
-#line 332 "cwebdir/ctangle.w"
+#line 338 "cwebdir/ctangle.w"
 
 static void
 pop_level(
@@ -620,7 +625,7 @@
 }
 
 /*:36*//*38:*/
-#line 368 "cwebdir/ctangle.w"
+#line 374 "cwebdir/ctangle.w"
 
 static void
 get_output(void)
@@ -643,15 +648,15 @@
 case 0:cur_val= a;out_char(identifier);break;
 case 1:if(a==output_defs_flag)output_defs();
 else/*40:*/
-#line 402 "cwebdir/ctangle.w"
+#line 408 "cwebdir/ctangle.w"
 
 {
 a-= 024000;
 if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir);
 else if(a!=0){
-#line 77 "cwebdir/ctang-w2c.ch"
+#line 85 "cwebdir/ctang-w2c.ch"
 fputs(_("\n! Not present: <"),stdout);
-#line 408 "cwebdir/ctangle.w"
+#line 414 "cwebdir/ctangle.w"
 print_section_name(a+name_dir);err_print(">");
 
 }
@@ -659,7 +664,7 @@
 }
 
 /*:40*/
-#line 389 "cwebdir/ctangle.w"
+#line 395 "cwebdir/ctangle.w"
 
 break;
 default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -669,7 +674,7 @@
 }
 
 /*:38*//*43:*/
-#line 460 "cwebdir/ctangle.w"
+#line 466 "cwebdir/ctangle.w"
 
 static void
 flush_buffer(void)
@@ -676,7 +681,7 @@
 {
 C_putc('\n');
 if(cur_line%100==0&&show_progress){
-printf(".");
+putchar('.');
 if(cur_line%500==0)printf("%d",cur_line);
 update_terminal;
 }
@@ -684,86 +689,88 @@
 }
 
 /*:43*//*48:*/
-#line 514 "cwebdir/ctangle.w"
+#line 518 "cwebdir/ctangle.w"
 
 static void
 phase_two(void){
+phase= 2;
 web_file_open= false;
 cur_line= 1;
 /*33:*/
-#line 298 "cwebdir/ctangle.w"
+#line 304 "cwebdir/ctangle.w"
 
 stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
 cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
 
 /*:33*/
-#line 519 "cwebdir/ctangle.w"
+#line 524 "cwebdir/ctangle.w"
 
 /*51:*/
-#line 578 "cwebdir/ctangle.w"
+#line 585 "cwebdir/ctangle.w"
 
 if(!output_defs_seen)
 output_defs();
 
 /*:51*/
-#line 520 "cwebdir/ctangle.w"
+#line 525 "cwebdir/ctangle.w"
 
-if(text_info->text_link==0&&cur_out_file==end_output_files){
-#line 89 "cwebdir/ctang-w2c.ch"
+if(text_info->text_link==macro&&cur_out_file==end_output_files){
+#line 97 "cwebdir/ctang-w2c.ch"
 fputs(_("\n! No program text was specified."),stdout);mark_harmless;
-#line 523 "cwebdir/ctangle.w"
+#line 528 "cwebdir/ctangle.w"
 
 }
 else{
 if(cur_out_file==end_output_files){
-if(show_progress)
-#line 95 "cwebdir/ctang-w2c.ch"
+if(show_progress){
+#line 103 "cwebdir/ctang-w2c.ch"
 printf(_("\nWriting the output file (%s):"),C_file_name);
-#line 529 "cwebdir/ctangle.w"
+#line 534 "cwebdir/ctangle.w"
+update_terminal;
 }
+}
 else{
 if(show_progress){
-#line 101 "cwebdir/ctang-w2c.ch"
+#line 109 "cwebdir/ctang-w2c.ch"
 fputs(_("\nWriting the output files:"),stdout);
-#line 533 "cwebdir/ctangle.w"
+#line 540 "cwebdir/ctangle.w"
 
 printf(" (%s)",C_file_name);
 update_terminal;
 }
-if(text_info->text_link==0)goto writeloop;
+if(text_info->text_link==macro)goto writeloop;
 }
 while(stack_ptr> stack)get_output();
 flush_buffer();
 writeloop:/*50:*/
-#line 130 "cwebdir/ctang-w2c.ch"
+#line 138 "cwebdir/ctang-w2c.ch"
 
 fclose(C_file);C_file= NULL;
 /*105:*/
-#line 356 "cwebdir/ctang-w2c.ch"
+#line 364 "cwebdir/ctang-w2c.ch"
 
 if((C_file= fopen(C_file_name,"r"))!=NULL){
 /*106:*/
-#line 363 "cwebdir/ctang-w2c.ch"
+#line 371 "cwebdir/ctang-w2c.ch"
 
-char x[BUFSIZ],y[BUFSIZ];
-int x_size,y_size,comparison= false;
+boolean comparison= false;
 
 if((check_file= fopen(check_file_name,"r"))==NULL)
 fatal(_("! Cannot open output file "),check_file_name);
 
 
-if(temporary_output)/*107:*/
-#line 378 "cwebdir/ctang-w2c.ch"
+if(check_for_change)/*107:*/
+#line 385 "cwebdir/ctang-w2c.ch"
 
 do{
-x_size= fread(x,1,BUFSIZ,C_file);
-y_size= fread(y,1,BUFSIZ,check_file);
-comparison= (x_size==y_size);
-if(comparison)comparison= !memcmp(x,y,x_size);
+char x[BUFSIZ],y[BUFSIZ];
+int x_size= fread(x,sizeof(char),BUFSIZ,C_file);
+int y_size= fread(y,sizeof(char),BUFSIZ,check_file);
+comparison= (x_size==y_size)&&!memcmp(x,y,x_size);
 }while(comparison&&!feof(C_file)&&!feof(check_file));
 
 /*:107*/
-#line 371 "cwebdir/ctang-w2c.ch"
+#line 378 "cwebdir/ctang-w2c.ch"
 
 
 fclose(C_file);C_file= NULL;
@@ -770,10 +777,10 @@
 fclose(check_file);check_file= NULL;
 
 /*:106*/
-#line 358 "cwebdir/ctang-w2c.ch"
+#line 366 "cwebdir/ctang-w2c.ch"
 
 /*108:*/
-#line 389 "cwebdir/ctang-w2c.ch"
+#line 396 "cwebdir/ctang-w2c.ch"
 
 if(comparison)
 remove(check_file_name);
@@ -783,13 +790,13 @@
 }
 
 /*:108*/
-#line 359 "cwebdir/ctang-w2c.ch"
+#line 367 "cwebdir/ctang-w2c.ch"
 
 }else
 rename(check_file_name,C_file_name);
 
 /*:105*/
-#line 132 "cwebdir/ctang-w2c.ch"
+#line 140 "cwebdir/ctang-w2c.ch"
 
 for(an_output_file= end_output_files;an_output_file> cur_out_file;){
 an_output_file--;
@@ -803,7 +810,7 @@
 if(show_progress){printf("\n(%s)",output_file_name);update_terminal;}
 cur_line= 1;
 stack_ptr= stack+1;
-cur_name= (*an_output_file);
+cur_name= *an_output_file;
 cur_repl= (text_pointer)cur_name->equiv;
 cur_byte= cur_repl->tok_start;
 cur_end= (cur_repl+1)->tok_start;
@@ -810,32 +817,33 @@
 while(stack_ptr> stack)get_output();
 flush_buffer();fclose(C_file);C_file= NULL;
 /*109:*/
-#line 402 "cwebdir/ctang-w2c.ch"
+#line 409 "cwebdir/ctang-w2c.ch"
 
 if(0==strcmp("/dev/stdout",output_file_name))
 /*111:*/
-#line 429 "cwebdir/ctang-w2c.ch"
+#line 436 "cwebdir/ctang-w2c.ch"
 {
 /*114:*/
-#line 460 "cwebdir/ctang-w2c.ch"
+#line 467 "cwebdir/ctang-w2c.ch"
 
 char in_buf[BUFSIZ+1];
-int in_size,comparison= true;
+int in_size;
+boolean comparison= true;
 if((check_file= fopen(check_file_name,"r"))==NULL)
 fatal(_("! Cannot open output file "),check_file_name);
 
 
 /*:114*/
-#line 430 "cwebdir/ctang-w2c.ch"
+#line 437 "cwebdir/ctang-w2c.ch"
 
 do{
-in_size= fread(in_buf,1,BUFSIZ,check_file);
+in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file);
 in_buf[in_size]= '\0';
 fprintf(stdout,"%s",in_buf);
 }while(!feof(check_file));
 fclose(check_file);check_file= NULL;
 /*110:*/
-#line 419 "cwebdir/ctang-w2c.ch"
+#line 426 "cwebdir/ctang-w2c.ch"
 
 if(comparison)
 remove(check_file_name);
@@ -845,37 +853,38 @@
 }
 
 /*:110*/
-#line 437 "cwebdir/ctang-w2c.ch"
+#line 444 "cwebdir/ctang-w2c.ch"
 
 }
 
 /*:111*/
-#line 404 "cwebdir/ctang-w2c.ch"
+#line 411 "cwebdir/ctang-w2c.ch"
 
 else if(0==strcmp("/dev/stderr",output_file_name))
 /*112:*/
-#line 442 "cwebdir/ctang-w2c.ch"
+#line 449 "cwebdir/ctang-w2c.ch"
 {
 /*114:*/
-#line 460 "cwebdir/ctang-w2c.ch"
+#line 467 "cwebdir/ctang-w2c.ch"
 
 char in_buf[BUFSIZ+1];
-int in_size,comparison= true;
+int in_size;
+boolean comparison= true;
 if((check_file= fopen(check_file_name,"r"))==NULL)
 fatal(_("! Cannot open output file "),check_file_name);
 
 
 /*:114*/
-#line 443 "cwebdir/ctang-w2c.ch"
+#line 450 "cwebdir/ctang-w2c.ch"
 
 do{
-in_size= fread(in_buf,1,BUFSIZ,check_file);
+in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file);
 in_buf[in_size]= '\0';
 fprintf(stderr,"%s",in_buf);
 }while(!feof(check_file));
 fclose(check_file);check_file= NULL;
 /*110:*/
-#line 419 "cwebdir/ctang-w2c.ch"
+#line 426 "cwebdir/ctang-w2c.ch"
 
 if(comparison)
 remove(check_file_name);
@@ -885,20 +894,20 @@
 }
 
 /*:110*/
-#line 450 "cwebdir/ctang-w2c.ch"
+#line 457 "cwebdir/ctang-w2c.ch"
 
 }
 
 /*:112*/
-#line 406 "cwebdir/ctang-w2c.ch"
+#line 413 "cwebdir/ctang-w2c.ch"
 
 else if(0==strcmp("/dev/null",output_file_name))
 /*113:*/
-#line 455 "cwebdir/ctang-w2c.ch"
+#line 462 "cwebdir/ctang-w2c.ch"
 {
-int comparison= true;
+boolean comparison= true;
 /*110:*/
-#line 419 "cwebdir/ctang-w2c.ch"
+#line 426 "cwebdir/ctang-w2c.ch"
 
 if(comparison)
 remove(check_file_name);
@@ -908,37 +917,36 @@
 }
 
 /*:110*/
-#line 457 "cwebdir/ctang-w2c.ch"
+#line 464 "cwebdir/ctang-w2c.ch"
 
 }
 
 /*:113*/
-#line 408 "cwebdir/ctang-w2c.ch"
+#line 415 "cwebdir/ctang-w2c.ch"
 
 else{
 if((C_file= fopen(output_file_name,"r"))!=NULL){
 /*106:*/
-#line 363 "cwebdir/ctang-w2c.ch"
+#line 371 "cwebdir/ctang-w2c.ch"
 
-char x[BUFSIZ],y[BUFSIZ];
-int x_size,y_size,comparison= false;
+boolean comparison= false;
 
 if((check_file= fopen(check_file_name,"r"))==NULL)
 fatal(_("! Cannot open output file "),check_file_name);
 
 
-if(temporary_output)/*107:*/
-#line 378 "cwebdir/ctang-w2c.ch"
+if(check_for_change)/*107:*/
+#line 385 "cwebdir/ctang-w2c.ch"
 
 do{
-x_size= fread(x,1,BUFSIZ,C_file);
-y_size= fread(y,1,BUFSIZ,check_file);
-comparison= (x_size==y_size);
-if(comparison)comparison= !memcmp(x,y,x_size);
+char x[BUFSIZ],y[BUFSIZ];
+int x_size= fread(x,sizeof(char),BUFSIZ,C_file);
+int y_size= fread(y,sizeof(char),BUFSIZ,check_file);
+comparison= (x_size==y_size)&&!memcmp(x,y,x_size);
 }while(comparison&&!feof(C_file)&&!feof(check_file));
 
 /*:107*/
-#line 371 "cwebdir/ctang-w2c.ch"
+#line 378 "cwebdir/ctang-w2c.ch"
 
 
 fclose(C_file);C_file= NULL;
@@ -945,10 +953,10 @@
 fclose(check_file);check_file= NULL;
 
 /*:106*/
-#line 411 "cwebdir/ctang-w2c.ch"
+#line 418 "cwebdir/ctang-w2c.ch"
 
 /*110:*/
-#line 419 "cwebdir/ctang-w2c.ch"
+#line 426 "cwebdir/ctang-w2c.ch"
 
 if(comparison)
 remove(check_file_name);
@@ -958,7 +966,7 @@
 }
 
 /*:110*/
-#line 412 "cwebdir/ctang-w2c.ch"
+#line 419 "cwebdir/ctang-w2c.ch"
 
 }else
 rename(check_file_name,output_file_name);
@@ -965,26 +973,26 @@
 }
 
 /*:109*/
-#line 151 "cwebdir/ctang-w2c.ch"
+#line 159 "cwebdir/ctang-w2c.ch"
 
 }
 strcpy(check_file_name,"");
-#line 573 "cwebdir/ctangle.w"
+#line 580 "cwebdir/ctangle.w"
 
 /*:50*/
-#line 541 "cwebdir/ctangle.w"
+#line 548 "cwebdir/ctangle.w"
 
 if(show_happiness){
 if(show_progress)new_line;
-#line 107 "cwebdir/ctang-w2c.ch"
+#line 115 "cwebdir/ctang-w2c.ch"
 fputs(_("Done."),stdout);
-#line 545 "cwebdir/ctangle.w"
+#line 552 "cwebdir/ctangle.w"
 }
 }
 }
 
 /*:48*//*54:*/
-#line 589 "cwebdir/ctangle.w"
+#line 599 "cwebdir/ctangle.w"
 
 static void
 output_defs(void)
@@ -992,7 +1000,7 @@
 sixteen_bits a;
 push_level(NULL);
 for(cur_text= text_info+1;cur_text<text_ptr;cur_text++)
-if(cur_text->text_link==0){
+if(cur_text->text_link==macro){
 cur_byte= cur_text->tok_start;
 cur_end= (cur_text+1)->tok_start;
 C_printf("%s","#define ");
@@ -1010,9 +1018,9 @@
 if(a<024000){
 cur_val= a;out_char(identifier);
 }
-#line 159 "cwebdir/ctang-w2c.ch"
-else if(a<050000){confusion(_("macro defs have strange char"));}
-#line 615 "cwebdir/ctangle.w"
+#line 167 "cwebdir/ctang-w2c.ch"
+else if(a<050000)confusion(_("macro defs have strange char"));
+#line 625 "cwebdir/ctangle.w"
 else{
 cur_val= a-050000;cur_section= cur_val;out_char(section_number);
 }
@@ -1026,7 +1034,7 @@
 }
 
 /*:54*//*55:*/
-#line 632 "cwebdir/ctangle.w"
+#line 642 "cwebdir/ctangle.w"
 
 static void
 out_char(
@@ -1039,25 +1047,22 @@
 if(protect||out_state==verbatim)C_putc('\\');
 flush_buffer();if(out_state!=verbatim)out_state= normal;break;
 /*59:*/
-#line 700 "cwebdir/ctangle.w"
+#line 710 "cwebdir/ctangle.w"
 
 case identifier:
 if(out_state==num_or_id)C_putc(' ');
-j= (cur_val+name_dir)->byte_start;
-k= (cur_val+name_dir+1)->byte_start;
-while(j<k){
+for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start;
+j<k;j++)
 if((eight_bits)(*j)<0200)C_putc(*j);
 
 else C_printf("%s",translit[(eight_bits)(*j)-0200]);
-j++;
-}
 out_state= num_or_id;break;
 
 /*:59*/
-#line 643 "cwebdir/ctangle.w"
+#line 653 "cwebdir/ctangle.w"
 
 /*60:*/
-#line 713 "cwebdir/ctangle.w"
+#line 720 "cwebdir/ctangle.w"
 
 case section_number:
 if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -1068,26 +1073,26 @@
 goto restart;
 }else{
 sixteen_bits a;
-a= 0400**cur_byte++;
+a= *cur_byte++*0400;
 a+= *cur_byte++;
 C_printf("\n#line %d \"",a);
 
-cur_val= *cur_byte++;
-cur_val= 0400*(cur_val-0200)+*cur_byte++;
+cur_val= (*cur_byte++-0200)*0400;
+cur_val+= *cur_byte++;
 for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start;
 j<k;j++){
 if(*j=='\\'||*j=='"')C_putc('\\');
 C_putc(*j);
 }
-C_printf("%s","\"\n");
+C_putc('"');C_putc('\n');
 }
 break;
 
 /*:60*/
-#line 644 "cwebdir/ctangle.w"
+#line 654 "cwebdir/ctangle.w"
 
 /*56:*/
-#line 662 "cwebdir/ctangle.w"
+#line 672 "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;
@@ -1108,7 +1113,7 @@
 break;
 
 /*:56*/
-#line 645 "cwebdir/ctangle.w"
+#line 655 "cwebdir/ctangle.w"
 
 case'=':case'>':C_putc(cur_char);C_putc(' ');
 out_state= normal;break;
@@ -1127,7 +1132,7 @@
 }
 
 /*:55*//*64:*/
-#line 794 "cwebdir/ctangle.w"
+#line 801 "cwebdir/ctangle.w"
 
 static eight_bits
 skip_ahead(void)
@@ -1145,7 +1150,7 @@
 }
 
 /*:64*//*67:*/
-#line 833 "cwebdir/ctangle.w"
+#line 840 "cwebdir/ctangle.w"
 
 static boolean skip_comment(
 boolean is_long_comment)
@@ -1156,9 +1161,9 @@
 if(is_long_comment){
 if(get_line())return comment_continues= true;
 else{
-#line 165 "cwebdir/ctang-w2c.ch"
+#line 173 "cwebdir/ctang-w2c.ch"
 err_print(_("! Input ended in mid-comment"));
-#line 844 "cwebdir/ctangle.w"
+#line 851 "cwebdir/ctangle.w"
 
 return comment_continues= false;
 }
@@ -1171,9 +1176,9 @@
 }
 if(c=='@'){
 if(ccode[(eight_bits)*loc]==new_section){
-#line 171 "cwebdir/ctang-w2c.ch"
+#line 179 "cwebdir/ctang-w2c.ch"
 err_print(_("! Section name ended in mid-comment"));loc--;
-#line 857 "cwebdir/ctangle.w"
+#line 864 "cwebdir/ctangle.w"
 
 return comment_continues= false;
 }
@@ -1188,17 +1193,19 @@
 static eight_bits
 get_next(void)
 {
-static int preprocessing= 0;
+static boolean preprocessing= false;
 eight_bits c;
 while(true){
 if(loc> limit){
-if(preprocessing&&*(limit-1)!='\\')preprocessing= 0;
+if(preprocessing&&*(limit-1)!='\\')preprocessing= false;
 if(get_line()==false)return new_section;
 else if(print_where&&!no_where){
 print_where= false;
 /*85:*/
-#line 1214 "cwebdir/ctangle.w"
+#line 1224 "cwebdir/ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1208,8 +1215,8 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
 #line 893 "cwebdir/ctangle.w"
@@ -1226,24 +1233,33 @@
 }
 loc++;
 if(xisdigit(c)||c=='.')/*73:*/
-#line 964 "cwebdir/ctangle.w"
+#line 965 "cwebdir/ctangle.w"
 {
+boolean hex_flag= false;
 id_first= loc-1;
 if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
 if(*id_first=='0'){
 if(*loc=='x'||*loc=='X'){
-loc++;while(xisxdigit(*loc))loc++;goto found;
+hex_flag= true;
+loc++;while(xisxdigit(*loc)||*loc=='\'')loc++;
 }
+else if(*loc=='b'||*loc=='B'){
+loc++;while(*loc=='0'||*loc=='1'||*loc=='\'')loc++;goto found;
 }
-while(xisdigit(*loc))loc++;
+}
+while(xisdigit(*loc)||*loc=='\'')loc++;
 if(*loc=='.'){
 loc++;
-while(xisdigit(*loc))loc++;
+while((hex_flag&&xisxdigit(*loc))||xisdigit(*loc)||*loc=='\'')loc++;
 }
 if(*loc=='e'||*loc=='E'){
 if(*++loc=='+'||*loc=='-')loc++;
-while(xisdigit(*loc))loc++;
+while(xisdigit(*loc)||*loc=='\'')loc++;
 }
+else if(hex_flag&&(*loc=='p'||*loc=='P')){
+if(*++loc=='+'||*loc=='-')loc++;
+while(xisxdigit(*loc)||*loc=='\'')loc++;
+}
 found:while(*loc=='u'||*loc=='U'||*loc=='l'||*loc=='L'
 ||*loc=='f'||*loc=='F')loc++;
 id_loc= loc;
@@ -1257,27 +1273,27 @@
 ||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
 ||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
 /*74:*/
-#line 992 "cwebdir/ctangle.w"
+#line 1002 "cwebdir/ctangle.w"
 {
 char delim= c;
 id_first= section_text+1;
 id_loc= section_text;*++id_loc= delim;
 if(delim=='L'||delim=='u'||delim=='U'){
-if(delim=='u'&&*loc=='8'){*++id_loc= *loc++;}
+if(delim=='u'&&*loc=='8')*++id_loc= *loc++;
 delim= *loc++;*++id_loc= delim;
 }
 while(true){
 if(loc>=limit){
 if(*(limit-1)!='\\'){
-#line 177 "cwebdir/ctang-w2c.ch"
+#line 185 "cwebdir/ctang-w2c.ch"
 err_print(_("! String didn't end"));loc= limit;break;
-#line 1004 "cwebdir/ctangle.w"
+#line 1014 "cwebdir/ctangle.w"
 
 }
 if(get_line()==false){
-#line 183 "cwebdir/ctang-w2c.ch"
+#line 191 "cwebdir/ctang-w2c.ch"
 err_print(_("! Input ended in middle of string"));loc= buffer;break;
-#line 1008 "cwebdir/ctangle.w"
+#line 1018 "cwebdir/ctangle.w"
 
 }
 else if(++id_loc<=section_text_end)*id_loc= '\n';
@@ -1295,9 +1311,9 @@
 if(++id_loc<=section_text_end)*id_loc= c;
 }
 if(id_loc>=section_text_end){
-#line 189 "cwebdir/ctang-w2c.ch"
+#line 197 "cwebdir/ctang-w2c.ch"
 fputs(_("\n! String too long: "),stdout);
-#line 1026 "cwebdir/ctangle.w"
+#line 1036 "cwebdir/ctangle.w"
 
 term_write(section_text+1,25);
 err_print("...");
@@ -1311,10 +1327,12 @@
 
 else if(isalpha(c)||isxalpha(c)||ishigh(c))
 /*72:*/
-#line 957 "cwebdir/ctangle.w"
+#line 956 "cwebdir/ctangle.w"
 {
 id_first= --loc;
-while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc)
+do
+++loc;
+while(isalpha((eight_bits)*loc)||isdigit((eight_bits)*loc)
 ||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc));
 id_loc= loc;return identifier;
 }
@@ -1323,44 +1341,42 @@
 #line 911 "cwebdir/ctangle.w"
 
 else if(c=='@')/*75:*/
-#line 1037 "cwebdir/ctangle.w"
-{
-c= ccode[(eight_bits)*loc++];
-switch(c){
+#line 1047 "cwebdir/ctangle.w"
+
+switch(c= ccode[(eight_bits)*loc++]){
 case ignore:continue;
-#line 195 "cwebdir/ctang-w2c.ch"
+#line 203 "cwebdir/ctang-w2c.ch"
 case translit_code:err_print(_("! Use @l in limbo only"));continue;
-#line 1042 "cwebdir/ctangle.w"
+#line 1051 "cwebdir/ctangle.w"
 
 case control_text:while((c= skip_ahead())=='@');
 
 if(*(loc-1)!='>')
-#line 201 "cwebdir/ctang-w2c.ch"
+#line 209 "cwebdir/ctang-w2c.ch"
 err_print(_("! Double @ should be used in control text"));
-#line 1047 "cwebdir/ctangle.w"
+#line 1056 "cwebdir/ctangle.w"
 
 continue;
 case section_name:
 cur_section_name_char= *(loc-1);
 /*77:*/
-#line 1085 "cwebdir/ctangle.w"
+#line 1092 "cwebdir/ctangle.w"
 {
-char*k;
+char*k= section_text;
 /*79:*/
-#line 1105 "cwebdir/ctangle.w"
+#line 1114 "cwebdir/ctangle.w"
 
-k= section_text;
 while(true){
 if(loc> limit&&get_line()==false){
-#line 219 "cwebdir/ctang-w2c.ch"
+#line 227 "cwebdir/ctang-w2c.ch"
 err_print(_("! Input ended in section name"));
-#line 1110 "cwebdir/ctangle.w"
+#line 1118 "cwebdir/ctangle.w"
 
 loc= buffer+1;break;
 }
 c= *loc;
 /*80:*/
-#line 1129 "cwebdir/ctangle.w"
+#line 1137 "cwebdir/ctangle.w"
 
 if(c=='@'){
 c= *(loc+1);
@@ -1368,15 +1384,15 @@
 loc+= 2;break;
 }
 if(ccode[(eight_bits)c]==new_section){
-#line 231 "cwebdir/ctang-w2c.ch"
+#line 239 "cwebdir/ctang-w2c.ch"
 err_print(_("! Section name didn't end"));break;
-#line 1137 "cwebdir/ctangle.w"
+#line 1145 "cwebdir/ctangle.w"
 
 }
 if(ccode[(eight_bits)c]==section_name){
-#line 237 "cwebdir/ctang-w2c.ch"
+#line 245 "cwebdir/ctang-w2c.ch"
 err_print(_("! Nesting of section names not allowed"));break;
-#line 1141 "cwebdir/ctangle.w"
+#line 1149 "cwebdir/ctangle.w"
 
 }
 *(++k)= '@';loc++;
@@ -1383,7 +1399,7 @@
 }
 
 /*:80*/
-#line 1114 "cwebdir/ctangle.w"
+#line 1122 "cwebdir/ctangle.w"
 
 loc++;if(k<section_text_end)k++;
 if(xisspace(c)){
@@ -1392,9 +1408,9 @@
 *k= c;
 }
 if(k>=section_text_end){
-#line 225 "cwebdir/ctang-w2c.ch"
+#line 233 "cwebdir/ctang-w2c.ch"
 fputs(_("\n! Section name too long: "),stdout);
-#line 1123 "cwebdir/ctangle.w"
+#line 1131 "cwebdir/ctangle.w"
 
 term_write(section_text+1,25);
 printf("...");mark_harmless;
@@ -1402,14 +1418,16 @@
 if(*k==' '&&k> section_text)k--;
 
 /*:79*/
-#line 1087 "cwebdir/ctangle.w"
+#line 1094 "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);
+cur_section_name= section_lookup(section_text+1,k-3,true);
+
+else cur_section_name= section_lookup(section_text+1,k,false);
+
 if(cur_section_name_char=='(')
 /*47:*/
-#line 497 "cwebdir/ctangle.w"
+#line 503 "cwebdir/ctangle.w"
 
 {
 for(an_output_file= cur_out_file;
@@ -1418,60 +1436,56 @@
 if(an_output_file==end_output_files){
 if(cur_out_file> output_files)
 *--cur_out_file= cur_section_name;
-else{
-#line 83 "cwebdir/ctang-w2c.ch"
-overflow(_("output files"));
-#line 507 "cwebdir/ctangle.w"
+#line 91 "cwebdir/ctang-w2c.ch"
+else overflow(_("output files"));
+#line 512 "cwebdir/ctangle.w"
 }
 }
-}
 
 /*:47*/
-#line 1093 "cwebdir/ctangle.w"
+#line 1102 "cwebdir/ctangle.w"
 
 return section_name;
 }
 
 /*:77*/
-#line 1051 "cwebdir/ctangle.w"
+#line 1060 "cwebdir/ctangle.w"
 
 case string:/*81:*/
-#line 1151 "cwebdir/ctangle.w"
-{
+#line 1159 "cwebdir/ctangle.w"
+
 id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
 while(*loc!='@'||*(loc+1)!='>')loc++;
-#line 243 "cwebdir/ctang-w2c.ch"
+#line 251 "cwebdir/ctang-w2c.ch"
 if(loc>=limit)err_print(_("! Verbatim string didn't end"));
-#line 1155 "cwebdir/ctangle.w"
+#line 1163 "cwebdir/ctangle.w"
 
 id_loc= loc;loc+= 2;
 return string;
-}
 
 /*:81*/
-#line 1052 "cwebdir/ctangle.w"
+#line 1061 "cwebdir/ctangle.w"
 
 case ord:/*76:*/
-#line 1064 "cwebdir/ctangle.w"
+#line 1072 "cwebdir/ctangle.w"
 
 id_first= loc;
-if(*loc=='\\'){
+if(*loc=='\\')
 if(*++loc=='\'')loc++;
-}
 while(*loc!='\''){
 if(*loc=='@'){
 if(*(loc+1)!='@')
-#line 207 "cwebdir/ctang-w2c.ch"
+#line 215 "cwebdir/ctang-w2c.ch"
 err_print(_("! Double @ should be used in ASCII constant"));
-#line 1073 "cwebdir/ctangle.w"
+#line 1080 "cwebdir/ctangle.w"
 
 else loc++;
 }
 loc++;
 if(loc> limit){
-#line 213 "cwebdir/ctang-w2c.ch"
+#line 221 "cwebdir/ctang-w2c.ch"
 err_print(_("! String didn't end"));loc= limit-1;break;
-#line 1079 "cwebdir/ctangle.w"
+#line 1086 "cwebdir/ctangle.w"
 
 }
 }
@@ -1479,11 +1493,10 @@
 return ord;
 
 /*:76*/
-#line 1053 "cwebdir/ctangle.w"
+#line 1062 "cwebdir/ctangle.w"
 
 default:return c;
 }
-}
 
 /*:75*/
 #line 912 "cwebdir/ctangle.w"
@@ -1493,20 +1506,21 @@
 
 else return' ';
 }
-else if(c=='#'&&loc==buffer+1)preprocessing= 1;
+else if(c=='#'&&loc==buffer+1)preprocessing= true;
 mistake:/*71:*/
-#line 935 "cwebdir/ctangle.w"
+#line 933 "cwebdir/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);
-}
-break;
+}break;
 case':':if(*loc==':')compress(colon_colon);break;
 case'=':if(*loc=='=')compress(eq_eq);break;
 case'>':if(*loc=='='){compress(gt_eq);}
@@ -1526,7 +1540,7 @@
 }
 
 /*:69*//*83:*/
-#line 1186 "cwebdir/ctangle.w"
+#line 1192 "cwebdir/ctangle.w"
 
 static void
 scan_repl(
@@ -1533,9 +1547,11 @@
 eight_bits t)
 {
 sixteen_bits a;
-if(t==section_name){/*85:*/
-#line 1214 "cwebdir/ctangle.w"
+if(t==section_name)/*85:*/
+#line 1224 "cwebdir/ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1545,31 +1561,29 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
-#line 1192 "cwebdir/ctangle.w"
-}
+#line 1198 "cwebdir/ctangle.w"
+
 while(true)switch(a= get_next()){
 /*86:*/
-#line 1227 "cwebdir/ctangle.w"
+#line 1239 "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 identifier:store_id(a);break;
 case section_name:if(t!=section_name)goto done;
 else{
 /*87:*/
-#line 1260 "cwebdir/ctangle.w"
+#line 1270 "cwebdir/ctangle.w"
 {
 char*try_loc= loc;
 while(*try_loc==' '&&try_loc<limit)try_loc++;
 if(*try_loc=='+'&&try_loc<limit)try_loc++;
 while(*try_loc==' '&&try_loc<limit)try_loc++;
-#line 273 "cwebdir/ctang-w2c.ch"
+#line 281 "cwebdir/ctang-w2c.ch"
 if(*try_loc=='=')err_print(_("! Missing `@ ' before a named section"));
-#line 1266 "cwebdir/ctangle.w"
+#line 1276 "cwebdir/ctangle.w"
 
 
 
@@ -1576,14 +1590,16 @@
 }
 
 /*:87*/
-#line 1233 "cwebdir/ctangle.w"
+#line 1243 "cwebdir/ctangle.w"
 
 a= cur_section_name-name_dir;
 app_repl((a/0400)+0250);
 app_repl(a%0400);
 /*85:*/
-#line 1214 "cwebdir/ctangle.w"
+#line 1224 "cwebdir/ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1593,16 +1609,16 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
-#line 1237 "cwebdir/ctangle.w"
+#line 1247 "cwebdir/ctangle.w"
 break;
 }
-#line 261 "cwebdir/ctang-w2c.ch"
+#line 269 "cwebdir/ctang-w2c.ch"
 case output_defs_code:if(t!=section_name)err_print(_("! Misplaced @h"));
-#line 1240 "cwebdir/ctangle.w"
+#line 1250 "cwebdir/ctangle.w"
 
 else{
 output_defs_seen= true;
@@ -1610,8 +1626,10 @@
 app_repl((a/0400)+0200);
 app_repl(a%0400);
 /*85:*/
-#line 1214 "cwebdir/ctangle.w"
+#line 1224 "cwebdir/ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1621,37 +1639,39 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
-#line 1246 "cwebdir/ctangle.w"
+#line 1256 "cwebdir/ctangle.w"
 
 }
 break;
 case constant:case string:
 /*88:*/
-#line 1271 "cwebdir/ctangle.w"
+#line 1287 "cwebdir/ctangle.w"
 
 app_repl(a);
 while(id_first<id_loc){
 if(*id_first=='@'){
 if(*(id_first+1)=='@')id_first++;
-#line 279 "cwebdir/ctang-w2c.ch"
+#line 287 "cwebdir/ctang-w2c.ch"
 else err_print(_("! Double @ should be used in string"));
-#line 1277 "cwebdir/ctangle.w"
+#line 1293 "cwebdir/ctangle.w"
 
 }
+else if(a==constant&&*id_first=='\''&&!keep_digit_separators)
+id_first++;
 app_repl(*id_first++);
 }
 app_repl(a);break;
 
 /*:88*/
-#line 1250 "cwebdir/ctangle.w"
+#line 1260 "cwebdir/ctangle.w"
 
 case ord:
 /*89:*/
-#line 1287 "cwebdir/ctangle.w"
+#line 1305 "cwebdir/ctangle.w"
 {
 int c= (eight_bits)*id_first;
 if(c=='\\'){
@@ -1688,9 +1708,9 @@
 case'\\':c= '\\';break;
 case'\'':c= '\'';break;
 case'\"':c= '\"';break;
-#line 285 "cwebdir/ctang-w2c.ch"
+#line 293 "cwebdir/ctang-w2c.ch"
 default:err_print(_("! Unrecognized escape sequence"));
-#line 1324 "cwebdir/ctangle.w"
+#line 1342 "cwebdir/ctangle.w"
 
 }
 }
@@ -1704,19 +1724,19 @@
 break;
 
 /*:89*/
-#line 1252 "cwebdir/ctangle.w"
+#line 1262 "cwebdir/ctangle.w"
 
 case definition:case format_code:case begin_C:if(t!=section_name)goto done;
 else{
-#line 267 "cwebdir/ctang-w2c.ch"
+#line 275 "cwebdir/ctang-w2c.ch"
 err_print(_("! @d, @f and @c are ignored in C text"));continue;
-#line 1256 "cwebdir/ctangle.w"
+#line 1266 "cwebdir/ctangle.w"
 
 }
 case new_section:goto done;
 
 /*:86*/
-#line 1197 "cwebdir/ctangle.w"
+#line 1203 "cwebdir/ctangle.w"
 
 case')':app_repl(a);
 if(t==macro)app_repl(' ');
@@ -1724,14 +1744,14 @@
 default:app_repl(a);
 }
 done:next_control= (eight_bits)a;
-#line 255 "cwebdir/ctang-w2c.ch"
+#line 263 "cwebdir/ctang-w2c.ch"
 if(text_ptr> text_info_end)overflow(_("text"));
-#line 1205 "cwebdir/ctangle.w"
+#line 1211 "cwebdir/ctangle.w"
 cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
 }
 
 /*:83*//*90:*/
-#line 1346 "cwebdir/ctangle.w"
+#line 1364 "cwebdir/ctangle.w"
 
 static void
 scan_section(void)
@@ -1743,10 +1763,10 @@
 if(*(loc-1)=='*'&&show_progress){
 printf("*%d",section_count);update_terminal;
 }
-next_control= 0;
+next_control= ignore;
 while(true){
 /*92:*/
-#line 1387 "cwebdir/ctangle.w"
+#line 1405 "cwebdir/ctangle.w"
 
 while(next_control<definition)
 
@@ -1755,32 +1775,29 @@
 }
 
 /*:92*/
-#line 1360 "cwebdir/ctangle.w"
+#line 1378 "cwebdir/ctangle.w"
 
 if(next_control==definition){
 /*93:*/
-#line 1394 "cwebdir/ctangle.w"
-{
+#line 1412 "cwebdir/ctangle.w"
+
 while((next_control= get_next())=='\n');
 if(next_control!=identifier){
-#line 291 "cwebdir/ctang-w2c.ch"
+#line 299 "cwebdir/ctang-w2c.ch"
 err_print(_("! Definition flushed, must start with identifier"));
-#line 1398 "cwebdir/ctangle.w"
+#line 1416 "cwebdir/ctangle.w"
 
 continue;
 }
-app_repl(((a= id_lookup(id_first,id_loc,0)-name_dir)/0400)+0200);
-
-app_repl(a%0400);
+store_id(a);
 if(*loc!='('){
 app_repl(string);app_repl(' ');app_repl(string);
 }
 scan_repl(macro);
 cur_text->text_link= macro;
-}
 
 /*:93*/
-#line 1362 "cwebdir/ctangle.w"
+#line 1380 "cwebdir/ctangle.w"
 
 continue;
 }
@@ -1790,7 +1807,7 @@
 if(next_control==section_name){
 p= cur_section_name;
 /*94:*/
-#line 1419 "cwebdir/ctangle.w"
+#line 1434 "cwebdir/ctangle.w"
 
 while((next_control= get_next())=='+');
 if(next_control!='='&&next_control!=eq_eq)
@@ -1797,7 +1814,7 @@
 continue;
 
 /*:94*/
-#line 1370 "cwebdir/ctangle.w"
+#line 1388 "cwebdir/ctangle.w"
 
 break;
 }
@@ -1805,23 +1822,23 @@
 }
 no_where= print_where= false;
 /*95:*/
-#line 1424 "cwebdir/ctangle.w"
+#line 1439 "cwebdir/ctangle.w"
 
 /*96:*/
-#line 1429 "cwebdir/ctangle.w"
+#line 1444 "cwebdir/ctangle.w"
 
 store_two_bytes((sixteen_bits)(0150000+section_count));
 
 
 /*:96*/
-#line 1425 "cwebdir/ctangle.w"
+#line 1440 "cwebdir/ctangle.w"
 
 scan_repl(section_name);
 /*97:*/
-#line 1433 "cwebdir/ctangle.w"
+#line 1448 "cwebdir/ctangle.w"
 
-if(p==name_dir||p==0){
-(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
+if(p==name_dir||p==NULL){
+last_unnamed->text_link= cur_text-text_info;last_unnamed= cur_text;
 }
 else if(p->equiv==(void*)text_info)p->equiv= (void*)cur_text;
 
@@ -1835,16 +1852,16 @@
 
 
 /*:97*/
-#line 1427 "cwebdir/ctangle.w"
+#line 1442 "cwebdir/ctangle.w"
 
 
 /*:95*/
-#line 1376 "cwebdir/ctangle.w"
+#line 1394 "cwebdir/ctangle.w"
 
 }
 
 /*:90*//*98:*/
-#line 1448 "cwebdir/ctangle.w"
+#line 1463 "cwebdir/ctangle.w"
 
 static void
 phase_one(void){
@@ -1854,34 +1871,32 @@
 skip_limbo();
 while(!input_has_ended)scan_section();
 check_complete();
-phase= 2;
 }
 
 /*:98*//*100:*/
-#line 1465 "cwebdir/ctangle.w"
+#line 1479 "cwebdir/ctangle.w"
 
 static void
 skip_limbo(void)
 {
-char c;
 while(true){
 if(loc> limit&&get_line()==false)return;
 *(limit+1)= '@';
 while(*loc!='@')loc++;
 if(loc++<=limit){
-c= *loc++;
+char c= *loc++;
 if(ccode[(eight_bits)c]==new_section)break;
 switch(ccode[(eight_bits)c]){
 case translit_code:/*102:*/
-#line 1496 "cwebdir/ctangle.w"
+#line 1509 "cwebdir/ctangle.w"
 
 while(xisspace(*loc)&&loc<limit)loc++;
 loc+= 3;
 if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
 ||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))
-#line 309 "cwebdir/ctang-w2c.ch"
+#line 317 "cwebdir/ctang-w2c.ch"
 err_print(_("! Improper hex number following @l"));
-#line 1502 "cwebdir/ctangle.w"
+#line 1515 "cwebdir/ctangle.w"
 
 else{
 unsigned int i;
@@ -1891,9 +1906,9 @@
 beg= loc;
 while(loc<limit&&(xisalpha(*loc)||xisdigit(*loc)||*loc=='_'))loc++;
 if(loc-beg>=translit_length)
-#line 315 "cwebdir/ctang-w2c.ch"
+#line 323 "cwebdir/ctang-w2c.ch"
 err_print(_("! Replacement string in @l too long"));
-#line 1512 "cwebdir/ctangle.w"
+#line 1525 "cwebdir/ctangle.w"
 
 else{
 strncpy(translit[i-0200],beg,(size_t)(loc-beg));
@@ -1902,21 +1917,21 @@
 }
 
 /*:102*/
-#line 1478 "cwebdir/ctangle.w"
+#line 1491 "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 297 "cwebdir/ctang-w2c.ch"
+#line 305 "cwebdir/ctang-w2c.ch"
 err_print(_("! Double @ should be used in control text"));
-#line 1484 "cwebdir/ctangle.w"
+#line 1497 "cwebdir/ctangle.w"
 
 break;
 }
-#line 303 "cwebdir/ctang-w2c.ch"
+#line 311 "cwebdir/ctang-w2c.ch"
 default:err_print(_("! Double @ should be used in limbo"));
-#line 1488 "cwebdir/ctangle.w"
+#line 1501 "cwebdir/ctangle.w"
 
 }
 }
@@ -1924,11 +1939,11 @@
 }
 
 /*:100*//*103:*/
-#line 1522 "cwebdir/ctangle.w"
+#line 1535 "cwebdir/ctangle.w"
 
 void
 print_stats(void){
-#line 328 "cwebdir/ctang-w2c.ch"
+#line 336 "cwebdir/ctang-w2c.ch"
 puts(_("\nMemory usage statistics:"));
 printf(_("%ld names (out of %ld)\n"),
 (ptrdiff_t)(name_ptr-name_dir),(long)max_names);
@@ -1937,9 +1952,9 @@
 printf(_("%ld bytes (out of %ld)\n"),
 (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
 printf(_("%ld tokens (out of %ld)\n"),
-#line 1533 "cwebdir/ctangle.w"
+#line 1546 "cwebdir/ctangle.w"
 (ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks);
 }
 
-#line 341 "cwebdir/ctang-w2c.ch"
+#line 349 "cwebdir/ctang-w2c.ch"
 /*:103*/

Modified: branches/stable/source/src/texk/web2c/cwebboot.cin
===================================================================
--- branches/stable/source/src/texk/web2c/cwebboot.cin	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebboot.cin	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,8 +1,8 @@
 /*1:*/
-#line 66 "cwebdir/common.w"
+#line 62 "cwebdir/common.w"
 
 /*3:*/
-#line 53 "cwebdir/comm-w2c.h"
+#line 51 "cwebdir/comm-w2c.h"
 
 #ifndef HAVE_GETTEXT
 #define HAVE_GETTEXT 0
@@ -11,7 +11,7 @@
 #if HAVE_GETTEXT
 #include <libintl.h> 
 #else
-#define gettext(A) A
+#define gettext(a) a
 #endif
 
 #include <ctype.h>  
@@ -23,18 +23,18 @@
 #include <string.h>  
 
 /*:3*//*89:*/
-#line 709 "cwebdir/comm-w2c.ch"
+#line 717 "cwebdir/comm-w2c.ch"
 
 #if HAVE_GETTEXT
 #include <locale.h>  
 #else
-#define setlocale(A,B) ""
-#define bindtextdomain(A,B) ""
-#define textdomain(A) ""
+#define setlocale(a,b) ""
+#define bindtextdomain(a,b) ""
+#define textdomain(a) ""
 #endif
 
 /*:89*//*91:*/
-#line 756 "cwebdir/comm-w2c.ch"
+#line 764 "cwebdir/comm-w2c.ch"
 
 typedef bool boolean;
 #define HAVE_BOOLEAN
@@ -44,15 +44,15 @@
 #include <lib/lib.h>  
 
 /*:91*//*94:*/
-#line 795 "cwebdir/comm-w2c.ch"
+#line 803 "cwebdir/comm-w2c.ch"
 
 #define CWEB
 #include "help.h" 
 
 /*:94*/
-#line 67 "cwebdir/common.w"
+#line 63 "cwebdir/common.w"
 
-#define _(S) gettext(S)  \
+#define _(s) gettext(s)  \
 
 #define and_and 04
 #define lt_lt 020
@@ -70,13 +70,19 @@
 #define period_ast 026
 #define minus_gt_ast 027 \
 
-#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 compress(c) if(loc++<=limit) return c \
 
+#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 isxalpha(c) ((c) =='_'||(c) =='$')  \
+
+#define ishigh(c) ((eight_bits) (c) > 0177)  \
+ \
+
 #define max_include_depth 10 \
 
 #define max_file_name_length 1024
@@ -87,7 +93,7 @@
 #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 print_id(c) term_write((c) ->byte_start,length(c) ) 
 #define llink link
 #define rlink dummy.Rlink
 #define root name_dir->rlink \
@@ -97,7 +103,7 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless {if(history==spotless) history= harmless_message;}
+#define mark_harmless if(history==spotless) history= harmless_message
 #define mark_error history= error_message
 #define confusion(s) fatal(_("! This can't happen: ") ,s)  \
  \
@@ -104,38 +110,33 @@
 
 #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 temporary_output flags['t']
-#define make_xrefs flags['x'] \
+#define make_xrefs flags['x']
+#define check_for_change flags['c'] \
 
 #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 term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
+#define buf_size 1000
+#define longest_name 10000 \
+
+#define long_buf_size (buf_size+longest_name) 
 #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 max_sections 4000 \
 
 #define lines_dont_match (change_limit-change_buffer!=limit-buffer|| \
 strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) )  \
 
-#define if_section_start_make_pending(b) {*limit= '!'; \
+#define if_section_start_make_pending(b)  \
+*limit= '!'; \
 for(loc= buffer;xisspace(*loc) ;loc++) ; \
 *limit= ' '; \
 if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b; \
-} \
 
 #define too_long() {include_depth--; \
 err_print(_("! Include file name too long") ) ;goto restart;} \
@@ -171,10 +172,10 @@
 #define kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)  \
 
 
-#line 68 "cwebdir/common.w"
+#line 64 "cwebdir/common.w"
 
 /*2:*/
-#line 35 "cwebdir/comm-w2c.h"
+#line 33 "cwebdir/comm-w2c.h"
 
 typedef bool boolean;
 typedef uint8_t eight_bits;
@@ -194,7 +195,7 @@
 extern char*id_loc;
 
 /*:4*//*5:*/
-#line 105 "cwebdir/comm-w2c.h"
+#line 109 "cwebdir/comm-w2c.h"
 
 extern char buffer[];
 extern char*buffer_end;
@@ -202,7 +203,7 @@
 extern char*limit;
 
 /*:5*//*6:*/
-#line 122 "cwebdir/comm-w2c.h"
+#line 126 "cwebdir/comm-w2c.h"
 
 extern int include_depth;
 extern FILE*file[];
@@ -219,7 +220,7 @@
 extern boolean web_file_open;
 
 /*:6*//*8:*/
-#line 143 "cwebdir/comm-w2c.h"
+#line 147 "cwebdir/comm-w2c.h"
 
 extern sixteen_bits section_count;
 extern boolean changed_section[];
@@ -227,7 +228,7 @@
 extern boolean print_where;
 
 /*:8*//*9:*/
-#line 157 "cwebdir/comm-w2c.h"
+#line 161 "cwebdir/comm-w2c.h"
 
 typedef struct name_info{
 char*byte_start;
@@ -252,12 +253,12 @@
 extern hash_pointer h;
 
 /*:9*//*11:*/
-#line 201 "cwebdir/comm-w2c.h"
+#line 205 "cwebdir/comm-w2c.h"
 
 extern int history;
 
 /*:11*//*13:*/
-#line 218 "cwebdir/comm-w2c.h"
+#line 222 "cwebdir/comm-w2c.h"
 
 extern int argc;
 extern char**argv;
@@ -269,7 +270,7 @@
 extern const char*use_language;
 
 /*:13*//*14:*/
-#line 235 "cwebdir/comm-w2c.h"
+#line 237 "cwebdir/comm-w2c.h"
 
 extern FILE*C_file;
 extern FILE*tex_file;
@@ -279,22 +280,22 @@
 extern FILE*check_file;
 
 /*:14*/
-#line 69 "cwebdir/common.w"
+#line 65 "cwebdir/common.w"
 
 /*18:*/
-#line 83 "cwebdir/common.w"
+#line 79 "cwebdir/common.w"
 
 #line 72 "cwebdir/comm-w2c.ch"
 cweb program;
-#line 85 "cwebdir/common.w"
+#line 81 "cwebdir/common.w"
 
 /*:18*//*19:*/
-#line 92 "cwebdir/common.w"
+#line 88 "cwebdir/common.w"
 
 int phase;
 
 /*:19*//*21:*/
-#line 130 "cwebdir/common.w"
+#line 126 "cwebdir/common.w"
 
 char section_text[longest_name+1];
 char*section_text_end= section_text+longest_name;
@@ -302,7 +303,7 @@
 char*id_loc;
 
 /*:21*//*22:*/
-#line 150 "cwebdir/common.w"
+#line 146 "cwebdir/common.w"
 
 char buffer[long_buf_size];
 char*buffer_end= buffer+buf_size-2;
@@ -310,7 +311,7 @@
 char*limit= buffer;
 
 /*:22*//*25:*/
-#line 194 "cwebdir/common.w"
+#line 190 "cwebdir/common.w"
 
 int include_depth;
 FILE*file[max_include_depth];
@@ -318,7 +319,7 @@
 char file_name[max_include_depth][max_file_name_length];
 
 char change_file_name[max_file_name_length];
-#line 202 "cwebdir/common.w"
+#line 198 "cwebdir/common.w"
 int line[max_include_depth];
 int change_line;
 int change_depth;
@@ -327,13 +328,13 @@
 boolean web_file_open= false;
 
 /*:25*//*26:*/
-#line 220 "cwebdir/common.w"
+#line 216 "cwebdir/common.w"
 
 static char change_buffer[buf_size];
 static char*change_limit;
 
 /*:26*//*37:*/
-#line 399 "cwebdir/common.w"
+#line 393 "cwebdir/common.w"
 
 sixteen_bits section_count;
 boolean changed_section[max_sections];
@@ -342,7 +343,7 @@
 boolean print_where= false;
 
 /*:37*//*43:*/
-#line 596 "cwebdir/common.w"
+#line 590 "cwebdir/common.w"
 
 char byte_mem[max_bytes];
 char*byte_mem_end= byte_mem+max_bytes-1;
@@ -350,13 +351,13 @@
 name_pointer name_dir_end= name_dir+max_names-1;
 
 /*:43*//*44:*/
-#line 607 "cwebdir/common.w"
+#line 601 "cwebdir/common.w"
 
 char*byte_ptr;
 name_pointer name_ptr;
 
 /*:44*//*46:*/
-#line 627 "cwebdir/common.w"
+#line 621 "cwebdir/common.w"
 
 name_pointer hash[hash_size];
 hash_pointer hash_end= hash+hash_size-1;
@@ -363,12 +364,12 @@
 hash_pointer h;
 
 /*:46*//*65:*/
-#line 1014 "cwebdir/common.w"
+#line 1003 "cwebdir/common.w"
 
 int history= spotless;
 
 /*:65*//*73:*/
-#line 1135 "cwebdir/common.w"
+#line 1126 "cwebdir/common.w"
 
 int argc;
 char**argv;
@@ -375,35 +376,35 @@
 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 431 "cwebdir/comm-w2c.ch"
+#line 447 "cwebdir/comm-w2c.ch"
 char scn_file_name[max_file_name_length];
 char check_file_name[max_file_name_length];
-#line 1142 "cwebdir/common.w"
+#line 1133 "cwebdir/common.w"
 boolean flags[128];
 
 /*:73*//*83:*/
-#line 1282 "cwebdir/common.w"
+#line 1269 "cwebdir/common.w"
 
 FILE*C_file;
 FILE*tex_file;
 FILE*idx_file;
-#line 569 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
 FILE*scn_file;
 FILE*check_file;
-#line 576 "cwebdir/comm-w2c.ch"
+#line 584 "cwebdir/comm-w2c.ch"
 FILE*active_file;
 char*found_filename;
-#line 1288 "cwebdir/common.w"
+#line 1275 "cwebdir/common.w"
 
-#line 593 "cwebdir/comm-w2c.ch"
+#line 601 "cwebdir/comm-w2c.ch"
 /*:83*//*86:*/
-#line 638 "cwebdir/comm-w2c.ch"
+#line 646 "cwebdir/comm-w2c.ch"
 
 const char*use_language= "";
 
 
 /*:86*//*87:*/
-#line 651 "cwebdir/comm-w2c.ch"
+#line 659 "cwebdir/comm-w2c.ch"
 
 char cb_banner[max_banner];
 string texmf_locale;
@@ -413,10 +414,10 @@
 char separators[]= SEPARATORS;
 
 /*:87*/
-#line 70 "cwebdir/common.w"
+#line 66 "cwebdir/common.w"
 
 /*7:*/
-#line 137 "cwebdir/comm-w2c.h"
+#line 141 "cwebdir/comm-w2c.h"
 
 extern boolean get_line(void);
 extern void check_complete(void);
@@ -423,12 +424,12 @@
 extern void reset_input(void);
 
 /*:7*//*10:*/
-#line 180 "cwebdir/comm-w2c.h"
+#line 184 "cwebdir/comm-w2c.h"
 
 extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
 extern name_pointer id_lookup(const char*,const char*,char);
 
-extern name_pointer section_lookup(char*,char*,int);
+extern name_pointer section_lookup(char*,char*,boolean);
 extern void init_node(name_pointer);
 extern void init_p(name_pointer,eight_bits);
 extern void print_prefix_name(name_pointer);
@@ -436,7 +437,7 @@
 extern void sprint_section_name(char*,name_pointer);
 
 /*:10*//*12:*/
-#line 204 "cwebdir/comm-w2c.h"
+#line 208 "cwebdir/comm-w2c.h"
 
 extern int wrap_up(void);
 extern void err_print(const char*);
@@ -444,7 +445,7 @@
 extern void overflow(const char*);
 
 /*:12*//*15:*/
-#line 244 "cwebdir/comm-w2c.h"
+#line 246 "cwebdir/comm-w2c.h"
 
 extern void common_init(void);
 extern void print_stats(void);
@@ -451,45 +452,45 @@
 extern void cb_show_banner(void);
 
 /*:15*//*24:*/
-#line 180 "cwebdir/common.w"
+#line 176 "cwebdir/common.w"
 static boolean input_ln(FILE*);
 
 /*:24*//*28:*/
-#line 241 "cwebdir/common.w"
+#line 237 "cwebdir/common.w"
 static void prime_the_change_buffer(void);
 
 /*:28*//*33:*/
-#line 340 "cwebdir/common.w"
+#line 334 "cwebdir/common.w"
 static void check_change(void);
 
 /*:33*//*55:*/
-#line 774 "cwebdir/common.w"
+#line 764 "cwebdir/common.w"
 
 static int web_strcmp(char*,int,char*,int);
-static name_pointer add_section_name(name_pointer,int,char*,char*,int);
-static void extend_section_name(name_pointer,char*,char*,int);
+static name_pointer add_section_name(name_pointer,int,char*,char*,boolean);
+static void extend_section_name(name_pointer,char*,char*,boolean);
 
 /*:55*//*64:*/
-#line 1002 "cwebdir/common.w"
+#line 991 "cwebdir/common.w"
 static int section_name_cmp(char**,int,name_pointer);
 
 /*:64*//*76:*/
-#line 1197 "cwebdir/common.w"
+#line 1186 "cwebdir/common.w"
 static void scan_args(void);
 
-#line 496 "cwebdir/comm-w2c.ch"
+#line 507 "cwebdir/comm-w2c.ch"
 /*:76*//*96:*/
-#line 808 "cwebdir/comm-w2c.ch"
+#line 816 "cwebdir/comm-w2c.ch"
 
 static void cb_usage(const_string str);
 static void cb_usagehelp(const_string*message,const_string bug_email);
 
 /*:96*/
-#line 71 "cwebdir/common.w"
+#line 67 "cwebdir/common.w"
 
 
 /*:1*//*20:*/
-#line 99 "cwebdir/common.w"
+#line 95 "cwebdir/common.w"
 
 void
 common_init(void)
@@ -496,7 +497,7 @@
 {
 #line 78 "cwebdir/comm-w2c.ch"
 /*45:*/
-#line 611 "cwebdir/common.w"
+#line 605 "cwebdir/common.w"
 
 name_dir->byte_start= byte_ptr= byte_mem;
 name_ptr= name_dir+1;
@@ -504,7 +505,7 @@
 root= NULL;
 
 /*:45*//*47:*/
-#line 634 "cwebdir/common.w"
+#line 628 "cwebdir/common.w"
 
 for(h= hash;h<=hash_end;*h++= NULL);
 
@@ -512,7 +513,7 @@
 #line 78 "cwebdir/comm-w2c.ch"
 
 /*92:*/
-#line 770 "cwebdir/comm-w2c.ch"
+#line 778 "cwebdir/comm-w2c.ch"
 
 kpse_set_program_name(argv[0],"cweb");
 
@@ -521,7 +522,7 @@
 
 #line 85 "cwebdir/comm-w2c.ch"
 /*90:*/
-#line 718 "cwebdir/comm-w2c.ch"
+#line 726 "cwebdir/comm-w2c.ch"
 
 setlocale(LC_MESSAGES,setlocale(LC_CTYPE,""));
 texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}");
@@ -540,20 +541,18 @@
 #line 85 "cwebdir/comm-w2c.ch"
 
 /*74:*/
-#line 1148 "cwebdir/common.w"
+#line 1139 "cwebdir/common.w"
 
-#line 438 "cwebdir/comm-w2c.ch"
-make_xrefs= true;
-temporary_output= true;
-#line 1150 "cwebdir/common.w"
-show_stats= false;
+#line 454 "cwebdir/comm-w2c.ch"
+make_xrefs= check_for_change= true;
+#line 1141 "cwebdir/common.w"
 
 /*:74*/
 #line 86 "cwebdir/comm-w2c.ch"
 
-#line 105 "cwebdir/common.w"
+#line 101 "cwebdir/common.w"
 /*84:*/
-#line 593 "cwebdir/comm-w2c.ch"
+#line 601 "cwebdir/comm-w2c.ch"
 
 scan_args();
 if(program==ctangle){
@@ -584,16 +583,16 @@
 if((tex_file= fopen(check_file_name,"wb"))==NULL)
 fatal(_("! Cannot open output file "),check_file_name);
 }
-#line 1300 "cwebdir/common.w"
+#line 1287 "cwebdir/common.w"
 
-#line 628 "cwebdir/comm-w2c.ch"
+#line 636 "cwebdir/comm-w2c.ch"
 /*:84*/
-#line 105 "cwebdir/common.w"
+#line 101 "cwebdir/common.w"
 
 }
 
 /*:20*//*23:*/
-#line 160 "cwebdir/common.w"
+#line 156 "cwebdir/common.w"
 
 static boolean input_ln(
 FILE*fp)
@@ -605,12 +604,12 @@
 while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
 #line 92 "cwebdir/comm-w2c.ch"
 if((*(k++)= c)!=' '&&c!='\r')limit= k;
-#line 170 "cwebdir/common.w"
+#line 166 "cwebdir/common.w"
 if(k> buffer_end)
 if((c= getc(fp))!=EOF&&c!='\n'){
 #line 98 "cwebdir/comm-w2c.ch"
 ungetc(c,fp);loc= buffer;err_print(_("! Input line too long"));
-#line 173 "cwebdir/common.w"
+#line 169 "cwebdir/common.w"
 
 }
 if(c==EOF&&limit==buffer)return false;
@@ -619,7 +618,7 @@
 }
 
 /*:23*//*27:*/
-#line 231 "cwebdir/common.w"
+#line 227 "cwebdir/common.w"
 
 static void
 prime_the_change_buffer(void)
@@ -626,7 +625,7 @@
 {
 change_limit= change_buffer;
 /*29:*/
-#line 247 "cwebdir/common.w"
+#line 243 "cwebdir/common.w"
 
 while(true){
 change_line++;
@@ -639,16 +638,16 @@
 loc= buffer+2;
 #line 109 "cwebdir/comm-w2c.ch"
 err_print(_("! Missing @x in change file"));
-#line 258 "cwebdir/common.w"
+#line 254 "cwebdir/common.w"
 
 }
 }
 
 /*:29*/
-#line 236 "cwebdir/common.w"
+#line 232 "cwebdir/common.w"
 
 /*30:*/
-#line 264 "cwebdir/common.w"
+#line 260 "cwebdir/common.w"
 
 do{
 change_line++;
@@ -655,7 +654,7 @@
 if(!input_ln(change_file)){
 #line 115 "cwebdir/comm-w2c.ch"
 err_print(_("! Change file ended after @x"));
-#line 269 "cwebdir/common.w"
+#line 265 "cwebdir/common.w"
 
 return;
 }
@@ -662,23 +661,21 @@
 }while(limit==buffer);
 
 /*:30*/
-#line 237 "cwebdir/common.w"
+#line 233 "cwebdir/common.w"
 
 /*31:*/
-#line 274 "cwebdir/common.w"
+#line 270 "cwebdir/common.w"
 
-{
 change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
 strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
-}
 
 /*:31*/
-#line 238 "cwebdir/common.w"
+#line 234 "cwebdir/common.w"
 
 }
 
 /*:27*//*32:*/
-#line 302 "cwebdir/common.w"
+#line 296 "cwebdir/common.w"
 
 static void
 check_change(void)
@@ -691,11 +688,11 @@
 if(!change_pending)changed_section[section_count]= true;
 }
 while(true){
-changing= true;print_where= true;change_line++;
+changing= print_where= true;change_line++;
 if(!input_ln(change_file)){
 #line 121 "cwebdir/comm-w2c.ch"
 err_print(_("! Change file ended before @y"));
-#line 317 "cwebdir/common.w"
+#line 311 "cwebdir/common.w"
 
 change_limit= change_buffer;changing= false;
 return;
@@ -703,12 +700,12 @@
 if(limit> buffer+1&&buffer[0]=='@'){
 char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1];
 /*34:*/
-#line 342 "cwebdir/common.w"
+#line 336 "cwebdir/common.w"
 
 if(xyz_code=='x'||xyz_code=='z'){
 #line 133 "cwebdir/comm-w2c.ch"
 loc= buffer+2;err_print(_("! Where is the matching @y?"));
-#line 345 "cwebdir/common.w"
+#line 339 "cwebdir/common.w"
 
 }
 else if(xyz_code=='y'){
@@ -717,7 +714,7 @@
 printf("\n! Hmm... %d ",n);
 #line 139 "cwebdir/comm-w2c.ch"
 err_print(_("of the preceding lines failed to match"));
-#line 352 "cwebdir/common.w"
+#line 346 "cwebdir/common.w"
 
 }
 change_depth= include_depth;
@@ -725,19 +722,17 @@
 }
 
 /*:34*/
-#line 324 "cwebdir/common.w"
+#line 318 "cwebdir/common.w"
 
 }
 /*31:*/
-#line 274 "cwebdir/common.w"
+#line 270 "cwebdir/common.w"
 
-{
 change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
 strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
-}
 
 /*:31*/
-#line 326 "cwebdir/common.w"
+#line 320 "cwebdir/common.w"
 
 changing= false;cur_line++;
 while(!input_ln(cur_file)){
@@ -744,7 +739,7 @@
 if(include_depth==0){
 #line 127 "cwebdir/comm-w2c.ch"
 err_print(_("! CWEB file ended during a change"));
-#line 331 "cwebdir/common.w"
+#line 325 "cwebdir/common.w"
 
 input_has_ended= true;return;
 }
@@ -755,7 +750,7 @@
 }
 
 /*:32*//*35:*/
-#line 362 "cwebdir/common.w"
+#line 356 "cwebdir/common.w"
 
 void
 reset_input(void)
@@ -762,13 +757,13 @@
 {
 limit= buffer;loc= buffer+1;buffer[0]= ' ';
 /*36:*/
-#line 377 "cwebdir/common.w"
+#line 371 "cwebdir/common.w"
 
 #line 149 "cwebdir/comm-w2c.ch"
-if((found_filename= kpse_find_cweb(web_file_name))==NULL||
-(web_file= fopen(found_filename,"r"))==NULL){
+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);
-}else if(strlen(found_filename)<max_file_name_length){
+else if(strlen(found_filename)<max_file_name_length){
 
 if(strcmp(web_file_name,found_filename))
 strcpy(web_file_name,found_filename+
@@ -775,15 +770,15 @@
 ((strncmp(found_filename,"./",2)==0)?2:0));
 free(found_filename);
 }else fatal(_("! Filename too long\n"),found_filename);
-#line 383 "cwebdir/common.w"
+#line 377 "cwebdir/common.w"
 
 
 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){
+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);
-}else if(strlen(found_filename)<max_file_name_length){
+else if(strlen(found_filename)<max_file_name_length){
 
 if(strcmp(change_file_name,found_filename))
 strcpy(change_file_name,found_filename+
@@ -790,19 +785,19 @@
 ((strncmp(found_filename,"./",2)==0)?2:0));
 free(found_filename);
 }else fatal(_("! Filename too long\n"),found_filename);
-#line 388 "cwebdir/common.w"
+#line 382 "cwebdir/common.w"
 
 /*:36*/
-#line 367 "cwebdir/common.w"
+#line 361 "cwebdir/common.w"
 
-include_depth= 0;cur_line= 0;change_line= 0;
+include_depth= cur_line= change_line= 0;
 change_depth= include_depth;
-changing= 1;prime_the_change_buffer();changing= !changing;
+changing= true;prime_the_change_buffer();changing= !changing;
 limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false;
 }
 
 /*:35*//*38:*/
-#line 406 "cwebdir/common.w"
+#line 400 "cwebdir/common.w"
 
 boolean get_line(void)
 {
@@ -809,13 +804,13 @@
 restart:
 if(changing&&include_depth==change_depth)
 /*41:*/
-#line 514 "cwebdir/common.w"
+#line 508 "cwebdir/common.w"
 {
 change_line++;
 if(!input_ln(change_file)){
 #line 274 "cwebdir/comm-w2c.ch"
 err_print(_("! Change file ended without @z"));
-#line 518 "cwebdir/common.w"
+#line 512 "cwebdir/common.w"
 
 buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;
 }
@@ -833,7 +828,7 @@
 loc= buffer+2;
 #line 280 "cwebdir/comm-w2c.ch"
 err_print(_("! Where is the matching @z?"));
-#line 534 "cwebdir/common.w"
+#line 528 "cwebdir/common.w"
 
 }
 else if(buffer[1]=='z'){
@@ -844,11 +839,11 @@
 }
 
 /*:41*/
-#line 411 "cwebdir/common.w"
+#line 405 "cwebdir/common.w"
 
 if(!changing||include_depth> change_depth){
 /*40:*/
-#line 497 "cwebdir/common.w"
+#line 491 "cwebdir/common.w"
 {
 cur_line++;
 while(!input_ln(cur_file)){
@@ -867,7 +862,7 @@
 }
 
 /*:40*/
-#line 413 "cwebdir/common.w"
+#line 407 "cwebdir/common.w"
 
 if(changing&&include_depth==change_depth)goto restart;
 }
@@ -879,7 +874,7 @@
 if(loc>=limit){
 #line 180 "cwebdir/comm-w2c.ch"
 err_print(_("! Include file name not given"));
-#line 423 "cwebdir/common.w"
+#line 417 "cwebdir/common.w"
 
 goto restart;
 }
@@ -886,18 +881,18 @@
 if(include_depth>=max_include_depth-1){
 #line 186 "cwebdir/comm-w2c.ch"
 err_print(_("! Too many nested includes"));
-#line 428 "cwebdir/common.w"
+#line 422 "cwebdir/common.w"
 
 goto restart;
 }
 include_depth++;
 /*39:*/
-#line 451 "cwebdir/common.w"
+#line 445 "cwebdir/common.w"
 {
 #line 223 "cwebdir/comm-w2c.ch"
 char*cur_file_name_end= cur_file_name+max_file_name_length-1;
 char*k= cur_file_name;
-#line 456 "cwebdir/common.w"
+#line 450 "cwebdir/common.w"
 
 if(*loc=='"'){
 loc++;
@@ -909,8 +904,8 @@
 
 *k= '\0';
 #line 230 "cwebdir/comm-w2c.ch"
-if((found_filename= kpse_find_cweb(cur_file_name))!=NULL&&
-(cur_file= fopen(found_filename,"r"))!=NULL){
+if((found_filename= kpse_find_cweb(cur_file_name))!=NULL
+&&(cur_file= fopen(found_filename,"r"))!=NULL){
 
 if(strlen(found_filename)<max_file_name_length){
 if(strcmp(cur_file_name,found_filename))
@@ -918,17 +913,17 @@
 ((strncmp(found_filename,"./",2)==0)?2:0));
 free(found_filename);
 }else fatal(_("! Filename too long\n"),found_filename);
-#line 467 "cwebdir/common.w"
+#line 461 "cwebdir/common.w"
 cur_line= 0;print_where= true;
 goto restart;
 }
 #line 268 "cwebdir/comm-w2c.ch"
 include_depth--;err_print(_("! Cannot open include file"));goto restart;
-#line 495 "cwebdir/common.w"
+#line 489 "cwebdir/common.w"
 }
 
 /*:39*/
-#line 432 "cwebdir/common.w"
+#line 426 "cwebdir/common.w"
 
 }
 return true;
@@ -936,7 +931,7 @@
 
 #line 201 "cwebdir/comm-w2c.ch"
 /*:38*//*42:*/
-#line 546 "cwebdir/common.w"
+#line 540 "cwebdir/common.w"
 
 void
 check_complete(void){
@@ -946,13 +941,13 @@
 changing= true;change_depth= include_depth;loc= buffer;
 #line 286 "cwebdir/comm-w2c.ch"
 err_print(_("! Change file entry did not match"));
-#line 554 "cwebdir/common.w"
+#line 548 "cwebdir/common.w"
 
 }
 }
 
 /*:42*//*48:*/
-#line 639 "cwebdir/common.w"
+#line 633 "cwebdir/common.w"
 
 name_pointer
 id_lookup(
@@ -967,7 +962,7 @@
 if(last==NULL)for(last= first;*last!='\0';last++);
 l= (int)(last-first);
 /*49:*/
-#line 662 "cwebdir/common.w"
+#line 656 "cwebdir/common.w"
 
 h= (eight_bits)*i;
 while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
@@ -974,10 +969,10 @@
 
 
 /*:49*/
-#line 652 "cwebdir/common.w"
+#line 646 "cwebdir/common.w"
 
 /*50:*/
-#line 670 "cwebdir/common.w"
+#line 664 "cwebdir/common.w"
 
 p= hash[h];
 while(p&&!names_match(p,first,l,t))p= p->link;
@@ -987,15 +982,15 @@
 }
 
 /*:50*/
-#line 653 "cwebdir/common.w"
+#line 647 "cwebdir/common.w"
 
 if(p==name_ptr)/*51:*/
-#line 681 "cwebdir/common.w"
+#line 676 "cwebdir/common.w"
 {
-#line 293 "cwebdir/comm-w2c.ch"
+#line 299 "cwebdir/comm-w2c.ch"
 if(byte_ptr+l> byte_mem_end)overflow(_("byte memory"));
 if(name_ptr>=name_dir_end)overflow(_("name"));
-#line 684 "cwebdir/common.w"
+#line 679 "cwebdir/common.w"
 strncpy(byte_ptr,first,l);
 (++name_ptr)->byte_start= byte_ptr+= l;
 init_p(p,t);
@@ -1002,13 +997,13 @@
 }
 
 /*:51*/
-#line 654 "cwebdir/common.w"
+#line 648 "cwebdir/common.w"
 
 return p;
 }
 
 /*:48*//*52:*/
-#line 713 "cwebdir/common.w"
+#line 708 "cwebdir/common.w"
 
 void
 print_section_name(
@@ -1018,11 +1013,9 @@
 name_pointer q= p+1;
 while(p!=name_dir){
 ss= (p+1)->byte_start-1;
-if(*ss==' '&&ss>=s){
-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;
-}
+if(*ss==' '&&ss>=s)p= q->link,q= p;
+else ss++,p= name_dir,q= NULL;
+term_write(s,(size_t)(ss-s));
 s= p->byte_start;
 }
 if(q)term_write("...",3);
@@ -1029,7 +1022,7 @@
 }
 
 /*:52*//*53:*/
-#line 732 "cwebdir/common.w"
+#line 725 "cwebdir/common.w"
 
 void
 sprint_section_name(
@@ -1040,11 +1033,8 @@
 name_pointer q= p+1;
 while(p!=name_dir){
 ss= (p+1)->byte_start-1;
-if(*ss==' '&&ss>=s){
-p= q->link;q= p;
-}else{
-ss++;p= name_dir;
-}
+if(*ss==' '&&ss>=s)p= q->link,q= p;
+else ss++,p= name_dir;
 strncpy(dest,s,(size_t)(ss-s)),dest+= ss-s;
 s= p->byte_start;
 }
@@ -1052,7 +1042,7 @@
 }
 
 /*:53*//*54:*/
-#line 753 "cwebdir/common.w"
+#line 743 "cwebdir/common.w"
 
 void
 print_prefix_name(
@@ -1065,7 +1055,7 @@
 }
 
 /*:54*//*56:*/
-#line 779 "cwebdir/common.w"
+#line 769 "cwebdir/common.w"
 
 static int web_strcmp(
 char*j,
@@ -1083,7 +1073,7 @@
 }
 
 /*:56*//*57:*/
-#line 808 "cwebdir/common.w"
+#line 798 "cwebdir/common.w"
 
 static name_pointer
 add_section_name(
@@ -1091,15 +1081,15 @@
 int c,
 char*first,
 char*last,
-int ispref)
+boolean ispref)
 {
 name_pointer p= name_ptr;
 char*s= first_chunk(p);
 int name_len= (int)(last-first)+ispref;
-#line 301 "cwebdir/comm-w2c.ch"
+#line 307 "cwebdir/comm-w2c.ch"
 if(s+name_len> byte_mem_end)overflow(_("byte memory"));
 if(name_ptr+1>=name_dir_end)overflow(_("name"));
-#line 822 "cwebdir/common.w"
+#line 812 "cwebdir/common.w"
 (++name_ptr)->byte_start= byte_ptr= s+name_len;
 if(ispref){
 *(byte_ptr-1)= ' ';
@@ -1109,14 +1099,13 @@
 }
 set_prefix_length(p,name_len);
 strncpy(s,first,name_len);
-p->llink= NULL;
-p->rlink= NULL;
+p->llink= p->rlink= NULL;
 init_node(p);
 return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
 }
 
 /*:57*//*58:*/
-#line 837 "cwebdir/common.w"
+#line 826 "cwebdir/common.w"
 
 static void
 extend_section_name(
@@ -1123,21 +1112,21 @@
 name_pointer p,
 char*first,
 char*last,
-int ispref)
+boolean ispref)
 {
 char*s;
 name_pointer q= p+1;
 int name_len= (int)(last-first)+ispref;
-#line 308 "cwebdir/comm-w2c.ch"
+#line 314 "cwebdir/comm-w2c.ch"
 if(name_ptr>=name_dir_end)overflow(_("name"));
-#line 849 "cwebdir/common.w"
+#line 838 "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 314 "cwebdir/comm-w2c.ch"
+#line 320 "cwebdir/comm-w2c.ch"
 if(s+name_len> byte_mem_end)overflow(_("byte memory"));
-#line 854 "cwebdir/common.w"
+#line 843 "cwebdir/common.w"
 (++name_ptr)->byte_start= byte_ptr= s+name_len;
 strncpy(s,first,name_len);
 if(ispref)*(byte_ptr-1)= ' ';
@@ -1144,14 +1133,14 @@
 }
 
 /*:58*//*59:*/
-#line 865 "cwebdir/common.w"
+#line 854 "cwebdir/common.w"
 
 name_pointer
 section_lookup(
 char*first,char*last,
-int ispref)
+boolean ispref)
 {
-int c= 0;
+int c= less;
 name_pointer p= root;
 name_pointer q= NULL;
 name_pointer r= NULL;
@@ -1159,7 +1148,7 @@
 
 int name_len= (int)(last-first)+1;
 /*60:*/
-#line 889 "cwebdir/common.w"
+#line 878 "cwebdir/common.w"
 
 while(p){
 c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1169,14 +1158,14 @@
 p= (c==less?p->llink:p->rlink);
 }else{
 if(r!=NULL){
-#line 320 "cwebdir/comm-w2c.ch"
+#line 326 "cwebdir/comm-w2c.ch"
 fputs(_("\n! Ambiguous prefix: matches <"),stdout);
-#line 899 "cwebdir/common.w"
+#line 888 "cwebdir/common.w"
 
 print_prefix_name(p);
-#line 326 "cwebdir/comm-w2c.ch"
+#line 332 "cwebdir/comm-w2c.ch"
 fputs(_(">\n and <"),stdout);
-#line 902 "cwebdir/common.w"
+#line 891 "cwebdir/common.w"
 print_prefix_name(r);
 err_print(">");
 return name_dir;
@@ -1190,27 +1179,27 @@
 }
 
 /*:60*/
-#line 879 "cwebdir/common.w"
+#line 868 "cwebdir/common.w"
 
 /*61:*/
-#line 914 "cwebdir/common.w"
+#line 903 "cwebdir/common.w"
 
 if(r==NULL)
 return add_section_name(par,c,first,last+1,ispref);
 
 /*:61*/
-#line 880 "cwebdir/common.w"
+#line 869 "cwebdir/common.w"
 
 /*62:*/
-#line 922 "cwebdir/common.w"
+#line 911 "cwebdir/common.w"
 
 switch(section_name_cmp(&first,name_len,r)){
 
 case prefix:
 if(!ispref){
-#line 332 "cwebdir/comm-w2c.ch"
+#line 338 "cwebdir/comm-w2c.ch"
 fputs(_("\n! New name is a prefix of <"),stdout);
-#line 928 "cwebdir/common.w"
+#line 917 "cwebdir/common.w"
 
 print_section_name(r);
 err_print(">");
@@ -1217,39 +1206,39 @@
 }
 else if(name_len<prefix_length(r))set_prefix_length(r,name_len);
 
-case equal:return r;
+case equal:break;
 case extension:if(!ispref||first<=last)
 extend_section_name(r,first,last+1,ispref);
-return r;
+break;
 case bad_extension:
-#line 338 "cwebdir/comm-w2c.ch"
+#line 344 "cwebdir/comm-w2c.ch"
 fputs(_("\n! New name extends <"),stdout);
-#line 940 "cwebdir/common.w"
+#line 929 "cwebdir/common.w"
 
 print_section_name(r);
 err_print(">");
-return r;
+break;
 default:
-#line 344 "cwebdir/comm-w2c.ch"
+#line 350 "cwebdir/comm-w2c.ch"
 fputs(_("\n! Section name incompatible with <"),stdout);
-#line 946 "cwebdir/common.w"
+#line 935 "cwebdir/common.w"
 
 print_prefix_name(r);
-#line 350 "cwebdir/comm-w2c.ch"
+#line 356 "cwebdir/comm-w2c.ch"
 fputs(_(">,\n which abbreviates <"),stdout);
-#line 949 "cwebdir/common.w"
+#line 938 "cwebdir/common.w"
 print_section_name(r);
 err_print(">");
+}
 return r;
-}
 
 /*:62*/
-#line 881 "cwebdir/common.w"
+#line 870 "cwebdir/common.w"
 
 }
 
 /*:59*//*63:*/
-#line 970 "cwebdir/common.w"
+#line 959 "cwebdir/common.w"
 
 static int section_name_cmp(
 char**pfirst,
@@ -1259,12 +1248,12 @@
 char*first= *pfirst;
 name_pointer q= r+1;
 char*ss,*s= first_chunk(r);
-int c;
-int ispref;
+int c= less;
+boolean ispref;
 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;
+if(*ss==' '&&ss>=r->byte_start)ispref= true,q= q->link;
+else ispref= false,ss++,q= name_dir;
 switch(c= web_strcmp(first,len,s,ss-s)){
 case equal:if(q==name_dir)
 if(ispref){
@@ -1283,29 +1272,29 @@
 }
 
 /*:63*//*66:*/
-#line 1024 "cwebdir/common.w"
+#line 1013 "cwebdir/common.w"
 
 void
 err_print(
 const char*s)
 {
-char*k,*l;
 printf(*s=='!'?"\n%s":"%s",s);
 if(web_file_open)/*67:*/
-#line 1044 "cwebdir/common.w"
+#line 1032 "cwebdir/common.w"
 
-{if(changing&&include_depth==change_depth)
-#line 358 "cwebdir/comm-w2c.ch"
+{char*k,*l;
+if(changing&&include_depth==change_depth)
+#line 364 "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 1049 "cwebdir/common.w"
+#line 1038 "cwebdir/common.w"
 l= (loc>=limit?limit:loc);
 if(l> buffer){
 for(k= buffer;k<l;k++)
 if(*k=='\t')putchar(' ');
 else putchar(*k);
-putchar('\n');
+new_line;
 for(k= buffer;k<l;k++)putchar(' ');
 }
 for(k= l;k<limit;k++)putchar(*k);
@@ -1314,24 +1303,24 @@
 }
 
 /*:67*/
-#line 1031 "cwebdir/common.w"
+#line 1019 "cwebdir/common.w"
 
 update_terminal;mark_error;
 }
 
 /*:66*//*68:*/
-#line 1076 "cwebdir/common.w"
+#line 1065 "cwebdir/common.w"
 
 int wrap_up(void){
 if(show_progress)new_line;
 if(show_stats)
 print_stats();
-#line 388 "cwebdir/comm-w2c.ch"
+#line 394 "cwebdir/comm-w2c.ch"
 /*69:*/
-#line 1086 "cwebdir/common.w"
+#line 1075 "cwebdir/common.w"
 
 switch(history){
-#line 412 "cwebdir/comm-w2c.ch"
+#line 420 "cwebdir/comm-w2c.ch"
 case spotless:
 if(show_happiness)puts(_("(No errors were found.)"));break;
 case harmless_message:
@@ -1338,16 +1327,16 @@
 puts(_("(Did you see the warning message above?)"));break;
 case error_message:
 puts(_("(Pardon me, but I think I spotted something wrong.)"));break;
-case fatal_message:
+case fatal_message:default:
 puts(_("(That was a fatal error, my friend.)"));
-#line 1094 "cwebdir/common.w"
+#line 1085 "cwebdir/common.w"
 }
 
 /*:69*/
-#line 388 "cwebdir/comm-w2c.ch"
+#line 394 "cwebdir/comm-w2c.ch"
 
 /*88:*/
-#line 662 "cwebdir/comm-w2c.ch"
+#line 670 "cwebdir/comm-w2c.ch"
 
 if(C_file)fclose(C_file);
 if(tex_file)fclose(tex_file);
@@ -1356,20 +1345,20 @@
 remove(check_file_name);
 
 /*:88*/
-#line 389 "cwebdir/comm-w2c.ch"
+#line 395 "cwebdir/comm-w2c.ch"
 
-#line 396 "cwebdir/comm-w2c.ch"
+#line 402 "cwebdir/comm-w2c.ch"
 switch(history){
+case spotless:return RETURN_OK;
 case harmless_message:return RETURN_WARN;
 case error_message:return RETURN_ERROR;
-case fatal_message:return RETURN_FAIL;
-default:return RETURN_OK;
+case fatal_message:default:return RETURN_FAIL;
 }
-#line 1084 "cwebdir/common.w"
+#line 1073 "cwebdir/common.w"
 }
 
 /*:68*//*70:*/
-#line 1102 "cwebdir/common.w"
+#line 1093 "cwebdir/common.w"
 void
 fatal(
 const char*s,const char*t)
@@ -1380,19 +1369,19 @@
 }
 
 /*:70*//*71:*/
-#line 1113 "cwebdir/common.w"
+#line 1104 "cwebdir/common.w"
 void
 overflow(
 const char*t)
 {
-#line 425 "cwebdir/comm-w2c.ch"
+#line 433 "cwebdir/comm-w2c.ch"
 printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("","");
-#line 1118 "cwebdir/common.w"
+#line 1109 "cwebdir/common.w"
 }
 
 
 /*:71*//*75:*/
-#line 1167 "cwebdir/common.w"
+#line 1157 "cwebdir/common.w"
 
 static void
 scan_args(void)
@@ -1403,8 +1392,8 @@
 boolean found_web= false,found_change= false,found_out= false;
 
 
-#line 462 "cwebdir/comm-w2c.ch"
-
+#line 477 "cwebdir/comm-w2c.ch"
+strcpy(change_file_name,"/dev/null");
 #if defined DEV_NULL
 strncpy(change_file_name,DEV_NULL,max_file_name_length-2);
 change_file_name[max_file_name_length-2]= '\0';
@@ -1411,20 +1400,19 @@
 #elif defined _DEV_NULL
 strncpy(change_file_name,_DEV_NULL,max_file_name_length-2);
 change_file_name[max_file_name_length-2]= '\0';
-#else
-strcpy(change_file_name,"/dev/null");
 #endif
 
-#line 1178 "cwebdir/common.w"
+#line 1168 "cwebdir/common.w"
 while(--argc> 0){
 if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 510 "cwebdir/comm-w2c.ch"
+#line 1247 "cwebdir/common.w"
 
+#line 520 "cwebdir/comm-w2c.ch"
 {
 if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0)
 
 /*95:*/
-#line 799 "cwebdir/comm-w2c.ch"
+#line 807 "cwebdir/comm-w2c.ch"
 
 cb_usagehelp(program==ctangle?CTANGLEHELP:
 program==cweave?CWEAVEHELP:CTWILLHELP,NULL);
@@ -1431,12 +1419,12 @@
 
 
 /*:95*/
-#line 514 "cwebdir/comm-w2c.ch"
+#line 523 "cwebdir/comm-w2c.ch"
 
 if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0)
 
 /*98:*/
-#line 846 "cwebdir/comm-w2c.ch"
+#line 855 "cwebdir/comm-w2c.ch"
 
 printversionandexit(cb_banner,
 program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth",
@@ -1444,80 +1432,76 @@
 
 
 /*:98*/
-#line 517 "cwebdir/comm-w2c.ch"
+#line 526 "cwebdir/comm-w2c.ch"
 
 if(strcmp("-verbose",*argv)==0||strcmp("--verbose",*argv)==0)
 
-{show_banner= show_progress= show_happiness= 1;continue;}
+strcpy(*argv,"-v");
 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= true;
-}else
-if(*dot_pos=='q'){
-show_banner= show_progress= show_happiness= false;
-}else
-if(*dot_pos=='d'){
+strcpy(*argv,"-q");
+for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++){
+switch(*dot_pos){
+case'v':show_banner= show_progress= show_happiness= true;continue;
+case'q':show_banner= show_progress= show_happiness= false;continue;
+case'd':
 if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/
-#line 555 "cwebdir/comm-w2c.ch"
+#line 563 "cwebdir/comm-w2c.ch"
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
-#line 1275 "cwebdir/common.w"
+#line 1262 "cwebdir/common.w"
 
-#line 563 "cwebdir/comm-w2c.ch"
+#line 571 "cwebdir/comm-w2c.ch"
 /*:81*/
-#line 532 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 
 while(isdigit(*dot_pos))dot_pos++;
 dot_pos--;
-}else
-if(*dot_pos=='l'){
-use_language= ++dot_pos;
+continue;
+case'l':use_language= ++dot_pos;break;
+default:flags[(eight_bits)*dot_pos]= flag_change;continue;
+}
 break;
-}else
-#line 1261 "cwebdir/common.w"
- flags[(eight_bits)*dot_pos]= flag_change;
 }
+}
+#line 1250 "cwebdir/common.w"
 
-#line 555 "cwebdir/comm-w2c.ch"
+#line 563 "cwebdir/comm-w2c.ch"
 /*:80*/
-#line 1179 "cwebdir/common.w"
+#line 1169 "cwebdir/common.w"
 
 else{
 s= name_pos= *argv;dot_pos= NULL;
-#line 482 "cwebdir/comm-w2c.ch"
-while(*s){
+#line 494 "cwebdir/comm-w2c.ch"
+while(*s)
 if(*s=='.')dot_pos= s++;
 else if(*s==DIR_SEPARATOR||*s==DEVICE_SEPARATOR||*s=='/')
 dot_pos= NULL,name_pos= ++s;
 else s++;
-}
 
-#line 1187 "cwebdir/common.w"
+#line 1176 "cwebdir/common.w"
 if(!found_web)/*77:*/
-#line 1206 "cwebdir/common.w"
+#line 1195 "cwebdir/common.w"
 
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 563 "cwebdir/comm-w2c.ch"
+#line 571 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
-#line 1277 "cwebdir/common.w"
+#line 1264 "cwebdir/common.w"
 
 
 /*:82*/
-#line 1209 "cwebdir/common.w"
+#line 1198 "cwebdir/common.w"
 
 if(dot_pos==NULL)
 sprintf(web_file_name,"%s.w",*argv);
 else{
 strcpy(web_file_name,*argv);
-*dot_pos= 0;
+*dot_pos= '\0';
 }
-#line 1217 "cwebdir/common.w"
+#line 1206 "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);
@@ -1526,22 +1510,22 @@
 }
 
 /*:77*/
-#line 1188 "cwebdir/common.w"
+#line 1177 "cwebdir/common.w"
 
 else if(!found_change)/*78:*/
-#line 1224 "cwebdir/common.w"
+#line 1213 "cwebdir/common.w"
 
 {
 if(strcmp(*argv,"-")!=0){
 if(s-*argv> max_file_name_length-4)
 /*82:*/
-#line 563 "cwebdir/comm-w2c.ch"
+#line 571 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
-#line 1277 "cwebdir/common.w"
+#line 1264 "cwebdir/common.w"
 
 
 /*:82*/
-#line 1228 "cwebdir/common.w"
+#line 1217 "cwebdir/common.w"
 
 if(dot_pos==NULL)
 sprintf(change_file_name,"%s.ch",*argv);
@@ -1551,21 +1535,21 @@
 }
 
 /*:78*/
-#line 1189 "cwebdir/common.w"
+#line 1178 "cwebdir/common.w"
 
 else if(!found_out)/*79:*/
-#line 1236 "cwebdir/common.w"
+#line 1225 "cwebdir/common.w"
 
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 563 "cwebdir/comm-w2c.ch"
+#line 571 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
-#line 1277 "cwebdir/common.w"
+#line 1264 "cwebdir/common.w"
 
 
 /*:82*/
-#line 1239 "cwebdir/common.w"
+#line 1228 "cwebdir/common.w"
 
 if(dot_pos==NULL){
 sprintf(tex_file_name,"%s.tex",*argv);
@@ -1576,7 +1560,7 @@
 strcpy(tex_file_name,*argv);
 strcpy(C_file_name,*argv);
 if(make_xrefs){
-*dot_pos= 0;
+*dot_pos= '\0';
 sprintf(idx_file_name,"%s.idx",*argv);
 sprintf(scn_file_name,"%s.scn",*argv);
 }
@@ -1585,36 +1569,36 @@
 }
 
 /*:79*/
-#line 1190 "cwebdir/common.w"
+#line 1179 "cwebdir/common.w"
 
 else/*81:*/
-#line 555 "cwebdir/comm-w2c.ch"
+#line 563 "cwebdir/comm-w2c.ch"
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
-#line 1275 "cwebdir/common.w"
+#line 1262 "cwebdir/common.w"
 
-#line 563 "cwebdir/comm-w2c.ch"
+#line 571 "cwebdir/comm-w2c.ch"
 /*:81*/
-#line 1191 "cwebdir/common.w"
+#line 1180 "cwebdir/common.w"
 
 }
 }
 if(!found_web)/*81:*/
-#line 555 "cwebdir/comm-w2c.ch"
+#line 563 "cwebdir/comm-w2c.ch"
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
-#line 1275 "cwebdir/common.w"
+#line 1262 "cwebdir/common.w"
 
-#line 563 "cwebdir/comm-w2c.ch"
+#line 571 "cwebdir/comm-w2c.ch"
 /*:81*/
-#line 1194 "cwebdir/common.w"
+#line 1183 "cwebdir/common.w"
 
 }
 
 /*:75*//*97:*/
-#line 812 "cwebdir/comm-w2c.ch"
+#line 820 "cwebdir/comm-w2c.ch"
 
 static void cb_usage(const_string str)
 {
@@ -1635,6 +1619,7 @@
 textdomain("web2c-help");
 
 while(*message){
+
 printf("%s\n",strcmp("",*message)?_(*message):*message);
 ++message;
 }
@@ -1647,11 +1632,10 @@
 }
 
 /*:97*//*99:*/
-#line 854 "cwebdir/comm-w2c.ch"
+#line 863 "cwebdir/comm-w2c.ch"
 
 void cb_show_banner(void)
 {
-assert(cb_banner[0]!='\0');
 textdomain("cweb-tl");
 
 printf("%s%s\n",_(cb_banner),versionstring);

Modified: branches/stable/source/src/texk/web2c/cwebdir/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,71 @@
+2021-06-06  Andreas Scherer  <https://ascherer.github.io>
+
+	* Makefile,
+	* comm-{mac,mini,ql,w2c}.ch,
+	* comm-w2c.h,
+	* common.c,
+	* common.h,
+	* common.w,
+	* ctang-{bs,pc,ql,vms,w2c,w32}.ch,
+	* ctangle.c,
+	* ctangle.w,
+	* ctwill-{mini,w2c}.ch,
+	* ctwimac.tex,
+	* cweav-{bs,pc,ql,vms,w2c,w32}.ch,
+	* cweave.w,
+	* cwebmac.tex,
+	* cwebman-w2c.ch,
+	* cwebman.tex,
+	* po/cweb[-tl].pot,
+	* po/de/cweb[-tl].po,
+	* po/it/cweb.po,
+	* prod-twill.w,
+	* prod.w: CWEB 4.3 and CWEBbin 2021.
+
+2021-03-26  Andreas Scherer  <https://ascherer.github.io>
+
+	* common.w,
+	* ctangle.c,
+	* ctangle.w,
+	* ctwill-mini.ch,
+	* ctwill-w2c.ch,
+	* cweav-w2c.ch,
+	* cweave.w,
+	* prod-twill.w,
+	* prod.w: Parameter indentation for modern function headers.
+
+2021-03-19  Andreas Scherer  <https://ascherer.github.io>
+
+	* Makefile,
+	* README,
+	* comm-{bs,mac}.ch,
+	* comm-w2c.h,
+	* common.h,
+	* common.w,
+	* ctang-w2c.ch,
+	* ctangle.c,
+	* ctangle.w,
+	* ctwill-mini.ch,
+	* ctwill-w2c.ch,
+	* cweav-bs.ch,
+	* cweav-w2c.ch,
+	* cweave.w,
+	* cwebmac.tex,
+	* cwebman.tex,
+	* prod-twill.w,
+	* prod.w: Incorporate C++ material by @texdraft.
+
+2021-03-09  Andreas Scherer  <https://ascherer.github.io>
+
+	* Makefile,
+	* refsort.ch,
+	* twinx.ch: Patch refsort and twinx with changefiles.
+
+	* resort.w,
+	* twinx.w: Revert to original form from the CTWILL tarball.
+
+	* twinx-startup.tex: Add example template for 'twinx'.
+
 2021-02-25  Andreas Scherer  <https://ascherer.github.io>
 
 	* Makefile,

Modified: branches/stable/source/src/texk/web2c/cwebdir/Makefile
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/Makefile	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/Makefile	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,6 +1,6 @@
 # This file is part of CWEB.
 # It is distributed WITHOUT ANY WARRANTY, express or implied.
-# Version 4.2 --- February 2021
+# Version 4.4 --- June 2021
 
 # Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
 
@@ -74,7 +74,7 @@
 CTANGLE = ./ctangle
 SOURCES = cweave.w common.w ctangle.w
 ALL =  common.w ctangle.w cweave.w prod.w \
-	Makefile common.c common.h ctangle.c \
+	Makefile README common.c common.h ctangle.c \
 	cwebman.tex cwebmac.tex comm-vms.ch ctang-vms.ch \
 	cweav-vms.ch comm-man.ch ctang-man.ch cweav-man.ch \
 	comm-pc.ch ctang-pc.ch cweav-pc.ch comm-amiga.ch \
@@ -81,7 +81,7 @@
         comm-bs.ch ctang-bs.ch cweav-bs.ch makefile.bs \
 	comm-ql.ch ctang-ql.ch cweav-ql.ch readme.ql \
 	comm-w32.ch ctang-w32.ch cweav-w32.ch \
-	comm-os2.ch comm-mac.ch cweb.1 cweb.el c++lib.w README
+	comm-os2.ch comm-mac.ch cweb.1 cweb.el c++lib.w iso_types.w
 
 .SUFFIXES: .dvi .tex .w .pdf
 
@@ -149,16 +149,16 @@
 doc: $(SOURCES:.w=.dvi)
 
 usermanual: cwebman.tex cwebmac.tex
-	tex cwebman
+	$(PDF)tex cwebman
 
 fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
 	make cweave
 	./cweave common.w comm-man.ch
-	tex common.tex
+	$(PDF)tex common.tex
 	./cweave ctangle.w ctang-man.ch
-	tex ctangle.tex
+	$(PDF)tex ctangle.tex
 	./cweave cweave.w cweav-man.ch
-	tex cweave.tex
+	$(PDF)tex cweave.tex
 
 # be sure to leave ctangle.c and common.c for bootstrapping
 clean:
@@ -183,6 +183,8 @@
 	- mkdir $(CWEBINPUTS)
 	$(CP) c++lib.w $(CWEBINPUTS)
 	chmod 644 $(CWEBINPUTS)/c++lib.w
+	$(CP) iso_types.w $(CWEBINPUTS)
+	chmod 644 $(CWEBINPUTS)/iso_types.w
 
 floppy: $(ALL) examples
 	bar cvhf /dev/rfd0 $(ALL) examples

Modified: branches/stable/source/src/texk/web2c/cwebdir/README
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/README	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/README	2021-06-17 21:27:03 UTC (rev 855)
@@ -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 February 2021 by Andreas Scherer
+% This README file last updated May 2021 by Andreas Scherer
 
 % Copyright (C) 1987,1990,1993,2000,2016 Silvio Levy and Donald E. Knuth
 
@@ -66,6 +66,7 @@
 prod.w
 readme.ql
 c++lib.w
+iso_types.w
 
 The file cwebman.tex is the user manual.
 The examples directory contains additional examples of the use of CWEB.
@@ -72,8 +73,9 @@
 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 240-page CWEB manual.
+The files c++lib.w and iso_types.w are for C++ users (say `@i c++lib.w'
+and/or `@i iso_types.w' at beginning of program).
+The files *-man.ch are used if you want to make the full 243-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.

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-amiga.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-amiga.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-amiga.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -10,7 +10,7 @@
 An omitted change file argument means that |"nil:"| should be used,
 @z
 
- at x section 76
+ at x section 75
   strcpy(change_file_name,"/dev/null");
 @y
   strcpy(change_file_name,"nil:");

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-bs.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -15,7 +15,7 @@
 (Update attempt by Andreas Scherer, 31 Jan 2021.  Good luck!)
 
 
- at x Section 6.
+ at x Section 9.
   for section names */
 
 @<Common code...@>=
@@ -50,7 +50,7 @@
   union {
     void huge* equiv_member;
     void huge* xref_member;
-  } ptr_union;  /* info corresponding to names */
+  } 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 */
 typedef name_pointer *hash_pointer;
@@ -136,23 +136,23 @@
 
 @x Section 57.
 static name_pointer
-add_section_name(@t\1\1@> /* install a new node in the tree */
+add_section_name( /* 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 at t\2\2@>) /* are we adding a prefix or a full name? */
+boolean ispref) /* are we adding a prefix or a full name? */
 {
   name_pointer p=name_ptr; /* new node */
   char *s=first_chunk(p);
 @y
 static name_pointer
-add_section_name(@t\1\1@> /* install a new node in the tree */
+add_section_name( /* 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 at t\2\2@>) /* are we adding a prefix or a full name? */
+boolean ispref) /* are we adding a prefix or a full name? */
 {
   name_pointer p=name_ptr; /* new node */
   char huge* s=first_chunk(p);
@@ -161,39 +161,39 @@
 
 @x Section 58.
 static void
-extend_section_name(@t\1\1@>
+extend_section_name(
 name_pointer p, /* name to be extended */
 char *first, /* beginning of extension text */
 char *last, /* one beyond end of extension text */
-int ispref at t\2\2@>) /* are we adding a prefix or a full name? */
+boolean ispref) /* are we adding a prefix or a full name? */
 {
   char *s;
 @y
 static void
-extend_section_name(@t\1\1@>
+extend_section_name(
 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 at t\2\2@>) /* are we adding a prefix or a full name? */
+boolean ispref) /* are we adding a prefix or a full name? */
 {
   char huge* s;
 @z
 
 
- at x Section 64.
-static int section_name_cmp(@t\1\1@>
+ at x Section 63.
+static int section_name_cmp(
 char **pfirst, /* pointer to beginning of comparison string */
 int len, /* length of string */
-name_pointer r at t\2\2@>) /* section name being compared */
+name_pointer r) /* 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
-static int section_name_cmp(@t\1\1@>
+static int section_name_cmp(
 char huge** pfirst, /* pointer to beginning of comparison string */
 int len, /* length of string */
-name_pointer r at t\2\2@>) /* section name being compared */
+name_pointer r) /* section name being compared */
 {
   char huge* first=*pfirst; /* beginning of comparison string */
   name_pointer q=r+1; /* access to subsequent chunks */
@@ -208,7 +208,7 @@
 @z
 
 
- at x Section 76.
+ at x Section 75.
   strcpy(change_file_name,"/dev/null");
 @y
   strcpy(change_file_name,"NUL");
@@ -215,7 +215,7 @@
 @z
 
 
- at x Section 76.
+ at x Section 75.
         else if (*s=='/') dot_pos=NULL,name_pos=++s;
 @y
         else if (*s == ':' || *s == '\\' || *s == '/')

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-mac.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -4,27 +4,24 @@
 (Contributed 13 Oct 2000 by AndPio at aol.com; slightly edited by Don Knuth)
 
 @x in limbo, change the title page document to specify Mac version
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
 @y
-  \centerline{(Version 4.2 for MacOS)}
+  \centerline{(Version 4.4 for MacOS)}
 @z
 
- at x sections 23/24: Make input_ln accept \n, \r, \n\r, or \r\n as line endings
+ at x section 23: 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@>
 
-@<Predecl...@>=
-static boolean input_ln(FILE *);@/
-
-@ @c
-static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */
-FILE *fp at t\2\2@>) /* what file to read from */
+ at c
+static boolean input_ln( /* copies a line into |buffer| or returns |false| */
+FILE *fp) /* 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 false;  /* we have hit end-of-file */
-  limit = k = buffer;  /* beginning of buffer */
+  register int c=EOF; /* character read; initialized so some compilers won't complain */
+  register char *k; /* where next character goes */
+  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;
   if (k>buffer_end)
@@ -32,7 +29,7 @@
       ungetc(c,fp); loc=buffer; err_print("! Input line too long");
 @.Input line too long@>
     }
-  if (c==EOF && limit==buffer) return false;  /* there was nothing after
+  if (c==EOF && limit==buffer) return false; /* there was nothing after
     the last newline */
   return true;
 }
@@ -45,17 +42,14 @@
 \UNIX/, {\mc DOS} or {\mc MAC} format.
 @^system dependencies@>
 
-@<Predecl...@>=
-static boolean input_ln(FILE *);@/
-
-@ @c
-static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */
-FILE *fp at t\2\2@>) /* what file to read from */
+ at c
+static boolean input_ln( /* copies a line into |buffer| or returns |false| */
+FILE *fp) /* 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 false;  /* we have hit end-of-file */
-  limit = k = buffer;  /* beginning of buffer */
+  register char *k; /* where next character goes */
+  if (feof(fp)) return false; /* we have hit end-of-file */
+  limit = k = buffer; /* beginning of buffer */
   while (true) {
     c = getc(fp);
     if (c==EOF)  return limit!=buffer; /* |false|, if there was nothing after
@@ -77,7 +71,7 @@
 }
 @z
 
- at x section 28, simply return if no change file was specified
+ at x section 27, simply return if no change file was specified
   change_limit=change_buffer; /* this value is used if the change file ends */
   @<Skip over comment lines in the change file; |return| if end of file@>@;
 @y
@@ -121,13 +115,12 @@
 @y
 An omitted change file argument means that no change file should be used,
 @z
-
- at x section 76, make change file name empty when it is unspecified
+ at x section 75, make change file name empty when it is unspecified
   strcpy(change_file_name,"/dev/null");
 @y
   change_file_name[0]='\0';   /* empty string */
 @z
- at x section 76, use the Metrowerks |ccommand| to access command lines
+ at x section 75, use the Metrowerks |ccommand| to access command lines
   while (--argc > 0) {
 @y
   argc = ccommand (&argv); /* use Mac interface to command line */
@@ -134,7 +127,7 @@
 @^system dependencies@>
   while (--argc > 0) {
 @z
- at x section 76, use the path separator constant
+ at x section 75, 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;

Added: branches/stable/source/src/texk/web2c/cwebdir/comm-mini.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-mini.ch	                        (rev 0)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-mini.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -0,0 +1,107 @@
+Limbo.
+
+ at x
+\def\title{Common code for CTANGLE and CWEAVE (Version 4.4 [CWEBbin 2021])}
+ at y
+\def\title{COMMON (Version 4.4 [CWEBbin 2021])}
+\def\contentspagenumber{0}
+ at z
+
+Section 3.
+
+ at x
+internationalization.
+ at y
+internationalization.
+ at -A@>
+ at -S@>
+ at z
+
+Section 5.
+
+ at x
+@ Code related to input routines:
+ at y
+@ Code related to input routines:
+ at -c@>
+ at z
+
+Section 9.
+
+ at x
+@ Code related to identifier and section name storage:
+ at y
+@ Code related to identifier and section name storage:
+ at -c@>
+ at z
+
+Section 14.
+
+ at x
+@ Code related to output:
+ at y
+@ Code related to output:
+ at -a@>
+ at -b@>
+ at z
+
+Section 32.
+
+ at x
+current line is nonempty.
+ at y
+current line is nonempty.
+ at -b@>
+ at z
+
+Section 52.
+
+ at x
+ at d first_chunk(p) ((p)->byte_start+2)
+ at y
+ at -m@>
+ at d first_chunk(p) ((p)->byte_start+2)
+ at z
+
+Section 87.
+
+ at x
+@^system dependencies@> @.CWEBINPUTS@>
+ at y
+@^system dependencies@> @.CWEBINPUTS@>
+ at -CWEBINPUTS@>
+ at z
+
+Section 88.
+
+ at x
+@ @c
+ at y
+@ @-CWEBINPUTS@>@c
+ at z
+
+Section 89.
+
+ at x
+needs a few extra variables.
+ at y
+needs a few extra variables.
+ at -SEPARATORS@>
+ at z
+
+Section 91.
+
+ at x
+ at .cweb.mo@>
+ at y
+ at .cweb.mo@>
+ at -A@>
+ at -B@>
+ at z
+
+Section 93.
+
+ at x
+@** Index.
+ at y
+ at z


Property changes on: branches/stable/source/src/texk/web2c/cwebdir/comm-mini.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-os2.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-os2.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-os2.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -10,13 +10,13 @@
 An omitted change file argument means that |"NUL"| should be used,
 @z
 
- at x section 76
+ at x section 75
   strcpy(change_file_name,"/dev/null");
 @y
   strcpy(change_file_name,"NUL");
 @z
 
- at x section 76 (this change copied from comm-pc.ch)
+ at x section 75 (this change copied from comm-pc.ch)
         else if (*s=='/') dot_pos=NULL,name_pos=++s;
 @y
         else if (*s == ':' || *s == '\\' || *s == '/')

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-pc.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-pc.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-pc.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -8,7 +8,7 @@
 that allows >64K arrays.
 
 @x section 16
- at d max_bytes 1000000 /* the number of bytes in identifiers,
+ at d max_bytes 90000 /* the number of bytes in identifiers,
 @y
 @d max_bytes (unsigned)60000 /* the number of bytes in identifiers,
 @z
@@ -19,13 +19,13 @@
 An omitted change file argument means that |"NUL"| should be used,
 @z
 
- at x section 76
+ at x section 75
   strcpy(change_file_name,"/dev/null");
 @y
   strcpy(change_file_name,"NUL");
 @z
 
- at x section 76 (this change copied from comm-bs.ch, July 94)
+ at x section 75 (this change copied from comm-bs.ch, July 94)
         else if (*s=='/') dot_pos=NULL,name_pos=++s;
 @y
         else if (*s == ':' || *s == '\\' || *s == '/')

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-ql.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -10,12 +10,12 @@
 @x
 \def\v{\char'174} % vertical (|) in typewriter font
 
-\def\title{Common code for CTANGLE and CWEAVE (Version 4.2)}
+\def\title{Common code for CTANGLE and CWEAVE (Version 4.4)}
 \def\topofcontents{\null\vfill
   \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
     {\ttitlefont CWEAVE}}
   \vskip 15pt
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
   \vfill}
 \def\botofcontents{\vfill
 \noindent
@@ -22,12 +22,12 @@
 @y
 \def\v{\char'174} % vertical (|) in typewriter font
 
-\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.2)}
+\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.4)}
 \def\topofcontents{\null\vfill
   \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
     {\ttitlefont CWEAVE}}
   \vskip 15pt
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
   \vfill}
 \def\botofcontents{\vfill
 \noindent
@@ -40,7 +40,7 @@
 (current) QDOS/SMSQ file systems have a limitation of 36 characters as
 maximum length for a file name.
 @x
- at d max_file_name_length 1024
+ at d max_file_name_length 60
 @y
 @d max_file_name_length 42
 @z
@@ -148,7 +148,7 @@
     sprintf(web_file_name,"%s.w",*argv);
   else {
     strcpy(web_file_name,*argv);
-    *dot_pos=0; /* string now ends where the dot was */
+    *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 */
@@ -166,7 +166,7 @@
     sprintf(web_file_name,"%s_w",*argv);
   else {
     strcpy(web_file_name,*argv);
-    *dot_pos=0; /* string now ends where the dot was */
+    *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 */
@@ -219,7 +219,7 @@
     strcpy(tex_file_name,*argv);
     strcpy(C_file_name,*argv);
     if (make_xrefs) { /* indexes will be generated */
-      *dot_pos=0;
+      *dot_pos='\0';
       sprintf(idx_file_name,"%s.idx",*argv);
       sprintf(scn_file_name,"%s.scn",*argv);
     }
@@ -240,7 +240,7 @@
     strcpy(tex_file_name,*argv);
     strcpy(C_file_name,*argv);
     if (make_xrefs) { /* indexes will be generated */
-      *dot_pos=0;
+      *dot_pos='\0';
       sprintf(idx_file_name,"%s_idx",*argv);
       sprintf(scn_file_name,"%s_scn",*argv);
     }

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-vms.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -34,7 +34,7 @@
 
 @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.
+a status of |EXIT_SUCCESS| if and only if only harmless messages were printed.
 @y
 programs are started. Here, for instance, we pass VAX/VMS
 a status of |SS$_NORMAL| if and only if only harmless
@@ -67,7 +67,7 @@
 null device |"NL:"| should be used, when no changes are desired.
 @z
 
- at x section 76 (1987 BL) (01-FEB-1992 ST) (05-APR-1992 DEK)
+ at x section 75 (1987 BL) (01-FEB-1992 ST) (05-APR-1992 DEK)
   strcpy(change_file_name,"/dev/null");
 @y
   strcpy(change_file_name,"NL:");

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -17,16 +17,16 @@
 @q Please send comments, suggestions, etc. to tex-k@@tug.org.            @>
 
 @x
-\def\title{Common code for CTANGLE and CWEAVE (Version 4.2)}
+\def\title{Common code for CTANGLE and CWEAVE (Version 4.4)}
 @y
 \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi
-\def\title{Common code for CTANGLE and CWEAVE (4.2 [\TeX~Live])}
+\def\title{Common code for CTANGLE and CWEAVE (4.4 [\TeX~Live])}
 @z
 
 @x
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
 @y
-  \centerline{(Version 4.2 [\TeX~Live])}
+  \centerline{(Version 4.4 [\TeX~Live])}
 @z
 
 @x
@@ -146,11 +146,11 @@
        fatal("! Cannot open input file ", web_file_name);
 }
 @y
-if ((found_filename=kpse_find_cweb(web_file_name))==NULL || @|
-    (web_file=fopen(found_filename,"r"))==NULL) {
+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);
-} else if (strlen(found_filename) < max_file_name_length) {
-  /* Copy name for |#line| directives. */
+else if (strlen(found_filename) < max_file_name_length) {
+  /* Copy name for \#\&{line} directives. */
   if (strcmp(web_file_name, found_filename))
     strcpy(web_file_name, found_filename +
       ((strncmp(found_filename,"./",2)==0) ? 2 : 0));
@@ -162,11 +162,11 @@
 if ((change_file=fopen(change_file_name,"r"))==NULL)
        fatal("! Cannot open change file ", change_file_name);
 @y
-if ((found_filename=kpse_find_cweb(change_file_name))==NULL || @|
-    (change_file=fopen(found_filename,"r"))==NULL) {
+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);
-} else if (strlen(found_filename) < max_file_name_length) {
-  /* Copy name for |#line| directives. */
+else if (strlen(found_filename) < max_file_name_length) {
+  /* Copy name for \#\&{line} directives. */
   if (strcmp(change_file_name, found_filename))
     strcpy(change_file_name, found_filename +
       ((strncmp(found_filename,"./",2)==0) ? 2 : 0));
@@ -217,7 +217,7 @@
 @x
   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;
+  char *kk, *k=cur_file_name;
   int l; /* length of file name */
 @y
   char *cur_file_name_end=cur_file_name+max_file_name_length-1;
@@ -227,9 +227,9 @@
 @x
   if ((cur_file=fopen(cur_file_name,"r"))!=NULL) {
 @y
-  if ((found_filename=kpse_find_cweb(cur_file_name))!=NULL && @|
-      (cur_file=fopen(found_filename,"r"))!=NULL) {
-    /* Copy name for |#line| directives. */
+  if ((found_filename=kpse_find_cweb(cur_file_name))!=NULL @|
+      && (cur_file=fopen(found_filename,"r"))!=NULL) {
+    /* Copy name for \#\&{line} directives. */
     if (strlen(found_filename) < max_file_name_length) {
       if (strcmp(cur_file_name, found_filename))
         strcpy(cur_file_name, found_filename +
@@ -239,8 +239,8 @@
 @z
 
 @x
-  kk=getenv("CWEBINPUTS");
-  if (kk!=NULL) {
+  if ((kk=getenv("CWEBINPUTS"))!=NULL) {
+ at .CWEBINPUTS@>
     if ((l=strlen(kk))>max_file_name_length-2) too_long();
     strcpy(temp_file_name,kk);
   }
@@ -253,9 +253,9 @@
 #endif /* |CWEBINPUTS| */
   }
   if (l>0) {
-    if (k+l+2>=cur_file_name_end)  too_long();
+    if (k+l+2>=cur_file_name_end) too_long();
 @.Include file name ...@>
-    for (; k>= cur_file_name; k--) *(k+l+1)=*k;
+    for (; k>=cur_file_name; k--) *(k+l+1)=*k;
     strcpy(cur_file_name,temp_file_name);
     cur_file_name[l]='/'; /* \UNIX/ pathname separator */
     if ((cur_file=fopen(cur_file_name,"r"))!=NULL) {
@@ -287,6 +287,12 @@
 @z
 
 @x
+ at d hash_size 353 /* should be prime */
+ at y
+ at d hash_size 8501 /* should be prime */
+ at z
+
+ at x
   if (byte_ptr+l>byte_mem_end) overflow("byte memory");
   if (name_ptr>=name_dir_end) overflow("name");
 @y
@@ -364,7 +370,7 @@
 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.
+a status of |EXIT_SUCCESS| 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
@@ -394,20 +400,22 @@
   else return EXIT_SUCCESS;
 @y
   switch(history) {
+  case spotless: return RETURN_OK;
   case harmless_message: return RETURN_WARN;
   case error_message: return RETURN_ERROR;
-  case fatal_message: return RETURN_FAIL;
-  default: return RETURN_OK;
+  case fatal_message: default: return RETURN_FAIL;
   }
 @z
 
 @x
-case spotless: if (show_happiness) puts("(No errors were found.)"); break;
+case spotless:
+  if (show_happiness) puts("(No errors were found.)"); break;
 case harmless_message:
   puts("(Did you see the warning message above?)"); break;
 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.)");
+case fatal_message: default:
+  puts("(That was a fatal error, my friend.)");
 @y
 case spotless:
   if (show_happiness) puts(_("(No errors were found.)")); break;
@@ -415,7 +423,7 @@
   puts(_("(Did you see the warning message above?)")); break;
 case error_message:
   puts(_("(Pardon me, but I think I spotted something wrong.)")); break;
-case fatal_message:
+case fatal_message: default:
   puts(_("(That was a fatal error, my friend.)"));
 @z
 
@@ -426,6 +434,14 @@
 @z
 
 @x
+or flags to be turned on (beginning with |"+"|).
+ at y
+or flags to be turned on (beginning with |"+"|).
+\TeX~Live's \.{CWEB} executables accept several ``long options'' as well;
+see section |@<Handle flag arg...@>| for details.
+ at z
+
+ at x
 char scn_file_name[max_file_name_length]; /* name of |scn_file| */
 @y
 char scn_file_name[max_file_name_length]; /* name of |scn_file| */
@@ -433,10 +449,9 @@
 @z
 
 @x
-show_banner=show_happiness=show_progress=make_xrefs=true;@/
+show_banner=show_happiness=show_progress=make_xrefs=true;
 @y
-make_xrefs=true;@/
-temporary_output=true; /* Check temporary output for changes */
+make_xrefs=check_for_change=true;
 @z
 
 @x
@@ -459,7 +474,7 @@
 @x
   strcpy(change_file_name,"/dev/null");
 @y
-@#
+  strcpy(change_file_name,"/dev/null");
 #if defined DEV_NULL
   strncpy(change_file_name,DEV_NULL,max_file_name_length-2);
   change_file_name[max_file_name_length-2]='\0';
@@ -466,25 +481,21 @@
 #elif defined _DEV_NULL
   strncpy(change_file_name,_DEV_NULL,max_file_name_length-2);
   change_file_name[max_file_name_length-2]='\0';
-#else
-  strcpy(change_file_name,"/dev/null");
 #endif
 @^system dependencies@>
 @z
 
 @x
-      while (*s) {
+      while (*s)
         if (*s=='.') dot_pos=s++;
         else if (*s=='/') dot_pos=NULL,name_pos=++s;
         else s++;
-      }
 @y
-      while (*s) {
+      while (*s)
         if (*s=='.') dot_pos=s++;
         else if (*s==DIR_SEPARATOR || *s==DEVICE_SEPARATOR || *s=='/')
           dot_pos=NULL,name_pos=++s;
         else s++;
-      }
 @^system dependencies@>
 @z
 
@@ -503,11 +514,9 @@
 @z
 
 @x
-@<Handle flag...@>=
-{
-  for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++)
+for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++)
+  flags[(eight_bits)*dot_pos]=flag_change;
 @y
-@<Handle flag...@>=
 {
   if (strcmp("-help",*argv)==0 || strcmp("--help",*argv)==0)
 @.--help@>
@@ -517,26 +526,25 @@
     @<Display version information and |exit|@>@;
   if (strcmp("-verbose",*argv)==0 || strcmp("--verbose",*argv)==0)
 @.--verbose@>
-  { show_banner=show_progress=show_happiness=1; continue; }
+    strcpy(*argv,"-v");
   if (strcmp("-quiet",*argv)==0 || strcmp("--quiet",*argv)==0)
 @.--quiet@>
-  { 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=true;
-    } else
-    if (*dot_pos=='q') {
-      show_banner=show_progress=show_happiness=false;
-    } else
-    if (*dot_pos=='d') {
+      strcpy(*argv,"-q");
+  for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++) {
+    switch (*dot_pos) {
+    case 'v': show_banner=show_progress=show_happiness=true; continue;
+    case 'q': show_banner=show_progress=show_happiness=false; continue;
+    case 'd':
       if (sscanf(++dot_pos,"%u",&kpathsea_debug)!=1) @<Print usage error...@>@;
       while (isdigit(*dot_pos)) dot_pos++; /* skip numeric part */
       dot_pos--; /* reset to final digit */
-    } else
-    if(*dot_pos=='l') {
-       use_language=++dot_pos;
-       break;
-    } else
+      continue;
+    case 'l': use_language=++dot_pos; break; /* from |switch| */
+    default: flags[(eight_bits)*dot_pos]=flag_change; continue;
+    }
+    break; /* from |for| loop */
+  }
+}
 @z
 
 @x
@@ -625,9 +633,9 @@
 @x
 @** Index.
 @y
-@** 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.
+@** Extensions to {\tentex 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
 material should nicely integrate with the original ``\&{85.~Index}.''
@@ -710,9 +718,9 @@
 #if HAVE_GETTEXT
 #include <locale.h> /* |@!LC_MESSAGES|, |@!LC_CTYPE| */
 #else
-#define setlocale(A,B) ""
-#define bindtextdomain(A,B) ""
-#define textdomain(A) ""
+#define setlocale(a,b) ""
+#define bindtextdomain(a,b) ""
+#define textdomain(a) ""
 #endif
 
 @ @<Set locale...@>=
@@ -829,6 +837,7 @@
   textdomain("web2c-help");
 @.web2c-help.mo@>
   while (*message) {
+    /* empty string \.{""} has special meaning for |gettext| */
     printf("%s\n", strcmp("", *message) ? _(*message) : *message);
     ++message;
   }
@@ -854,7 +863,6 @@
 @c
 void cb_show_banner (void)
 {
-  assert(cb_banner[0]!='\0');
   textdomain("cweb-tl");
 @.cweb-tl.mo@>
   printf("%s%s\n", _(cb_banner), versionstring);

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-w2c.h	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 % This program by Silvio Levy and Donald E. Knuth
 % is based on a program by Knuth.
 % It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.2 --- February 2021 (works also with later versions)
+% Version 4.4 --- June 2021 (works also with later versions)
 
 % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
 
@@ -27,9 +27,7 @@
 
 First comes general stuff:
 
- at s boolean int
- at s uint8_t int
- at s uint16_t int
+ at i iso_types.w
 
 
 @<Common code...@>=
@@ -48,7 +46,7 @@
 not have this library installed, we wrap things for neutral behavior without
 internationalization.
 
- at d _(S) gettext(S)
+ at d _(s) gettext(s)
 
 @<Include files@>=
 #ifndef HAVE_GETTEXT
@@ -58,7 +56,7 @@
 #if HAVE_GETTEXT
 #include <libintl.h>
 #else
-#define gettext(A) A
+#define gettext(a) a
 #endif
 @#
 #include <ctype.h> /* definition of |@!isalpha|, |@!isdigit| and so on */
@@ -73,20 +71,22 @@
 @^ASCII code dependencies@>
 
 @d and_and 04 /* `\.{\&\&}'\,; corresponds to MIT's {\tentex\char'4} */
- at d lt_lt 020 /* `\.{<<}'\,;  corresponds to MIT's {\tentex\char'20} */
- at d gt_gt 021 /* `\.{>>}'\,;  corresponds to MIT's {\tentex\char'21} */
- at d plus_plus 013 /* `\.{++}'\,;  corresponds to MIT's {\tentex\char'13} */
- at d minus_minus 01 /* `\.{--}'\,;  corresponds to MIT's {\tentex\char'1} */
- at d minus_gt 031 /* `\.{->}'\,;  corresponds to MIT's {\tentex\char'31} */
- at d non_eq 032 /* `\.{!=}'\,;  corresponds to MIT's {\tentex\char'32} */
- at d lt_eq 034 /* `\.{<=}'\,;  corresponds to MIT's {\tentex\char'34} */
- at d gt_eq 035 /* `\.{>=}'\,;  corresponds to MIT's {\tentex\char'35} */
- at d eq_eq 036 /* `\.{==}'\,;  corresponds to MIT's {\tentex\char'36} */
- at d or_or 037 /* `\.{\v\v}'\,;  corresponds to MIT's {\tentex\char'37} */
- at d dot_dot_dot 016 /* `\.{...}'\,;  corresponds to MIT's {\tentex\char'16} */
- at d colon_colon 06 /* `\.{::}'\,;  corresponds to MIT's {\tentex\char'6} */
- at d period_ast 026 /* `\.{.*}'\,;  corresponds to MIT's {\tentex\char'26} */
- at d minus_gt_ast 027 /* `\.{->*}'\,;  corresponds to MIT's {\tentex\char'27} */
+ at d lt_lt 020 /* `\.{<<}'\,; corresponds to MIT's {\tentex\char'20} */
+ at d gt_gt 021 /* `\.{>>}'\,; corresponds to MIT's {\tentex\char'21} */
+ at d plus_plus 013 /* `\.{++}'\,; corresponds to MIT's {\tentex\char'13} */
+ at d minus_minus 01 /* `\.{--}'\,; corresponds to MIT's {\tentex\char'1} */
+ at d minus_gt 031 /* `\.{->}'\,; corresponds to MIT's {\tentex\char'31} */
+ at d non_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */
+ at d lt_eq 034 /* `\.{<=}'\,; corresponds to MIT's {\tentex\char'34} */
+ at d gt_eq 035 /* `\.{>=}'\,; corresponds to MIT's {\tentex\char'35} */
+ at d eq_eq 036 /* `\.{==}'\,; corresponds to MIT's {\tentex\char'36} */
+ at d or_or 037 /* `\.{\v\v}'\,; corresponds to MIT's {\tentex\char'37} */
+ at d dot_dot_dot 016 /* `\.{...}'\,; corresponds to MIT's {\tentex\char'16} */
+ at d colon_colon 06 /* `\.{::}'\,; corresponds to MIT's {\tentex\char'6} */
+ at d period_ast 026 /* `\.{.*}'\,; corresponds to MIT's {\tentex\char'26} */
+ at d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */
+@#
+ at d compress(c) if (loc++<=limit) return c
 
 @<Common code...@>=
 extern char section_text[]; /* text being sought for */
@@ -95,12 +95,16 @@
 extern char *id_loc; /* just after the current identifier in the buffer */
 
 @ Code related to input routines:
- at d xisalpha(c) (isalpha((eight_bits)c)&&((eight_bits)c<0200))
- at d xisdigit(c) (isdigit((eight_bits)c)&&((eight_bits)c<0200))
- at d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200))
- at d xislower(c) (islower((eight_bits)c)&&((eight_bits)c<0200))
- at d xisupper(c) (isupper((eight_bits)c)&&((eight_bits)c<0200))
- at d xisxdigit(c) (isxdigit((eight_bits)c)&&((eight_bits)c<0200))
+ at d xisalpha(c) (isalpha((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisdigit(c) (isdigit((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisspace(c) (isspace((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xislower(c) (islower((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisupper(c) (isupper((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisxdigit(c) (isxdigit((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d isxalpha(c) ((c)=='_' || (c)=='$')
+  /* non-alpha characters allowed in identifier */
+ at d ishigh(c) ((eight_bits)(c)>0177)
+@^high-bit character handling@>
 
 @<Common code...@>=
 extern char buffer[]; /* where each line of input goes */
@@ -148,7 +152,7 @@
 
 @ 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 */
- at d print_id(c) term_write((c)->byte_start,length((c))) /* print identifier */
+ at 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
@@ -181,7 +185,7 @@
 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 name_pointer section_lookup(char *,char *,boolean); /* finds section name */
 extern void init_node(name_pointer);@/
 extern void init_p(name_pointer,eight_bits);@/
 extern void print_prefix_name(name_pointer);@/
@@ -193,7 +197,7 @@
 @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 */
- at d mark_harmless {if (history==spotless) history=harmless_message;}
+ at 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@>
@@ -210,10 +214,10 @@
 @ 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? */
+ at d show_happiness flags['h'] /* should lack of errors be announced? */
 @d show_stats flags['s'] /* should statistics be printed at end of run? */
- at d show_happiness flags['h'] /* should lack of errors be announced? */
- at d temporary_output flags['t'] /* should temporary output take precedence? */
 @d make_xrefs flags['x'] /* should cross references be output? */
+ at d check_for_change flags['c'] /* check temporary output for changes */
 
 @<Common code...@>=
 extern int argc; /* copy of |ac| parameter to |main| */
@@ -227,10 +231,8 @@
 
 @ Code related to output:
 @d update_terminal fflush(stdout) /* empty the terminal output buffer */
- at d new_line putchar('\n') @d putxchar putchar
+ at d new_line putchar('\n')
 @d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout)
- at d C_printf(c,a) fprintf(C_file,c,a)
- at d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */
 
 @<Common code...@>=
 extern FILE *C_file; /* where output of \.{CTANGLE} goes */
@@ -250,16 +252,14 @@
 handle \TEX/, so they should be sufficient for most applications of
 \.{CWEB}.
 
+ at d buf_size 1000 /* maximum length of input line, plus one */
+ at d longest_name 10000 /* file names, section names, and section texts
+   shouldn't be longer than this */
+ at d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
 @d max_bytes 1000000 /* the number of bytes in identifiers,
-  index entries, and section names */
- at d max_toks 1000000 /* number of bytes in compressed \CEE/ code */
+  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 */
 @d max_sections 4000 /* greater than the total number of sections */
- at d max_texts 10239 /* number of replacement texts, must be less than 10240 */
- at d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */
- at d stack_size 500 /* number of simultaneous levels of macro expansion */
- at d buf_size 1000 /* maximum length of input line, plus one */
- at d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
 
 @ End of \.{COMMON} interface.

Modified: branches/stable/source/src/texk/web2c/cwebdir/comm-w32.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/comm-w32.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/comm-w32.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -52,13 +52,13 @@
 An omitted change file argument means that |"NUL"| should be used,
 @z
 
- at x section 76
+ at x section 75
   strcpy(change_file_name,"/dev/null");
 @y
   strcpy(change_file_name,"NUL");
 @z
 
- at x section 76 (this change copied from comm-bs.ch, July 94)
+ at x section 75 (this change copied from comm-bs.ch, July 94)
         else if (*s=='/') dot_pos=NULL,name_pos=++s;
 @y
         else if (*s == ':' || *s == '\\' || *s == '/')

Added: branches/stable/source/src/texk/web2c/cwebdir/common.bux
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/common.bux	                        (rev 0)
+++ branches/stable/source/src/texk/web2c/cwebdir/common.bux	2021-06-17 21:27:03 UTC (rev 855)
@@ -0,0 +1,28 @@
+@$ctangle "common.h" \zip@>
+@$ctwill "common.h" \zip@>
+@$cweave "common.h" \zip@>
+
+@$HAVE_GETTEXT "common.h" \zip@>
+
+@$init_p {CWEAVE.W}32 \&{void} (\,)@>
+@$init_node {CWEAVE.W}32 \&{void} (\,)@>
+@$names_match {CWEAVE.W}32 \&{boolean} (\,)@>
+
+@$ac {CWEAVE.W}2 \&{int}@>
+@$av {CWEAVE.W}2 \&{char} ${*}{*}$@>
+@$main {CWEAVE.W}2 \&{int} (\,)@>
+
+@$print_stats {CWEAVE.W}262 \&{void} (\,)@>
+
+@$xmem {CWEAVE.W}23 \&{xref\_info} [\,]@>
+
+@$xref {CWEAVE.W}24 \\{equiv\_or\_xref}@>
+
+@$text_info {CTANGLE.W}20 \&{text} [\,]@>
+
+@$equiv {CTANGLE.W}22 \\{equiv\_or\_xref}@>
+
+@$ilk {CWEAVE.W}20 \\{dummy.Ilk}@>
+
+@$DEV_NULL {COMMON.W}75 macro@>
+@$_DEV_NULL {COMMON.W}75 macro@>

Modified: branches/stable/source/src/texk/web2c/cwebdir/common.c
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/common.c	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/common.c	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,8 +1,8 @@
 /*1:*/
-#line 66 "common.w"
+#line 62 "common.w"
 
 /*3:*/
-#line 46 "common.h"
+#line 44 "common.h"
 
 #include <ctype.h>  
 #include <stdbool.h>  
@@ -13,7 +13,7 @@
 #include <string.h>  
 
 /*:3*/
-#line 67 "common.w"
+#line 63 "common.w"
 
 #define ctangle false
 #define cweave true \
@@ -34,16 +34,22 @@
 #define period_ast 026
 #define minus_gt_ast 027 \
 
-#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 compress(c) if(loc++<=limit) return c \
 
+#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 isxalpha(c) ((c) =='_'||(c) =='$')  \
+
+#define ishigh(c) ((eight_bits) (c) > 0177)  \
+ \
+
 #define max_include_depth 10 \
 
-#define max_file_name_length 1024
+#define max_file_name_length 60
 #define cur_file file[include_depth]
 #define cur_file_name file_name[include_depth]
 #define cur_line line[include_depth]
@@ -51,7 +57,7 @@
 #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 print_id(c) term_write((c) ->byte_start,length(c) ) 
 #define llink link
 #define rlink dummy.Rlink
 #define root name_dir->rlink \
@@ -61,7 +67,7 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless {if(history==spotless) history= harmless_message;}
+#define mark_harmless if(history==spotless) history= harmless_message
 #define mark_error history= error_message
 #define confusion(s) fatal("! This can't happen: ",s)  \
  \
@@ -68,42 +74,37 @@
 
 #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') 
-#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 term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
-#define max_bytes 1000000 \
+#define buf_size 100
+#define longest_name 10000 \
 
-#define max_toks 1000000
-#define max_names 10239 \
+#define long_buf_size (buf_size+longest_name) 
+#define max_bytes 90000 \
 
-#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 max_names 4000 \
 
+#define max_sections 2000 \
+
 #define lines_dont_match (change_limit-change_buffer!=limit-buffer|| \
 strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) )  \
 
-#define if_section_start_make_pending(b) {*limit= '!'; \
+#define if_section_start_make_pending(b)  \
+*limit= '!'; \
 for(loc= buffer;xisspace(*loc) ;loc++) ; \
 *limit= ' '; \
 if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b; \
-} \
 
 #define too_long() {include_depth--; \
 err_print("! Include file name too long") ;goto restart;} \
 
-#define hash_size 8501 \
+#define hash_size 353 \
 
 #define first_chunk(p) ((p) ->byte_start+2) 
 #define prefix_length(p) (int) ((eight_bits) *((p) ->byte_start) *256+ \
@@ -121,10 +122,10 @@
 
 #define flag_change (**argv!='-') 
 
-#line 68 "common.w"
+#line 64 "common.w"
 
 /*2:*/
-#line 37 "common.h"
+#line 35 "common.h"
 
 typedef bool boolean;
 typedef uint8_t eight_bits;
@@ -141,7 +142,7 @@
 extern char*id_loc;
 
 /*:4*//*5:*/
-#line 88 "common.h"
+#line 92 "common.h"
 
 extern char buffer[];
 extern char*buffer_end;
@@ -149,7 +150,7 @@
 extern char*limit;
 
 /*:5*//*6:*/
-#line 105 "common.h"
+#line 109 "common.h"
 
 extern int include_depth;
 extern FILE*file[];
@@ -165,7 +166,7 @@
 extern boolean web_file_open;
 
 /*:6*//*8:*/
-#line 125 "common.h"
+#line 129 "common.h"
 
 extern sixteen_bits section_count;
 extern boolean changed_section[];
@@ -173,7 +174,7 @@
 extern boolean print_where;
 
 /*:8*//*9:*/
-#line 139 "common.h"
+#line 143 "common.h"
 
 typedef struct name_info{
 char*byte_start;
@@ -198,12 +199,12 @@
 extern hash_pointer h;
 
 /*:9*//*11:*/
-#line 183 "common.h"
+#line 187 "common.h"
 
 extern int history;
 
 /*:11*//*13:*/
-#line 199 "common.h"
+#line 203 "common.h"
 
 extern int argc;
 extern char**argv;
@@ -214,7 +215,7 @@
 extern boolean flags[];
 
 /*:13*//*14:*/
-#line 215 "common.h"
+#line 217 "common.h"
 
 extern FILE*C_file;
 extern FILE*tex_file;
@@ -223,20 +224,20 @@
 extern FILE*active_file;
 
 /*:14*/
-#line 69 "common.w"
+#line 65 "common.w"
 
 /*18:*/
-#line 83 "common.w"
+#line 79 "common.w"
 
 boolean program;
 
 /*:18*//*19:*/
-#line 92 "common.w"
+#line 88 "common.w"
 
 int phase;
 
 /*:19*//*21:*/
-#line 130 "common.w"
+#line 126 "common.w"
 
 char section_text[longest_name+1];
 char*section_text_end= section_text+longest_name;
@@ -244,7 +245,7 @@
 char*id_loc;
 
 /*:21*//*22:*/
-#line 150 "common.w"
+#line 146 "common.w"
 
 char buffer[long_buf_size];
 char*buffer_end= buffer+buf_size-2;
@@ -252,7 +253,7 @@
 char*limit= buffer;
 
 /*:22*//*25:*/
-#line 194 "common.w"
+#line 190 "common.w"
 
 int include_depth;
 FILE*file[max_include_depth];
@@ -269,13 +270,13 @@
 boolean web_file_open= false;
 
 /*:25*//*26:*/
-#line 220 "common.w"
+#line 216 "common.w"
 
 static char change_buffer[buf_size];
 static char*change_limit;
 
 /*:26*//*37:*/
-#line 399 "common.w"
+#line 393 "common.w"
 
 sixteen_bits section_count;
 boolean changed_section[max_sections];
@@ -284,7 +285,7 @@
 boolean print_where= false;
 
 /*:37*//*43:*/
-#line 596 "common.w"
+#line 590 "common.w"
 
 char byte_mem[max_bytes];
 char*byte_mem_end= byte_mem+max_bytes-1;
@@ -292,13 +293,13 @@
 name_pointer name_dir_end= name_dir+max_names-1;
 
 /*:43*//*44:*/
-#line 607 "common.w"
+#line 601 "common.w"
 
 char*byte_ptr;
 name_pointer name_ptr;
 
 /*:44*//*46:*/
-#line 627 "common.w"
+#line 621 "common.w"
 
 name_pointer hash[hash_size];
 hash_pointer hash_end= hash+hash_size-1;
@@ -305,12 +306,12 @@
 hash_pointer h;
 
 /*:46*//*65:*/
-#line 1014 "common.w"
+#line 1003 "common.w"
 
 int history= spotless;
 
 /*:65*//*73:*/
-#line 1135 "common.w"
+#line 1126 "common.w"
 
 int argc;
 char**argv;
@@ -321,7 +322,7 @@
 boolean flags[128];
 
 /*:73*//*83:*/
-#line 1282 "common.w"
+#line 1269 "common.w"
 
 FILE*C_file;
 FILE*tex_file;
@@ -330,10 +331,10 @@
 FILE*active_file;
 
 /*:83*/
-#line 70 "common.w"
+#line 66 "common.w"
 
 /*7:*/
-#line 119 "common.h"
+#line 123 "common.h"
 
 extern boolean get_line(void);
 extern void check_complete(void);
@@ -340,12 +341,12 @@
 extern void reset_input(void);
 
 /*:7*//*10:*/
-#line 162 "common.h"
+#line 166 "common.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 name_pointer section_lookup(char*,char*,boolean);
 extern void init_node(name_pointer);
 extern void init_p(name_pointer,eight_bits);
 extern void print_prefix_name(name_pointer);
@@ -353,7 +354,7 @@
 extern void sprint_section_name(char*,name_pointer);
 
 /*:10*//*12:*/
-#line 186 "common.h"
+#line 190 "common.h"
 
 extern int wrap_up(void);
 extern void err_print(const char*);
@@ -361,50 +362,50 @@
 extern void overflow(const char*);
 
 /*:12*//*15:*/
-#line 223 "common.h"
+#line 225 "common.h"
 
 extern void common_init(void);
 extern void print_stats(void);
 
 /*:15*//*24:*/
-#line 180 "common.w"
+#line 176 "common.w"
 static boolean input_ln(FILE*);
 
 /*:24*//*28:*/
-#line 241 "common.w"
+#line 237 "common.w"
 static void prime_the_change_buffer(void);
 
 /*:28*//*33:*/
-#line 340 "common.w"
+#line 334 "common.w"
 static void check_change(void);
 
 /*:33*//*55:*/
-#line 774 "common.w"
+#line 764 "common.w"
 
 static int web_strcmp(char*,int,char*,int);
-static name_pointer add_section_name(name_pointer,int,char*,char*,int);
-static void extend_section_name(name_pointer,char*,char*,int);
+static name_pointer add_section_name(name_pointer,int,char*,char*,boolean);
+static void extend_section_name(name_pointer,char*,char*,boolean);
 
 /*:55*//*64:*/
-#line 1002 "common.w"
+#line 991 "common.w"
 static int section_name_cmp(char**,int,name_pointer);
 
 /*:64*//*76:*/
-#line 1197 "common.w"
+#line 1186 "common.w"
 static void scan_args(void);
 
 /*:76*/
-#line 71 "common.w"
+#line 67 "common.w"
 
 
 /*:1*//*20:*/
-#line 99 "common.w"
+#line 95 "common.w"
 
 void
 common_init(void)
 {
 /*45:*/
-#line 611 "common.w"
+#line 605 "common.w"
 
 name_dir->byte_start= byte_ptr= byte_mem;
 name_ptr= name_dir+1;
@@ -412,24 +413,23 @@
 root= NULL;
 
 /*:45*//*47:*/
-#line 634 "common.w"
+#line 628 "common.w"
 
 for(h= hash;h<=hash_end;*h++= NULL);
 
 /*:47*/
-#line 103 "common.w"
+#line 99 "common.w"
 
 /*74:*/
-#line 1148 "common.w"
+#line 1139 "common.w"
 
 show_banner= show_happiness= show_progress= make_xrefs= true;
-show_stats= false;
 
 /*:74*/
-#line 104 "common.w"
+#line 100 "common.w"
 
 /*84:*/
-#line 1289 "common.w"
+#line 1276 "common.w"
 
 scan_args();
 if(program==ctangle){
@@ -443,12 +443,12 @@
 }
 
 /*:84*/
-#line 105 "common.w"
+#line 101 "common.w"
 
 }
 
 /*:20*//*23:*/
-#line 160 "common.w"
+#line 156 "common.w"
 
 static boolean input_ln(
 FILE*fp)
@@ -470,7 +470,7 @@
 }
 
 /*:23*//*27:*/
-#line 231 "common.w"
+#line 227 "common.w"
 
 static void
 prime_the_change_buffer(void)
@@ -477,7 +477,7 @@
 {
 change_limit= change_buffer;
 /*29:*/
-#line 247 "common.w"
+#line 243 "common.w"
 
 while(true){
 change_line++;
@@ -494,10 +494,10 @@
 }
 
 /*:29*/
-#line 236 "common.w"
+#line 232 "common.w"
 
 /*30:*/
-#line 264 "common.w"
+#line 260 "common.w"
 
 do{
 change_line++;
@@ -509,23 +509,21 @@
 }while(limit==buffer);
 
 /*:30*/
-#line 237 "common.w"
+#line 233 "common.w"
 
 /*31:*/
-#line 274 "common.w"
+#line 270 "common.w"
 
-{
 change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
 strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
-}
 
 /*:31*/
-#line 238 "common.w"
+#line 234 "common.w"
 
 }
 
 /*:27*//*32:*/
-#line 302 "common.w"
+#line 296 "common.w"
 
 static void
 check_change(void)
@@ -538,7 +536,7 @@
 if(!change_pending)changed_section[section_count]= true;
 }
 while(true){
-changing= true;print_where= true;change_line++;
+changing= print_where= true;change_line++;
 if(!input_ln(change_file)){
 err_print("! Change file ended before @y");
 
@@ -548,7 +546,7 @@
 if(limit> buffer+1&&buffer[0]=='@'){
 char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1];
 /*34:*/
-#line 342 "common.w"
+#line 336 "common.w"
 
 if(xyz_code=='x'||xyz_code=='z'){
 loc= buffer+2;err_print("! Where is the matching @y?");
@@ -566,19 +564,17 @@
 }
 
 /*:34*/
-#line 324 "common.w"
+#line 318 "common.w"
 
 }
 /*31:*/
-#line 274 "common.w"
+#line 270 "common.w"
 
-{
 change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
 strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
-}
 
 /*:31*/
-#line 326 "common.w"
+#line 320 "common.w"
 
 changing= false;cur_line++;
 while(!input_ln(cur_file)){
@@ -594,7 +590,7 @@
 }
 
 /*:32*//*35:*/
-#line 362 "common.w"
+#line 356 "common.w"
 
 void
 reset_input(void)
@@ -601,7 +597,7 @@
 {
 limit= buffer;loc= buffer+1;buffer[0]= ' ';
 /*36:*/
-#line 377 "common.w"
+#line 371 "common.w"
 
 if((web_file= fopen(web_file_name,"r"))==NULL){
 strcpy(web_file_name,alt_web_file_name);
@@ -615,16 +611,16 @@
 fatal("! Cannot open change file ",change_file_name);
 
 /*:36*/
-#line 367 "common.w"
+#line 361 "common.w"
 
-include_depth= 0;cur_line= 0;change_line= 0;
+include_depth= cur_line= change_line= 0;
 change_depth= include_depth;
-changing= 1;prime_the_change_buffer();changing= !changing;
+changing= true;prime_the_change_buffer();changing= !changing;
 limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false;
 }
 
 /*:35*//*38:*/
-#line 406 "common.w"
+#line 400 "common.w"
 
 boolean get_line(void)
 {
@@ -631,7 +627,7 @@
 restart:
 if(changing&&include_depth==change_depth)
 /*41:*/
-#line 514 "common.w"
+#line 508 "common.w"
 {
 change_line++;
 if(!input_ln(change_file)){
@@ -662,11 +658,11 @@
 }
 
 /*:41*/
-#line 411 "common.w"
+#line 405 "common.w"
 
 if(!changing||include_depth> change_depth){
 /*40:*/
-#line 497 "common.w"
+#line 491 "common.w"
 {
 cur_line++;
 while(!input_ln(cur_file)){
@@ -685,7 +681,7 @@
 }
 
 /*:40*/
-#line 413 "common.w"
+#line 407 "common.w"
 
 if(changing&&include_depth==change_depth)goto restart;
 }
@@ -706,11 +702,11 @@
 }
 include_depth++;
 /*39:*/
-#line 451 "common.w"
+#line 445 "common.w"
 {
 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;
+char*kk,*k= cur_file_name;
 int l;
 
 if(*loc=='"'){
@@ -726,8 +722,8 @@
 cur_line= 0;print_where= true;
 goto restart;
 }
-kk= getenv("CWEBINPUTS");
-if(kk!=NULL){
+if((kk= getenv("CWEBINPUTS"))!=NULL){
+
 if((l= strlen(kk))> max_file_name_length-2)too_long();
 strcpy(temp_file_name,kk);
 }
@@ -754,7 +750,7 @@
 }
 
 /*:39*/
-#line 432 "common.w"
+#line 426 "common.w"
 
 }
 return true;
@@ -761,7 +757,7 @@
 }
 
 /*:38*//*42:*/
-#line 546 "common.w"
+#line 540 "common.w"
 
 void
 check_complete(void){
@@ -775,7 +771,7 @@
 }
 
 /*:42*//*48:*/
-#line 639 "common.w"
+#line 633 "common.w"
 
 name_pointer
 id_lookup(
@@ -790,7 +786,7 @@
 if(last==NULL)for(last= first;*last!='\0';last++);
 l= (int)(last-first);
 /*49:*/
-#line 662 "common.w"
+#line 656 "common.w"
 
 h= (eight_bits)*i;
 while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
@@ -797,10 +793,10 @@
 
 
 /*:49*/
-#line 652 "common.w"
+#line 646 "common.w"
 
 /*50:*/
-#line 670 "common.w"
+#line 664 "common.w"
 
 p= hash[h];
 while(p&&!names_match(p,first,l,t))p= p->link;
@@ -810,10 +806,10 @@
 }
 
 /*:50*/
-#line 653 "common.w"
+#line 647 "common.w"
 
 if(p==name_ptr)/*51:*/
-#line 681 "common.w"
+#line 676 "common.w"
 {
 if(byte_ptr+l> byte_mem_end)overflow("byte memory");
 if(name_ptr>=name_dir_end)overflow("name");
@@ -823,13 +819,13 @@
 }
 
 /*:51*/
-#line 654 "common.w"
+#line 648 "common.w"
 
 return p;
 }
 
 /*:48*//*52:*/
-#line 713 "common.w"
+#line 708 "common.w"
 
 void
 print_section_name(
@@ -839,11 +835,9 @@
 name_pointer q= p+1;
 while(p!=name_dir){
 ss= (p+1)->byte_start-1;
-if(*ss==' '&&ss>=s){
-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;
-}
+if(*ss==' '&&ss>=s)p= q->link,q= p;
+else ss++,p= name_dir,q= NULL;
+term_write(s,(size_t)(ss-s));
 s= p->byte_start;
 }
 if(q)term_write("...",3);
@@ -850,7 +844,7 @@
 }
 
 /*:52*//*53:*/
-#line 732 "common.w"
+#line 725 "common.w"
 
 void
 sprint_section_name(
@@ -861,11 +855,8 @@
 name_pointer q= p+1;
 while(p!=name_dir){
 ss= (p+1)->byte_start-1;
-if(*ss==' '&&ss>=s){
-p= q->link;q= p;
-}else{
-ss++;p= name_dir;
-}
+if(*ss==' '&&ss>=s)p= q->link,q= p;
+else ss++,p= name_dir;
 strncpy(dest,s,(size_t)(ss-s)),dest+= ss-s;
 s= p->byte_start;
 }
@@ -873,7 +864,7 @@
 }
 
 /*:53*//*54:*/
-#line 753 "common.w"
+#line 743 "common.w"
 
 void
 print_prefix_name(
@@ -886,7 +877,7 @@
 }
 
 /*:54*//*56:*/
-#line 779 "common.w"
+#line 769 "common.w"
 
 static int web_strcmp(
 char*j,
@@ -904,7 +895,7 @@
 }
 
 /*:56*//*57:*/
-#line 808 "common.w"
+#line 798 "common.w"
 
 static name_pointer
 add_section_name(
@@ -912,7 +903,7 @@
 int c,
 char*first,
 char*last,
-int ispref)
+boolean ispref)
 {
 name_pointer p= name_ptr;
 char*s= first_chunk(p);
@@ -928,14 +919,13 @@
 }
 set_prefix_length(p,name_len);
 strncpy(s,first,name_len);
-p->llink= NULL;
-p->rlink= NULL;
+p->llink= p->rlink= NULL;
 init_node(p);
 return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
 }
 
 /*:57*//*58:*/
-#line 837 "common.w"
+#line 826 "common.w"
 
 static void
 extend_section_name(
@@ -942,7 +932,7 @@
 name_pointer p,
 char*first,
 char*last,
-int ispref)
+boolean ispref)
 {
 char*s;
 name_pointer q= p+1;
@@ -959,14 +949,14 @@
 }
 
 /*:58*//*59:*/
-#line 865 "common.w"
+#line 854 "common.w"
 
 name_pointer
 section_lookup(
 char*first,char*last,
-int ispref)
+boolean ispref)
 {
-int c= 0;
+int c= less;
 name_pointer p= root;
 name_pointer q= NULL;
 name_pointer r= NULL;
@@ -974,7 +964,7 @@
 
 int name_len= (int)(last-first)+1;
 /*60:*/
-#line 889 "common.w"
+#line 878 "common.w"
 
 while(p){
 c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1001,19 +991,19 @@
 }
 
 /*:60*/
-#line 879 "common.w"
+#line 868 "common.w"
 
 /*61:*/
-#line 914 "common.w"
+#line 903 "common.w"
 
 if(r==NULL)
 return add_section_name(par,c,first,last+1,ispref);
 
 /*:61*/
-#line 880 "common.w"
+#line 869 "common.w"
 
 /*62:*/
-#line 922 "common.w"
+#line 911 "common.w"
 
 switch(section_name_cmp(&first,name_len,r)){
 
@@ -1026,16 +1016,16 @@
 }
 else if(name_len<prefix_length(r))set_prefix_length(r,name_len);
 
-case equal:return r;
+case equal:break;
 case extension:if(!ispref||first<=last)
 extend_section_name(r,first,last+1,ispref);
-return r;
+break;
 case bad_extension:
 fputs("\n! New name extends <",stdout);
 
 print_section_name(r);
 err_print(">");
-return r;
+break;
 default:
 fputs("\n! Section name incompatible with <",stdout);
 
@@ -1043,16 +1033,16 @@
 fputs(">,\n which abbreviates <",stdout);
 print_section_name(r);
 err_print(">");
+}
 return r;
-}
 
 /*:62*/
-#line 881 "common.w"
+#line 870 "common.w"
 
 }
 
 /*:59*//*63:*/
-#line 970 "common.w"
+#line 959 "common.w"
 
 static int section_name_cmp(
 char**pfirst,
@@ -1062,12 +1052,12 @@
 char*first= *pfirst;
 name_pointer q= r+1;
 char*ss,*s= first_chunk(r);
-int c;
-int ispref;
+int c= less;
+boolean ispref;
 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;
+if(*ss==' '&&ss>=r->byte_start)ispref= true,q= q->link;
+else ispref= false,ss++,q= name_dir;
 switch(c= web_strcmp(first,len,s,ss-s)){
 case equal:if(q==name_dir)
 if(ispref){
@@ -1086,18 +1076,18 @@
 }
 
 /*:63*//*66:*/
-#line 1024 "common.w"
+#line 1013 "common.w"
 
 void
 err_print(
 const char*s)
 {
-char*k,*l;
 printf(*s=='!'?"\n%s":"%s",s);
 if(web_file_open)/*67:*/
-#line 1044 "common.w"
+#line 1032 "common.w"
 
-{if(changing&&include_depth==change_depth)
+{char*k,*l;
+if(changing&&include_depth==change_depth)
 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);
@@ -1106,7 +1096,7 @@
 for(k= buffer;k<l;k++)
 if(*k=='\t')putchar(' ');
 else putchar(*k);
-putchar('\n');
+new_line;
 for(k= buffer;k<l;k++)putchar(' ');
 }
 for(k= l;k<limit;k++)putchar(*k);
@@ -1115,13 +1105,13 @@
 }
 
 /*:67*/
-#line 1031 "common.w"
+#line 1019 "common.w"
 
 update_terminal;mark_error;
 }
 
 /*:66*//*68:*/
-#line 1076 "common.w"
+#line 1065 "common.w"
 
 int wrap_up(void){
 if(show_progress)new_line;
@@ -1128,19 +1118,21 @@
 if(show_stats)
 print_stats();
 /*69:*/
-#line 1086 "common.w"
+#line 1075 "common.w"
 
 switch(history){
-case spotless:if(show_happiness)puts("(No errors were found.)");break;
+case spotless:
+if(show_happiness)puts("(No errors were found.)");break;
 case harmless_message:
 puts("(Did you see the warning message above?)");break;
 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.)");
+case fatal_message:default:
+puts("(That was a fatal error, my friend.)");
 }
 
 /*:69*/
-#line 1081 "common.w"
+#line 1070 "common.w"
 
 if(history> harmless_message)return EXIT_FAILURE;
 else return EXIT_SUCCESS;
@@ -1147,7 +1139,7 @@
 }
 
 /*:68*//*70:*/
-#line 1102 "common.w"
+#line 1093 "common.w"
 void
 fatal(
 const char*s,const char*t)
@@ -1158,7 +1150,7 @@
 }
 
 /*:70*//*71:*/
-#line 1113 "common.w"
+#line 1104 "common.w"
 void
 overflow(
 const char*t)
@@ -1168,7 +1160,7 @@
 
 
 /*:71*//*75:*/
-#line 1167 "common.w"
+#line 1157 "common.w"
 
 static void
 scan_args(void)
@@ -1182,41 +1174,38 @@
 strcpy(change_file_name,"/dev/null");
 while(--argc> 0){
 if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1258 "common.w"
+#line 1247 "common.w"
 
-{
 for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
 flags[(eight_bits)*dot_pos]= flag_change;
-}
 
 /*:80*/
-#line 1179 "common.w"
+#line 1169 "common.w"
 
 else{
 s= name_pos= *argv;dot_pos= NULL;
-while(*s){
+while(*s)
 if(*s=='.')dot_pos= s++;
 else if(*s=='/')dot_pos= NULL,name_pos= ++s;
 else s++;
-}
 if(!found_web)/*77:*/
-#line 1206 "common.w"
+#line 1195 "common.w"
 
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 1276 "common.w"
+#line 1263 "common.w"
 fatal("! Filename too long\n",*argv);
 
 
 /*:82*/
-#line 1209 "common.w"
+#line 1198 "common.w"
 
 if(dot_pos==NULL)
 sprintf(web_file_name,"%s.w",*argv);
 else{
 strcpy(web_file_name,*argv);
-*dot_pos= 0;
+*dot_pos= '\0';
 }
 sprintf(alt_web_file_name,"%s.web",*argv);
 sprintf(tex_file_name,"%s.tex",name_pos);
@@ -1227,21 +1216,21 @@
 }
 
 /*:77*/
-#line 1188 "common.w"
+#line 1177 "common.w"
 
 else if(!found_change)/*78:*/
-#line 1224 "common.w"
+#line 1213 "common.w"
 
 {
 if(strcmp(*argv,"-")!=0){
 if(s-*argv> max_file_name_length-4)
 /*82:*/
-#line 1276 "common.w"
+#line 1263 "common.w"
 fatal("! Filename too long\n",*argv);
 
 
 /*:82*/
-#line 1228 "common.w"
+#line 1217 "common.w"
 
 if(dot_pos==NULL)
 sprintf(change_file_name,"%s.ch",*argv);
@@ -1251,20 +1240,20 @@
 }
 
 /*:78*/
-#line 1189 "common.w"
+#line 1178 "common.w"
 
 else if(!found_out)/*79:*/
-#line 1236 "common.w"
+#line 1225 "common.w"
 
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 1276 "common.w"
+#line 1263 "common.w"
 fatal("! Filename too long\n",*argv);
 
 
 /*:82*/
-#line 1239 "common.w"
+#line 1228 "common.w"
 
 if(dot_pos==NULL){
 sprintf(tex_file_name,"%s.tex",*argv);
@@ -1275,7 +1264,7 @@
 strcpy(tex_file_name,*argv);
 strcpy(C_file_name,*argv);
 if(make_xrefs){
-*dot_pos= 0;
+*dot_pos= '\0';
 sprintf(idx_file_name,"%s.idx",*argv);
 sprintf(scn_file_name,"%s.scn",*argv);
 }
@@ -1284,10 +1273,10 @@
 }
 
 /*:79*/
-#line 1190 "common.w"
+#line 1179 "common.w"
 
 else/*81:*/
-#line 1264 "common.w"
+#line 1251 "common.w"
 
 {
 if(program==ctangle)
@@ -1301,12 +1290,12 @@
 }
 
 /*:81*/
-#line 1191 "common.w"
+#line 1180 "common.w"
 
 }
 }
 if(!found_web)/*81:*/
-#line 1264 "common.w"
+#line 1251 "common.w"
 
 {
 if(program==ctangle)
@@ -1320,7 +1309,7 @@
 }
 
 /*:81*/
-#line 1194 "common.w"
+#line 1183 "common.w"
 
 }
 

Modified: branches/stable/source/src/texk/web2c/cwebdir/common.h
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/common.h	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/common.h	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 % This program by Silvio Levy and Donald E. Knuth
 % is based on a program by Knuth.
 % It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.2 --- February 2021 (works also with later versions)
+% Version 4.4 --- June 2021 (works also with later versions)
 
 % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
 
@@ -27,9 +27,7 @@
 
 First comes general stuff:
 
- at s boolean int
- at s uint8_t int
- at s uint16_t int
+ at i iso_types.w
 
 @d ctangle false
 @d cweave true
@@ -56,20 +54,22 @@
 @^ASCII code dependencies@>
 
 @d and_and 04 /* `\.{\&\&}'\,; corresponds to MIT's {\tentex\char'4} */
- at d lt_lt 020 /* `\.{<<}'\,;  corresponds to MIT's {\tentex\char'20} */
- at d gt_gt 021 /* `\.{>>}'\,;  corresponds to MIT's {\tentex\char'21} */
- at d plus_plus 013 /* `\.{++}'\,;  corresponds to MIT's {\tentex\char'13} */
- at d minus_minus 01 /* `\.{--}'\,;  corresponds to MIT's {\tentex\char'1} */
- at d minus_gt 031 /* `\.{->}'\,;  corresponds to MIT's {\tentex\char'31} */
- at d non_eq 032 /* `\.{!=}'\,;  corresponds to MIT's {\tentex\char'32} */
- at d lt_eq 034 /* `\.{<=}'\,;  corresponds to MIT's {\tentex\char'34} */
- at d gt_eq 035 /* `\.{>=}'\,;  corresponds to MIT's {\tentex\char'35} */
- at d eq_eq 036 /* `\.{==}'\,;  corresponds to MIT's {\tentex\char'36} */
- at d or_or 037 /* `\.{\v\v}'\,;  corresponds to MIT's {\tentex\char'37} */
- at d dot_dot_dot 016 /* `\.{...}'\,;  corresponds to MIT's {\tentex\char'16} */
- at d colon_colon 06 /* `\.{::}'\,;  corresponds to MIT's {\tentex\char'6} */
- at d period_ast 026 /* `\.{.*}'\,;  corresponds to MIT's {\tentex\char'26} */
- at d minus_gt_ast 027 /* `\.{->*}'\,;  corresponds to MIT's {\tentex\char'27} */
+ at d lt_lt 020 /* `\.{<<}'\,; corresponds to MIT's {\tentex\char'20} */
+ at d gt_gt 021 /* `\.{>>}'\,; corresponds to MIT's {\tentex\char'21} */
+ at d plus_plus 013 /* `\.{++}'\,; corresponds to MIT's {\tentex\char'13} */
+ at d minus_minus 01 /* `\.{--}'\,; corresponds to MIT's {\tentex\char'1} */
+ at d minus_gt 031 /* `\.{->}'\,; corresponds to MIT's {\tentex\char'31} */
+ at d non_eq 032 /* `\.{!=}'\,; corresponds to MIT's {\tentex\char'32} */
+ at d lt_eq 034 /* `\.{<=}'\,; corresponds to MIT's {\tentex\char'34} */
+ at d gt_eq 035 /* `\.{>=}'\,; corresponds to MIT's {\tentex\char'35} */
+ at d eq_eq 036 /* `\.{==}'\,; corresponds to MIT's {\tentex\char'36} */
+ at d or_or 037 /* `\.{\v\v}'\,; corresponds to MIT's {\tentex\char'37} */
+ at d dot_dot_dot 016 /* `\.{...}'\,; corresponds to MIT's {\tentex\char'16} */
+ at d colon_colon 06 /* `\.{::}'\,; corresponds to MIT's {\tentex\char'6} */
+ at d period_ast 026 /* `\.{.*}'\,; corresponds to MIT's {\tentex\char'26} */
+ at d minus_gt_ast 027 /* `\.{->*}'\,; corresponds to MIT's {\tentex\char'27} */
+@#
+ at d compress(c) if (loc++<=limit) return c
 
 @<Common code...@>=
 extern char section_text[]; /* text being sought for */
@@ -78,12 +78,16 @@
 extern char *id_loc; /* just after the current identifier in the buffer */
 
 @ Code related to input routines:
- at d xisalpha(c) (isalpha((eight_bits)c)&&((eight_bits)c<0200))
- at d xisdigit(c) (isdigit((eight_bits)c)&&((eight_bits)c<0200))
- at d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200))
- at d xislower(c) (islower((eight_bits)c)&&((eight_bits)c<0200))
- at d xisupper(c) (isupper((eight_bits)c)&&((eight_bits)c<0200))
- at d xisxdigit(c) (isxdigit((eight_bits)c)&&((eight_bits)c<0200))
+ at d xisalpha(c) (isalpha((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisdigit(c) (isdigit((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisspace(c) (isspace((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xislower(c) (islower((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisupper(c) (isupper((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d xisxdigit(c) (isxdigit((eight_bits)(c))&&((eight_bits)(c)<0200))
+ at d isxalpha(c) ((c)=='_' || (c)=='$')
+  /* non-alpha characters allowed in identifier */
+ at d ishigh(c) ((eight_bits)(c)>0177)
+@^high-bit character handling@>
 
 @<Common code...@>=
 extern char buffer[]; /* where each line of input goes */
@@ -95,7 +99,7 @@
 @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 */
- at d max_file_name_length 1024
+ at 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 */
@@ -130,7 +134,7 @@
 
 @ 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 */
- at d print_id(c) term_write((c)->byte_start,length((c))) /* print identifier */
+ at 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
@@ -163,7 +167,7 @@
 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 name_pointer section_lookup(char *,char *,boolean); /* finds section name */
 extern void init_node(name_pointer);@/
 extern void init_p(name_pointer,eight_bits);@/
 extern void print_prefix_name(name_pointer);@/
@@ -175,7 +179,7 @@
 @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 */
- at d mark_harmless {if (history==spotless) history=harmless_message;}
+ at 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@>
@@ -192,8 +196,8 @@
 @ 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? */
+ at d show_happiness flags['h'] /* should lack of errors be announced? */
 @d show_stats flags['s'] /* should statistics be printed at end of run? */
- at d show_happiness flags['h'] /* should lack of errors be announced? */
 @d make_xrefs flags['x'] /* should cross references be output? */
 
 @<Common code...@>=
@@ -207,10 +211,8 @@
 
 @ Code related to output:
 @d update_terminal fflush(stdout) /* empty the terminal output buffer */
- at d new_line putchar('\n') @d putxchar putchar
+ at d new_line putchar('\n')
 @d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout)
- at d C_printf(c,a) fprintf(C_file,c,a)
- at d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */
 
 @<Common code...@>=
 extern FILE *C_file; /* where output of \.{CTANGLE} goes */
@@ -228,16 +230,14 @@
 handle \TEX/, so they should be sufficient for most applications of
 \.{CWEB}.
 
- at d max_bytes 1000000 /* the number of bytes in identifiers,
-  index entries, and section names */
- at d max_toks 1000000 /* number of bytes in compressed \CEE/ code */
- at d max_names 10239 /* number of identifiers, strings, section names;
+ at d buf_size 100 /* maximum length of input line, plus one */
+ at d longest_name 10000 /* file names, section names, and section texts
+   shouldn't be longer than this */
+ at d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
+ at d max_bytes 90000 /* the number of bytes in identifiers,
+  index entries, and section names; must be less than $2^{24}$ */
+ at d max_names 4000 /* number of identifiers, strings, section names;
   must be less than 10240 */
- at d max_sections 4000 /* greater than the total number of sections */
- at d max_texts 10239 /* number of replacement texts, must be less than 10240 */
- at d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */
- at d stack_size 500 /* number of simultaneous levels of macro expansion */
- at d buf_size 1000 /* maximum length of input line, plus one */
- at d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
+ at d max_sections 2000 /* greater than the total number of sections */
 
 @ End of \.{COMMON} interface.

Modified: branches/stable/source/src/texk/web2c/cwebdir/common.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/common.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/common.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 % This program by Silvio Levy and Donald E. Knuth
 % is based on a program by Knuth.
 % It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.2 --- February 2021
+% Version 4.4 --- June 2021
 
 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
 
@@ -22,12 +22,12 @@
 
 \def\v{\char'174} % vertical (|) in typewriter font
 
-\def\title{Common code for CTANGLE and CWEAVE (Version 4.2)}
+\def\title{Common code for CTANGLE and CWEAVE (Version 4.4)}
 \def\topofcontents{\null\vfill
   \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
     {\ttitlefont CWEAVE}}
   \vskip 15pt
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
   \vfill}
 \def\botofcontents{\vfill
 \noindent
@@ -47,10 +47,6 @@
 \pageno=\contentspagenumber \advance\pageno by 1
 \let\maybe=\iftrue
 
- at s boolean int
- at s uint8_t int
- at s uint16_t int
-
 @** Introduction.  This file contains code common
 to both \.{CTANGLE} and \.{CWEAVE}, which roughly concerns the following
 problems: character uniformity, input routines, error handling and
@@ -158,13 +154,13 @@
 @^system dependencies@>
 
 @c
-static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */
-FILE *fp at t\2\2@>) /* what file to read from */
+static boolean input_ln( /* copies a line into |buffer| or returns |false| */
+FILE *fp) /* 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 false;  /* we have hit end-of-file */
-  limit = k = buffer;  /* beginning of buffer */
+  register int c=EOF; /* character read; initialized so some compilers won't complain */
+  register char *k; /* where next character goes */
+  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;
   if (k>buffer_end)
@@ -172,7 +168,7 @@
       ungetc(c,fp); loc=buffer; err_print("! Input line too long");
 @.Input line too long@>
     }
-  if (c==EOF && limit==buffer) return false;  /* there was nothing after
+  if (c==EOF && limit==buffer) return false; /* there was nothing after
     the last newline */
   return true;
 }
@@ -182,7 +178,7 @@
 @ 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
-commands \.{@@i}, and a |change_file|, which might also contain
+commands~\.{@@i}, and a |change_file|, which might also contain
 includes.  The |web_file| together with the currently open include
 files form a stack |file|, whose names are stored in a parallel stack
 |file_name|.  The boolean |changing| tells whether or not we're reading
@@ -214,7 +210,7 @@
 
 Here's a shorthand expression for inequality between the two lines:
 
- at d lines_dont_match (change_limit-change_buffer != limit-buffer || @|
+ at d lines_dont_match (change_limit-change_buffer != limit-buffer @| ||
   strncmp(buffer, change_buffer, (size_t)(limit-buffer)))
 
 @<Global var...@>=
@@ -272,10 +268,8 @@
 } while (limit==buffer);
 
 @ @<Move |buffer| and |limit| to |change_buffer| and |change_limit|@>=
-{
-  change_limit=change_buffer+(ptrdiff_t)(limit-buffer);
-  strncpy(change_buffer,buffer,(size_t)(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 |false|.
@@ -293,11 +287,11 @@
 This procedure is called only when |buffer<limit|, i.e., when the
 current line is nonempty.
 
- at d if_section_start_make_pending(b) {@+*limit='!';
-  for (loc=buffer;xisspace(*loc);loc++) ;
+ at d if_section_start_make_pending(b)@/
+  *limit='!';@+
+  for (loc=buffer;xisspace(*loc);loc++) ;@+
   *limit=' ';
   if (*loc=='@@' && (xisspace(*(loc+1)) || *(loc+1)=='*')) change_pending=b;
-}
 
 @c
 static void
@@ -311,7 +305,7 @@
     if (!change_pending) changed_section[section_count]=true;
   }
   while (true) {
-    changing=true; print_where=true; change_line++;
+    changing=print_where=true; change_line++;
     if (!input_ln(change_file)) {
       err_print("! Change file ended before @@y");
 @.Change file ended...@>
@@ -365,9 +359,9 @@
 {
   limit=buffer; loc=buffer+1; buffer[0]=' ';
   @<Open input files@>@;
-  include_depth=0; cur_line=0; change_line=0;
+  include_depth=cur_line=change_line=0;
   change_depth=include_depth;
-  changing=1; prime_the_change_buffer(); changing=!changing;
+  changing=true; prime_the_change_buffer(); changing=!changing;
   limit=buffer; loc=buffer+1; buffer[0]=' '; input_has_ended=false;
 }
 
@@ -408,7 +402,7 @@
 {
   restart:
   if (changing && include_depth==change_depth)
-   @<Read from |change_file| and maybe turn off |changing|@>@;
+    @<Read from |change_file| and maybe turn off |changing|@>@;
   if (! changing || include_depth>change_depth) {
     @<Read from |cur_file| and maybe turn on |changing|@>@;
     if (changing && include_depth==change_depth) goto restart;
@@ -448,10 +442,10 @@
 @d too_long() {include_depth--;
         err_print("! Include file name too long"); goto restart;}
 
- at .CWEBINPUTS@>@<Try to open...@>= {
+@<Try to open...@>= {
   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;
+  char *kk, *k=cur_file_name;
   int l; /* length of file name */
 
   if (*loc=='"') {
@@ -467,8 +461,8 @@
     cur_line=0; print_where=true;
     goto restart; /* success */
   }
-  kk=getenv("CWEBINPUTS");
-  if (kk!=NULL) {
+  if ((kk=getenv("CWEBINPUTS"))!=NULL) {
+ at .CWEBINPUTS@>
     if ((l=strlen(kk))>max_file_name_length-2) too_long();
     strcpy(temp_file_name,kk);
   }
@@ -481,9 +475,9 @@
 #endif /* |CWEBINPUTS| */
   }
   if (l>0) {
-    if (k+l+2>=cur_file_name_end)  too_long();
+    if (k+l+2>=cur_file_name_end) too_long();
 @.Include file name ...@>
-    for (; k>= cur_file_name; k--) *(k+l+1)=*k;
+    for (; k>=cur_file_name; k--) *(k+l+1)=*k;
     strcpy(cur_file_name,temp_file_name);
     cur_file_name[l]='/'; /* \UNIX/ pathname separator */
     if ((cur_file=fopen(cur_file_name,"r"))!=NULL) {
@@ -622,7 +616,7 @@
 \.{CWEAVE} and \.{CTANGLE}.  If there is no match for the identifier,
 it is inserted into the table.
 
- at d hash_size 8501 /* should be prime */
+ at d hash_size 353 /* should be prime */
 
 @<Global var...@>=
 name_pointer hash[hash_size]; /* heads of hash lists */
@@ -638,10 +632,10 @@
 
 @c
 name_pointer
-id_lookup(@t\1\1@> /* looks up a string in the identifier table */
+id_lookup( /* 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 at t\2\2@>) /* the |ilk|; used by \.{CWEAVE} only */
+char t) /* the |ilk|; used by \.{CWEAVE} only */
 {
   const char *i=first; /* position in |buffer| */
   int h; /* hash code */
@@ -678,6 +672,7 @@
 @ 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.
+
 @<Enter a new name...@>= {
   if (byte_ptr+l>byte_mem_end) overflow("byte memory");
   if (name_ptr>=name_dir_end) overflow("name");
@@ -704,7 +699,7 @@
 to additional chunks in the same way. Null links are represented by
 |name_dir|.
 
- at d first_chunk(p)  ((p)->byte_start+2)
+ at d first_chunk(p) ((p)->byte_start+2)
 @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,
@@ -719,11 +714,9 @@
   name_pointer q = p+1;
   while (p!=name_dir) {
     ss = (p+1)->byte_start-1;
-    if (*ss==' ' && ss>=s) {
-      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;
-    }
+    if (*ss==' ' && ss>=s) p=q->link,q=p;
+    else ss++,p=name_dir,q=NULL;
+    term_write(s,(size_t)(ss-s));
     s = p->byte_start;
   }
   if (q) term_write("...",3); /* complete name not yet known */
@@ -739,11 +732,8 @@
   name_pointer q = p+1;
   while (p!=name_dir) {
     ss = (p+1)->byte_start-1;
-    if (*ss==' ' && ss>=s) {
-      p=q->link; q=p;
-    } else {
-      ss++; p=name_dir;
-    }
+    if (*ss==' ' && ss>=s) p=q->link,q=p;
+    else ss++,p=name_dir;
     strncpy(dest,s,(size_t)(ss-s)), dest+=ss-s;
     s = p->byte_start;
   }
@@ -773,15 +763,15 @@
 
 @<Predecl...@>=
 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 name_pointer add_section_name(name_pointer,int,char *,char *,boolean);@/
+static void extend_section_name(name_pointer,char *,char *,boolean);
 
 @ @c
-static int web_strcmp(@t\1\1@> /* fuller comparison than |strcmp| */
+static int web_strcmp( /* 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 at t\2\2@>) /* length of second string */
+  int k_len) /* length of second string */
 {
   char *j1=j+j_len, *k1=k+k_len;
   while (k<k1 && j<j1 && *j==*k) k++, j++;
@@ -807,12 +797,12 @@
 
 @c
 static name_pointer
-add_section_name(@t\1\1@> /* install a new node in the tree */
+add_section_name( /* 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 at t\2\2@>) /* are we adding a prefix or a full name? */
+boolean ispref) /* are we adding a prefix or a full name? */
 {
   name_pointer p=name_ptr; /* new node */
   char *s=first_chunk(p);
@@ -828,8 +818,7 @@
   }
   set_prefix_length(p,name_len);
   strncpy(s,first,name_len);
-  p->llink=NULL;
-  p->rlink=NULL;
+  p->llink=p->rlink=NULL;
   init_node(p);
   return par==NULL ? (root=p) : c==less ? (par->llink=p) : (par->rlink=p);
 }
@@ -836,11 +825,11 @@
 
 @ @c
 static void
-extend_section_name(@t\1\1@>
+extend_section_name(
 name_pointer p, /* name to be extended */
 char *first, /* beginning of extension text */
 char *last, /* one beyond end of extension text */
-int ispref at t\2\2@>) /* are we adding a prefix or a full name? */
+boolean ispref) /* are we adding a prefix or a full name? */
 {
   char *s;
   name_pointer q=p+1;
@@ -864,11 +853,11 @@
 
 @c
 name_pointer
-section_lookup(@t\1\1@> /* find or install section name in tree */
+section_lookup( /* find or install section name in tree */
 char *first,char *last, /* first and last characters of new name */
-int ispref at t\2\2@>) /* is the new name a prefix or a full name? */
+boolean ispref) /* is the new name a prefix or a full name? */
 {
-  int c=0; /* comparison between two names; initialized so some compilers won't complain */
+  int c=less; /* comparison between two names; initialized so some compilers won't complain */
   name_pointer p=root; /* current node of the search tree */
   name_pointer q=NULL; /* another place to look in the tree */
   name_pointer r=NULL; /* where a match has been found */
@@ -894,7 +883,7 @@
       par=p;
     p=(c==less?p->llink:p->rlink);
   } else { /* new name matches |p| */
-    if (r!=NULL) {  /* and also |r|: illegal */
+    if (r!=NULL) { /* and also |r|: illegal */
       fputs("\n! Ambiguous prefix: matches <",stdout);
 @.Ambiguous prefix ... @>
       print_prefix_name(p);
@@ -931,16 +920,16 @@
     }
     else if (name_len<prefix_length(r)) set_prefix_length(r,name_len);
     /* fall through */
-  case equal: return r;
+  case equal: break;
   case extension: if (!ispref || first<=last)
         extend_section_name(r,first,last+1,ispref);
-      return r;
+      break;
   case bad_extension:
       fputs("\n! New name extends <",stdout);
 @.New name extends...@>
       print_section_name(r);
       err_print(">");
-    return r;
+    break;
   default: /* no match: illegal */
     fputs("\n! Section name incompatible with <",stdout);
 @.Section name incompatible...@>
@@ -948,8 +937,8 @@
     fputs(">,\n which abbreviates <",stdout);
     print_section_name(r);
     err_print(">");
-    return r;
 }
+return r;
 
 @ The return codes of |section_name_cmp|, which compares a string with
 the full name of a section, are those of |web_strcmp| plus
@@ -968,20 +957,20 @@
 @d bad_extension 5
 
 @c
-static int section_name_cmp(@t\1\1@>
+static int section_name_cmp(
 char **pfirst, /* pointer to beginning of comparison string */
 int len, /* length of string */
-name_pointer r at t\2\2@>) /* section name being compared */
+name_pointer r) /* 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? */
+  int c=less; /* comparison */
+  boolean ispref; /* is chunk |r| a prefix? */
   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;
+    if (*ss==' ' && ss>=r->byte_start) ispref=true,q=q->link;
+    else ispref=false,ss++,q=name_dir;
     switch(c=web_strcmp(first,len,s,ss-s)) {
     case equal: if (q==name_dir)
         if (ispref) {
@@ -1023,12 +1012,11 @@
 
 @c
 void
-err_print(@t\1\1@> /* prints `\..' and location of error message */
-const char *s at t\2\2@>)
+err_print( /* prints `\..' and location of error message */
+const char *s)
 {
-  char *k,*l; /* pointers into |buffer| */
   printf(*s=='!'? "\n%s" : "%s",s);
-  if(web_file_open) @<Print error location based on input buffer@>@;
+  if (web_file_open) @<Print error location based on input buffer@>@;
   update_terminal; mark_error;
 }
 
@@ -1042,7 +1030,8 @@
 @^system dependencies@>
 
 @<Print error location based on input buffer@>=
-{if (changing && include_depth==change_depth)
+{char *k,*l; /* pointers into |buffer| */
+if (changing && include_depth==change_depth)
   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);
@@ -1051,7 +1040,7 @@
   for (k=buffer; k<l; k++)
     if (*k=='\t') putchar(' ');
     else putchar(*k); /* print the characters already read */
-  putchar('\n');
+  new_line;
   for (k=buffer; k<l; k++) putchar(' '); /* space out the next line */
 }
 for (k=l; k<limit; k++) putchar(*k); /* print the part not yet read */
@@ -1070,7 +1059,7 @@
 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.
+a status of |EXIT_SUCCESS| if and only if only harmless messages were printed.
 @^system dependencies@>
 
 @c
@@ -1085,13 +1074,15 @@
 
 @ @<Print the job |history|@>=
 switch (history) {
-case spotless: if (show_happiness) puts("(No errors were found.)"); break;
+case spotless:
+  if (show_happiness) puts("(No errors were found.)"); break;
 case harmless_message:
   puts("(Did you see the warning message above?)"); break;
 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.)");
-} /* there are no other cases */
+case fatal_message: default:
+  puts("(That was a fatal error, my friend.)");
+}
 
 @ When there is no way to recover from an error, the |fatal| subroutine is
 invoked. This happens most often when |overflow| occurs.
@@ -1146,8 +1137,7 @@
 should be set before calling |common_init|.
 
 @<Set the default options common to \.{CTANGLE} and \.{CWEAVE}@>=
-show_banner=show_happiness=show_progress=make_xrefs=true;@/
-show_stats=false;
+show_banner=show_happiness=show_progress=make_xrefs=true;
 
 @ 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}
@@ -1179,14 +1169,13 @@
     if ((**(++argv)=='-'||**argv=='+')&&*(*argv+1)) @<Handle flag argument@>@;
     else {
       s=name_pos=*argv;@+dot_pos=NULL;
-      while (*s) {
+      while (*s)
         if (*s=='.') dot_pos=s++;
         else if (*s=='/') dot_pos=NULL,name_pos=++s;
         else s++;
-      }
       if (!found_web) @<Make
-       |web_file_name|, |tex_file_name|, and |C_file_name|@>@;
-      else if (!found_change) @<Make |change_file_name| from |fname|@>@;
+        |web_file_name|, |tex_file_name|, and |C_file_name|@>@;
+      else if (!found_change) @<Make |change_file_name|@>@;
       else if (!found_out) @<Override |tex_file_name| and |C_file_name|@>@;
         else @<Print usage error message and quit@>@;
     }
@@ -1211,7 +1200,7 @@
     sprintf(web_file_name,"%s.w",*argv);
   else {
     strcpy(web_file_name,*argv);
-    *dot_pos=0; /* string now ends where the dot was */
+    *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 */
@@ -1246,7 +1235,7 @@
     strcpy(tex_file_name,*argv);
     strcpy(C_file_name,*argv);
     if (make_xrefs) { /* indexes will be generated */
-      *dot_pos=0;
+      *dot_pos='\0';
       sprintf(idx_file_name,"%s.idx",*argv);
       sprintf(scn_file_name,"%s.scn",*argv);
     }
@@ -1256,10 +1245,8 @@
 
 @ @d flag_change (**argv!='-')
 @<Handle flag...@>=
-{
-  for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++)
-    flags[(eight_bits)*dot_pos]=flag_change;
-}
+for(dot_pos=*argv+1;*dot_pos>'\0';dot_pos++)
+  flags[(eight_bits)*dot_pos]=flag_change;
 
 @ @<Print usage error message and quit@>=
 {

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-bs.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -17,16 +17,16 @@
 The ``banner line'' defined here should be changed whenever \.{CTANGLE}
 is modified.
 
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 @y
 The ``banner line'' defined here should be changed whenever \.{CTANGLE}
 is modified.
 
- at d banner "This is CTANGLE (Version 4.2pc/big)"
+ at d banner "This is CTANGLE (Version 4.4pc/big)"
 @z
 
 
- at x Section 9.
+ at x Section 10.
   for section names */
 
 @<Common code...@>=
@@ -84,27 +84,24 @@
 @z
 
 
- at 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}.
+ at x Section 19.
+  eight_bits *tok_start; /* pointer into |tok_mem| */
+  sixteen_bits text_link; /* relates replacement texts */
+} text;
+typedef text *text_pointer;
+ at y
+  eight_bits huge* tok_start; /* pointer into |tok_mem| */
+  sixteen_bits text_link; /* relates replacement texts */
+} text;
+typedef text *text_pointer;
+ at z
 
- at d max_bytes 1000000 /* the number of bytes in identifiers,
-  index entries, and section names */
- at d max_toks 1000000 /* number of bytes in compressed \CEE/ code */
- at d max_names 10239 /* number of identifiers, strings, section names;
-  must be less than 10240 */
- at d max_sections 4000 /* greater than the total number of sections */
- at d max_texts 10239 /* number of replacement texts, must be less than 10240 */
- at d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */
- at d stack_size 500 /* number of simultaneous levels of macro expansion */
- at d buf_size 1000 /* maximum length of input line, plus one */
+
+ at x Section 20.
+@ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */
+ at d max_toks 270000 /* number of bytes in compressed \CEE/ code */
 @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
+@ (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
@@ -113,34 +110,10 @@
 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.)
-
- at d max_bytes 90000 /* the number of bytes in identifiers,
-  index entries, and section names */
+ at d max_texts 2500 /* number of replacement texts, must be less than 10240 */
 @d max_toks 170000 /* number of bytes in compressed \CEE/ code */
- at d max_names 4000 /* number of identifiers, strings, section names;
-  must be less than 10240 */
- at d max_sections 4000 /* greater than the total number of sections */
- at d max_texts 2500 /* number of replacement texts, must be less than 10240 */
- at d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */
- at d stack_size 50 /* number of simultaneous levels of macro expansion */
- at d buf_size 100 /* for \.{CWEAVE} */
 @z
-
-
- at x Section 16.
-  eight_bits *tok_start; /* pointer into |tok_mem| */
-  sixteen_bits text_link; /* relates replacement texts */
-} text;
-typedef text *text_pointer;
- at y
-  eight_bits huge* tok_start; /* pointer into |tok_mem| */
-  sixteen_bits text_link; /* relates replacement texts */
-} text;
-typedef text *text_pointer;
- at z
-
-
- at x Section 17.
+ at x
 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| */
@@ -151,7 +124,7 @@
 @z
 
 
- at x Section 18.
+ at x Section 21.
 text_info->tok_start=tok_ptr=tok_mem;
 text_ptr=text_info+1; text_ptr->tok_start=tok_mem;
   /* this makes replacement text 0 of length zero */
@@ -163,7 +136,7 @@
 @z
 
 
- at x Section 19.
+ at x Section 22.
 @d equiv equiv_or_xref /* info corresponding to names */
 @y
 @d equiv ptr_union.equiv_member /* info corresponding to names */
@@ -170,7 +143,7 @@
 @z
 
 
- at x Section 27.
+ at x Section 31.
   eight_bits *end_field; /* ending location of replacement text */
   eight_bits *byte_field; /* present location within replacement text */
 @y
@@ -179,7 +152,7 @@
 @z
 
 
- at x Section 49.
+ at x Section 55.
 out_char(
 eight_bits cur_char)
 {

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-man.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-man.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-man.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -16,7 +16,7 @@
 }
 @y
 \def\botofcontents{\vfill\titlefalse}
-\def\contentspagenumber{66}
+\def\contentspagenumber{64}
 \def\title{APPENDIX E: CTANGLE}
 \let\K=\leftarrow
 @z

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-pc.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -9,16 +9,19 @@
 alternate change files with -bs suffix instead of -pc.
 
 @x section 1
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 @y
- at d banner "This is CTANGLE (Version 4.2pc)"
+ at d banner "This is CTANGLE (Version 4.4pc)"
 @z
- at x section 4
- at d max_bytes 1000000 /* the number of bytes in identifiers,
-  index entries, and section names */
- at d max_toks 1000000 /* number of bytes in compressed \CEE/ code */
+ at x section 17
+ at d max_bytes 90000 /* the number of bytes in identifiers,
+  index entries, and section names; must be less than $2^{24}$ */
 @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 */
+  index entries, and section names; must be less than $2^{24}$ */
+ at z
+ at x section 20
+ at d max_toks 270000 /* number of bytes in compressed \CEE/ code */
+ at y
 @d max_toks (unsigned)60000 /* number of bytes in compressed \CEE/ code */
 @z

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-ql.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -7,15 +7,15 @@
 
 
 @x
-\def\title{CTANGLE (Version 4.2)}
+\def\title{CTANGLE (Version 4.4)}
 @y
-\def\title{CTANGLE (QL Version 4.2)}
+\def\title{CTANGLE (QL Version 4.4)}
 @z
 
 @x section 1
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 @y
- at d banner "This is CTANGLE (QL Version 4.2)"
+ at d banner "This is CTANGLE (QL Version 4.4)"
 @z
 
 @x

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-vms.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -10,12 +10,12 @@
 (these changes not necessary for initial bootstrapping)
 
 @x section 1 (01-FEB-1992 ST)
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 @y
- at d banner "This is CTANGLE (VAX/VMS Version 4.2)"
+ at d banner "This is CTANGLE (VAX/VMS Version 4.4)"
 @z
 
- at x section 3 (01-FEB-1992 ST)
+ at x section 4 (01-FEB-1992 ST)
 #include <ctype.h> /* definition of |@!isalpha|, |@!isdigit| and so on */
 #include <stdbool.h> /* definition of |@!bool|, |@!true| and |@!false| */
 #include <stddef.h> /* definition of |@!ptrdiff_t| */

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-w2c.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -17,15 +17,15 @@
 @q Please send comments, suggestions, etc. to tex-k@@tug.org.            @>
 
 @x
-\def\title{CTANGLE (Version 4.2)}
+\def\title{CTANGLE (Version 4.4)}
 @y
-\def\title{CTANGLE (Version 4.2 [\TeX~Live])}
+\def\title{CTANGLE (Version 4.4 [\TeX~Live])}
 @z
 
 @x
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
 @y
-  \centerline{(Version 4.2 [\TeX~Live])}
+  \centerline{(Version 4.4 [\TeX~Live])}
 @z
 
 @x
@@ -41,9 +41,9 @@
 @z
 
 @x
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 @y
- at d banner "This is CTANGLE, Version 4.2"
+ at d banner "This is CTANGLE, Version 4.4"
   /* will be extended by the \TeX~Live |versionstring| */
 @z
 
@@ -60,6 +60,14 @@
 @z
 
 @x
+@ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */
+ at d max_toks 270000 /* number of bytes in compressed \CEE/ code */
+ at y
+@ @d max_texts 10239 /* number of replacement texts, must be less than 10240 */
+ at d max_toks 1000000 /* number of bytes in compressed \CEE/ code */
+ at z
+
+ at x
   if (tok_ptr+2>tok_mem_end) overflow("token");
 @y
   if (tok_ptr+2>tok_mem_end) overflow(_("token"));
@@ -78,9 +86,9 @@
 @z
 
 @x
-      overflow("output files");
+    else overflow("output files");
 @y
-      overflow(_("output files"));
+    else overflow(_("output files"));
 @z
 
 @x
@@ -113,14 +121,14 @@
     an_output_file--;
     sprint_section_name(output_file_name,*an_output_file);
     fclose(C_file);
-    C_file=fopen(output_file_name,"wb");
-    if (C_file ==0) fatal("! Cannot open output file ",output_file_name);
+    if ((C_file=fopen(output_file_name,"wb"))==NULL)
+      fatal("! Cannot open output file ",output_file_name);
 @.Cannot open output file@>
     if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
     cur_line=1;
     stack_ptr=stack+1;
-    cur_name= (*an_output_file);
-    cur_repl= (text_pointer)cur_name->equiv;
+    cur_name=*an_output_file;
+    cur_repl=(text_pointer)cur_name->equiv;
     cur_byte=cur_repl->tok_start;
     cur_end=(cur_repl+1)->tok_start;
     while (stack_ptr > stack) get_output();
@@ -142,8 +150,8 @@
     if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
     cur_line=1;
     stack_ptr=stack+1;
-    cur_name= (*an_output_file);
-    cur_repl= (text_pointer)cur_name->equiv;
+    cur_name=*an_output_file;
+    cur_repl=(text_pointer)cur_name->equiv;
     cur_byte=cur_repl->tok_start;
     cur_end=(cur_repl+1)->tok_start;
     while (stack_ptr > stack) get_output();
@@ -154,9 +162,9 @@
 @z
 
 @x
-          else if (a<050000) { confusion("macro defs have strange char");}
+          else if (a<050000) confusion("macro defs have strange char");
 @y
-          else if (a<050000) { confusion(_("macro defs have strange char"));}
+          else if (a<050000) confusion(_("macro defs have strange char"));
 @z
 
 @x
@@ -190,15 +198,15 @@
 @z
 
 @x
-    case translit_code: err_print("! Use @@l in limbo only"); continue;
+  case translit_code: err_print("! Use @@l in limbo only"); continue;
 @y
-    case translit_code: err_print(_("! Use @@l in limbo only")); continue;
+  case translit_code: err_print(_("! Use @@l in limbo only")); continue;
 @z
 
 @x
-        err_print("! Double @@ should be used in control text");
+      err_print("! Double @@ should be used in control text");
 @y
-        err_print(_("! Double @@ should be used in control text"));
+      err_print(_("! Double @@ should be used in control text"));
 @z
 
 @x
@@ -238,15 +246,15 @@
 @z
 
 @x
-  if (loc>=limit) err_print("! Verbatim string didn't end");
+if (loc>=limit) err_print("! Verbatim string didn't end");
 @y
-  if (loc>=limit) err_print(_("! Verbatim string didn't end"));
+if (loc>=limit) err_print(_("! Verbatim string didn't end"));
 @z
 
 @x
- at d app_repl(c)  {if (tok_ptr==tok_mem_end) overflow("token"); *tok_ptr++=c;}
+ at d app_repl(c) {if (tok_ptr==tok_mem_end) overflow("token"); *(tok_ptr++)=c;}
 @y
- at d app_repl(c) {if (tok_ptr==tok_mem_end) overflow(_("token")); *tok_ptr++=c;}
+ at d app_repl(c) {if (tok_ptr==tok_mem_end) overflow(_("token")); *(tok_ptr++)=c;}
 @z
 
 @x
@@ -286,9 +294,9 @@
 @z
 
 @x
-    err_print("! Definition flushed, must start with identifier");
+  err_print("! Definition flushed, must start with identifier");
 @y
-    err_print(_("! Definition flushed, must start with identifier"));
+  err_print(_("! Definition flushed, must start with identifier"));
 @z
 
 @x
@@ -338,9 +346,9 @@
 @x
 @** Index.
 @y
-@** 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.
+@** Extensions to {\tentex 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
 material should nicely integrate with the original ``\&{104.~Index}.''
@@ -361,14 +369,13 @@
   rename(check_file_name,C_file_name); /* This was the first run */
 
 @ @<Set up the comparison of temporary output@>=
-  char x[BUFSIZ],y[BUFSIZ];
-  int x_size,y_size,comparison=false;
+  boolean comparison=false;
 
   if((check_file=fopen(check_file_name,"r"))==NULL)
     fatal(_("! Cannot open output file "),check_file_name);
 @.Cannot open output file@>
 
-  if (temporary_output) @<Compare the temporary output...@>@;
+  if (check_for_change) @<Compare the temporary output...@>@;
 
   fclose(C_file); C_file=NULL;
   fclose(check_file); check_file=NULL;
@@ -377,10 +384,10 @@
 
 @<Compare the temporary output to the previous output@>=
 do {
-  x_size = fread(x,1,BUFSIZ,C_file);
-  y_size = fread(y,1,BUFSIZ,check_file);
-  comparison = (x_size == y_size); /* Do not merge these statements! */
-  if(comparison) comparison = !memcmp(x,y,x_size);
+  char x[BUFSIZ],y[BUFSIZ];
+  int x_size = fread(x,sizeof(char),BUFSIZ,C_file);
+  int y_size = fread(y,sizeof(char),BUFSIZ,check_file);
+  comparison = (x_size == y_size) && !memcmp(x,y,x_size);
 } while(comparison && !feof(C_file) && !feof(check_file));
 
 @ Note the superfluous call to |remove| before |rename|.  We're using it to
@@ -400,13 +407,13 @@
 to a file and finally get rid of that file.
 
 @<Update the secondary results...@>=
-if(0==strcmp("/dev/stdout",output_file_name))
+if(0==strcmp("/dev/stdout",output_file_name))@/
   @<Redirect temporary output to \.{/dev/stdout}@>@;
-else if(0==strcmp("/dev/stderr",output_file_name))
+else if(0==strcmp("/dev/stderr",output_file_name))@/
   @<Redirect temporary output to \.{/dev/stderr}@>@;
-else if(0==strcmp("/dev/null",output_file_name))
+else if(0==strcmp("/dev/null",output_file_name))@/
   @<Redirect temporary output to \.{/dev/null}@>@;
-else { /* Hopefully a \\{regular} output file */
+else { /* Hopefully a regular output file */
   if((C_file=fopen(output_file_name,"r"))!=NULL) {
     @<Set up the comparison of temporary output@>@;
     @<Create the secondary output depending on the comparison@>@;
@@ -429,7 +436,7 @@
 @<Redirect temporary output to \.{/dev/stdout}@>={
   @<Setup system redirection@>@;
   do {
-    in_size = fread(in_buf,1,BUFSIZ,check_file);
+    in_size = fread(in_buf,sizeof(char),BUFSIZ,check_file);
     in_buf[in_size]='\0';
     fprintf(stdout,"%s",in_buf);
   } while(!feof(check_file));@/
@@ -442,7 +449,7 @@
 @<Redirect temporary output to \.{/dev/stderr}@>={
   @<Setup system redirection@>@;
   do {
-    in_size = fread(in_buf,1,BUFSIZ,check_file);
+    in_size = fread(in_buf,sizeof(char),BUFSIZ,check_file);
     in_buf[in_size]='\0';
     fprintf(stderr,"%s",in_buf);
   } while(!feof(check_file));@/
@@ -453,18 +460,19 @@
 @ No copying necessary, just remove the temporary output file.
 
 @<Redirect temporary output to \.{/dev/null}@>={
-  int comparison=true;
+  boolean comparison=true;
   @<Create the secondary output...@>@;
 }
 
 @ @<Setup system redirection@>=
 char in_buf[BUFSIZ+1];
-int in_size,comparison=true;
+int in_size;
+boolean comparison=true;
 if((check_file=fopen(check_file_name,"r"))==NULL)
   fatal(_("! Cannot open output file "),check_file_name);
 @.Cannot open output file@>
 
-@* Put ``version'' information in a single spot.
+@* Print ``version'' information.
 Don't do this at home, kids! Push our local macro to the variable in \.{COMMON}
 for printing the |banner| and the |versionstring| from there.
 

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctang-w32.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -4,23 +4,23 @@
 Changes necessary for compiling with Borland C/C++
 
 @x section 1
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 @y
- at d banner "This is CTANGLE (Version 4.2win32)"
+ at d banner "This is CTANGLE (Version 4.4win32)"
 @z
 
 @x
-boolean names_match(@t\1\1@>
+boolean names_match(
 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 at t\2\2@>) /* not used by \.{TANGLE} */
+eight_bits t) /* not used by \.{TANGLE} */
 @y
-boolean __cdecl names_match(@t\1\1@>
+boolean __cdecl names_match(
 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 at t\2\2@>) /* not used by \.{TANGLE} */
+eight_bits t) /* not used by \.{TANGLE} */
 @z
 
 @x

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctangle.c
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctangle.c	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctangle.c	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 #line 66 "ctangle.w"
 
 /*4:*/
-#line 46 "common.h"
+#line 44 "common.h"
 
 #include <ctype.h>  
 #include <stdbool.h>  
@@ -15,7 +15,7 @@
 /*:4*/
 #line 67 "ctangle.w"
 
-#define banner "This is CTANGLE (Version 4.2)" \
+#define banner "This is CTANGLE (Version 4.4)" \
 
 #define ctangle false
 #define cweave true \
@@ -36,16 +36,22 @@
 #define period_ast 026
 #define minus_gt_ast 027 \
 
-#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 compress(c) if(loc++<=limit) return c \
 
+#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 isxalpha(c) ((c) =='_'||(c) =='$')  \
+
+#define ishigh(c) ((eight_bits) (c) > 0177)  \
+ \
+
 #define max_include_depth 10 \
 
-#define max_file_name_length 1024
+#define max_file_name_length 60
 #define cur_file file[include_depth]
 #define cur_file_name file_name[include_depth]
 #define cur_line line[include_depth]
@@ -53,7 +59,7 @@
 #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 print_id(c) term_write((c) ->byte_start,length(c) ) 
 #define llink link
 #define rlink dummy.Rlink
 #define root name_dir->rlink \
@@ -63,7 +69,7 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless {if(history==spotless) history= harmless_message;}
+#define mark_harmless if(history==spotless) history= harmless_message
 #define mark_error history= error_message
 #define confusion(s) fatal("! This can't happen: ",s)  \
  \
@@ -70,37 +76,37 @@
 
 #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') 
-#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 term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
-#define max_bytes 1000000 \
+#define buf_size 100
+#define longest_name 10000 \
 
-#define max_toks 1000000
-#define max_names 10239 \
+#define long_buf_size (buf_size+longest_name) 
+#define max_bytes 90000 \
 
-#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 max_names 4000 \
 
+#define max_sections 2000 \
+
+#define max_texts 2500
+#define max_toks 270000
 #define equiv equiv_or_xref \
 
+#define macro 0
 #define section_flag max_texts \
 
 #define string 02
+#define constant 03
 #define join 0177
 #define output_defs_flag (2*024000-1)  \
 
+#define stack_size 50
 #define cur_end cur_state.end_field
 #define cur_byte cur_state.byte_field
 #define cur_name cur_state.name_field
@@ -117,9 +123,12 @@
 #define verbatim 4 \
 
 #define max_files 256
+#define C_printf(c,a) fprintf(C_file,c,a) 
+#define C_putc(c) putc(c,C_file)  \
+
 #define translit_length 10 \
 
-#define ignore 0
+#define ignore 00
 #define ord 0302
 #define control_text 0303
 #define translit_code 0304
@@ -130,23 +139,19 @@
 #define section_name 0311
 #define new_section 0312 \
 
-#define constant 03 \
+#define app_repl(c) {if(tok_ptr==tok_mem_end) overflow("token") ;*(tok_ptr++) = c;} \
 
-#define isxalpha(c) ((c) =='_'||(c) =='$')  \
+#define store_id(a) a= id_lookup(id_first,id_loc,0) -name_dir; \
+app_repl((a/0400) +0200) ; \
+app_repl(a%0400) ; \
 
-#define ishigh(c) ((eight_bits) (c) > 0177)  \
- \
+#define keep_digit_separators flags['k'] \
 
-#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 68 "ctangle.w"
 
 /*3:*/
-#line 37 "common.h"
+#line 35 "common.h"
 
 typedef bool boolean;
 typedef uint8_t eight_bits;
@@ -163,7 +168,7 @@
 extern char*id_loc;
 
 /*:5*//*6:*/
-#line 88 "common.h"
+#line 92 "common.h"
 
 extern char buffer[];
 extern char*buffer_end;
@@ -171,7 +176,7 @@
 extern char*limit;
 
 /*:6*//*7:*/
-#line 105 "common.h"
+#line 109 "common.h"
 
 extern int include_depth;
 extern FILE*file[];
@@ -187,7 +192,7 @@
 extern boolean web_file_open;
 
 /*:7*//*9:*/
-#line 125 "common.h"
+#line 129 "common.h"
 
 extern sixteen_bits section_count;
 extern boolean changed_section[];
@@ -195,7 +200,7 @@
 extern boolean print_where;
 
 /*:9*//*10:*/
-#line 139 "common.h"
+#line 143 "common.h"
 
 typedef struct name_info{
 char*byte_start;
@@ -220,12 +225,12 @@
 extern hash_pointer h;
 
 /*:10*//*12:*/
-#line 183 "common.h"
+#line 187 "common.h"
 
 extern int history;
 
 /*:12*//*14:*/
-#line 199 "common.h"
+#line 203 "common.h"
 
 extern int argc;
 extern char**argv;
@@ -236,7 +241,7 @@
 extern boolean flags[];
 
 /*:14*//*15:*/
-#line 215 "common.h"
+#line 217 "common.h"
 
 extern FILE*C_file;
 extern FILE*tex_file;
@@ -257,7 +262,7 @@
 typedef text*text_pointer;
 
 /*:19*//*31:*/
-#line 269 "ctangle.w"
+#line 274 "ctangle.w"
 
 typedef struct{
 eight_bits*end_field;
@@ -272,7 +277,7 @@
 #line 70 "ctangle.w"
 
 /*20:*/
-#line 129 "ctangle.w"
+#line 131 "ctangle.w"
 
 static text text_info[max_texts];
 static text_pointer text_info_end= text_info+max_texts-1;
@@ -282,12 +287,12 @@
 static eight_bits*tok_ptr;
 
 /*:20*//*26:*/
-#line 198 "ctangle.w"
+#line 200 "ctangle.w"
 
 static text_pointer last_unnamed;
 
 /*:26*//*32:*/
-#line 285 "ctangle.w"
+#line 291 "ctangle.w"
 
 static output_state cur_state;
 
@@ -296,18 +301,18 @@
 static stack_pointer stack_ptr;
 
 /*:32*//*37:*/
-#line 361 "ctangle.w"
+#line 367 "ctangle.w"
 
 static int cur_val;
 
 /*:37*//*42:*/
-#line 452 "ctangle.w"
+#line 458 "ctangle.w"
 
 static eight_bits out_state;
 static boolean protect;
 
 /*:42*//*45:*/
-#line 483 "ctangle.w"
+#line 489 "ctangle.w"
 
 static name_pointer output_files[max_files];
 static name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -315,33 +320,33 @@
 static char output_file_name[longest_name+1];
 
 /*:45*//*52:*/
-#line 582 "ctangle.w"
+#line 589 "ctangle.w"
 
 static boolean output_defs_seen= false;
 
 /*:52*//*57:*/
-#line 691 "ctangle.w"
+#line 701 "ctangle.w"
 
 static char translit[128][translit_length];
 
 /*:57*//*62:*/
-#line 770 "ctangle.w"
+#line 777 "ctangle.w"
 
 static eight_bits ccode[256];
 
 /*:62*//*66:*/
-#line 830 "ctangle.w"
+#line 837 "ctangle.w"
 
 static boolean comment_continues= false;
 
 /*:66*//*68:*/
-#line 869 "ctangle.w"
+#line 874 "ctangle.w"
 
 static name_pointer cur_section_name;
 static boolean no_where;
 
 /*:68*//*82:*/
-#line 1182 "ctangle.w"
+#line 1188 "ctangle.w"
 
 static text_pointer cur_text;
 static eight_bits next_control;
@@ -350,7 +355,7 @@
 #line 71 "ctangle.w"
 
 /*8:*/
-#line 119 "common.h"
+#line 123 "common.h"
 
 extern boolean get_line(void);
 extern void check_complete(void);
@@ -357,12 +362,12 @@
 extern void reset_input(void);
 
 /*:8*//*11:*/
-#line 162 "common.h"
+#line 166 "common.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 name_pointer section_lookup(char*,char*,boolean);
 extern void init_node(name_pointer);
 extern void init_p(name_pointer,eight_bits);
 extern void print_prefix_name(name_pointer);
@@ -370,7 +375,7 @@
 extern void sprint_section_name(char*,name_pointer);
 
 /*:11*//*13:*/
-#line 186 "common.h"
+#line 190 "common.h"
 
 extern int wrap_up(void);
 extern void err_print(const char*);
@@ -378,41 +383,41 @@
 extern void overflow(const char*);
 
 /*:13*//*16:*/
-#line 223 "common.h"
+#line 225 "common.h"
 
 extern void common_init(void);
 extern void print_stats(void);
 
 /*:16*//*30:*/
-#line 241 "ctangle.w"
+#line 246 "ctangle.w"
 static void store_two_bytes(sixteen_bits);
 
 /*:30*//*35:*/
-#line 324 "ctangle.w"
+#line 330 "ctangle.w"
 
 static void push_level(name_pointer);
 static void pop_level(boolean);
 
 /*:35*//*39:*/
-#line 397 "ctangle.w"
+#line 403 "ctangle.w"
 static void get_output(void);
 
 /*:39*//*44:*/
-#line 473 "ctangle.w"
+#line 479 "ctangle.w"
 static void flush_buffer(void);
 
 /*:44*//*49:*/
-#line 549 "ctangle.w"
+#line 556 "ctangle.w"
 static void phase_two(void);
 
 /*:49*//*53:*/
-#line 585 "ctangle.w"
+#line 592 "ctangle.w"
 
 static void output_defs(void);
 static void out_char(eight_bits);
 
 /*:53*//*65:*/
-#line 810 "ctangle.w"
+#line 817 "ctangle.w"
 
 static eight_bits skip_ahead(void);
 static boolean skip_comment(boolean);
@@ -422,19 +427,19 @@
 static eight_bits get_next(void);
 
 /*:70*//*84:*/
-#line 1208 "ctangle.w"
+#line 1214 "ctangle.w"
 static void scan_repl(eight_bits);
 
 /*:84*//*91:*/
-#line 1379 "ctangle.w"
+#line 1397 "ctangle.w"
 static void scan_section(void);
 
 /*:91*//*99:*/
-#line 1460 "ctangle.w"
+#line 1474 "ctangle.w"
 static void phase_one(void);
 
 /*:99*//*101:*/
-#line 1494 "ctangle.w"
+#line 1507 "ctangle.w"
 static void skip_limbo(void);
 
 /*:101*/
@@ -451,7 +456,7 @@
 argc= ac;argv= av;
 program= ctangle;
 /*21:*/
-#line 137 "ctangle.w"
+#line 139 "ctangle.w"
 
 text_info->tok_start= tok_ptr= tok_mem;
 text_ptr= text_info+1;text_ptr->tok_start= tok_mem;
@@ -458,21 +463,21 @@
 
 
 /*:21*//*23:*/
-#line 147 "ctangle.w"
+#line 149 "ctangle.w"
 
 init_node(name_dir);
 
 /*:23*//*27:*/
-#line 201 "ctangle.w"
-last_unnamed= text_info;text_info->text_link= 0;
+#line 203 "ctangle.w"
+last_unnamed= text_info;text_info->text_link= macro;
 
 /*:27*//*46:*/
-#line 493 "ctangle.w"
+#line 499 "ctangle.w"
 
 cur_out_file= end_output_files= output_files+max_files;
 
 /*:46*//*58:*/
-#line 694 "ctangle.w"
+#line 704 "ctangle.w"
 
 {
 int i;
@@ -480,10 +485,11 @@
 }
 
 /*:58*//*63:*/
-#line 773 "ctangle.w"
+#line 780 "ctangle.w"
 {
 int c;
 for(c= 0;c<256;c++)ccode[c]= ignore;
+}
 ccode[' ']= ccode['\t']= ccode['\n']= ccode['\v']= ccode['\r']= ccode['\f']
 = ccode['*']= new_section;
 ccode['@']= '@';ccode['=']= string;
@@ -497,10 +503,9 @@
 ccode['&']= join;
 ccode['<']= ccode['(']= section_name;
 ccode['\'']= ord;
-}
 
 /*:63*//*78:*/
-#line 1103 "ctangle.w"
+#line 1112 "ctangle.w"
 section_text[0]= ' ';
 
 /*:78*/
@@ -514,7 +519,7 @@
 }
 
 /*:2*//*24:*/
-#line 153 "ctangle.w"
+#line 155 "ctangle.w"
 
 boolean names_match(
 name_pointer p,
@@ -522,12 +527,11 @@
 size_t l,
 eight_bits t)
 {(void)t;
-if(length(p)!=l)return false;
-return!strncmp(first,p->byte_start,l);
+return length(p)==l&&strncmp(first,p->byte_start,l)==0;
 }
 
 /*:24*//*25:*/
-#line 169 "ctangle.w"
+#line 170 "ctangle.w"
 
 void
 init_node(
@@ -539,7 +543,7 @@
 init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
 
 /*:25*//*29:*/
-#line 231 "ctangle.w"
+#line 236 "ctangle.w"
 
 static void
 store_two_bytes(
@@ -551,7 +555,7 @@
 }
 
 /*:29*//*34:*/
-#line 309 "ctangle.w"
+#line 315 "ctangle.w"
 
 static void
 push_level(
@@ -568,7 +572,7 @@
 }
 
 /*:34*//*36:*/
-#line 332 "ctangle.w"
+#line 338 "ctangle.w"
 
 static void
 pop_level(
@@ -584,7 +588,7 @@
 }
 
 /*:36*//*38:*/
-#line 368 "ctangle.w"
+#line 374 "ctangle.w"
 
 static void
 get_output(void)
@@ -607,7 +611,7 @@
 case 0:cur_val= a;out_char(identifier);break;
 case 1:if(a==output_defs_flag)output_defs();
 else/*40:*/
-#line 402 "ctangle.w"
+#line 408 "ctangle.w"
 
 {
 a-= 024000;
@@ -621,7 +625,7 @@
 }
 
 /*:40*/
-#line 389 "ctangle.w"
+#line 395 "ctangle.w"
 
 break;
 default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -631,7 +635,7 @@
 }
 
 /*:38*//*43:*/
-#line 460 "ctangle.w"
+#line 466 "ctangle.w"
 
 static void
 flush_buffer(void)
@@ -638,7 +642,7 @@
 {
 C_putc('\n');
 if(cur_line%100==0&&show_progress){
-printf(".");
+putchar('.');
 if(cur_line%500==0)printf("%d",cur_line);
 update_terminal;
 }
@@ -646,39 +650,42 @@
 }
 
 /*:43*//*48:*/
-#line 514 "ctangle.w"
+#line 518 "ctangle.w"
 
 static void
 phase_two(void){
+phase= 2;
 web_file_open= false;
 cur_line= 1;
 /*33:*/
-#line 298 "ctangle.w"
+#line 304 "ctangle.w"
 
 stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
 cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
 
 /*:33*/
-#line 519 "ctangle.w"
+#line 524 "ctangle.w"
 
 /*51:*/
-#line 578 "ctangle.w"
+#line 585 "ctangle.w"
 
 if(!output_defs_seen)
 output_defs();
 
 /*:51*/
-#line 520 "ctangle.w"
+#line 525 "ctangle.w"
 
-if(text_info->text_link==0&&cur_out_file==end_output_files){
+if(text_info->text_link==macro&&cur_out_file==end_output_files){
 fputs("\n! No program text was specified.",stdout);mark_harmless;
 
 }
 else{
 if(cur_out_file==end_output_files){
-if(show_progress)
+if(show_progress){
 printf("\nWriting the output file (%s):",C_file_name);
+update_terminal;
 }
+}
 else{
 if(show_progress){
 fputs("\nWriting the output files:",stdout);
@@ -686,24 +693,24 @@
 printf(" (%s)",C_file_name);
 update_terminal;
 }
-if(text_info->text_link==0)goto writeloop;
+if(text_info->text_link==macro)goto writeloop;
 }
 while(stack_ptr> stack)get_output();
 flush_buffer();
 writeloop:/*50:*/
-#line 555 "ctangle.w"
+#line 562 "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,"wb");
-if(C_file==0)fatal("! Cannot open output file ",output_file_name);
+if((C_file= fopen(output_file_name,"wb"))==NULL)
+fatal("! Cannot open output file ",output_file_name);
 
 if(show_progress){printf("\n(%s)",output_file_name);update_terminal;}
 cur_line= 1;
 stack_ptr= stack+1;
-cur_name= (*an_output_file);
+cur_name= *an_output_file;
 cur_repl= (text_pointer)cur_name->equiv;
 cur_byte= cur_repl->tok_start;
 cur_end= (cur_repl+1)->tok_start;
@@ -712,7 +719,7 @@
 }
 
 /*:50*/
-#line 541 "ctangle.w"
+#line 548 "ctangle.w"
 
 if(show_happiness){
 if(show_progress)new_line;
@@ -722,7 +729,7 @@
 }
 
 /*:48*//*54:*/
-#line 589 "ctangle.w"
+#line 599 "ctangle.w"
 
 static void
 output_defs(void)
@@ -730,7 +737,7 @@
 sixteen_bits a;
 push_level(NULL);
 for(cur_text= text_info+1;cur_text<text_ptr;cur_text++)
-if(cur_text->text_link==0){
+if(cur_text->text_link==macro){
 cur_byte= cur_text->tok_start;
 cur_end= (cur_text+1)->tok_start;
 C_printf("%s","#define ");
@@ -748,7 +755,7 @@
 if(a<024000){
 cur_val= a;out_char(identifier);
 }
-else if(a<050000){confusion("macro defs have strange char");}
+else if(a<050000)confusion("macro defs have strange char");
 else{
 cur_val= a-050000;cur_section= cur_val;out_char(section_number);
 }
@@ -762,7 +769,7 @@
 }
 
 /*:54*//*55:*/
-#line 632 "ctangle.w"
+#line 642 "ctangle.w"
 
 static void
 out_char(
@@ -775,25 +782,22 @@
 if(protect||out_state==verbatim)C_putc('\\');
 flush_buffer();if(out_state!=verbatim)out_state= normal;break;
 /*59:*/
-#line 700 "ctangle.w"
+#line 710 "ctangle.w"
 
 case identifier:
 if(out_state==num_or_id)C_putc(' ');
-j= (cur_val+name_dir)->byte_start;
-k= (cur_val+name_dir+1)->byte_start;
-while(j<k){
+for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start;
+j<k;j++)
 if((eight_bits)(*j)<0200)C_putc(*j);
 
 else C_printf("%s",translit[(eight_bits)(*j)-0200]);
-j++;
-}
 out_state= num_or_id;break;
 
 /*:59*/
-#line 643 "ctangle.w"
+#line 653 "ctangle.w"
 
 /*60:*/
-#line 713 "ctangle.w"
+#line 720 "ctangle.w"
 
 case section_number:
 if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -804,26 +808,26 @@
 goto restart;
 }else{
 sixteen_bits a;
-a= 0400**cur_byte++;
+a= *cur_byte++*0400;
 a+= *cur_byte++;
 C_printf("\n#line %d \"",a);
 
-cur_val= *cur_byte++;
-cur_val= 0400*(cur_val-0200)+*cur_byte++;
+cur_val= (*cur_byte++-0200)*0400;
+cur_val+= *cur_byte++;
 for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start;
 j<k;j++){
 if(*j=='\\'||*j=='"')C_putc('\\');
 C_putc(*j);
 }
-C_printf("%s","\"\n");
+C_putc('"');C_putc('\n');
 }
 break;
 
 /*:60*/
-#line 644 "ctangle.w"
+#line 654 "ctangle.w"
 
 /*56:*/
-#line 662 "ctangle.w"
+#line 672 "ctangle.w"
 
 case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
 case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -844,7 +848,7 @@
 break;
 
 /*:56*/
-#line 645 "ctangle.w"
+#line 655 "ctangle.w"
 
 case'=':case'>':C_putc(cur_char);C_putc(' ');
 out_state= normal;break;
@@ -863,7 +867,7 @@
 }
 
 /*:55*//*64:*/
-#line 794 "ctangle.w"
+#line 801 "ctangle.w"
 
 static eight_bits
 skip_ahead(void)
@@ -881,7 +885,7 @@
 }
 
 /*:64*//*67:*/
-#line 833 "ctangle.w"
+#line 840 "ctangle.w"
 
 static boolean skip_comment(
 boolean is_long_comment)
@@ -920,17 +924,19 @@
 static eight_bits
 get_next(void)
 {
-static int preprocessing= 0;
+static boolean preprocessing= false;
 eight_bits c;
 while(true){
 if(loc> limit){
-if(preprocessing&&*(limit-1)!='\\')preprocessing= 0;
+if(preprocessing&&*(limit-1)!='\\')preprocessing= false;
 if(get_line()==false)return new_section;
 else if(print_where&&!no_where){
 print_where= false;
 /*85:*/
-#line 1214 "ctangle.w"
+#line 1224 "ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -940,8 +946,8 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
 #line 893 "ctangle.w"
@@ -958,24 +964,33 @@
 }
 loc++;
 if(xisdigit(c)||c=='.')/*73:*/
-#line 964 "ctangle.w"
+#line 965 "ctangle.w"
 {
+boolean hex_flag= false;
 id_first= loc-1;
 if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
 if(*id_first=='0'){
 if(*loc=='x'||*loc=='X'){
-loc++;while(xisxdigit(*loc))loc++;goto found;
+hex_flag= true;
+loc++;while(xisxdigit(*loc)||*loc=='\'')loc++;
 }
+else if(*loc=='b'||*loc=='B'){
+loc++;while(*loc=='0'||*loc=='1'||*loc=='\'')loc++;goto found;
 }
-while(xisdigit(*loc))loc++;
+}
+while(xisdigit(*loc)||*loc=='\'')loc++;
 if(*loc=='.'){
 loc++;
-while(xisdigit(*loc))loc++;
+while((hex_flag&&xisxdigit(*loc))||xisdigit(*loc)||*loc=='\'')loc++;
 }
 if(*loc=='e'||*loc=='E'){
 if(*++loc=='+'||*loc=='-')loc++;
-while(xisdigit(*loc))loc++;
+while(xisdigit(*loc)||*loc=='\'')loc++;
 }
+else if(hex_flag&&(*loc=='p'||*loc=='P')){
+if(*++loc=='+'||*loc=='-')loc++;
+while(xisxdigit(*loc)||*loc=='\'')loc++;
+}
 found:while(*loc=='u'||*loc=='U'||*loc=='l'||*loc=='L'
 ||*loc=='f'||*loc=='F')loc++;
 id_loc= loc;
@@ -989,13 +1004,13 @@
 ||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
 ||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
 /*74:*/
-#line 992 "ctangle.w"
+#line 1002 "ctangle.w"
 {
 char delim= c;
 id_first= section_text+1;
 id_loc= section_text;*++id_loc= delim;
 if(delim=='L'||delim=='u'||delim=='U'){
-if(delim=='u'&&*loc=='8'){*++id_loc= *loc++;}
+if(delim=='u'&&*loc=='8')*++id_loc= *loc++;
 delim= *loc++;*++id_loc= delim;
 }
 while(true){
@@ -1037,10 +1052,12 @@
 
 else if(isalpha(c)||isxalpha(c)||ishigh(c))
 /*72:*/
-#line 957 "ctangle.w"
+#line 956 "ctangle.w"
 {
 id_first= --loc;
-while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc)
+do
+++loc;
+while(isalpha((eight_bits)*loc)||isdigit((eight_bits)*loc)
 ||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc));
 id_loc= loc;return identifier;
 }
@@ -1049,10 +1066,9 @@
 #line 911 "ctangle.w"
 
 else if(c=='@')/*75:*/
-#line 1037 "ctangle.w"
-{
-c= ccode[(eight_bits)*loc++];
-switch(c){
+#line 1047 "ctangle.w"
+
+switch(c= ccode[(eight_bits)*loc++]){
 case ignore:continue;
 case translit_code:err_print("! Use @l in limbo only");continue;
 
@@ -1065,13 +1081,12 @@
 case section_name:
 cur_section_name_char= *(loc-1);
 /*77:*/
-#line 1085 "ctangle.w"
+#line 1092 "ctangle.w"
 {
-char*k;
+char*k= section_text;
 /*79:*/
-#line 1105 "ctangle.w"
+#line 1114 "ctangle.w"
 
-k= section_text;
 while(true){
 if(loc> limit&&get_line()==false){
 err_print("! Input ended in section name");
@@ -1080,7 +1095,7 @@
 }
 c= *loc;
 /*80:*/
-#line 1129 "ctangle.w"
+#line 1137 "ctangle.w"
 
 if(c=='@'){
 c= *(loc+1);
@@ -1099,7 +1114,7 @@
 }
 
 /*:80*/
-#line 1114 "ctangle.w"
+#line 1122 "ctangle.w"
 
 loc++;if(k<section_text_end)k++;
 if(xisspace(c)){
@@ -1116,14 +1131,16 @@
 if(*k==' '&&k> section_text)k--;
 
 /*:79*/
-#line 1087 "ctangle.w"
+#line 1094 "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);
+cur_section_name= section_lookup(section_text+1,k-3,true);
+
+else cur_section_name= section_lookup(section_text+1,k,false);
+
 if(cur_section_name_char=='(')
 /*47:*/
-#line 497 "ctangle.w"
+#line 503 "ctangle.w"
 
 {
 for(an_output_file= cur_out_file;
@@ -1132,24 +1149,22 @@
 if(an_output_file==end_output_files){
 if(cur_out_file> output_files)
 *--cur_out_file= cur_section_name;
-else{
-overflow("output files");
+else overflow("output files");
 }
 }
-}
 
 /*:47*/
-#line 1093 "ctangle.w"
+#line 1102 "ctangle.w"
 
 return section_name;
 }
 
 /*:77*/
-#line 1051 "ctangle.w"
+#line 1060 "ctangle.w"
 
 case string:/*81:*/
-#line 1151 "ctangle.w"
-{
+#line 1159 "ctangle.w"
+
 id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
 while(*loc!='@'||*(loc+1)!='>')loc++;
 if(loc>=limit)err_print("! Verbatim string didn't end");
@@ -1156,18 +1171,16 @@
 
 id_loc= loc;loc+= 2;
 return string;
-}
 
 /*:81*/
-#line 1052 "ctangle.w"
+#line 1061 "ctangle.w"
 
 case ord:/*76:*/
-#line 1064 "ctangle.w"
+#line 1072 "ctangle.w"
 
 id_first= loc;
-if(*loc=='\\'){
+if(*loc=='\\')
 if(*++loc=='\'')loc++;
-}
 while(*loc!='\''){
 if(*loc=='@'){
 if(*(loc+1)!='@')
@@ -1185,11 +1198,10 @@
 return ord;
 
 /*:76*/
-#line 1053 "ctangle.w"
+#line 1062 "ctangle.w"
 
 default:return c;
 }
-}
 
 /*:75*/
 #line 912 "ctangle.w"
@@ -1199,20 +1211,21 @@
 
 else return' ';
 }
-else if(c=='#'&&loc==buffer+1)preprocessing= 1;
+else if(c=='#'&&loc==buffer+1)preprocessing= true;
 mistake:/*71:*/
-#line 935 "ctangle.w"
+#line 933 "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);
-}
-break;
+}break;
 case':':if(*loc==':')compress(colon_colon);break;
 case'=':if(*loc=='=')compress(eq_eq);break;
 case'>':if(*loc=='='){compress(gt_eq);}
@@ -1232,7 +1245,7 @@
 }
 
 /*:69*//*83:*/
-#line 1186 "ctangle.w"
+#line 1192 "ctangle.w"
 
 static void
 scan_repl(
@@ -1239,9 +1252,11 @@
 eight_bits t)
 {
 sixteen_bits a;
-if(t==section_name){/*85:*/
-#line 1214 "ctangle.w"
+if(t==section_name)/*85:*/
+#line 1224 "ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1251,23 +1266,21 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
-#line 1192 "ctangle.w"
-}
+#line 1198 "ctangle.w"
+
 while(true)switch(a= get_next()){
 /*86:*/
-#line 1227 "ctangle.w"
+#line 1239 "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 identifier:store_id(a);break;
 case section_name:if(t!=section_name)goto done;
 else{
 /*87:*/
-#line 1260 "ctangle.w"
+#line 1270 "ctangle.w"
 {
 char*try_loc= loc;
 while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1280,14 +1293,16 @@
 }
 
 /*:87*/
-#line 1233 "ctangle.w"
+#line 1243 "ctangle.w"
 
 a= cur_section_name-name_dir;
 app_repl((a/0400)+0250);
 app_repl(a%0400);
 /*85:*/
-#line 1214 "ctangle.w"
+#line 1224 "ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1297,11 +1312,11 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
-#line 1237 "ctangle.w"
+#line 1247 "ctangle.w"
 break;
 }
 case output_defs_code:if(t!=section_name)err_print("! Misplaced @h");
@@ -1312,8 +1327,10 @@
 app_repl((a/0400)+0200);
 app_repl(a%0400);
 /*85:*/
-#line 1214 "ctangle.w"
+#line 1224 "ctangle.w"
 
+{
+eight_bits a;
 store_two_bytes(0150000);
 if(changing&&include_depth==change_depth){
 id_first= change_file_name;
@@ -1323,17 +1340,17 @@
 store_two_bytes((sixteen_bits)cur_line);
 }
 id_loc= id_first+strlen(id_first);
-{int a_l= id_lookup(id_first,id_loc,0)-name_dir;app_repl((a_l/0400)+0200);
-app_repl(a_l%0400);}
+store_id(a);
+}
 
 /*:85*/
-#line 1246 "ctangle.w"
+#line 1256 "ctangle.w"
 
 }
 break;
 case constant:case string:
 /*88:*/
-#line 1271 "ctangle.w"
+#line 1287 "ctangle.w"
 
 app_repl(a);
 while(id_first<id_loc){
@@ -1342,16 +1359,18 @@
 else err_print("! Double @ should be used in string");
 
 }
+else if(a==constant&&*id_first=='\''&&!keep_digit_separators)
+id_first++;
 app_repl(*id_first++);
 }
 app_repl(a);break;
 
 /*:88*/
-#line 1250 "ctangle.w"
+#line 1260 "ctangle.w"
 
 case ord:
 /*89:*/
-#line 1287 "ctangle.w"
+#line 1305 "ctangle.w"
 {
 int c= (eight_bits)*id_first;
 if(c=='\\'){
@@ -1402,7 +1421,7 @@
 break;
 
 /*:89*/
-#line 1252 "ctangle.w"
+#line 1262 "ctangle.w"
 
 case definition:case format_code:case begin_C:if(t!=section_name)goto done;
 else{
@@ -1412,7 +1431,7 @@
 case new_section:goto done;
 
 /*:86*/
-#line 1197 "ctangle.w"
+#line 1203 "ctangle.w"
 
 case')':app_repl(a);
 if(t==macro)app_repl(' ');
@@ -1425,7 +1444,7 @@
 }
 
 /*:83*//*90:*/
-#line 1346 "ctangle.w"
+#line 1364 "ctangle.w"
 
 static void
 scan_section(void)
@@ -1437,10 +1456,10 @@
 if(*(loc-1)=='*'&&show_progress){
 printf("*%d",section_count);update_terminal;
 }
-next_control= 0;
+next_control= ignore;
 while(true){
 /*92:*/
-#line 1387 "ctangle.w"
+#line 1405 "ctangle.w"
 
 while(next_control<definition)
 
@@ -1449,12 +1468,12 @@
 }
 
 /*:92*/
-#line 1360 "ctangle.w"
+#line 1378 "ctangle.w"
 
 if(next_control==definition){
 /*93:*/
-#line 1394 "ctangle.w"
-{
+#line 1412 "ctangle.w"
+
 while((next_control= get_next())=='\n');
 if(next_control!=identifier){
 err_print("! Definition flushed, must start with identifier");
@@ -1461,18 +1480,15 @@
 
 continue;
 }
-app_repl(((a= id_lookup(id_first,id_loc,0)-name_dir)/0400)+0200);
-
-app_repl(a%0400);
+store_id(a);
 if(*loc!='('){
 app_repl(string);app_repl(' ');app_repl(string);
 }
 scan_repl(macro);
 cur_text->text_link= macro;
-}
 
 /*:93*/
-#line 1362 "ctangle.w"
+#line 1380 "ctangle.w"
 
 continue;
 }
@@ -1482,7 +1498,7 @@
 if(next_control==section_name){
 p= cur_section_name;
 /*94:*/
-#line 1419 "ctangle.w"
+#line 1434 "ctangle.w"
 
 while((next_control= get_next())=='+');
 if(next_control!='='&&next_control!=eq_eq)
@@ -1489,7 +1505,7 @@
 continue;
 
 /*:94*/
-#line 1370 "ctangle.w"
+#line 1388 "ctangle.w"
 
 break;
 }
@@ -1497,23 +1513,23 @@
 }
 no_where= print_where= false;
 /*95:*/
-#line 1424 "ctangle.w"
+#line 1439 "ctangle.w"
 
 /*96:*/
-#line 1429 "ctangle.w"
+#line 1444 "ctangle.w"
 
 store_two_bytes((sixteen_bits)(0150000+section_count));
 
 
 /*:96*/
-#line 1425 "ctangle.w"
+#line 1440 "ctangle.w"
 
 scan_repl(section_name);
 /*97:*/
-#line 1433 "ctangle.w"
+#line 1448 "ctangle.w"
 
-if(p==name_dir||p==0){
-(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
+if(p==name_dir||p==NULL){
+last_unnamed->text_link= cur_text-text_info;last_unnamed= cur_text;
 }
 else if(p->equiv==(void*)text_info)p->equiv= (void*)cur_text;
 
@@ -1527,16 +1543,16 @@
 
 
 /*:97*/
-#line 1427 "ctangle.w"
+#line 1442 "ctangle.w"
 
 
 /*:95*/
-#line 1376 "ctangle.w"
+#line 1394 "ctangle.w"
 
 }
 
 /*:90*//*98:*/
-#line 1448 "ctangle.w"
+#line 1463 "ctangle.w"
 
 static void
 phase_one(void){
@@ -1546,26 +1562,24 @@
 skip_limbo();
 while(!input_has_ended)scan_section();
 check_complete();
-phase= 2;
 }
 
 /*:98*//*100:*/
-#line 1465 "ctangle.w"
+#line 1479 "ctangle.w"
 
 static void
 skip_limbo(void)
 {
-char c;
 while(true){
 if(loc> limit&&get_line()==false)return;
 *(limit+1)= '@';
 while(*loc!='@')loc++;
 if(loc++<=limit){
-c= *loc++;
+char c= *loc++;
 if(ccode[(eight_bits)c]==new_section)break;
 switch(ccode[(eight_bits)c]){
 case translit_code:/*102:*/
-#line 1496 "ctangle.w"
+#line 1509 "ctangle.w"
 
 while(xisspace(*loc)&&loc<limit)loc++;
 loc+= 3;
@@ -1590,7 +1604,7 @@
 }
 
 /*:102*/
-#line 1478 "ctangle.w"
+#line 1491 "ctangle.w"
 break;
 case format_code:case'@':break;
 case control_text:if(c=='q'||c=='Q'){
@@ -1608,7 +1622,7 @@
 }
 
 /*:100*//*103:*/
-#line 1522 "ctangle.w"
+#line 1535 "ctangle.w"
 
 void
 print_stats(void){

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctangle.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctangle.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctangle.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 % This program by Silvio Levy and Donald E. Knuth
 % is based on a program by Knuth.
 % It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.2 --- February 2021
+% Version 4.4 --- June 2021
 
 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
 
@@ -27,11 +27,11 @@
 \mathchardef\RA="3221 % right arrow
 \mathchardef\BA="3224 % double arrow
 
-\def\title{CTANGLE (Version 4.2)}
+\def\title{CTANGLE (Version 4.4)}
 \def\topofcontents{\null\vfill
   \centerline{\titlefont The {\ttitlefont CTANGLE} processor}
   \vskip 15pt
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
   \vfill}
 \def\botofcontents{\vfill
 \noindent
@@ -61,7 +61,7 @@
 The ``banner line'' defined here should be changed whenever \.{CTANGLE}
 is modified.
 
- at d banner "This is CTANGLE (Version 4.2)"
+ at d banner "This is CTANGLE (Version 4.4)"
 
 @c
 @<Include files@>@/
@@ -126,7 +126,9 @@
 } text;
 typedef text *text_pointer;
 
-@ @<Private...@>=
+@ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */
+ at d max_toks 270000 /* number of bytes in compressed \CEE/ code */
+@<Private...@>=
 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| */
@@ -151,14 +153,13 @@
 starting at position |first| equals the identifier pointed to by |p|:
 
 @c
-boolean names_match(@t\1\1@>
+boolean names_match(
 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 at t\2\2@>) /* not used by \.{TANGLE} */
-{@+(void)t;
-  if (length(p)!=l) return false;
-  return !strncmp(first,p->byte_start,l);
+eight_bits t) /* not used by \.{TANGLE} */
+{@+(void)t;@/
+  return length(p)==l && strncmp(first,p->byte_start,l)==0;
 }
 
 @ The common lookup routine refers to separate routines |init_node| and
@@ -193,12 +194,13 @@
 The replacement text pointer for the first unnamed section appears in
 |text_info->text_link|, and the most recent such pointer is |last_unnamed|.
 
+ at d macro 0
 @d section_flag max_texts /* final |text_link| in section replacement texts */
 
 @<Private...@>=
 static text_pointer last_unnamed; /* most recent replacement text of unnamed section */
 
-@ @<Set init...@>= last_unnamed=text_info; text_info->text_link=0;
+@ @<Set init...@>= last_unnamed=text_info; text_info->text_link=macro;
 
 @ If the first byte of a token is less than |0200|, the token occupies a
 single byte. Otherwise we make a sixteen-bit token by combining two consecutive
@@ -214,16 +216,19 @@
 Some of the 7-bit codes will not be present, however, so we can
 use them for special purposes. The following symbolic names are used:
 
-\yskip \hang |join| denotes the concatenation of adjacent items with no
-space or line breaks allowed between them (the \.{@@\&} operation of \.{CWEB}).
+\yskip \hang |string| denotes the beginning or end of a string
+or a verbatim construction.
 
-\hang |string| denotes the beginning or end of a string, verbatim
-construction or numerical constant.
+\hang |constant| denotes a numerical constant.
+
+\hang |join| denotes the concatenation of adjacent items with no space
+or line breaks allowed between them (the \.{@@\&} operation of \.{CWEB}).
 @^ASCII code dependencies@>
 
- at d string 02 /* takes the place of extended ASCII \.{\char2} */
- at d join 0177 /* takes the place of ASCII delete */
- at d output_defs_flag (2*024000-1)
+ at d string 02 /* takes the place of ASCII \.{STX} */
+ at d constant 03 /* takes the place of ASCII \.{ETX} */
+ at d join 0177 /* takes the place of ASCII \.{DEL} */
+ at d output_defs_flag (2*024000-1) /* |024000==(0250-0200)*0400| */
 
 @ The following procedure is used to enter a two-byte value into
 |tok_mem| when a replacement text is being generated.
@@ -276,7 +281,8 @@
 } output_state;
 typedef output_state *stack_pointer;
 
-@ @d cur_end cur_state.end_field /* current ending location in |tok_mem| */
+@ @d stack_size 50 /* number of simultaneous levels of macro expansion */
+ at d cur_end cur_state.end_field /* current ending location in |tok_mem| */
 @d cur_byte cur_state.byte_field /* location of next output byte in |tok_mem|*/
 @d cur_name cur_state.name_field /* pointer to current name being expanded */
 @d cur_repl cur_state.repl_field /* pointer to current replacement text */
@@ -308,8 +314,8 @@
 
 @c
 static void
-push_level(@t\1\1@> /* suspends the current level */
-name_pointer p at t\2\2@>)
+push_level( /* suspends the current level */
+name_pointer p)
 {
   if (stack_ptr==stack_end) overflow("stack");
   *stack_ptr=cur_state;
@@ -331,8 +337,8 @@
 
 @c
 static void
-pop_level(@t\1\1@> /* do this when |cur_byte| reaches |cur_end| */
-boolean flag at t\2\2@>) /* |flag==false| means we are in |output_defs| */
+pop_level( /* do this when |cur_byte| reaches |cur_end| */
+boolean flag) /* |flag==false| means we are in |output_defs| */
 {
   if (flag && cur_repl->text_link<section_flag) { /* link to a continuation */
     cur_repl=cur_repl->text_link+text_info; /* stay on the same level */
@@ -350,7 +356,7 @@
 if the next output begins or ends the replacement text of some section,
 in which case |cur_val| is that section's number (if beginning) or the
 negative of that value (if ending). (A section number of 0 indicates
-not the beginning or ending of a section, but a \&{\#line} command.)
+not the beginning or ending of a section, but a \#\&{line} command.)
 And it sends the value |identifier|
 if the next output is an identifier, in which case
 |cur_val| points to that identifier name.
@@ -463,7 +469,7 @@
 {
   C_putc('\n');
   if (cur_line % 100 == 0 && show_progress) {
-    printf(".");
+    putchar('.');
     if (cur_line % 500 == 0) printf("%d",cur_line);
     update_terminal; /* progress report */
   }
@@ -502,9 +508,7 @@
   if (an_output_file==end_output_files) {
     if (cur_out_file>output_files)
         *--cur_out_file=cur_section_name;
-    else {
-      overflow("output files");
-    }
+    else overflow("output files");
   }
 }
 
@@ -514,18 +518,21 @@
 @c
 static void
 phase_two (void) {
+  phase=2;
   web_file_open=false;
   cur_line=1;
   @<Initialize the output stacks@>@;
   @<Output macro definitions if appropriate@>@;
-  if (text_info->text_link==0 && cur_out_file==end_output_files) {
+  if (text_info->text_link==macro && cur_out_file==end_output_files) {
     fputs("\n! No program text was specified.",stdout); mark_harmless;
 @.No program text...@>
   }
   else {
-    if(cur_out_file==end_output_files) {
-      if(show_progress)
+    if (cur_out_file==end_output_files) {
+      if (show_progress) {
         printf("\nWriting the output file (%s):",C_file_name);
+        update_terminal;
+      }
     }
     else {
       if (show_progress) {
@@ -534,7 +541,7 @@
         printf(" (%s)",C_file_name);
         update_terminal;
       }
-      if (text_info->text_link==0) goto writeloop;
+      if (text_info->text_link==macro) goto writeloop;
     }
     while (stack_ptr>stack) get_output();
     flush_buffer();
@@ -557,14 +564,14 @@
     an_output_file--;
     sprint_section_name(output_file_name,*an_output_file);
     fclose(C_file);
-    C_file=fopen(output_file_name,"wb");
-    if (C_file ==0) fatal("! Cannot open output file ",output_file_name);
+    if ((C_file=fopen(output_file_name,"wb"))==NULL)
+      fatal("! Cannot open output file ",output_file_name);
 @.Cannot open output file@>
     if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
     cur_line=1;
     stack_ptr=stack+1;
-    cur_name= (*an_output_file);
-    cur_repl= (text_pointer)cur_name->equiv;
+    cur_name=*an_output_file;
+    cur_repl=(text_pointer)cur_name->equiv;
     cur_byte=cur_repl->tok_start;
     cur_end=(cur_repl+1)->tok_start;
     while (stack_ptr > stack) get_output();
@@ -586,7 +593,10 @@
 static void output_defs(void);@/
 static void out_char(eight_bits);
 
-@ @c
+@ @d C_printf(c,a) fprintf(C_file,c,a)
+ at d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */
+
+ at c
 static void
 output_defs(void)
 {
@@ -593,7 +603,7 @@
   sixteen_bits a;
   push_level(NULL);
   for (cur_text=text_info+1; cur_text<text_ptr; cur_text++)
-    if (cur_text->text_link==0) { /* |cur_text| is the text for a macro */
+    if (cur_text->text_link==macro) { /* |cur_text| is the text for a |macro| */
       cur_byte=cur_text->tok_start;
       cur_end=(cur_text+1)->tok_start;
       C_printf("%s","#define ");
@@ -611,7 +621,7 @@
           if (a<024000) { /* |024000==(0250-0200)*0400| */
             cur_val=a; out_char(identifier);
           }
-          else if (a<050000) { confusion("macro defs have strange char");}
+          else if (a<050000) confusion("macro defs have strange char");
           else {
             cur_val=a-050000; cur_section=cur_val; out_char(section_number);
           }
@@ -643,7 +653,7 @@
       @/@t\4@>@<Case of an identifier@>@;
       @/@t\4@>@<Case of a section number@>@;
       @/@t\4@>@<Cases like \.{!=}@>@;
-      case '=': case '>': C_putc(cur_char); C_putc(' ');
+      case '=': case '>': C_putc(cur_char);@+C_putc(' ');
         out_state=normal; break;
       case join: out_state=unbreakable; break;
       case constant: if (out_state==verbatim) {
@@ -659,7 +669,7 @@
     }
 }
 
-@ @<Cases like \.{!=}@>=
+@ @<Cases like \.{!=}@>=@t\1\quad@>
 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;
@@ -697,20 +707,17 @@
   for (i=0;i<128;i++) sprintf(translit[i],"X%02X",(unsigned int)(128+i));
 }
 
-@ @<Case of an identifier@>=
+@ @<Case of an identifier@>=@t\1\quad@>
 case identifier:
   if (out_state==num_or_id) C_putc(' ');
-  j=(cur_val+name_dir)->byte_start;
-  k=(cur_val+name_dir+1)->byte_start;
-  while (j<k) {
+  for (j=(cur_val+name_dir)->byte_start, k=(cur_val+name_dir+1)->byte_start;
+       j<k; j++)
     if ((eight_bits)(*j)<0200) C_putc(*j);
 @^high-bit character handling@>
     else C_printf("%s",translit[(eight_bits)(*j)-0200]);
-    j++;
-  }
   out_state=num_or_id; break;
 
-@ @<Case of a sec...@>=
+@ @<Case of a sec...@>=@t\1\quad@>
 case section_number:
   if (cur_val>0) C_printf("/*%d:*/",cur_val);
   else if(cur_val<0) C_printf("/*:%d*/",-cur_val);
@@ -720,18 +727,18 @@
     goto restart;
   } else {
     sixteen_bits a;
-    a=0400* *cur_byte++;
+    a=*cur_byte++ *0400;
     a+=*cur_byte++; /* gets the line number */
     C_printf("\n#line %d \"",a);
 @:line}{\.{\#line}@>
-    cur_val=*cur_byte++;
-    cur_val=0400*(cur_val-0200)+ *cur_byte++; /* points to the file name */
+    cur_val=(*cur_byte++-0200)*0400;
+    cur_val+=*cur_byte++; /* points to the file name */
     for (j=(cur_val+name_dir)->byte_start, k=(cur_val+name_dir+1)->byte_start;
          j<k; j++) {
       if (*j=='\\' || *j=='"') C_putc('\\');
       C_putc(*j);
     }
-    C_printf("%s","\"\n");
+    C_putc('"');@+C_putc('\n');
   }
   break;
 
@@ -756,7 +763,7 @@
 larger numbers are given to the control codes that denote more significant
 milestones.
 
- at d ignore 0 /* control code of no interest to \.{CTANGLE} */
+ at d ignore 00 /* control code of no interest to \.{CTANGLE} */
 @d ord 0302 /* control code for `\.{@@'}' */
 @d control_text 0303 /* control code for `\.{@@t}', `\.{@@\^}', etc. */
 @d translit_code 0304 /* control code for `\.{@@l}' */
@@ -773,20 +780,20 @@
 @ @<Set ini...@>= {
   int c; /* must be |int| so the |for| loop will end */
   for (c=0; c<256; c++) ccode[c]=ignore;
-  ccode[' ']=ccode['\t']=ccode['\n']=ccode['\v']=ccode['\r']=ccode['\f']
-   =ccode['*']=new_section;
-  ccode['@@']='@@'; ccode['=']=string;
-  ccode['d']=ccode['D']=definition;
-  ccode['f']=ccode['F']=ccode['s']=ccode['S']=format_code;
-  ccode['c']=ccode['C']=ccode['p']=ccode['P']=begin_C;
-  ccode['^']=ccode[':']=ccode['.']=ccode['t']=ccode['T']=
-   ccode['q']=ccode['Q']=control_text;
-  ccode['h']=ccode['H']=output_defs_code;
-  ccode['l']=ccode['L']=translit_code;
-  ccode['&']=join;
-  ccode['<']=ccode['(']=section_name;
-  ccode['\'']=ord;
 }
+ccode[' ']=ccode['\t']=ccode['\n']=ccode['\v']=ccode['\r']=ccode['\f']
+  =ccode['*']=new_section;
+ccode['@@']='@@'; ccode['=']=string;
+ccode['d']=ccode['D']=definition;
+ccode['f']=ccode['F']=ccode['s']=ccode['S']=format_code;
+ccode['c']=ccode['C']=ccode['p']=ccode['P']=begin_C;
+ccode['^']=ccode[':']=ccode['.']=ccode['t']=ccode['T']=
+ccode['q']=ccode['Q']=control_text;
+ccode['h']=ccode['H']=output_defs_code;
+ccode['l']=ccode['L']=translit_code;
+ccode['&']=join;
+ccode['<']=ccode['(']=section_name;
+ccode['\'']=ord;
 
 @ The |skip_ahead| procedure reads through the input at fairly high speed
 until finding the next non-ignorable control code, which it returns.
@@ -817,7 +824,7 @@
 proceeds until finding the end-comment token \.{*/} or a newline; in the
 latter case |skip_comment| will be called again by |get_next|, since the
 comment is not finished.  This is done so that each newline in the
-\CEE/ part of a section is copied to the output; otherwise the \&{\#line}
+\CEE/ part of a section is copied to the output; otherwise the \#\&{line}
 commands inserted into the \CEE/ file by the output routines become useless.
 On the other hand, if the comment is introduced by \.{//} (i.e., if it
 is a \CPLUSPLUS/ ``short comment''), it always is simply delimited by the next
@@ -831,15 +838,15 @@
 static boolean comment_continues=false; /* are we scanning a comment? */
 
 @ @c
-static boolean skip_comment(@t\1\1@> /* skips over comments */
-boolean is_long_comment at t\2\2@>)
+static boolean skip_comment( /* skips over comments */
+boolean is_long_comment)
 {
   char c; /* current character */
   while (true) {
     if (loc>limit) {
       if (is_long_comment) {
-        if(get_line()) return comment_continues=true;
-        else{
+        if (get_line()) return comment_continues=true;
+        else {
           err_print("! Input ended in mid-comment");
 @.Input ended in mid-comment@>
           return comment_continues=false;
@@ -864,8 +871,6 @@
 
 @* Inputting the next token.
 
- at d constant 03
-
 @<Private...@>=
 static name_pointer cur_section_name; /* name of section just scanned */
 static boolean no_where; /* suppress |print_where|? */
@@ -873,20 +878,15 @@
 @ As one might expect, |get_next| consists mostly of a big switch
 that branches to the various special cases that can arise.
 
- at d isxalpha(c) ((c)=='_' || (c)=='$') 
-  /* non-alpha characters allowed in identifier */
- at d ishigh(c) ((eight_bits)(c)>0177)
-@^high-bit character handling@>
-
 @c
 static eight_bits
 get_next(void) /* produces the next input token */
 {
-  static int preprocessing=0;
+  static boolean preprocessing=false;
   eight_bits c; /* the current character */
   while (true) {
     if (loc>limit) {
-      if (preprocessing && *(limit-1)!='\\') preprocessing=0;
+      if (preprocessing && *(limit-1)!='\\') preprocessing=false;
       if (get_line()==false) return new_section;
       else if (print_where && !no_where) {
           print_where=false;
@@ -913,9 +913,9 @@
     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;
+    else if (c=='#' && loc==buffer+1) preprocessing=true;
     mistake: @<Compress two-symbol operator@>@;
     return c;
   }
@@ -924,30 +924,29 @@
 @ @<Predecl...@>=@+static eight_bits get_next(void);
 
 @ The following code assigns values to the combinations \.{++},
-\.{--}, \.{->}, \.{>=}, \.{<=}, \.{==}, \.{<<}, \.{>>}, \.{!=}, \.{||} and
-\.{\&\&}, and to the \CPLUSPLUS/
+\.{--}, \.{->}, \.{>=}, \.{<=}, \.{==}, \.{<<}, \.{>>}, \.{!=}, %\.{||}
+\.{\v\v} and~\.{\&\&}, and to the \CPLUSPLUS/
 combinations \.{...}, \.{::}, \.{.*} and \.{->*}.
 The compound assignment operators (e.g., \.{+=}) are
 treated as separate tokens.
 
- at d compress(c) if (loc++<=limit) return c
-
 @<Compress tw...@>=
 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;
-  case '.': if (*loc=='*') {compress(period_ast);}
+  case '-': if (*loc=='-') {@+compress(minus_minus);@+}
+            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);
-            }
-            break;
+              loc++;@+compress(dot_dot_dot);
+            } break;
   case ':': if (*loc==':') compress(colon_colon); break;
   case '=': if (*loc=='=') compress(eq_eq); break;
-  case '>': if (*loc=='=') {compress(gt_eq);}
+  case '>': if (*loc=='=') {@+compress(gt_eq);@+}
     else if (*loc=='>') compress(gt_gt); break;
-  case '<': if (*loc=='=') {compress(lt_eq);}
+  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;
@@ -956,30 +955,41 @@
 
 @ @<Get an identifier@>= {
   id_first=--loc;
-  while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @|
+  do
+    ++loc;
+  while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @|
       || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));
   id_loc=loc; return identifier;
 }
 
 @ @<Get a constant@>= {
+  boolean hex_flag = false; /* are we reading a hexadecimal literal? */
   id_first=loc-1;
   if (*id_first=='.' && !xisdigit(*loc)) goto mistake; /* not a constant */
   if (*id_first=='0') {
     if (*loc=='x' || *loc=='X') { /* hex constant */
-      loc++; while (xisxdigit(*loc)) loc++; goto found;
+      hex_flag = true;
+      loc++; while (xisxdigit(*loc) || *loc=='\'') loc++;
     }
+    else if (*loc=='b' || *loc=='B') { /* binary constant */
+      loc++; while (*loc=='0' || *loc=='1' || *loc=='\'') loc++; goto found;
+    }
   }
-  while (xisdigit(*loc)) loc++;
+  while (xisdigit(*loc) || *loc=='\'') loc++;
   if (*loc=='.') {
-  loc++;
-  while (xisdigit(*loc)) loc++;
+    loc++;
+    while ((hex_flag && xisxdigit(*loc)) || xisdigit(*loc) || *loc=='\'') loc++;
   }
   if (*loc=='e' || *loc=='E') { /* float constant */
     if (*++loc=='+' || *loc=='-') loc++;
-    while (xisdigit(*loc)) loc++;
+    while (xisdigit(*loc) || *loc=='\'') loc++;
   }
- found: while (*loc=='u' || *loc=='U' || *loc=='l' || *loc=='L'
-             || *loc=='f' || *loc=='F') loc++;
+  else if (hex_flag && (*loc=='p' || *loc=='P')) { /* hex float constant */
+    if (*++loc=='+' || *loc=='-') loc++;
+    while (xisxdigit(*loc) || *loc=='\'') loc++;
+  }
+found: while (*loc=='u' || *loc=='U' || *loc=='l' || *loc=='L'
+            || *loc=='f' || *loc=='F') loc++;
   id_loc=loc;
   return constant;
 }
@@ -994,7 +1004,7 @@
   id_first = section_text+1;
   id_loc = section_text; *++id_loc=delim;
   if (delim=='L' || delim=='u' || delim=='U') { /* wide character constant */
-    if (delim=='u' && *loc=='8') { *++id_loc=*loc++; }
+    if (delim=='u' && *loc=='8') *++id_loc=*loc++;
     delim=*loc++; *++id_loc=delim;
   }
   while (true) {
@@ -1034,25 +1044,23 @@
 @ After an \.{@@} sign has been scanned, the next character tells us
 whether there is more work to do.
 
-@<Get control code and possible section name@>= {
-  c=ccode[(eight_bits)*loc++];
-  switch(c) {
-    case ignore: continue;
-    case translit_code: err_print("! Use @@l in limbo only"); continue;
+@<Get control code and possible section name@>=
+switch(c=ccode[(eight_bits)*loc++]) {
+  case ignore: continue;
+  case translit_code: err_print("! Use @@l in limbo only"); continue;
 @.Use @@l in limbo...@>
-    case control_text: while ((c=skip_ahead())=='@@');
-      /* only \.{@@@@} and \.{@@>} are expected */
-      if (*(loc-1)!='>')
-        err_print("! Double @@ should be used in control text");
+  case control_text: while ((c=skip_ahead())=='@@');
+    /* only \.{@@@@} and \.{@@>} are expected */
+    if (*(loc-1)!='>')
+      err_print("! Double @@ should be used in control text");
 @.Double @@ should be used...@>
-      continue;
-    case section_name:
-      cur_section_name_char=*(loc-1);
-      @<Scan the section name and make |cur_section_name| point to it@>@;
-    case string: @<Scan a verbatim string@>@;
-    case ord: @<Scan an ASCII constant@>@;
-    default: return c;
-  }
+    continue;
+  case section_name:
+    cur_section_name_char=*(loc-1);
+    @<Scan the section name and make |cur_section_name| point to it@>@;
+  case string: @<Scan a verbatim string@>@;
+  case ord: @<Scan an ASCII constant@>@;
+  default: return c;
 }
 
 @ After scanning a valid ASCII constant that follows
@@ -1063,9 +1071,8 @@
 
 @<Scan an ASCII constant@>=
   id_first=loc;
-  if (*loc=='\\') {
+  if (*loc=='\\')
     if (*++loc=='\'') loc++;
-  }
   while (*loc!='\'') {
     if (*loc=='@@') {
       if (*(loc+1)!='@@')
@@ -1083,11 +1090,13 @@
   return ord;
 
 @ @<Scan the section name...@>= {
-  char *k; /* pointer into |section_text| */
+  char *k=section_text; /* pointer into |section_text| */
   @<Put section name 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);
+    cur_section_name=section_lookup(section_text+1,k-3,true);
+      /* |true| means it's a prefix */
+  else cur_section_name=section_lookup(section_text+1,k,false);
+      /* |false| means it's not */
   if (cur_section_name_char=='(')
     @<If it's not there, add |cur_section_name| to the output file stack, or
           complain we're out of room@>@;
@@ -1103,7 +1112,6 @@
 @<Set init...@>=section_text[0]=' ';
 
 @ @<Put section name...@>=
-k=section_text;
 while (true) {
   if (loc>limit && get_line()==false) {
     err_print("! Input ended in section name");
@@ -1148,14 +1156,13 @@
 of the string itself, and |id_loc| to its ending-plus-one location in the
 buffer.  We also set |loc| to the position just after the ending delimiter.
 
-@<Scan a verbatim string@>= {
-  id_first=loc++; *(limit+1)='@@'; *(limit+2)='>';
-  while (*loc!='@@' || *(loc+1)!='>') loc++;
-  if (loc>=limit) err_print("! Verbatim string didn't end");
+@<Scan a verbatim string@>=
+id_first=loc++; *(limit+1)='@@'; *(limit+2)='>';
+while (*loc!='@@' || *(loc+1)!='>') loc++;
+if (loc>=limit) err_print("! Verbatim string didn't end");
 @.Verbatim string didn't end@>
-  id_loc=loc; loc+=2;
-  return string;
-}
+id_loc=loc; loc+=2;
+return string;
 
 @* Scanning a macro definition.
 The rules for generating the replacement texts corresponding to macros and
@@ -1176,8 +1183,7 @@
 acted, |cur_text| will point to the replacement text just generated, and
 |next_control| will contain the control code that terminated the activity.
 
- at d macro  0
- at d app_repl(c)  {if (tok_ptr==tok_mem_end) overflow("token"); *tok_ptr++=c;}
+ at d app_repl(c) {if (tok_ptr==tok_mem_end) overflow("token"); *(tok_ptr++)=c;}
 
 @<Private...@>=
 static text_pointer cur_text; /* replacement text formed by |scan_repl| */
@@ -1185,13 +1191,13 @@
 
 @ @c
 static void
-scan_repl(@t\1\1@> /* creates a replacement text */
-eight_bits t at t\2\2@>)
+scan_repl( /* creates a replacement text */
+eight_bits t)
 {
   sixteen_bits a; /* the current token */
-  if (t==section_name) {@<Insert the line number into |tok_mem|@>@;}
+  if (t==section_name) @<Insert the line number into |tok_mem|@>@;
   while (true) switch (a=get_next()) {
-      @<In cases that |a| is a non-|char| token (|identifier|,
+      @/@t\4@>@<In cases that |a| is a non-|char| token (|identifier|,
         |section_name|, etc.), either process it and change |a| to a byte
         that should be stored, or |continue| if |a| should be ignored,
         or |goto done| if |a| signals the end of this replacement text@>@;
@@ -1211,23 +1217,27 @@
 to |0150000|; then the numeric line number; then a pointer to the
 file name.
 
+ at d store_id(a) a=id_lookup(id_first,id_loc,0)-name_dir;@/
+  app_repl((a / 0400)+0200);
+  app_repl(a % 0400);
+
 @<Insert the line...@>=
-store_two_bytes(0150000);
-if (changing && include_depth==change_depth) { /* correction made Feb 2017 */
-  id_first=change_file_name;
-   store_two_bytes((sixteen_bits)change_line);
-}@+else {
-  id_first=cur_file_name;
-  store_two_bytes((sixteen_bits)cur_line);
+{
+  eight_bits a; /* shadow variable |a| */
+  store_two_bytes(0150000);
+  if (changing && include_depth==change_depth) { /* correction made Feb 2017 */
+    id_first=change_file_name;
+     store_two_bytes((sixteen_bits)change_line);
+  }@+else {
+    id_first=cur_file_name;
+    store_two_bytes((sixteen_bits)cur_line);
+  }
+  id_loc=id_first+strlen(id_first);
+  store_id(a);
 }
-id_loc=id_first+strlen(id_first);
-{int a_l=id_lookup(id_first,id_loc,0)-name_dir; app_repl((a_l / 0400)+0200);
-  app_repl(a_l % 0400);}
 
-@ @<In cases that |a| is...@>=
-case identifier: a=id_lookup(id_first,id_loc,0)-name_dir;
-  app_repl((a / 0400)+0200);
-  app_repl(a % 0400); break;
+@ @<In cases that |a| is...@>=@t\1\quad@>
+case identifier: store_id(a); break;
 case section_name: if (t!=section_name) goto done;
   else {
     @<Was an `\.{@@}' missed here?@>@;
@@ -1268,7 +1278,13 @@
      as explained in the manual */
 }
 
-@ @<Copy a string...@>=
+@ By default, \.{CTANGLE} purges single-quote characters from \CPLUSPLUS/-style
+literals, e.g., \.{1'000'000}, so that you can use this notation also in \CEE/
+code. The \.{+k} switch will `keep' the single quotes in the output.
+
+ at d keep_digit_separators flags['k']
+
+@<Copy a string...@>=
   app_repl(a); /* |string| or |constant| */
   while (id_first < id_loc) { /* simplify \.{@@@@} pairs */
     if (*id_first=='@@') {
@@ -1276,6 +1292,8 @@
       else err_print("! Double @@ should be used in string");
 @.Double @@ should be used...@>
     }
+    else if (a==constant && *id_first=='\'' && !keep_digit_separators)
+      id_first++;
     app_repl(*id_first++);
   }
   app_repl(a); break;
@@ -1354,15 +1372,15 @@
   if (*(loc-1)=='*' && show_progress) { /* starred section */
     printf("*%d",section_count); update_terminal;
   }
-  next_control=0;
+  next_control=ignore;
   while (true) {
     @<Skip ahead until |next_control| corresponds to \.{@@d}, \.{@@<},
       \.{@@\ } or the like@>@;
-    if (next_control == definition) {  /* \.{@@d} */
+    if (next_control == definition) { /* \.{@@d} */
         @<Scan a definition@>@;
         continue;
     }
-    if (next_control == begin_C) {  /* \.{@@c} or \.{@@p} */
+    if (next_control == begin_C) { /* \.{@@c} or \.{@@p} */
       p=name_dir; break;
     }
     if (next_control == section_name) { /* \.{@@<} or \.{@@(} */
@@ -1391,22 +1409,19 @@
     loc-=2; next_control=get_next();
   }
 
-@ @<Scan a definition@>= {
-  while ((next_control=get_next())=='\n'); /* allow newline before definition */
-  if (next_control!=identifier) {
-    err_print("! Definition flushed, must start with identifier");
+@ @<Scan a 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...@>
-    continue;
-  }
-  app_repl(((a=id_lookup(id_first,id_loc,0)-name_dir) / 0400)+0200);
-        /* append the lhs */
-  app_repl(a % 0400);
-  if (*loc!='(') { /* identifier must be separated from replacement text */
-    app_repl(string); app_repl(' '); app_repl(string);
-  }
-  scan_repl(macro);
-  cur_text->text_link=macro;
+  continue;
 }
+store_id(a); /* append the lhs */
+if (*loc!='(') { /* identifier must be separated from replacement text */
+  app_repl(string); app_repl(' '); app_repl(string);
+}
+scan_repl(macro);
+cur_text->text_link=macro;
 
 @ If the section name is not followed by \.{=} or \.{+=}, no \CEE/
 code is forthcoming: the section is being cited, not being
@@ -1431,8 +1446,8 @@
   /* |0150000==0320*0400| */
 
 @ @<Update the data...@>=
-if (p==name_dir||p==0) { /* unnamed section, or bad section name */
-  (last_unnamed)->text_link=cur_text-text_info; last_unnamed=cur_text;
+if (p==name_dir||p==NULL) { /* unnamed section, or bad section name */
+  last_unnamed->text_link=cur_text-text_info; last_unnamed=cur_text;
 }
 else if (p->equiv==(void *)text_info) p->equiv=(void *)cur_text;
   /* first section of this name */
@@ -1454,7 +1469,6 @@
   skip_limbo();
   while (!input_has_ended) scan_section();
   check_complete();
-  phase=2;
 }
 
 @ @<Predec...@>=@+static void phase_one(void);
@@ -1466,13 +1480,12 @@
 static void
 skip_limbo(void)
 {
-  char c;
   while (true) {
     if (loc>limit && get_line()==false) return;
     *(limit+1)='@@';
     while (*loc!='@@') loc++;
     if (loc++<=limit) {
-      c=*loc++;
+      char c=*loc++;
       if (ccode[(eight_bits)c]==new_section) break;
       switch (ccode[(eight_bits)c]) {
         case translit_code: @<Read in transliteration of a character@>@; break;

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctproofmac.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctproofmac.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctproofmac.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,8 +1,8 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 3.6 --- May 2000
+% Version 4.4 --- June 2021
 % Modified for proofs in CTWILL
 \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CWEB3.6+PROOFS}
+\xdef\fmtversion{\fmtversion+CWEB4.4+PROOFS}
 
 \let\:=\. % preserve a way to get the dot accent
  % (all other accents will still work as usual)
@@ -107,6 +107,7 @@
 \newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
 \let\yskip=\smallskip
 \def\?{\mathrel?}
+\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}}
 \def\lapstar{\rlap{*}}
 \def\stsec{\rightskip=0pt % get out of C mode (cf. \B)
@@ -162,7 +163,8 @@
   \hbox{$\def\?{\kern.2em}%
     \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant
     \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
-    \let\~=\oct \let\^=\hex {#1}$}}
+    \def\%{\cdot 16^{\aftergroup}}% power of sixteen (via dirty trick)
+    \let\~=\oct \let\^=\hex \let\\=\bin{#1}$}}%$%
 \def\U{\note{This code is used in section}} % xref for use of a section
 \def\Us{\note{This code is used in sections}} % xref for uses of a section
 \let\V=\lor % logical or
@@ -176,8 +178,12 @@
 
 %\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style
 %\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style
-\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}% CWEB style
-\def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style
+\def\oct{\hbox{$^\circ$\kern-.1em}\Od}% CWEB style
+\def\hex{\hbox{$^{\scriptscriptstyle\#}$}\Hd} % CWEB style
+\def\bin{\hbox{$^{\scriptscriptstyle b}$}\Bd}
+\def\Od#1/{{\it#1}} % octal digit
+\def\Hd#1/{{\tt#1}} % hexadecimal digit
+\def\Bd#1/{{\tt#1}} % binary digit
 \def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule
         \hbox{\strut\kern2pt\.{#1}\kern2pt}}
       \hrule}\vrule\kern2pt}} % verbatim string
@@ -339,9 +345,6 @@
 \def\printtwodigits{\advance\twodigits100
   \expandafter\gobbleone\number\twodigits
   \advance\twodigits-100 }
-\def\TeX{{\ifmmode\it\fi
-   \leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
-\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip
   \let\startsection=\stsec\stsec}}
   % say `\datethis' in limbo, to get your listing timestamped before section 1

Modified: branches/stable/source/src/texk/web2c/cwebdir/cttwinxmac.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cttwinxmac.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cttwinxmac.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,8 +2,6 @@
 
 \let\:=\. % preserve a way to get the dot accent
  % (all other accents will still work as usual)
-\def\TeX{{\ifmmode\it\fi
-   \hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
 \def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \let\mc=\ninerm % medium caps
 \def\CEE/{{\mc C\spacefactor1000}}

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctwill-mini.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctwill-mini.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctwill-mini.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -4,7 +4,7 @@
 @** Introduction.
 @y
 \ifacro \ifx\undefined\pdfpagewidth\else
-  \pdfpagewidth=\pagewd  \advance\pdfpagewidth by 2cm
+  \pdfpagewidth=\pagewd \advance\pdfpagewidth by 2cm
   \pdfpageheight=\pageht \advance\pdfpageheight by 5cm
   \ifpdftex \pdfhorigin=1cm \pdfvorigin=1cm
   \else \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
@@ -14,102 +14,91 @@
 @z
 
 @x
- at d banner "This is CTWILL, Version 4.2"
+A kind of ``user manual'' for \.{CTWILL} can be found in the appendix
+{\bf 271.~Mogrify \.{CWEAVE} into \.{CTWILL}} and beyond, together
+with additional material specific to \.{CTWILL}. % FIXME
+Until then, \.{CWEAVE}'s sequence of sections will be preserved.
+
+The ``banner line'' defined here should be changed whenever \.{CTWILL} is
 @y
+A kind of ``user manual'' for \.{CTWILL} can be found in section~\&{289}
+and beyond, together with additional material specific to \.{CTWILL}. % FIXME
 \bigskip
 {\font\itt=cmitt10 \font\bit=cmbxti10
-\noindent \bit Editor's Note: \it Although {\itt CTWILL} is based on
-{\itt cweave.w}, new and modified material is incorporated all over the place,
-without taking special care to keep the original section numbering intact.
+\noindent \bit Editor's Note: \it This heavily redacted version of
+{\itt ctwill.pdf} had to meddle with the section numbering of
+{\itt cweave.w}, spreading tabular material over several sections
+and splitting long sections into smaller chunks in order to
+fix overful pages---both horizontally and vertically---, to make
+the overall appearance of the {\itt CTWILL} documentation most
+pleasing to the readers'~eyes.
 \smallskip
-\noindent Moreover, this heavily redacted version of {\itt ctwill.pdf} had to
-meddle with the section numbering even more, spreading tabular material over
-several sections and splitting long sections into smaller chunks in order to
-fix overful pages---both horizontally and vertically---, to make the overall
-appearance of the {\itt CTWILL} documentation most pleasing to the
-readers'~eyes.
-\smallskip
 \noindent Please do not try to compare this {\itt ctwill.pdf} to the one
 created by {\itt CWEAVE} instead of {\itt CTWILL}; the section numbering will
-be even more ``off'' from {\itt cweave.w}.  Care has been taken to give a
+be quite ``off'' from {\itt cweave.w}.  Care has been taken to give a
 faithful overall rendering of {\itt CTWILL}'s code, though. \hfill
----Enjoy!\bigskip}
-
- at d banner "This is CTWILL, Version 4.2"
+---Enjoy!\par}
+\bigskip
+The ``banner line'' defined here should be changed whenever \.{CTWILL} is
+ at -banner@>
+@$banner {CTWILL}1 =\.{"This\ is\ CTWILL"}@>
 @z
 
 Section 2.
 
 @x
-@ Here is a sort of user manual for \.{CTWILL}---which is exactly like
+@ \.{CWEAVE} has a fairly straightforward outline.  It operates in
 @y
-@* \.{CTWILL} user manual.
-Here is a sort of user manual for \.{CTWILL}---which is exactly like
+ at r @ \.{CWEAVE} has a fairly straightforward outline.  It operates in
+@%
+@$show_banner {CTWILL}14 =\\{flags}[\.{'b'}]@>
+@$show_progress {CTWILL}14 =\\{flags}[\.{'p'}]@>
 @z
 
- at x
-give it the necessary hints in other places via your change file.
- at y
-give it the necessary hints in other places via your change file.
- at -f@>
- at -x@>
- at z
-
-Section 3.
-
- at x
-The current meaning of every identifier is initially `\.{\\uninitialized}'.
- at y
-@ The current meaning of every identifier is initially `\.{\\uninitialized}'.
- at z
-
- at x
-must have fewer than 50 characters. If the \TeX\ part starts
- at y
-must have fewer than 50 characters.
-
- at d max_tex_chars 50 /* limit on the \TeX\ part of a meaning */
-
-@ If the \TeX\ part starts
- at z
-
 Section 4.
 
 @x
- at d max_tex_chars 50 /* limit on the \TeX\ part of a meaning */
+ at d _(s) gettext(s)
 @y
+ at d _(s) gettext(s)
+ at -s@>
+ at -a@>
+ at -HAVE_GETTEXT@>
 @z
 
 Section 5.
 
 @x
-@ \.{CWEAVE} has a fairly straightforward outline.  It operates in
+ at d compress(c) if (loc++<=limit) return c
 @y
-@* Introduction (continued). \.{CWEAVE} has a fairly straightforward outline.
-It operates in
+ at d compress(c) if (loc++<=limit) return c
+ at -c@>
 @z
 
-Section 7.
+Section 6.
 
 @x
-internationalization.
+@ Code related to input routines:
 @y
-internationalization.
- at -A@>
- at -HAVE_GETTEXT@>
- at -S@>
+ at r @ Code related to input routines:
+ at -c@>
 @z
 
-Section 9.
+Section 7.
 
 @x
-@ Code related to input routines:
+ at d cur_line line[include_depth] /* number of current line in current file */
 @y
-@ Code related to input routines:
- at -c@>
+ at d cur_line line[include_depth] /* number of current line in current file */
+ at -cur_file@>
+ at -cur_file_name@>
+ at -cur_line@>
+@$cur_file {CTWILL}7 =\\{file}[\\{include\_depth}]@>
+@$cur_file_name {CTWILL}7 =\hfil\break\\{file\_name}[\\{include\_depth}]@>
+@$cur_line {CTWILL}7 =\\{line}[\\{include\_depth}]@>
 @z
 
-Section 13.
+Section 10.
 
 @x
 @ Code related to identifier and section name storage:
@@ -116,9 +105,15 @@
 @y
 @ Code related to identifier and section name storage:
 @-c@>
+ at -llink@>
+ at -rlink@>
+ at -root@>
+@$llink {CTWILL}10 =\\{link}@>
+@$rlink {CTWILL}10 =\\{dummy}.\\{Rlink}@>
+@$root {CTWILL}10 =\\{name\_dir}$\MG$\\{rlink}@>
 @z
 
-Section 15.
+Section 12.
 
 @x
 @ Code related to error handling:
@@ -127,15 +122,27 @@
 @-s@>
 @z
 
-Section 17.
+Section 14.
 
 @x
 extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */
 @y
 extern const char *use_language; /* prefix to \.{ctwimac.tex} in \TEX/ output */
+ at -show_banner@>
+ at -show_progress@>
+ at -show_happiness@>
+ at -show_stats@>
+ at -make_xrefs@>
+ at -check_for_change@>
+@$show_banner {CTWILL}14 =\\{flags}[\.{'b'}]@>
+@$show_progress {CTWILL}14 =\\{flags}[\.{'p'}]@>
+@$show_happiness {CTWILL}14 =\\{flags}[\.{'h'}]@>
+@$show_stats {CTWILL}14 =\\{flags}[\.{'s'}]@>
+@$make_xrefs {CTWILL}14 =\\{flags}[\.{'x'}]@>
+@$check_for_change {CTWILL}14 =\\{flags}[\.{'c'}]@>
 @z
 
-Section 18.
+Section 15.
 
 @x
 @ Code related to output:
@@ -144,44 +151,74 @@
 @-a@>
 @-b@>
 @-c@>
+ at -update_terminal@>
+ at -new_line@>
+@$update_terminal {CTWILL}15 =\\{fflush}(\\{stdout})@>
+@$new_line {CTWILL}15 =\\{putchar}(\.{'\\n'})@>
 @z
 
-Section 23.
+Section 16.
 
 @x
+@ The procedure that gets everything rolling:
+ at y
+ at r @ The procedure that gets everything rolling:
+ at z
+
+Section 17.
+
+ at x
+ at d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
+ at y
+ at d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */
+ at -long_buf_size@>
+@$long_buf_size {CTWILL}17 =$\\{buf\_size}+\\{longest\_name}$@>
+ at z
+
+Section 20.
+
+ at x
 @* Data structures exclusive to {\tt CWEAVE}.
 @y
 @* Data structures exclusive to {\tt CWEAVE}.
 @-a@>
+ at -ilk@>
+@$ilk {CTWILL}20 =\\{dummy}.\\{Ilk}@>
 @z
 
-Section 25.
+Section 21.
 
 @x
-@ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
+@ We keep track of the current section number in |section_count|, which
 @y
-@ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
- at -p@>
- at -x@>
+ at r @ We keep track of the current section number in |section_count|, which
 @z
 
-Section 27.
+Section 22.
 
 @x
-@ \.{CTWILL} also has special data structures to keep track of current
+@ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
 @y
- at r @ \.{CTWILL} also has special data structures to keep track of current
+@ The other large memory area in \.{CWEAVE} keeps the cross-reference data.
+ at -p@>
+ at -x@>
 @z
 
-Section 32.
+Section 24.
 
 @x
-@ The |new_meaning| routine changes the current ``permanent meaning''
+ at d file_flag (3*cite_flag)
 @y
- at r @ The |new_meaning| routine changes the current ``permanent meaning''
+ at -file_flag@>
+ at -def_flag@>
+ at -xref@>
+@$file_flag {CTWILL}24 =$\T{3}*\\{cite\_flag}{}$@>
+@$def_flag {CTWILL}24 =$\T{2}*\\{cite\_flag}{}$@>
+@$xref {CTWILL}24 =\\{equiv\_or\_xref}@>
+ at d file_flag (3*cite_flag)
 @z
 
-Section 35.
+Section 25.
 
 @x
 @ A new cross-reference for an identifier is formed by calling |new_xref|,
@@ -189,35 +226,58 @@
 @ A new cross-reference for an identifier is formed by calling |new_xref|,
 @-a@>
 @-c@>
+ at -p@>
+ at -no_xref@>
+@$no_xref {CTWILL}25 =$\R\\{make\_xrefs}$@>
 @z
 
-Section 44.
+Section 36.
 
 @x
-@ We have to get \CEE/'s
+ at d underline '\n' /* this code will be intercepted without confusion */
 @y
- at r @ We have to get \CEE/'s
+ at d underline '\n' /* this code will be intercepted without confusion */
+ at -begin_comment@>
+ at -underline@>
+@$begin_comment {CTWILL}36 =\.{'\\t'}@>
+@$underline {CTWILL}36 =\.{'\\n'}@>
 @z
 
-Section 45.
+Section 37.
 
 @x
-id_lookup("goto",NULL,case_like);
+@ Control codes are converted to \.{CWEAVE}'s internal
 @y
-@ @<Store all...@>=
-id_lookup("goto",NULL,case_like);
+ at r @ Control codes are converted to \.{CWEAVE}'s internal
 @z
 
-Section 49.
+Section 43.
 
 @x
-@ Control codes are converted to \.{CWEAVE}'s internal
+\yskip\hang |identifier|: In this case the global variables |id_first| and
+|id_loc| will have been set to the beginning and ending-plus-one locations
+in the buffer, as required by the |id_lookup| routine.
+
+\yskip\hang |string|: The string will have been copied into the array
+|section_text|; |id_first| and |id_loc| are set as above (now they are
+pointers into |section_text|).
+
+\yskip\hang |constant|: The constant is copied into |section_text|, with
+slight modifications; |id_first| and |id_loc| are set.
 @y
- at r @ Control codes are converted to \.{CWEAVE}'s internal
+{\raggedright
+\yskip\hang |identifier|: In this case the global variables |id_first| and
+|id_loc| will have been set to the beginning and ending-plus-one locations
+in the buffer, as required by the |id_lookup| routine.
+
+\yskip\hang |string|: The string will have been copied into the array
+|section_text|; |id_first| and |id_loc| are set as above (now they are
+pointers into |section_text|).
+
+\yskip\hang |constant|: The constant is copied into |section_text|, with
+slight modifications; |id_first| and |id_loc| are set.\par}
 @z
 
-Section 55.
-
 @x
 \yskip\hang |xref_roman|, |xref_wildcard|, |xref_typewriter|, |TeX_string|,
 |meaning|, |suppress|,
@@ -241,7 +301,7 @@
 preceded by \.{@@(} instead of \.{@@<}.\par}
 @z
 
-Section 56.
+Section 44.
 
 @x
 @ As one might expect, |get_next| consists mostly of a big switch
@@ -248,43 +308,151 @@
 @y
 @ As one might expect, |get_next| consists mostly of a big switch
 @-c@>
+@$c {CTWILL}44 \&{eight\_bits}@>
 @z
 
+Section 45.
+
+ at x
+@ @<Predecl...@>=@+static eight_bits get_next(void);
+ at y
+@ @<Predecl...@>=@+static eight_bits get_next(void);
+ at -get_next@>
+ at z
+
+Section 46.
+
+ at x
+ at d left_preproc ord /* begins a preprocessor command */
+ at y
+ at -left_preproc@>
+@$left_preproc {CTWILL}46 =\\{ord}@>
+ at d left_preproc ord /* begins a preprocessor command */
+ at z
+
+Section 51.
+
+ at x
+              if (*(loc+1)=='*') {loc++;@+compress(minus_gt_ast);}
+ at y
+              if (*(loc+1)=='*') {@+loc++;@+compress(minus_gt_ast);@+}
+ at z
+
+ at x
+            else if (*loc=='.' && *(loc+1)=='.') {
+              loc++;@+compress(dot_dot_dot);
+            } break;
+ at y
+            else if (*loc=='.' && *(loc+1)=='.') {@+
+              loc++;@+compress(dot_dot_dot);@+
+            } break;
+ at z
+
+Section 52.
+
+ at x
+  id_first=--loc;
+  do
+    ++loc;
+  while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @|
+      || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));
+  id_loc=loc; return identifier;
+}
+ at y
+  id_first=--loc;@/
+  do
+    ++loc;
+  while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @|
+      || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));@/
+  id_loc=loc;@/
+  return identifier;
+}
+ at z
+
+Section 53.
+
+ at x
+ at d gather_digits_while(t) while ((t) || *loc=='\'')
+ at y
+ at d gather_digits_while(t) while ((t) || *loc=='\'')
+ at -t@>
+ at z
+
+Section 55.
+
+ at x
+@ @<Get a bin...@>={
+ at y
+ at r @ @<Get a bin...@>={
+ at z
+
+Section 58.
+
+ at x
+@ @<Get a wide...@>={
+ at y
+ at r @ @<Get a wide...@>={
+ at z
+
 Section 63.
 
 @x
-@ The following code assigns values to the combinations \.{++},
+@ @<If end of name...@>=
 @y
-@ The following code assigns values to the combinations \.{++},
- at -c@>
+ at r @ @<If end of name...@>=
 @z
 
-Section 66.
+Section 65.
 
 @x
-@<Get a string@>= {
+@ @<Predecl...@>=@+static void skip_restricted(void);
 @y
-@<Get a string@>= {@+
+@ @<Predecl...@>=@+static void skip_restricted(void);
+ at -skip_restricted@>
 @z
 
-Section 70.
+Section 69.
 
 @x
-@ @<Put section name...@>=
+@ @<Predecl...@>=@+static void phase_one(void);
 @y
- at r @ @<Put section name...@>=
+@ @<Predecl...@>=@+static void phase_one(void);
+ at -phase_one@>
 @z
 
-Section 84.
+Section 72.
 
 @x
+C_xref( /* makes cross-references for \CEE/ identifiers */
+  eight_bits spec_ctrl)
+ at y
+C_xref( /* makes cross-references for \CEE/ identifiers */
+  eight_bits spec_ctrl)
+ at -C_xref@>
+@$C_xref {CTWILL}72 \&{static} \&{void} (\,)@>
+ at z
+
+ at x
+    if (next_control=='|' || next_control==begin_comment ||
+        next_control==begin_short_comment) return;
+ at y
+    if (next_control=='|' || next_control==begin_comment @| ||
+        next_control==begin_short_comment) return;
+ at z
+
+Section 73.
+
+ at x
+@ The |outer_xref| subroutine is like |C_xref| except that it begins
 with |next_control!='|'| and ends with |next_control>=format_code|. Thus, it
+handles \CEE/ text with embedded comments.
 @y
+@ The |outer_xref| subroutine is like |C_xref| except that it begins
 with |next_control| |!='|'| and ends with |next_control>=format_code|.
-Thus, it
+Thus, it handles \CEE/ text with embedded comments.
 @z
 
-Section 91.
+Section 80.
 
 @x
 @ Finally, when the \TEX/ and definition parts have been treated, we have
@@ -294,24 +462,29 @@
 \hfil\break|next_control>=begin_C|.
 @z
 
-Section 97.
+Section 86.
 
 @x
 @ The |flush_buffer| routine empties the buffer up to a given breakpoint,
 @y
 @ The |flush_buffer| routine empties the buffer up to a given breakpoint,
+ at -b@>
 @-c@>
+ at -tex_new_line@>
+@$tex_new_line {CTWILL}86 =$\\{putc}(\.{'\\n'},\39\\{active\_file})$@>
 @z
 
-Section 99.
+Section 89.
 
 @x
-@ When we are copying \TEX/ source material, we retain line breaks
+ at d proofing flags['P']
 @y
- at r @ When we are copying \TEX/ source material, we retain line breaks
+ at d proofing flags['P']
+ at -proofing@>
+@$proofing {CTWILL}89 =\\{flags}[\.{'P'}]@>
 @z
 
-Section 101.
+Section 90.
 
 @x
 @ When we wish to append one character |c| to the output buffer, we write
@@ -318,54 +491,56 @@
 @y
 @ When we wish to append one character |c| to the output buffer, we write
 @-c@>
+ at -s@>
 @z
 
-Section 105.
+Section 91.
 
 @x
-@ We get to this section only in the unusual case that the entire output line
+out_str( /* output characters from |s| to end of string */
+const char*s)
 @y
- at r @ We get to this section only in the unusual case that the entire output line
+out_str( /* output characters from |s| to end of string */
+const char*s)
+ at -out_str@>
+@$out_str {CTWILL}91 \&{static} \&{void} (\,)@>
 @z
 
-Section 111.
+Section 97.
 
 @x
-@ The |copy_TeX| routine processes the \TEX/ code at the beginning of a
+@ The |out_name| procedure is used to output an identifier or index
 @y
- at r @ The |copy_TeX| routine processes the \TEX/ code at the beginning of a
+ at r @ The |out_name| procedure is used to output an identifier or index
 @z
 
+Section 100.
+
 @x
-static eight_bits
-copy_TeX(void)
-{
+@ The |copy_TeX| routine processes the \TEX/ code at the beginning of a
 @y
-static eight_bits
-copy_TeX(void)
-{@+
+ at r @ The |copy_TeX| routine processes the \TEX/ code at the beginning of a
 @z
 
-Section 112.
+Section 101.
 
 @x
 @ The |copy_comment| function issues a warning if more braces are opened than
 @y
 @ The |copy_comment| function issues a warning if more braces are opened than
+ at -c@>
 @-t@>
+ at -copy_comment@>
+@$copy_comment {CTWILL}101 \&{static} \&{int} (\,)@>
 @z
 
 @x
-int bal at t\2\2@>) /* brace balance */
-{
-  char c; /* current character being copied */
+      } else {
 @y
-int bal at t\2\2@>) /* brace balance */
-{@+
-  char c; /* current character being copied */
+      } @+ else {
 @z
 
-Section 117.
+Section 106.
 
 @x
 @ Here is a list of the category codes that scraps can have.
@@ -373,7 +548,7 @@
 @r @ Here is a list of the category codes that scraps can have.
 @z
 
-Section 121.
+Section 109--110.
 
 @x
 @ The token lists for translated \TEX/ output contain some special control
@@ -382,8 +557,6 @@
 @-n@>
 @z
 
-Section 122.
-
 @x
 \yskip\noindent All of these tokens are removed from the \TEX/ output that
 @y
@@ -391,7 +564,7 @@
 @-n@>
 @z
 
-Section 123.
+Section 111--116.
 
 @x
 @ The raw input is converted into scraps according to the following table,
@@ -409,12 +582,20 @@
 \yskip\halign{\quad#\hfil&\quad\hbox to11cm{#\hfil}&\quad\hfil#\hfil\cr
 @z
 
-Section 124.
+ at x
+\./&|binop|: \./&yes\cr
+ at y
+\./&|binop|: \./&yes\cr}
 
+@ Cont.
+
+\yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
+ at z
+
 @x
-\.>&|prerangle|: \.{\\rangle}&yes\cr
+\.{complex}&|int_like|: \stars&yes\cr
 @y
-\.>&|prerangle|: \.{\\rangle}&yes\cr}
+\.{complex}&|int_like|: \stars&yes\cr}
 
 @ Cont.
 
@@ -421,24 +602,20 @@
 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
 @z
 
-Section 125.
-
 @x
-\.{continue}&|case_like|: \stars&maybe\cr
+\.{friend}&|int_like|: \stars&maybe\cr
 @y
-\.{continue}&|case_like|: \stars&maybe\cr}
+\.{friend}&|int_like|: \stars&maybe\cr}
 
- at r @ Cont.
+@ Cont.
 
 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
 @z
 
-Section 126.
-
 @x
-\.{long}&|raw_int|: \stars&maybe\cr
+\.{static\_cast}&|raw_int|: \stars&maybe\cr
 @y
-\.{long}&|raw_int|: \stars&maybe\cr}
+\.{static\_cast}&|raw_int|: \stars&maybe\cr}
 
 @ Cont.
 
@@ -445,24 +622,23 @@
 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
 @z
 
-Section 127.
-
 @x
-\.{try}&|else_like|: \stars&maybe\cr
+\.{xor\_eq}&|alfop|: \stars&yes\cr
 @y
-\.{try}&|else_like|: \stars&maybe\cr}
+\.{xor\_eq}&|alfop|: \stars&yes\cr}
 
- at r @ Cont.
+@ Cont.
 
 \yskip\halign{\quad#\hfil&\quad#\hfil&\quad\hfil#\hfil\cr
 @z
 
-Sections 128--135.
+Sections 117--125.
 
 @x l.7 line numbers refer to 'prod.w'
 @ Here is a table of all the productions.  Each production that
 @y
 @* Table of all productions.  Each production that
+ at -time@>
 @z
 
 TeX reports 'extra \fi' when running on twilled 'ctwill.w'.
@@ -473,6 +649,8 @@
 \newcount\prodno \newdimen\midcol \let\+\relax
 @z
 
+Section 118.
+
 @x l.78
 \+& |lpar| |rpar| & |exp| \hfill $L\.{\\,}R$ & functions, declarations\cr
 @y
@@ -489,9 +667,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip at -in@>@-x@>@-y@>
 \prodno=13 \midcol=2.5in
@@ -504,6 +682,8 @@
   \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
 @z
 
+Section 119.
+
 @x l.45
          |int_like| \alt|raw_int| |struct_like| & |extern "Ada" int|\cr
 @y
@@ -519,9 +699,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip at -in@>
 \prodno=27 \midcol=2.5in
@@ -534,6 +714,8 @@
   \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
 @z
 
+Section 120.
+
 @x l.75
               \&{struct} \&{name\_info} $\{$\cr
 @y
@@ -540,7 +722,7 @@
               \&{struct} \&{name\_info} $\{$\cr
 \endgroup
 
- at r @ Cont. at -z@>@-in@>
+ at r @ Cont. at -z@>@-in@>@-x@>
 \begingroup \lineskip=4pt
 \def\alt #1 #2
 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
@@ -549,11 +731,11 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
-\yskip at -in@>
+\yskip at -in@>@-x@>
 \prodno=47 \midcol=2.5in
 \def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
 \def\dagit{\dag\theprodno}
@@ -564,10 +746,12 @@
   \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
 @z
 
+Section 121.
+
 @x l.164
-       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & |else x=0;|\cr
+       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & $\!\!$|else x=0;|\cr
 @y
-       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & |else x=0;|\cr
+       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & $\!\!$|else x=0;|\cr
 \endgroup
 
 @ Cont.
@@ -579,9 +763,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip at -any@>@-z@>@-g@>@-a@>@-x@>@-y@>@-f@>
 \prodno=61 \midcol=2.5in
@@ -595,6 +779,8 @@
 \advance\midcol20pt
 @z
 
+Section 122.
+
 @x l.211
 \+& |prerangle| & |binop| \hfill \.> & $>$ not in template\cr
 @y
@@ -610,9 +796,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip at -any@>@-z@>@-g@>@-a@>
 \prodno=86 \midcol=2.5in
@@ -625,6 +811,8 @@
   \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
 @z
 
+Section 123.
+
 @x l.232
 \+\dagit& |new_exp| & |exp| & |new int;|\cr
 @y
@@ -632,6 +820,12 @@
 \endgroup
 
 @ Cont.
+ at -deprecated@>
+ at -fallthrough@>
+ at -likely@>
+ at -nodiscard@>
+ at -unlikely@>
+ at -s@>
 \begingroup \lineskip=4pt
 \def\alt #1 #2
 {$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
@@ -640,9 +834,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip at -any_other@>@-z@>@-f@>@-x@>@-p@>
 \prodno=100 \midcol=2.5in
@@ -669,15 +863,61 @@
 @y
 @z
 
- at x l.272
-\+& |any_other| |end_arg| & |end_arg| &    \&{char}$*$\.{@@]}\cr
+Section 124.
+
+ at x l.291
+\+& |exp| |attr| & |attr| \hfill $E\.\ A$ & \&{enum} $\{x\ [[\ldots]]\}$ \cr
+ at y
+\+& |exp| |attr| & |attr| \hfill $E\.\ A$ & \&{enum} $\{x\ [[\ldots]]\}$ \cr
+\endgroup
+
+@ Cont.
+ at -deprecated@>
+ at -fallthrough@>
+ at -likely@>
+ at -nodiscard@>
+ at -unlikely@>
+ at -y@>
+\begingroup \lineskip=4pt
+\def\alt #1 #2
+{$\displaystyle\Bigl\{\!\matrix{\strut\hbox{#1}\cr
+   \strut\hbox{#2}\cr}\!\Bigr\}$ }
+\def\altt #1 #2 #3
+{$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
+   \strut\hbox{#3}\cr}\!\Biggr\}$ }
+\def\malt #1 #2
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+\def\maltt #1 #2 #3
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+   \strut\hbox{#3}\hfill\cr}$}
+\yskip at -any_other@>@-z@>@-f@>@-x@>@-p@>
+\prodno=143 \midcol=2.5in
+\def\theprodno{\number\prodno \global\advance\prodno by1\enspace}
+\def\dagit{\dag\theprodno}
+\def\+#1&#2&#3&#4\cr{\def\next{#1}%
+ \line{\hbox to 2em{\hss
+  \ifx\next\empty\theprodno\else\next\fi}\strut
+  \ignorespaces#2\hfil\hbox to\midcol{$\RA$
+  \ignorespaces#3\hfil}\quad \hbox to1.45in{\ignorespaces#4\hfil}}}
+\advance\midcol20pt
+ at z
+
+Section 125.
+
+ at x l.326
+\+& |alignas_like| |cast| & |attr| & |alignas(int)| \cr
 \yskip
 \yskip
 \yskip
+\yskip
+\yskip
+\yskip
+\yskip
+\yskip
 \parindent=0pt
 \dag{\bf Notes}
 @y
-\+& |any_other| |end_arg| & |end_arg| &    \&{char}$*$\.{@@]}\cr
+\+& |alignas_like| |cast| & |attr| & |alignas(int)| \cr
 \advance\midcol-3pt
 \+\dag200\enspace& |typedef_like| |decl_head| \alt|exp| |int_like| &
       |typedef_like| |decl_head| \hfill $D=D$\alt $E^{**}$ $I^{**}$ \unskip &
@@ -689,15 +929,18 @@
   \&{typedef} \&{int} \&{foo}\cr
 \endgroup
 
- at r @-any_other@>@-z@>@ \begingroup\dag{\bf Notes}
+ at -any_other@>@-z@>@ \begingroup\dag{\bf Notes}
+\advance \hsize by -4cm
+\parindent=0pt
+\everypar={\hangindent=2em}
 @z
 
-Section 136.
+Section 126.
 
 @x
 @* Implementing the productions.
 @y
-@* Implementing the productions.  \advance \hsize by -4cm
+@* Implementing the productions.\advance \hsize by -4cm
 \ifx\undefined\pdfpagewidth \else \advance \pdfpagewidth by -4cm \fi
 @z
 
@@ -707,26 +950,46 @@
 the category codes |pp->cat|, |(pp+1)->cat|, $\,\ldots\,$
 @z
 
-Section 139.
+Section 127.
 
 @x
-@ Token lists in |@!tok_mem| are composed of the following kinds of
+@ @d trans trans_plus.Trans /* translation texts of scraps */
 @y
-@ Token lists in |@!tok_mem| are composed of the following kinds of
- at -p@>
+@ @d trans trans_plus.Trans /* translation texts of scraps */
+ at -trans@>
+@$trans {CTWILL}127 =\\{trans\_plus}.\\{Trans}@>
 @z
 
-Section 141.
+Section 128.
 
 @x
-@ @<Print token |r|...@>=
+null_scrap.trans=&tok_start[0];
+scrap_base=scrap_info+1;
 @y
- at r @ @<Print token |r|...@>=
+null_scrap.trans=&tok_start[0];@/
+scrap_base=scrap_info+1;@/
 @z
 
-Section 142.
+Section 129.
 
 @x
+@ Token lists in |@!tok_mem| are composed of the following kinds of
+ at y
+@ Token lists in |@!tok_mem| are composed of the following kinds of
+ at -p@>
+ at -res_flag@>
+ at -section_flag@>
+ at -tok_flag@>
+ at -inner_tok_flag@>
+@$res_flag {CTWILL}129 =$\T{2}*\\{id\_flag}$@>
+@$section_flag {CTWILL}129 =$\T{3}*\\{id\_flag}$@>
+@$tok_flag {CTWILL}129 =$\T{3}*\\{id\_flag}$@>
+@$inner_tok_flag {CTWILL}129 =$\T{4}*\\{id\_flag}$@>
+ at z
+
+Section 132.
+
+ at x
 @ The production rules listed above are embedded directly into \.{CWEAVE},
 @y
 @ The production rules listed above are embedded directly into \.{CWEAVE},
@@ -739,7 +1002,7 @@
 @-pp@>
 @z
 
-Section 143.
+Section 133.
 
 @x
 The code below is an exact translation of the production rules into
@@ -746,19 +1009,39 @@
 @y
 @r @ The code below is an exact translation of the production rules into
 @-a@>
+ at -c@>
+ at -p@>
 @z
 
-Section 146.
+Section 136--137.
 
 @x
 @ Let us consider the big switch for productions now, before looking
 @y
 @r @ Let us consider the big switch for productions now, before looking
+ at -cat1@>
+ at -cat2@>
+ at -cat3@>
+@$cat1 {CTWILL}136 =$(\\{pp}+\T{1})\MG\\{cat}$@>
+@$cat2 {CTWILL}136 =$(\\{pp}+\T{2})\MG\\{cat}$@>
+@$cat3 {CTWILL}136 =$(\\{pp}+\T{3})\MG\\{cat}$@>
 @z
 
-Section 147.
+ at x
+        && pp->cat!=new_exp
+        && pp->cat!=ftemplate @|
+ at y
+        && pp->cat!=new_exp @|
+        && pp->cat!=ftemplate
+ at z
 
 @x
+        && pp->cat!=const_like
+ at y
+        && pp->cat!=const_like @|
+ at z
+
+ at x
   switch (pp->cat) {
     case exp: @<Cases for |exp|@>@; @+break;
     case lpar: @<Cases for |lpar|@>@; @+break;
@@ -807,17 +1090,20 @@
     case typedef_like: @<Cases for |typedef_like|@>@; @+break;
     case delete_like: @<Cases for |delete_like|@>@; @+break;
     case question: @<Cases for |question|@>@; @+break;
+    case alignas_like: @<Cases for |alignas_like|@>@; @+break;
+    case lbrack: @<Cases for |lbrack|@>@; @+break;
+    case attr_head: @<Cases for |attr_head|@>@; @+break;
+    case attr: @<Cases for |attr|@>@; @+break;
+    case default_like: @<Cases for |default_like|@>@; @+break;
   }
-  pp++; /* if no match was found, we move to the right */
-}
+pp++; /* if no match was found, we move to the right */
 @y
   switch (pp->cat) {
     @<Cases for |pp->cat|@>@;
   }
-  pp++; /* if no match was found, we move to the right */
-}
+pp++; /* if no match was found, we move to the right */
 
-@ @<Cases for |pp->cat|@>=
+@ @<Cases for |pp->cat|@>=@t\1\5\5@>
     case exp: @<Cases for |exp|@>@; @+break;
     case lpar: @<Cases for |lpar|@>@; @+break;
     case unop: @<Cases for |unop|@>@; @+break;
@@ -865,101 +1151,199 @@
     case typedef_like: @<Cases for |typedef_like|@>@; @+break;
     case delete_like: @<Cases for |delete_like|@>@; @+break;
     case question: @<Cases for |question|@>@; @+break;
+    case alignas_like: @<Cases for |alignas_like|@>@; @+break;
+    case lbrack: @<Cases for |lbrack|@>@; @+break;
+    case attr_head: @<Cases for |attr_head|@>@; @+break;
+    case attr: @<Cases for |attr|@>@; @+break;
+    case default_like: @<Cases for |default_like|@>@; @+break;
 @z
 
-Section 148.
+Section 138.
 
 @x
-of identifiers in case labels.
+should say, for example, `\.{@@!@@\^\\\&\{operator\} \$+\{=\}\$@@>}' (or,
+more properly alpha\-betized,
+`\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}').
+ at y
+should say, for example, `\.{@@!@@\^\\\&\{operator\}} \.{\$+\{=\}\$@@>}'
+(or, properly alpha\-betized,
+`\.{@@!@@:operator+=\}\{\\\&\{operator\}} \.{\$+\{=\}\$@@>}').
+ at -find_first_ident@>
+ at -make_reserved@>
+ at -make_underlined@>
+ at -underline_xref@>
+ at -no_ident_found@>
+ at -case_found@>
+ at -operator_found@>
+@$no_ident_found {CTWILL}138 =\hfil\break(\&{token\_pointer}) 0@>
+@$case_found {CTWILL}138 =\hfil\break(\&{token\_pointer}) 1@>
+@$operator_found {CTWILL}138 =\hfil\break(\&{token\_pointer}) 2@>
+ at z
 
-If the first identifier is the keyword `\&{operator}', we give up;
+Section 140.
+
+ at x
+the |for| loop below.
+
+We use the fact that |make_underlined| has been called immediately preceding
+|make_reserved|, hence |tok_loc| has been set.
 @y
-of identifiers in case labels.
-If the first identifier is the keyword `\&{operator}', we give up;
+the |for| loop below.
+We use the fact that |make_underlined| has been called immediately preceding
+|make_reserved|, hence |tok_loc| has been set.
 @z
 
-Section 150.
+ at x
+make_reserved( /* make the first identifier in |p->trans| like |int| */
+scrap_pointer p)
+ at y
+make_reserved( /* make the first identifier in |p->trans| like |int| */
+scrap_pointer p)
+ at -make_reserved@>
+@$make_reserved {CTWILL}140 \&{static} \&{void} (\,)@>
+ at z
 
+Section 141.
+
 @x
-@ The scraps currently being parsed must be inspected for any
+@ In the following situations we want to mark the occurrence of
 @y
- at r @ The scraps currently being parsed must be inspected for any
+ at r @ In the following situations we want to mark the occurrence of
 @z
 
 @x
-|make_reserved|, hence |tok_loc| has been set.
+make_underlined(
+/* underline the entry for the first identifier in |p->trans| */
+scrap_pointer p)
 @y
-\hfil\break|make_reserved|, hence |tok_loc| has been set.
+make_underlined(
+/* underline the entry for the first identifier in |p->trans| */
+scrap_pointer p)
+ at -make_underlined@>
+@$make_underlined {CTWILL}141 \&{static} \&{void} (\,)@>
 @z
 
-Section 154.
+Section 144.
 
 @x
-@ \.{CTWILL} needs the following procedure, which appends tokens of a
+else if (cat1==attr) {
 @y
- at r @ \.{CTWILL} needs the following procedure, which appends tokens of a
+else @/ if (cat1==attr) {
 @z
 
-Section 155.
+Section 158.
 
 @x
-@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|,
+@ @<Cases for |struct_head|@>=
 @y
-@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|,
- at -b@>
+ at r @ @<Cases for |struct_head|@>=
 @z
 
+Section 165.
+
 @x
-  int l) /* 0, 1, or 2 */
-{
+  else squash(pp,1,else_like,0,65);
+}
+else if (cat1==attr) {
 @y
-  int l) /* 0, 1, or 2 */
-{@+
+  else squash(pp,1,else_like,0,65);
+}
+ at + else @/ if (cat1==attr) {
 @z
 
-Section 159.
+Section 171.
 
 @x
-@ @<Cases for |lpar|@>=
+ at d force_lines flags['f'] /* should each statement be on its own line? */
 @y
- at r @ @<Cases for |lpar|@>=
+ at d force_lines flags['f'] /* should each statement be on its own line? */
+ at -force_lines@>
+@$force_lines {CTWILL}171 =\\{flags}[\.{'f'}]@>
 @z
 
-Section 168.
+Section 174.
 
 @x
-@ @<Cases for |decl_head|@>=
+if (cat1==else_like || cat1==if_like || cat1==define_like)
 @y
- at r @ @<Cases for |decl_head|@>=
+if (cat1==else_like || cat1==if_like || cat1==define_like) @/
 @z
 
-Section 173.
+ at x
+} else if (cat1==exp || cat1==function) {
+ at y
+} else @/ if (cat1==exp || cat1==function) {
+ at z
 
+Section 182.
+
 @x
-@ @<Cases for |fn_decl|@>=
+  big_app1(pp+2); reduce(pp,3,new_exp,0,96);
+}
+else if (cat1==raw_ubin) {
 @y
- at r @ @<Cases for |fn_decl|@>=
+  big_app1(pp+2); reduce(pp,3,new_exp,0,96);
+}
+ at + else @/ if (cat1==raw_ubin) {
 @z
 
-Section 208.
+Section 198.
 
 @x
-@ Here's the |squash| procedure, which
+static void squash(scrap_pointer,short,eight_bits,short,short);
+
+@ @c
 @y
- at r @ Here's the |squash| procedure, which
+static void squash(scrap_pointer,short,eight_bits,short,short);
+
+ at r @ @c
 @z
 
-Section 212.
+Section 203.
 
 @x
 @ @<Print a snapsh...@>=
 @y
- at r @ @<Print a snapsh...@>=
+@ @<Print a snapsh...@>=
+ at -n@>
+@%
+@$n {CTWILL}198 \&{short}@>
+@$n {CTWILL}199 \&{short}@>
 @z
 
-Section 220.
+Section 205.
 
 @x
+@ @<Predecl...@>=@+static text_pointer translate(void);
+ at y
+@ @<Predecl...@>=@+static text_pointer translate(void);
+ at -translate@>
+ at z
+
+Section 209.
+
+ at x
+    if (next_control=='|' || next_control==begin_comment ||
+        next_control==begin_short_comment) return;
+ at y
+ at -C_parse@>
+@$C_parse {CTWILL}209 \&{static} \&{void} (\,)@>
+    if (next_control=='|' || next_control==begin_comment @| ||
+        next_control==begin_short_comment) return;
+ at z
+
+Section 210.
+
+ at x
+@ @<Predecl...@>=@+static void C_parse(eight_bits);
+ at y
+@ @<Predecl...@>=@+static void C_parse(eight_bits);
+ at -C_parse@>
+ at z
+
+Section 211.
+
+ at x
 @ The following macro is used to append a scrap whose tokens have just
 @y
 @ The following macro is used to append a scrap whose tokens have just
@@ -967,121 +1351,411 @@
 @-c@>
 @z
 
-Section 229.
+Section 212.
 
 @x
+@ @<Append the scr...@>=
+@<Make sure that there is room for the new scraps, tokens, and texts@>@;
+ at y
+@ @<Append the scr...@>=
+@#
+@<Make sure that there is room for the new scraps, tokens, and texts@>@;
+@#
+ at z
+
+ at x
+  case '/': case '.':
+    app(next_control);@+app_scrap(binop,yes_math);@+break;
+  case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break;
+ at .\\langle@>
+  case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break;
+ at .\\rangle@>
+  case '=': app_str("\\K");@+app_scrap(binop,yes_math);@+break;
+ at .\\K@>
+  case '|': app_str("\\OR");@+app_scrap(binop,yes_math);@+break;
+ at .\\OR@>
+  case '^': app_str("\\XOR");@+app_scrap(binop,yes_math);@+break;
+ at .\\XOR@>
+  case '%': app_str("\\MOD");@+app_scrap(binop,yes_math);@+break;
+ at .\\MOD@>
+  case '!': app_str("\\R");@+app_scrap(unop,yes_math);@+break;
+ at .\\R@>
+  case '~': app_str("\\CM");@+app_scrap(unop,yes_math);@+break;
+ at .\\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;
+ at .\\AND@>
+  case '?': app_str("\\?");@+app_scrap(question,yes_math);@+break;
+ at .\\?@>
+  case '#': app_str("\\#");@+app_scrap(ubinop,yes_math);@+break;
+ at .\\\#@>
+  case ignore: case xref_roman: case xref_wildcard:
+  case meaning: case suppress:
+  case xref_typewriter: case noop:@+break;
+  case '(': app(next_control);@+app_scrap(lpar,maybe_math);@+break;
+  case ')': app(next_control);@+app_scrap(rpar,maybe_math);@+break;
+  case '[': app(next_control);@+app_scrap(lbrack,maybe_math);@+break;
+  case ']': app(next_control);@+app_scrap(rbrack,maybe_math);@+break;
+  case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break;
+ at .\\\{@>@q}@>
+  case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break;
+ at 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@> @<Cases involving nonstandard characters@>@;
+ at y
+  case ignore: case xref_roman: case xref_wildcard: case meaning: @/
+  case suppress: case xref_typewriter: case noop:@+break;
+@#
+  @t\4@> @<Cases for operators and syntax markers@>@;
+  @t\4@> @<Cases involving nonstandard characters@>@;
+@#
+ at z
+
+Section 213--214.
+
+ at x
+  overflow(_("scrap/token/text"));
+}
+ at y
+  overflow(_("scrap/token/text"));
+}
+
+@ @<Cases for operators...@>=@t\1\5\5@>
+  case '/': case '.':
+    app(next_control);@+app_scrap(binop,yes_math);@+break;
+  case '<': app_str("\\langle");@+app_scrap(prelangle,yes_math);@+break;
+ at .\\langle@>
+  case '>': app_str("\\rangle");@+app_scrap(prerangle,yes_math);@+break;
+ at .\\rangle@>
+  case '=': app_str("\\K");@+app_scrap(binop,yes_math);@+break;
+ at .\\K@>
+  case '|': app_str("\\OR");@+app_scrap(binop,yes_math);@+break;
+ at .\\OR@>
+  case '^': app_str("\\XOR");@+app_scrap(binop,yes_math);@+break;
+ at .\\XOR@>
+  case '%': app_str("\\MOD");@+app_scrap(binop,yes_math);@+break;
+ at .\\MOD@>
+  case '!': app_str("\\R");@+app_scrap(unop,yes_math);@+break;
+ at .\\R@>
+  case '~': app_str("\\CM");@+app_scrap(unop,yes_math);@+break;
+ at .\\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;
+ at .\\AND@>
+  case '?': app_str("\\?");@+app_scrap(question,yes_math);@+break;
+ at .\\?@>
+  case '#': app_str("\\#");@+app_scrap(ubinop,yes_math);@+break;
+ at .\\\#@>
+  case '(': app(next_control);@+app_scrap(lpar,maybe_math);@+break;
+  case ')': app(next_control);@+app_scrap(rpar,maybe_math);@+break;
+  case '[': app(next_control);@+app_scrap(lbrack,maybe_math);@+break;
+  case ']': app(next_control);@+app_scrap(rbrack,maybe_math);@+break;
+  case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break;
+ at .\\\{@>@q}@>
+  case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break;
+ at 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;@/
+ at z
+
+Section 221.
+
+ at x
 @ The |outer_parse| routine is to |C_parse| as |outer_xref|
 @y
 @r @ The |outer_parse| routine is to |C_parse| as |outer_xref|
 @z
 
-Section 235.
+ at x
+ at d make_pb flags['e']
+ at y
+ at d make_pb flags['e']
+ at -make_pb@>
+@$make_pb {CTWILL}221 =\\{flags}[\.{'e'}]@>
+ at z
 
+Section 225.
+
 @x
-@ To insert token-list |p| into the output, the |push_level| subroutine
+ at d cur_mode cur_state.mode_field /* current mode of interpretation */
 @y
- at r @ To insert token-list |p| into the output, the |push_level| subroutine
+ at d cur_mode cur_state.mode_field /* current mode of interpretation */
+ at -cur_end@>
+ at -cur_tok@>
+ at -cur_mode@>
+@$cur_end {CTWILL}225 =\\{cur\_state}.\\{end\_field}]@>
+@$cur_tok {CTWILL}225 =\\{cur\_state}.\\{tok\_field}]@>
+@$cur_mode {CTWILL}225 =\\{cur\_state}.\\{mode\_field}]@>
 @z
 
-Section 237.
+Section 228.
 
 @x
+push_level( /* suspends the current level */
+text_pointer p)
+ at y
+push_level( /* suspends the current level */
+text_pointer p)
+ at -push_level@>
+@$push_level {CTWILL}228 \&{static} \&{void} (\,)@>
+ at z
+
+Section 229.
+
+ at x
+force when the current level was begun. This subroutine will never be
 called when |stack_ptr==1|.
 @y
-called when |stack_ptr| |==1|.
+force when the current level was begun.
+
+This subroutine will never be called when |stack_ptr==1|.
 @z
 
-Section 241.
+Section 234--235.
 
 @x
-  text_pointer save_text_ptr;
-  sixteen_bits save_next_control; /* values to be restored */
-  text_pointer p; /* translation of the \CEE/ text */
+@ Here is \.{CWEAVE}'s major output handler.
 @y
-  text_pointer save_text_ptr, p; /* translation of the \CEE/ text */
-  sixteen_bits save_next_control; /* values to be restored */
+ at r @ Here is \.{CWEAVE}'s major output handler.
 @z
 
-Section 244.
+ at x
+    reswitch: switch(a) {
+      case end_translation: return;
+      case identifier: case res_word: @<Output an identifier@>@; break;
+      case section_code: @<Output a section name@>@; break;
+      case math_rel: out_str("\\MRL{"@q}@>);
+ at .\\MRL@>
+      case noop: case inserted: break;
+      case cancel: case big_cancel: c=0; b=a;
+        while (true) {
+          a=get_output();
+          if (a==inserted) continue;
+          if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break;
+          if (a==indent) c++;
+          else if (a==outdent) c--;
+            else if (a==opt) a=get_output();
+        }
+        @<Output saved |indent| or |outdent| tokens@>@;
+        goto reswitch;
+      case dindent: a=get_output();
+        if (a!=big_force) {
+          out_str("\\1\\1"); goto reswitch;
+        }
+        else dindent_pending=true; /* fall through */
+      case indent: case outdent: case opt: case backup: case break_space:
+      case force: case big_force: case preproc_line: @<Output a control,
+        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 */
+    }
+  }
+}
+ at y
+    @/@<The output |switch|@>@;
+  }
+}
 
+@ @<The output |switch|@>=
+    reswitch: switch(a) {
+      case end_translation: return;
+      case identifier: case res_word: @<Output an identifier@>@; break;
+      case section_code: @<Output a section name@>@; break;
+      case math_rel: out_str("\\MRL{"@q}@>);
+ at .\\MRL@>
+      case noop: case inserted: break;
+      case cancel: case big_cancel: c=0; b=a;
+        while (true) {
+          a=get_output();
+          if (a==inserted) continue;
+          if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break;
+          if (a==indent) c++;
+          else if (a==outdent) c--;
+            else if (a==opt) a=get_output();
+        }
+        @<Output saved |indent| or |outdent| tokens@>@;
+        goto reswitch;
+      case dindent: a=get_output();
+        if (a!=big_force) {
+          out_str("\\1\\1"); goto reswitch;
+        }
+        else dindent_pending=true; /* fall through */
+      case indent: case outdent: case opt: case backup: case break_space:
+      case force: case big_force: case preproc_line: @<Output a control,
+        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 */
+    }
+ at z
+
+Section 236.
+
 @x
-else @<Look ahead for strongest line break, |goto reswitch|@>
+@ An identifier of length one does not have to be enclosed in braces, and it
 @y
-else {@<Look ahead for strongest line break, |goto reswitch|@>}
+ at r @ An identifier of length one does not have to be enclosed in braces, and it
 @z
 
-Section 245.
+Section 237.
 
 @x
+  } else if (a==opt) b=get_output(); /* ignore digit following |opt| */
+ at y
+  }@+ else if (a==opt) b=get_output(); /* ignore digit following |opt| */
+ at z
+
+Section 238.
+
+ at x
 @<Look ahead for st...@>= {
+  b=a; save_mode=cur_mode;
+  if (dindent_pending) {
+    c=2; dindent_pending=false;
+  } else c=0;
 @y
-@<Look ahead for st...@>=
+@<Look ahead for st...@>= {@+
+  b=a; save_mode=cur_mode;
+  if (dindent_pending) {@+
+    c=2; dindent_pending=false;@+
+  } else c=0;
 @z
 
 @x
-}
+  while (true) {
 @y
+  while (true) {@+
 @z
 
+Section 241.
+
+ at x
+    case ' ': case '\\': case '#': case '%': case '$': case '^':
+    case '{': case '}': case '~': case '&': case '_':
+      out('\\'); /* falls through */
+ at y
+    case ' ': case '\\': case '#': case '%': @/
+    case '$': case '^': case '{': case '}': @/
+    case '~': case '&': case '_': @/
+      out('\\'); /* falls through */
+ at z
+
+Section 243.
+
+ at x
+  if (b=='@@' || (b=='\\' && delim!=0))
+ at y
+  if (b=='@@' || (b=='\\' && delim!=0)) @/
+ at z
+
+Section 245.
+
+ at x
+phase_two(void) {
+ at y
+phase_two(void) {@+
+ at z
+
 Section 246.
 
 @x
-@ @<Output saved...@>=
+@ @<Predecl...@>=@+static void phase_two(void);
 @y
- at r @ @<Output saved...@>=
+@ @<Predecl...@>=@+static void phase_two(void);
+ at -phase_two@>
 @z
 
-Section 250.
+Section 248.
 
 @x
-@ The \CEE/ text enclosed in \pb\ should not contain `\.{\v}' characters,
+@ @d usage_sentinel (struct perm_meaning *)1
+@<Translate the current section@>= {
 @y
- at r @ The \CEE/ text enclosed in \pb\ should not contain `\.{\v}' characters,
+@ @d usage_sentinel (struct perm_meaning *)1
+ at -usage_sentinel@>
+@$usage_sentinel {CTWILL}248 =(\&{struct} \&{perm\_meaning} ${}{*}{}$) \T{1}@>
+@<Translate the current section@>=@+ {
 @z
 
-Section 256.
+Section 252.
 
 @x
-@ The output file will contain the control sequence \.{\\Y} between non-null
+finish_C( /* finishes a definition or a \CEE/ part */
+  boolean visible) /* |true| if we should produce \TeX\ output */
 @y
- at r @ The output file will contain the control sequence \.{\\Y} between non-null
+finish_C( /* finishes a definition or a \CEE/ part */
+  boolean visible) /* |true| if we should produce \TeX\ output */
+ at -finish_C@>
+@$finish_C {CTWILL}252 \&{static} \&{void} (\,)@>
 @z
 
-Section 259.
+Section 253.
 
 @x
-@<Translate the \T...@>= do {
+@ @<Predecl...@>=@+static void finish_C(boolean);
 @y
-@<Translate the \T...@>= do {@+
+@ @<Predecl...@>=@+static void finish_C(boolean);
+ at -finish_C@>
 @z
 
-Section 267.
+Section 255.
 
 @x
+@ @<Start a format...@>= {
+ at y
+ at r @ @<Start a format...@>= {
+ at z
+
+Section 256.
+
+ at x
 |next_control>=begin_C|. We will make the global variable |this_section|
+point to the current section name, if it has a name.
 @y
-\hfil\break|next_control>=begin_C|. We will make the global variable |this_section|
+\hfil\break|next_control>=begin_C|.
+We will make the global variable |this_section| point to
+\hfil\break the current section name, if it has a name.
 @z
 
-Section 268.
+Section 261.
 
 @x
-@ @<Translate the \CEE/...@>=
+footnote( /* outputs section cross-references */
+sixteen_bits flag)
 @y
- at r @ @<Translate the \CEE/...@>=
+footnote( /* outputs section cross-references */
+sixteen_bits flag)
+ at -footnote@>
+@$footnote {CTWILL}261 \&{static} \&{void} (\,)@>
 @z
 
-Section 272.
+Section 262.
 
 @x
-@ The |footnote| procedure gives cross-reference information about
+@ @<Predecl...@>=@+static void footnote(sixteen_bits);
 @y
- at r @ The |footnote| procedure gives cross-reference information about
+@ @<Predecl...@>=@+static void footnote(sixteen_bits);
+ at -footnote@>
 @z
 
-Section 284.
+Section 266.
 
 @x
+@ @<Predecl...@>=@+static void phase_three(void);
+ at y
+@ @<Predecl...@>=@+static void phase_three(void);
+ at -phase_three@>
+ at z
+
+Section 269.
+
+ at x
 @ A left-to-right radix sorting method is used, since this makes it easy to
 @y
 @ A left-to-right radix sorting method is used, since this makes it easy to
@@ -1088,56 +1762,329 @@
 @-c@>
 @z
 
-Section 286.
+Section 271.
 
 @x
-@ During the sorting phase we shall use the |cat| and |trans| arrays from
+@<Rest of |trans_plus| union@>=
 @y
-@ During the sorting phase we shall use the |cat| and |trans| arrays from
+@<Rest of |trans_plus| union@>=
 @-j@>
 @-k@>
 @z
 
-Section 289.
+Section 272.
 
 @x
+@ @d depth cat /* reclaims memory that is no longer needed for parsing */
+ at y
+@ @d depth cat /* reclaims memory that is no longer needed for parsing */
+ at -depth@>
+ at -head@>
+ at -sort_ptr@>
+ at -max_sorts@>
+@$depth {CTWILL}272 =\\{cat}@>
+@$head {CTWILL}272 =\\{trans\_plus}.\\{Head}@>
+@$sort_ptr {CTWILL}272 =\\{scrap\_ptr}@>
+@$max_sorts {CTWILL}272 =\\{max_scraps}@>
+ at z
+
+Section 274.
+
+ at x
 $|collate|[0]<|collate|[1]<\cdots<|collate|[100]$.
 @y
-|collate[0]| $<$|collate[1]|$<\cdots<$|collate[100]|.
+|collate[0]| ${}<{}$|collate[1]|${}<\cdots<{}$|collate[100]|.
 @z
 
-Section 296.
+Section 276.
 
 @x
-    else {char *j;
+@ Procedure |unbucket| goes through the buckets and adds nonempty lists
 @y
-    else {@+char *j;
+ at r @ Procedure |unbucket| goes through the buckets and adds nonempty lists
+ at -unbucket@>
+@$unbucket {CTWILL}276 \&{static} \&{void} (\,)@>
 @z
 
+Section 277.
+
+ at x
+@ @<Predecl...@>=@+static void unbucket(eight_bits);
+ at y
+@ @<Predecl...@>=@+static void unbucket(eight_bits);
+ at -unbucket@>
+ at z
+
+Section 279.
+
+ at x
+@ @<Split the list...@>= {
+  eight_bits c;
+  next_name=sort_ptr->head;
+ at y
+@ @<Split the list...@>= {@+
+  eight_bits c;
+  next_name=sort_ptr->head;@/
+ at z
+
+Section 280.
+
+ at x
+  cur_name=sort_ptr->head;
+ at y
+  @+cur_name=sort_ptr->head;@/
+ at z
+
+Section 286.
+
+ at x
+@ @<Predecl...@>=@+static void section_print(name_pointer);
+ at y
+@ @<Predecl...@>=@+static void section_print(name_pointer);
+ at -section_print@>
+ at z
+
+Section 288.
+
+ at x
+  puts(_("\nMemory usage statistics:"));
+ at .Memory usage statistics:@>
+  printf(_("%ld names (out of %ld)\n"),
+            (ptrdiff_t)(name_ptr-name_dir),(long)max_names);
+  printf(_("%ld cross-references (out of %ld)\n"),
+            (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);
+  printf(_("%ld bytes (out of %ld)\n"),
+            (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
+  printf(_("%ld temp meanings (out of %ld)\n"),
+            (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),
+            (long)max_meanings);
+  printf(_("%ld titles (out of %ld)\n"),
+            (ptrdiff_t)(title_code_ptr-title_code),(long)max_titles);
+  puts(_("Parsing:"));
+  printf(_("%ld scraps (out of %ld)\n"),
+            (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps);
+  printf(_("%ld texts (out of %ld)\n"),
+            (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts);
+  printf(_("%ld tokens (out of %ld)\n"),
+            (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks);
+  printf(_("%ld levels (out of %ld)\n"),
+            (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size);
+  puts(_("Sorting:"));
+  printf(_("%ld levels (out of %ld)\n"),
+            (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps);
+ at y
+  puts(_("\nMemory usage statistics:"));@/
+ at .Memory usage statistics:@>
+  printf(_("%ld names (out of %ld)\n"),
+            (ptrdiff_t)(name_ptr-name_dir),@/
+            @t\5\5\5\5@>(long)max_names);@/
+  printf(_("%ld cross-references (out of %ld)\n"),
+            (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);@/
+  printf(_("%ld bytes (out of %ld)\n"),
+            (ptrdiff_t)(byte_ptr-byte_mem),@/
+            @t\5\5\5\5@>(long)max_bytes);@/
+  printf(_("%ld temp meanings (out of %ld)\n"),
+            (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),@/
+            @t\5\5\5\5@>(long)max_meanings);@/
+  printf(_("%ld titles (out of %ld)\n"),
+            (ptrdiff_t)(title_code_ptr-title_code),@/
+            @t\5\5\5\5@>(long)max_titles);@/
+  puts(_("Parsing:"));@/
+  printf(_("%ld scraps (out of %ld)\n"),
+            (ptrdiff_t)(max_scr_ptr-scrap_info),@/
+            @t\5\5\5\5@>(long)max_scraps);@/
+  printf(_("%ld texts (out of %ld)\n"),
+            (ptrdiff_t)(max_text_ptr-tok_start),@/
+            @t\5\5\5\5@>(long)max_texts);@/
+  printf(_("%ld tokens (out of %ld)\n"),
+            (ptrdiff_t)(max_tok_ptr-tok_mem),@/
+            @t\5\5\5\5@>(long)max_toks);@/
+  printf(_("%ld levels (out of %ld)\n"),
+            (ptrdiff_t)(max_stack_ptr-stack),@/
+            @t\5\5\5\5@>(long)stack_size);@/
+  puts(_("Sorting:"));@/
+  printf(_("%ld levels (out of %ld)\n"),
+            (ptrdiff_t)(max_sort_ptr-scrap_info),@/
+            @t\5\5\5\5@>(long)max_scraps);
+ at z
+
+Section 289.
+
+ at x
+@** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}.  The following sections
+introduce material that is specific to \.{CTWILL}.
+
+Care has been taken to keep the original section numbering of \.{CWEAVE}
+up to this point intact, so this new material should nicely integrate
+with the original ``\&{271.~Index}.''
+
+ at q Section 2->272. @>
+@* {\tentex CTWILL} user manual.
+ at y
+@** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}.
+ at -s@>
+ at z
+
+ at x
+give it the necessary hints in other places via your change file.
+ at y
+give it the necessary hints in other places via your change file.
+ at -f@>
+ at -x@>
+ at z
+
+Section 290--291.
+
+ at x
+The current meaning of every identifier is initially `\.{\\uninitialized}'.
+ at y
+ at r @ The current meaning of every identifier is initially `\.{\\uninitialized}'.
+ at -printf@>
+ at z
+
+ at x
+must have fewer than 50 characters. If the \TeX\ part starts
+ at y
+must have fewer than 50 characters.
+
+ at d max_tex_chars 50 /* limit on the \TeX\ part of a meaning */
+ at -s@>
+
+@ If the \TeX\ part starts
+ at z
+
+ at x
+ at d max_tex_chars 50 /* limit on the \TeX\ part of a meaning */
+ at y
+ at z
+
+Section 293.
+
+ at x
+static struct perm_meaning {
+ at y
+static struct perm_meaning {
+ at -perm_meaning@>
+@$perm_meaning {CTWILL}293 \&{static} \&{struct}@>
+ at z
+
+Section 302.
+
+ at x
+@ @<Predec...@>=@+static boolean app_supp(text_pointer);
+ at y
+@ @<Predec...@>=@+static boolean app_supp(text_pointer);
+ at -app_supp@>
+ at z
+
 Section 303.
 
 @x
-@ Because on some systems the difference between two pointers is a |ptrdiff_t|
-rather than an |int|, we use \.{\%ld} to print these quantities.
+@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|,
 @y
- at r @ Because on some systems the difference between two pointers is a
-|ptrdiff_t| rather than an |int|, we use \.{\%ld} to print these quantities.
+ at r @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|,
+ at -a@>
+ at -b@>
+ at -c@>
+ at -make_ministring@>
+@$make_ministring {CTWILL}303 \&{static} \&{void} (\,)@>
 @z
 
 Section 304.
 
 @x
-\bigskip
-\font\itt=cmitt10
-{\noindent \it Although \.{\itt CTWILL} is based on \.{\itt cweave.w}, new and
-modified material is incorporated all over the place, without taking special
-care for keeping the original section numbering intact.}
+@ @<Predec...@>=@+static void make_ministring(int);
 @y
+@ @<Predec...@>=@+static void make_ministring(int);
+ at -make_ministring@>
 @z
 
+Section 307.
+
+ at x
+@ @<Append tokens for type |q|@>=
+ at y
+ at r @ @<Append tokens for type |q|@>=
+ at z
+
+ at x
+   && *(*r+1)=='{') app(**q); /* |struct_like| identifier */
+ at y
+   @|&& *(*r+1)=='{') app(**q); /* |struct_like| identifier */
+ at z
+
 Section 312.
 
 @x
+@ @<Write the new meaning to the \.{.aux} file@>=
+ at y
+@ @<Write the new meaning to the \.{.aux} file@>=
+@%
+@$p {CTWILL}296 \&{name\_pointer}@>
+@$q {CTWILL}296 \&{struct perm\_meaning} ${}{*}{}$@>
+ at z
+
+Section 313.
+
+ at x
+@<Flag the usage of this identifier, for the mini-index@>=
+ at y
+@<Flag the usage of this identifier, for the mini-index@>=
+@%
+@$p {CTWILL}219 \&{name\_pointer}@>
+ at z
+
+Section 316.
+
+ at x
+@ @<Predec...@>=@+static void out_mini(meaning_struct *);
+ at y
+@ @<Predec...@>=@+static void out_mini(meaning_struct *);
+ at -out_mini@>
+ at z
+
+Section 317.
+
+ at x
+@ Compare this code with section |@<Output the name...@>|.
+
+@<Mini-output...@>=
+ at y
+@ @<Mini-output...@>=
+ at z
+
+Section 319.
+
+ at x
+@ @<Predec...@>=@+static sixteen_bits title_lookup(void);
+ at y
+@ @<Predec...@>=@+static sixteen_bits title_lookup(void);
+ at -title_lookup@>
+ at z
+
+Section 322.
+
+ at x
+ at d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
+ at y
+ at d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
+ at -indent_param_decl@>
+@$indent_param_decl {CTWILL}322 =\\{flags}[\.{'i'}]@>
+ at z
+
+Section 323.
+
+ at x
+ at d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
+ at y
+ at d order_decl_stmt flags['o'] /* should declarations and statements be separated? */
+ at -order_decl_stmt@>
+@$order_decl_stmt {CTWILL}323 =\\{flags}[\.{'o'}]@>
+ at z
+
+Section 329.
+
+ at x
 @** Index.
 If you have read and understood the code for Phase III above, you know what
 is in this index and how it got here. All sections in which an identifier is

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctwill-w2c.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -31,12 +31,13 @@
 @y
 % Here is TeX material that gets inserted after \input ctwimac
 \def\contentspagenumber{0} % default page number for table of contents
+\datethis % Put timestamp before section 1
 @z
 
 @x
-\def\title{CWEAVE (Version 4.2)}
+\def\title{CWEAVE (Version 4.4)}
 @y
-\def\title{CTWILL (Version 4.2 [\TeX~Live])}
+\def\title{CTWILL (Version 4.4 [\TeX~Live])}
 @z
 
 @x
@@ -46,9 +47,9 @@
 @z
 
 @x
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
 @y
-  \centerline{(Version 4.2 [\TeX~Live])}
+  \centerline{(Version 4.4 [\TeX~Live])}
 @z
 
 @x
@@ -75,7 +76,7 @@
 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
 is modified.
 
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
 This is the \.{CTWILL} program by D. E. Knuth, based
 on \.{CWEAVE} by Silvio Levy and D.~E. Knuth. It is also based on
@@ -91,180 +92,19 @@
 can be found in Knuth's article ``Mini-indexes for literate programs,''
 reprinted in {\sl Digital Typography\/} (1999), 225--245.
 
+A kind of ``user manual'' for \.{CTWILL} can be found in the appendix
+{\bf 271.~Mogrify \.{CWEAVE} into \.{CTWILL}} and beyond, together
+with additional material specific to \.{CTWILL}. % FIXME
+Until then, \.{CWEAVE}'s sequence of sections will be preserved.
+
 The ``banner line'' defined here should be changed whenever \.{CTWILL} is
 modified. The version number parallels the corresponding version of \.{CWEAVE}.
 
- at d banner "This is CTWILL, Version 4.2"
+ at d banner "This is CTWILL, Version 4.4"
   /* will be extended by the \TeX~Live |versionstring| */
 @z
 
 @x
-@<Predeclaration of procedures@>
- at y
-@<Predeclaration of procedures@>
-
-@ Here is a sort of user manual for \.{CTWILL}---which is exactly like
-\.{CWEAVE} except that it produces much better documentation, for which you
-must work harder. As with \.{CWEAVE}, input comes from a source file
-\.{foo.w} and from an optional (but now almost mandatory) change file
-\.{foo.ch}; output goes to \.{foo.tex}, \.{foo.idx}, and \.{foo.scn}.
-Unlike \.{CWEAVE}, there is an additional output file, \.{foo.aux},
-which records all nonexternal definitions.  The \.{.aux} file also
-serves as an input file on subsequent runs. You should run \.{CTWILL}
-twice, once to prime the pump and once to get decent answers.
-
-Moreover, you must run the output twice through \TeX. (This double duplicity
-suggested the original name \.{TWILL}.) After `\.{tex} \.{foo}' you
-will have output that looks like final pages except that the entries
-of mini-indexes won't be alphabetized. \TeX\ will say `This is the first
-pass', and it will produce a weird file called \.{foo.ref}. Say
-$$\.{refsort < foo.ref > foo.sref}$$
-and then another `\.{tex} \.{foo}' will produce alphabetized output.
-While \TeX\ runs it emits messages filled with numeric data, indicating how
-much space is consumed by each program section. If you can decipher these
-numbers (see \.{ctwimac.tex}), you can use them to fine-tune the page
-layout. You might be tempted to do fine tuning by editing \.{foo.tex}
-directly, but it's better to incorporate all changes into \.{foo.ch}.
-
-The mini-indexes list identifiers that are used but not defined on
-each two-page spread. At the end of each section, \.{CTWILL} gives
-\TeX\ a list of identifiers used in that section and information
-about where they are defined. The macros in \.{ctwimac.tex} figure out
-which identifiers should go in each mini-index, based on how the pages
-break. (Yes, those macros are pretty hairy.)
-
-The information that \.{CTWILL} concocts from \.{foo.w} is not always
-correct. Sometimes you'll use an identifier that you don't want
-indexed; for example, your exposition might talk about |f(x)| when you
-don't mean to refer to program variables |f| or |x|. Sometimes you'll
-use an identifier that's defined in a header file, unknown to
-\.{CTWILL}. Sometimes you'll define a single identifier in several
-different places, and \.{CTWILL} won't know which definition to choose.
-But all is not lost. \.{CTWILL} guesses right most of the time, and you can
-give it the necessary hints in other places via your change file.
-
-If you think it's easy to write a completely automatic system that doesn't
-make \.{CTWILL}'s mistakes and doesn't depend so much on change files,
-please do so.
-
-\.{CTWILL} uses a very simple method to generate mini-index info. By
-understanding this method, you will understand how to fix it when things
-go wrong. Every identifier has a current ``meaning,'' consisting of its
-abstract type and the number of the section in which it was most recently
-defined. For example, if your \Cee\ program says `|char *s|' in section~3,
-the meaning of~|s| gets changed to `\&{char} $*$, \S3' while \.{CTWILL}
-is processing that section. If you refer to~|s| in section~10, and if
-|s|~hasn't been redefined in the meantime, and if section~10 doesn't
-wind up on the same two-page spread as section~3, the mini-index generated
-by section~10 will say ``|s|: \&{char}~$*$, \S3.''
-
-The current meaning of every identifier is initially `\.{\\uninitialized}'.
-Then \.{CTWILL} reads the \.{.aux} file for your job, if any; this
-\.{.aux} file contains all definitions of new meanings in the previous
-run, so it tells \.{CTWILL} about definitions that will be occurring
-in the future. If all identifiers have a unique definition, they will
-have a unique and appropriate meaning in the mini-indexes.
-
-But some identifiers, like parameters to procedures, may be defined
-several times. Others may not be defined at all, because they are
-defined elsewhere and mentioned in header files included by the \Cee\
-preprocessor. To solve this problem, \.{CTWILL} provides mechanisms by which
-the current meaning of an identifier can be temporarily or permanently
-changed.
-
-For example, the operation
-$$\.{@@\$s \{FOO\}3 \\\&\{char\} \$*\$@@>}$$
-changes the current meaning of |s| to the \TeX\ output of `\.{\\\&\{char\}}
-\.{\$*\$}' in section~3 of program {\sc FOO}. All entries in the \.{.aux}
-file are expressed in the form of this \.{@@\$} operator; therefore you
-can use a text editor to paste such entries into a \.{.ch} file, whenever
-you want to tell \.{CTWILL} about definitions that are out of order
-or from other programs.
-
-Before reading the \.{.aux} file, \.{CTWILL} actually looks for a file
-called \.{system.bux}, which will be read if present. And after
-\.{foo.aux}, a third possibility is \.{foo.bux}. The general
-convention is to put definitions of system procedures such as |printf|
-into \.{system.bux}, and to put definitions found in specifically
-foo-ish header files into \.{foo.bux}. Like the \.{.aux}
-files, \.{.bux} files should contain only \.{@@\$} specifications;
-this rule corresponds to the fact that `bux' is the plural of `\$'.
-The \.{.bux} files may also contain \.{@@i} includes.
-
-A companion operation \.{@@\%} signifies that all \.{@@\$}
-specifications from the present point to the beginning of the next
-section will define {\it temporary\/} meanings instead of permanent
-ones. Temporary meanings are placed into the
-mini-index of the current section; the permanent (current) meaning of
-the identifier will not be changed, nor will it appear in the
-mini-index of the section. If several temporary meanings are assigned
-to the same identifier in a section, all will appear in the mini-index.
-Each \.{@@\%} toggles the temporary/permanent convention; thus, after
-an even number of \.{@@\%} operations in a section, meanings specified
-by \.{@@\$} are permanent.
-
-The operation \.{@@-} followed by an identifier followed by \.{@@>}
-specifies that the identifier should not generate a mini-index entry
-in the current section (unless, of course, a temporary meaning is assigned).
-
-If \.{@@-foo@@>} appears in a section where a new permanent meaning is
-later defined by the semantics of~\Cee, the current meaning of \\{foo}
-will not be redefined; moreover, this current meaning, which may have
-been changed by \.{@@\$foo ...@@>}, will also be written to the
-\.{.aux} file. Therefore you can control what \.{CTWILL} outputs; you
-can keep it from repeatedly contaminating the \.{.aux} file with
-things you don't like.
-
-The meaning specified by \.{@@\$...@@>} generally has four components:
-an identifier (followed by space), a program name (enclosed in braces),
-a section number (followed by space), and a \TeX\ part. The \TeX\ part
-must have fewer than 50 characters. If the \TeX\ part starts
-with `\.=', the mini-index entry will contain an equals sign instead
-of a colon; for example,
-$$\.{@@\$buf\_size \{PROG\}10 =\\T\{200\}@@>}$$
-generates either `$\\{buf\_size}=200$, \S10' or
-`$\\{buf\_size}=200$, {\sc PROG}\S10', depending on whether
-`{\sc PROG}' is or isn't the title of the current program. If the
-\TeX\ part is `\.{\\zip}', the mini-index entry will contain neither
-colon nor equals, just a comma. The program name and section number
-can also be replaced by a string. For example,
-$$\.{@@\$printf "<stdio.h>" \\zip@@>}$$
-will generate a mini-index entry like `\\{printf}, \.{<stdio.h>}.'.
-
-A special ``proofmode'' is provided so that you can check \.{CTWILL}'s
-conclusions about cross-references. Run \.{CTWILL} with the
-flag \.{+P}, and \TeX\ will produce a specially formatted document
-({\it without\/} mini-indexes)
-in which you can check that your specifications are correct.
-You should always do this before generating mini-indexes, because
-mini-indexes can mask errors if page breaks are favorable but the
-errors might reveal themselves later after your program has changed.
-The proofmode output is much easier to check than the mini-indexes themselves.
-
-The control code \.{@@r} or \.{@@R} causes \.{CTWILL} to emit
-the \TeX\ macro `\.{\\shortpage}' just before starting the next
-section of the program. This causes the section to appear at the top of
-a right-hand page, if it would ordinarily have appeared near the bottom
-of a left-hand page and split across the pages. (The \.{\\shortpage} macro
-is fragile and should be used only in cases where it will not mess up
-the output; insert it only when fine-tuning a set of pages.) If the
-next section is a starred section, the behavior is slightly different
-(but still fragile): The starred section will either be postponed to
-a left-hand page, if it normally would begin on a right-hand page,
-or vice versa. In other words, \.{@@r@@*} inverts the left/right logic.
-
-\.{CTANGLE} does not recognize the operations \.{@@\$}, \.{@@\%}, \.{@@-},
-and \.{@@r}, which are unique to \.{CTWILL}. But that is no problem,
-since you use them only in change files set up for book publishing,
-which are quite different from the change files you set up for tangling.
-
-(End of user manual. We now resume the program for \.{CWEAVE}, with occasional
-outbursts of new code.)
-
- at d max_tex_chars 50 /* limit on the \TeX\ part of a meaning */
- at z
-
- at x
   program=cweave;
 @y
   program=ctwill;
@@ -283,6 +123,14 @@
 @z
 
 @x
+ at d max_refs 20000 /* number of cross-references; must be less than 65536 */
+ at d max_scraps 2000 /* number of tokens in \CEE/ texts being parsed */
+ at y
+ at d max_refs 65535 /* number of cross-references; must be less than 65536 */
+ at d max_scraps 5000 /* number of tokens in \CEE/ texts being parsed */
+ at z
+
+ at x
 turned on during the first phase.
 
 @<Private...@>=
@@ -292,132 +140,34 @@
 @z
 
 @x
-static sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */
+ at d append_xref(c) if (xref_ptr==xmem_end) overflow("cross-reference");
 @y
-static sixteen_bits xref_switch,section_xref_switch; /* either zero or |def_flag| */
+ at d append_xref(c) if (xref_ptr==xmem_end) overflow(_("cross-reference"));
+ at z
 
-@ \.{CTWILL} also has special data structures to keep track of current
-and temporary meanings. These structures were not designed for maximum
-efficiency; they were designed to be easily grafted into \.{CWEAVE}'s
-existing code without major surgery.
-
- at d max_meanings 100 /* max temporary meanings per section */
- at d max_titles 100 /* max distinct program or header names in meanings */
-
-@<Type...@>=
-typedef struct {
-  name_pointer id; /* identifier whose meaning is being recorded */
-  sixteen_bits prog_no; /* title of program or header in which defined */
-  sixteen_bits sec_no; /* section number in which defined */
-  char tex_part[max_tex_chars]; /* \TeX\ part of meaning */
-} meaning_struct;
-
-@ @<Private...@>=
-struct perm_meaning {
-  meaning_struct perm; /* current meaning of an identifier */
-  int stamp; /* last section number in which further output suppressed */
-  struct perm_meaning *link; /* another meaning to output in this section */
-} cur_meaning[max_names]; /* the current ``permanent'' meanings */
-static struct perm_meaning *top_usage; /* first meaning to output in this section */
-static meaning_struct temp_meaning_stack[max_meanings]; /* the current ``temporary'' meanings */
-static meaning_struct *temp_meaning_ptr; /* first available slot in |temp_meaning_stack| */
-static meaning_struct *max_temp_meaning_ptr; /* its maximum value so far */
-static name_pointer title_code[max_titles]; /* program names seen so far */
-static name_pointer *title_code_ptr; /* first available slot in |title_code| */
-static char ministring_buf[max_tex_chars]; /* \TeX\ code being generated */
-static char *ministring_ptr; /* first available slot in |ministring_buf| */
-static boolean ms_mode; /* are we outputting to |ministring_buf|? */
-
-@ @<Set init...@>=
-max_temp_meaning_ptr=temp_meaning_stack;
-title_code_ptr=title_code;
-ms_mode=false;
-
-@ Here's a routine that converts a program title from the buffer
-into an internal number for the |prog_no| field of a meaning.
-It advances |loc| past the title found.
-
- at c static sixteen_bits title_lookup(void)
-{
-  char *first,*last; /* boundaries */
-  int balance; /* excess of left over right */
-  register name_pointer *p;
-  first=loc;
-  if (*loc=='"') {
-    while (++loc<=limit && *loc!='"') if (*loc=='\\') loc++;
-  } else if (*loc=='{') {
-    balance=1;
-    while (++loc<=limit) {
-      if (*loc=='}' && --balance==0) break;
-      if (*loc=='{') balance++;
-    }
-  } else err_print(_("! Title should be enclosed in braces or doublequotes"));
-  last=++loc;
-  if (last>limit) err_print(_("! Title name didn't end"));
-  if (title_code_ptr==&title_code[max_titles]) overflow(_("titles"));
-  *title_code_ptr=id_lookup(first,last,title);
-  for (p=title_code;;p++) if (*p==*title_code_ptr) break;
-  if (p==title_code_ptr) title_code_ptr++;
-  return p-title_code;
-}
-
-@ @<Give a default title to the program, if necessary@>=
-if (title_code_ptr==title_code) { /* no \.{\\def\\title} found in limbo */
-  char *saveloc=loc,*savelimit=limit;
-  loc=limit+1; limit=loc;
-  *limit++='{';
-  memcpy(limit,tex_file_name,strlen(tex_file_name)-4);
-  limit+=strlen(tex_file_name)-4;
-  *limit++='}';
-  title_lookup();
-  loc=saveloc; limit=savelimit;
-}
-
-@ The |new_meaning| routine changes the current ``permanent meaning''
-when an identifier is redeclared. It gets the |tex_part| from
-|ministring_buf|.
-
- at c
-static void
-new_meaning(
-  name_pointer p)
-{
-  struct perm_meaning *q=p-name_dir+cur_meaning;
-  ms_mode=false;
-  if (q->stamp!=section_count) {
-    if (*(ministring_ptr-1)==' ') ministring_ptr--;
-    if (ministring_ptr>=&ministring_buf[max_tex_chars])
-      strcpy(ministring_buf,"\\zip"); /* ignore |tex_part| if too long */
- at .\\zip@>
-    else *ministring_ptr='\0';
-    q->perm.prog_no=0; /* |q->perm.id=p| */
-    q->perm.sec_no=section_count;
-    strcpy(q->perm.tex_part,ministring_buf);
-  }
-  @<Write the new meaning to the \.{.aux} file@>;
-}
-
-@ @<Write the new meaning to the \.{.aux} file@>=
-{@+int n=q->perm.prog_no;
-  fprintf(aux_file,"@@$%.*s %.*s",@|
-     (int)((p+1)->byte_start-p->byte_start),p->byte_start,@|
-      (int)((title_code[n]+1)->byte_start-title_code[n]->byte_start),
-         title_code[n]->byte_start);
-  if (*(title_code[n]->byte_start)=='{') fprintf(aux_file,"%d",q->perm.sec_no);
-  fprintf(aux_file," %s@@>\n",q->perm.tex_part);
-}
+ at x
+ at d max_toks 20000 /* number of symbols in \CEE/ texts being parsed;
+  must be less than 65536 */
+ at d max_texts 4000 /* number of phrases in \CEE/ texts being parsed;
+  must be less than 10240 */
+ at y
+ at d max_toks 65535 /* number of symbols in \CEE/ texts being parsed;
+  must be less than 65536 */
+ at d max_texts 10239 /* number of phrases in \CEE/ texts being parsed;
+  must be less than 10240 */
 @z
 
 @x
- at d append_xref(c) if (xref_ptr==xmem_end) overflow("cross-reference");
+@ Here are the three procedures needed to complete |id_lookup|:
 @y
- at d append_xref(c) if (xref_ptr==xmem_end) overflow(_("cross-reference"));
+@ Here are the three procedures needed to complete |id_lookup|:
+ at s perm_meaning int
 @z
 
 @x
   p->ilk=t; init_node(p);
 @y
-  struct perm_meaning *q=p-name_dir+cur_meaning;
+  struct perm_meaning *q=get_meaning(p);
   p->ilk=t; init_node(p);
   q->stamp=0;
   q->link=NULL;
@@ -427,27 +177,33 @@
 @z
 
 @x
+@ And here's a small helper function to simplify the code.
+
+ at d update_node(p) (p)->xref=(void *)xref_ptr
+ at y
+@ And here are two small helper functions to simplify the code.
+
+ at d update_node(p) (p)->xref=(void *)xref_ptr
+ at d get_meaning(p) (p)-name_dir+cur_meaning
+ at z
+
+ at x
 id_lookup("extern",NULL,int_like);
 @y
+@#
 ext_loc=id_lookup("extern",NULL,int_like)-name_dir;
+@#
 @z
 
 @x
 id_lookup("int",NULL,raw_int);
 @y
+@#
 int_loc=id_lookup("int",NULL,raw_int)-name_dir;
+@#
 @z
 
 @x
-id_lookup("make_pair",NULL,func_template);
- at y
-id_lookup("make_pair",NULL,func_template);
-
-@ @<Private...@>=
-static sixteen_bits int_loc, ext_loc; /* locations of special reserved words */
- at z
-
- at x
 @d ord 0207 /* control code for `\.{@@'}' */
 @d join 0210 /* control code for `\.{@@\&}' */
 @d thin_space 0211 /* control code for `\.{@@,}' */
@@ -560,24 +316,24 @@
 @z
 
 @x
-    case translit_code: err_print("! Use @@l in limbo only"); continue;
+  case translit_code: err_print("! Use @@l in limbo only"); continue;
 @y
-    case translit_code: err_print(_("! Use @@l in limbo only")); continue;
+  case translit_code: err_print(_("! Use @@l in limbo only")); continue;
 @z
 
 @x
-    case underline: xref_switch=def_flag; continue;
+  case underline: xref_switch=def_flag; continue;
 @y
-    case underline: xref_switch=def_flag; continue;
-    case temp_meaning: temp_switch=true-temp_switch; continue;
-    case right_start: right_start_switch=true; continue;
+  case underline: xref_switch=def_flag; continue;
+  case temp_meaning: temp_switch=!temp_switch; continue;
+  case right_start: right_start_switch=true; continue;
 @z
 
 @x
-    case xref_roman: case xref_wildcard: case xref_typewriter: case noop:
+  case xref_roman: case xref_wildcard: case xref_typewriter: case noop:
 @y
-    case xref_roman: case xref_wildcard: case xref_typewriter: case noop:
-    case meaning: case suppress:
+  case xref_roman: case xref_wildcard: case xref_typewriter: case noop:
+  case meaning: case suppress:
 @z
 
 @x
@@ -605,11 +361,9 @@
 @z
 
 @x
-static void
 skip_restricted(void)
 {
 @y
-static void
 skip_restricted(void)
 { int c=ccode[(eight_bits)*(loc-1)];
 @z
@@ -631,64 +385,13 @@
 @y
 @.Control codes are forbidden...@>
     if (c==meaning && phase==2) @<Process a user-generated meaning@>@;
-    else if (c==suppress && phase==2) @<Suppress mini-index entry@>;
-  }
-}
-
-@ @<Suppress mini-index entry@>=
-{ char *first=id_first,*last=id_loc;
-  while (xisspace(*first)) first++;
-  while (xisspace(*(last-1))) last--;
-  if (first<last) {
-    struct perm_meaning *q=id_lookup(first,last,normal)-name_dir+cur_meaning;
-    q->stamp=section_count; /* this is what actually suppresses output */
-  }
-}
-
-@ @<Process a user-generated meaning@>=
-{ char *first=id_first;
-  while (xisspace(*first)) first++;
-  loc=first;
-  while (xisalpha(*loc)||xisdigit(*loc)||*loc=='_') loc++;
-  if (*loc++!=' ')
-    err_print(_("! Identifier in meaning should be followed by space"));
-  else { name_pointer p=id_lookup(first,loc-1,normal);
-    sixteen_bits t; int n=0;
-    t=title_lookup();
-    if (*(loc-1)=='}')
-      while (xisdigit(*loc)) n=10*n+(*loc++)-'0';
-    if (*loc++!=' ')
-      err_print(_("! Location in meaning should be followed by space"));
-    else @<Digest the meaning of |p|, |t|, |n|@>;
-  }
-  loc=id_loc+2;
-}
-
-@ @<Digest...@>=
-{ meaning_struct *m;
-  struct perm_meaning *q=p-name_dir+cur_meaning;
-  if (temp_switch) {
-    m=temp_meaning_ptr++;
-    if (temp_meaning_ptr>max_temp_meaning_ptr) {
-      if (temp_meaning_ptr>&temp_meaning_stack[max_meanings])
-        overflow(_("temp meanings"));
-      max_temp_meaning_ptr=temp_meaning_ptr;
-    }
-  } else m=&(q->perm);
-  m->id=p;
-  m->prog_no=t;
-  m->sec_no=n;
-  if (id_loc-loc>=max_tex_chars) strcpy(m->tex_part,"\\zip");
- at .\\zip@>
-  else { char *q=m->tex_part;
-    while (loc<id_loc) *q++=*loc++;
-    *q='\0';
+    else if (c==suppress && phase==2) @<Suppress mini-index entry@>@;
 @z
 
 @x
-  if (loc>=limit) err_print("! Verbatim string didn't end");
+if (loc>=limit) err_print("! Verbatim string didn't end");
 @y
-  if (loc>=limit) err_print(_("! Verbatim string didn't end"));
+if (loc>=limit) err_print(_("! Verbatim string didn't end"));
 @z
 
 @x
@@ -695,7 +398,7 @@
   skip_limbo(); change_exists=false;
 @y
   skip_limbo();
-  @<Give a default title to the program, if necessary@>;
+  @<Give a default title to the program, if necessary@>@;
 @z
 
 @x
@@ -735,15 +438,15 @@
 @z
 
 @x
-    err_print("! Missing left identifier of @@s");
+  err_print("! Missing left identifier of @@s");
 @y
-    err_print(_("! Missing left identifier of @@s"));
+  err_print(_("! Missing left identifier of @@s"));
 @z
 
 @x
-      err_print("! Missing right identifier of @@s");
+    err_print("! Missing right identifier of @@s");
 @y
-      err_print(_("! Missing right identifier of @@s"));
+    err_print(_("! Missing right identifier of @@s"));
 @z
 
 @x
@@ -800,7 +503,7 @@
 @y
 @d out(c)
  {if (ms_mode) { /* outputting to |ministring_buf| */
-    if (ministring_ptr<&ministring_buf[max_tex_chars])
+    if (ministring_ptr<ministring_buf_end)
       *ministring_ptr++=c;
   } else {
      if (out_ptr>=out_buf_end) break_out();
@@ -823,7 +526,7 @@
 @z
 
 @x
-  if(changed_section[n]) out_str ("\\*");
+  if (changed_section[n]) out_str("\\*");
 @.\\*@>
 @y
 @z
@@ -872,10 +575,10 @@
 @z
 
 @x
- at d end_arg 62 /* \.{@@]} */
+ at d attr_head 69 /* denotes beginning of attribute */
 @y
- at d end_arg 62 /* \.{@@]} */
- at d title 63 /* program name or header name in a ``meaning'' */
+ at d attr_head 69 /* denotes beginning of attribute */
+ at d title 70 /* program name or header name in a ``meaning'' */
 @z
 
 @x
@@ -899,24 +602,29 @@
 @z
 
 @x
- at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+ at d inner_tok_flag (5*id_flag) /* signifies a token list in `\pb' */
 
 @c
 static void
-print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
+print_text( /* prints a token list for debugging; not used in |main| */
 @y
- at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+ at d inner_tok_flag (5*id_flag) /* signifies a token list in `\pb' */
 
- at c
+@<Predecl...@>=
 #if 0
-static void
-print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
+static void print_text(text_pointer p);
+#endif
+
+@ @c
+#if 0
+ at t\4\4@>static void
+print_text( /* prints a token list for debugging; not used in |main| */
 @z
 
 @x
   update_terminal;
 @y
-  printf("|\n"); update_terminal;
+  puts("|"); update_terminal;
 @z
 
 @x
@@ -929,10 +637,6 @@
 @x
 @ @<Predecl...@>=@+static void print_text(text_pointer p);
 @y
-@ @<Predecl...@>=
-#if 0
-static void print_text(text_pointer p);
-#endif
 @z
 
 @x
@@ -964,132 +668,9 @@
 @z
 
 @x
-  r->num=m; /* everything from |q| on is left undisturbed */
- at y
-  r->num=m; /* everything from |q| on is left undisturbed */
-
-@ \.{CTWILL} needs the following procedure, which appends tokens of a
-translated text until coming to |tok_loc|, then suppresses text that may
-appear between parentheses or brackets. The calling routine should set
-|ident_seen=false| first. (This is admittedly tricky.)
-
- at c boolean ident_seen;
-static boolean app_supp(
-  text_pointer p)
-{ token_pointer j;
-  text_pointer q;
-  if (ident_seen && **p>=tok_flag) {
-    q=**p-tok_flag+tok_start;
-    if (**q=='(') {
-      app('(');@+app('\\');@+app(',');@+app(')'); goto catch14;
-    }
-    if (**q=='[') {
-      app('[');@+app('\\');@+app(',');@+app(']'); goto catch14;
-    }
-  }
-  for (j=*p;j<*(p+1);j++) {
-    if (*j<tok_flag) {
-      if (*j==inserted) return false;
-      if (j==tok_loc) ident_seen=true;
-      else app(*j);
-    } else if (*j>=inner_tok_flag) confusion(_("inner"));
-    else if (app_supp(*j-tok_flag+tok_start)) goto catch14;;
-  }
-  return false;
-catch14: if (*(*(p+1)-1)=='9') return true; /* production 14 was used */
-  else return false;
-}
-
-@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|,
-which tries to figure out a symbolic form of definition after
-|make_underlined(pp+l)| has been called. We rely heavily on the
-existing productions, which force the translated texts to have a
-structure that's decodable even though the underlying |cat| and |mathness|
-codes have disappeared.
-
- at c static void
-make_ministring(
-  int l) /* 0, 1, or 2 */
-{
-  text_pointer q,r;
-  name_pointer cn;
-  token t;
-  int ast_count; /* asterisks preceding the expression */
-  boolean non_ast_seen; /* have we seen a non-asterisk? */
-  if (tok_loc<=operator_found) return;
-  cn=((*tok_loc)%id_flag)+name_dir;
-  @<Append the type of the declaree; |return| if it begins with \&{extern}@>;
-  null_scrap.mathness=(((pp+l)->mathness)%4)*5; big_app1(&null_scrap);
-    /* now we're ready for the mathness that follows (I think) */
-    /* (without the mod 4 times 5, comments posed a problem) */
-    /* (namely in cases like |int a(b,c)| followed by comment) */
-  ident_seen=false;@+app_supp((pp+l)->trans);
-  null_scrap.mathness=10; big_app1(&null_scrap);
-   /* now |cur_mathness==no_math| */
-  ms_mode=true; ministring_ptr=ministring_buf;
-  if (l==2) *ministring_ptr++='=';
-  make_output(); /* translate the current text into a ministring */
-  tok_ptr=*(--text_ptr); /* delete that text */
-  new_meaning(cn);
-  cur_mathness=maybe_math; /* restore it */
-}
-
-@ Here we use the fact that a |decl_head| comes from |int_like| only in
-production~27, whose translation is fairly easy to recognize. (Well,
-production 28 has been added for \CPLUSPLUS/, but we hope that doesn't
-mess us up.) And we also use other similar facts.
-
-If an identifier is given an \&{extern} definition, we don't change
-its current meaning, but we do suppress mini-index entries to its
-current meaning in other sections.
-
-@<Append the type of the declaree; |return| if it begins with \&{extern}@>=
-if (l==0) { app(int_loc+res_flag); app(' '); cur_mathness=no_math; }
-else {
-  q=(pp+l-1)->trans;
-  ast_count=0;
-  non_ast_seen=false;
-  while (true) {
-    if (*(q+1)==*q+1) {
-      r=q;@+break; /* e.g. \&{struct}; we're doing production 45 or 46 */
-    }
-    if (**q<tok_flag) confusion(_("find type"));
-    r=**q-tok_flag+tok_start;
-    if ((t=*(*(q+1)-2))>=tok_flag && **(t-tok_flag+tok_start)=='*') {
-           /* production 34 */
-      if (!non_ast_seen) ast_count++; /* count immediately preceding |*|'s */
-    } else non_ast_seen=true;
-    if (*(*q+1)==' ' && *(q+1)==*q+2) break; /* production 27 */
-    if (*(*q+1)=='{' && *(*q+2)=='}' && *(*q+3)=='$' && *(*q+4)==' '@|
-       && *(q+1)==*q+5) break; /* production 27 in disguise */
-    q=r;
-  }
-  while (**r>=tok_flag) {
-    if (*(r+1)>*r+9 && *(*r+1)=='{' && *(*r+2)=='}' && *(*r+3)=='$' @|
-        && *(*r+4)==indent) q=**r-tok_flag+tok_start; /* production 49 */
-    r=**r-tok_flag+tok_start;
-  }
-  if (**r==ext_loc+res_flag) return; /* \&{extern} gives no definition */
-  @<Append tokens for type |q|@>;
-}
-
-@ @<Append tokens for type |q|@>=
-cur_mathness=no_math; /* it was |maybe_math| */
-if (*(q+1)==*q+8 && *(*q+1)==' ' && *(*q+3)==' ') {
-  app(**q);@+app(' ');@+app(*(*q+2)); /* production 46 */
-} else if ((t=*(*(q+1)-1))>=tok_flag && **(r=t-tok_flag+tok_start)=='\\'
-   && *(*r+1)=='{') app(**q); /* |struct_like| identifier */
-else app((q-tok_start)+tok_flag);
-while (ast_count) {
-  big_app('{');@+app('*');@+app('}');@+ast_count--;
-}
-
- at z
-
- at x
 @<Cases for |exp|@>=
 if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  make_underlined(pp); big_app1(pp); big_app(indent); app(indent);
+  make_underlined(pp); big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,1);
 }
 @y
@@ -1097,16 +678,13 @@
 if(cat1==lbrace || cat1==int_like || cat1==decl) {
   make_underlined(pp);
   make_ministring(0);
-  big_app1(pp);
-  if (indent_param_decl) {
-    big_app(indent); app(indent);
-  }
+  if (indent_param_decl) big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,1);
 }
 @z
 
 @x
-  make_underlined (pp);  squash(pp,2,tag,-1,7);
+  make_underlined (pp); squash(pp,2,tag,-1,7);
 @y
   make_underlined (pp);
   if (tok_loc>operator_found) {
@@ -1123,10 +701,9 @@
   big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33);
 }
 else if (cat1==ubinop) {
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
-  reduce(pp,2,decl_head,-1,34);
+  big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,decl_head,-1,34);
 }
-else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
+else if (cat1==exp && cat2!=lpar && cat2!=lbrack && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1); squash(pp,2,decl_head,-1,35);
 }
 else if ((cat1==binop||cat1==colon) && cat2==exp && (cat3==comma ||
@@ -1134,7 +711,7 @@
   squash(pp,3,decl_head,-1,36);
 else if (cat1==cast) squash(pp,2,decl_head,-1,37);
 else if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  big_app1(pp); big_app(indent); app(indent); reduce(pp,1,fn_decl,0,38);
+  big_app(dindent); big_app1(pp); reduce(pp,1,fn_decl,0,38);
 }
 else if (cat1==semi) squash(pp,2,decl,-1,39);
 @y
@@ -1143,10 +720,10 @@
   big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33);
 }
 else if (cat1==ubinop) {
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
+  big_app1_insert(pp,'{'); big_app('}');
   reduce(pp,2,decl_head,-1,34);
 }
-else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
+else if (cat1==exp && cat2!=lpar && cat2!=lbrack && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1);
   make_ministring(1);
   squash(pp,2,decl_head,-1,35);
@@ -1156,10 +733,7 @@
   squash(pp,3,decl_head,-1,36);
 else if (cat1==cast) squash(pp,2,decl_head,-1,37);
 else if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  big_app1(pp);
-  if (indent_param_decl) {
-    big_app(indent); app(indent);
-  }
+  if (indent_param_decl) big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,38);
 }
 else if (cat1==semi) squash(pp,2,decl,-1,39);
@@ -1168,24 +742,19 @@
 @x
 @ @<Cases for |decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1);
-  reduce(pp,2,decl,-1,40);
+  big_app1_insert(pp,force); reduce(pp,2,decl,-1,40);
 }
 else if (cat1==stmt || cat1==function) {
-  big_app1(pp); big_app(big_force);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,41);
+  big_app1_insert(pp,big_force); reduce(pp,2,cat1,-1,41);
 }
 @y
 @ @<Cases for |decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1);
-  reduce(pp,2,decl,-1,40);
+  big_app1_insert(pp,force); reduce(pp,2,decl,-1,40);
 }
 else if (cat1==stmt || cat1==function) {
-  big_app1(pp);
-  if(order_decl_stmt) big_app(big_force);
-  else big_app(force);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,41);
+  big_app1_insert(pp,order_decl_stmt ? big_force : force);
+  reduce(pp,2,cat1,-1,41);
 }
 @z
 
@@ -1199,7 +768,7 @@
 @x
 @ @<Cases for |fn_decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51);
+  big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51);
 }
 else if (cat1==stmt) {
   big_app1(pp); app(outdent); app(outdent); big_app(force);
@@ -1208,7 +777,7 @@
 @y
 @ @<Cases for |fn_decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51);
+  big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51);
 }
 else if (cat1==stmt) {
   big_app1(pp);
@@ -1215,18 +784,24 @@
   if (indent_param_decl) {
     app(outdent); app(outdent);
   }
-  big_app(force);
-  big_app1(pp+1); reduce(pp,2,function,-1,52);
+  big_app(force); big_app1(pp+1); reduce(pp,2,function,-1,52);
 }
 @z
 
 @x
+  big_app1_insert(pp,dindent); reduce(pp,2,fn_decl,0,73);
+ at y
+  big_app1(pp); if (indent_param_decl) big_app(dindent);
+  big_app1(pp+1); reduce(pp,2,fn_decl,0,73);
+ at z
+
+ at x
 if (cat1==define_like) make_underlined(pp+2);
 @y
-if (cat1==define_like) { /* \.{\#define} is analogous to \&{extern} */
+if (cat1==define_like) { /* \#\&{define} is analogous to \&{extern} */
   make_underlined(pp+2);
   if (tok_loc>operator_found) {
-    /* no time to work out this case; I'll handle defines by brute force
+    /* no time to work out this case; I'll handle \&{define}s by brute force
        in the \.{aux} file, since they usually don't go in mini-index */
   }
 }
@@ -1241,9 +816,9 @@
 @z
 
 @x
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,else_like,-2,102);
+  big_app1_insert(pp,' '); reduce(pp,2,else_like,-2,102);
 @y
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,else_like,-2,123);
+  big_app1_insert(pp,' '); reduce(pp,2,else_like,-2,123);
 @z
 
 @x
@@ -1251,11 +826,11 @@
 if ((cat1==int_like || cat1==cast) && (cat2==comma || cat2==semi))
   squash(pp+1,1,exp,-1,115);
 else if (cat1==int_like) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,typedef_like,0,116);
+  big_app1_insert(pp,' '); reduce(pp,2,typedef_like,0,116);
 }
 else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1); make_reserved(pp+1);
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,typedef_like,0,117);
+  big_app1_insert(pp,' '); reduce(pp,2,typedef_like,0,117);
 }
 else if (cat1==comma) {
   big_app2(pp); big_app(' '); reduce(pp,2,typedef_like,0,118);
@@ -1262,8 +837,7 @@
 }
 else if (cat1==semi) squash(pp,2,decl,-1,119);
 else if (cat1==ubinop && (cat2==ubinop || cat2==cast)) {
-  big_app('{'); big_app1(pp+1); big_app('}'); big_app1(pp+2);
-  reduce(pp+1,2,cat2,0,120);
+  big_app('{'); big_app1_insert(pp+1,'}'); reduce(pp+1,2,cat2,0,120);
 }
 @y
 @ Here \.{CTWILL} deviates from the normal productions introduced in
@@ -1299,9 +873,9 @@
 @z
 
 @x
-    if (tok_ptr+6>tok_mem_end) overflow("token");
+  if (tok_ptr+6>tok_mem_end) overflow("token");
 @y
-    if (tok_ptr+6>tok_mem_end) overflow(_("token"));
+  if (tok_ptr+6>tok_mem_end) overflow(_("token"));
 @z
 
 @x
@@ -1343,7 +917,7 @@
       else app_scrap(p->ilk,maybe_math);
     }
   }
-  @<Flag the usage of this identifier, for the mini-index@>;
+  @<Flag the usage of this identifier, for the mini-index@>@;
 @z
 
 @x
@@ -1353,11 +927,9 @@
 @z
 
 @x
-to \.{\\PB}, if the user has invoked \.{CWEAVE} with the \.{+e} flag.
-Although \.{cwebmac} ignores \.{\\PB}, other macro packages
+to \.{\\PB}.  Although \.{cwebmac} ignores \.{\\PB}, other macro packages
 @y
-to \.{\\PB}, if the user has invoked \.{CTWILL} with the \.{+e} flag.
-Although \.{ctwimac} ignores \.{\\PB}, other macro packages
+to \.{\\PB}.  Although \.{ctwimac} ignores \.{\\PB}, other macro packages
 @z
 
 @x
@@ -1398,9 +970,9 @@
 @z
 
 @x
-reset_input(); if (show_progress) fputs("\nWriting the output file...",stdout);
+if (show_progress) fputs("\nWriting the output file...",stdout);
 @y
-reset_input(); if (show_progress) fputs(_("\nWriting the output file..."),stdout);
+if (show_progress) fputs(_("\nWriting the output file..."),stdout);
 @z
 
 @x
@@ -1407,45 +979,11 @@
 section_count=0; format_visible=true; copy_limbo();
 @y
 temp_switch=false; temp_meaning_ptr=temp_meaning_stack;
-@<Read the \.{.aux} file, if present; then open it for output@>;
+@<Read the \.{.aux} file, if present; then open it for output@>@;
 section_count=0; format_visible=true; right_start_switch=false; copy_limbo();
 @z
 
 @x
-while (!input_has_ended) @<Translate the current section@>@;
-}
-
- at y
-while (!input_has_ended) @<Translate the current section@>@;
-}
-
-@ @<Private...@>=
-static FILE *aux_file;
-static char aux_file_name[max_file_name_length]; /* name of \.{.aux} file */
-
-@ @<Read the \.{.aux} file, if present; then open it for output@>=
-memcpy(aux_file_name,tex_file_name,strlen(tex_file_name)-4);
-strcat(aux_file_name,".bux");
-include_depth=1; /* we simulate \.{@@i} */
-strcpy(cur_file_name,aux_file_name); /* first in, third out */
-if ((cur_file=fopen(cur_file_name,"r"))) { cur_line=0; include_depth++; }
-strcpy(aux_file_name+strlen(aux_file_name)-4,".aux");
-strcpy(cur_file_name,aux_file_name); /* second in, second out */
-if ((cur_file=fopen(cur_file_name,"r"))) { cur_line=0; include_depth++; }
-strcpy(cur_file_name,"system.bux"); /* third in, first out */
-if ((cur_file=fopen(cur_file_name,"r"))) cur_line=0;
-else include_depth--;
-if (include_depth) { /* at least one new file was opened */
-  while (get_next()==meaning) ; /* new meaning is digested */
-  if (include_depth) err_print(_("! Only @@$ is allowed in aux and bux files"));
-  finish_line(); loc=buffer; /* now reading beginning of line 1 */
-}
-if ((aux_file=fopen(aux_file_name,"wb"))==NULL)
-  fatal(_("! Cannot open aux output file "),aux_file_name);
-
- at z
-
- at x
 static boolean group_found=false; /* has a starred section occurred? */
 
 @ @<Translate the current section@>= {
@@ -1479,15 +1017,15 @@
 @y
 @.\\N@>
   if (right_start_switch) {
-    out_str("N"); right_start_switch=false;
+    out('N'); right_start_switch=false;
 @.\\NN@>
   }
 @z
 
 @x
-out_str("{");out_section(section_count); out_str("}");
+out('{'); out_section(section_count); out('}');
 @y
-out_str("{");out_section(section_count); out_str("}");
+out('{'); out_section(section_count); out('}');
 flush_buffer(out_ptr,false,false);
 @z
 
@@ -1495,7 +1033,7 @@
     case '@@': out('@@'); break;
 @y
     case '@@': out('@@'); break;
-    case temp_meaning: temp_switch=true-temp_switch; break;
+    case temp_meaning: temp_switch=!temp_switch; break;
     case right_start: right_start_switch=true; break;
 @z
 
@@ -1524,15 +1062,10 @@
 }
 @y
   outer_parse();
-  if (is_macro) @<Make ministring for a new macro@>;
+  if (is_macro) @<Make ministring for a new macro@>@;
   finish_C(format_visible); format_visible=true;
   doing_format=false;
 }
-
-@ @<Private...@>=
-static boolean is_macro; /* it's a macro def, not a format def */
-static int def_diff; /* 0 iff the current macro has parameters */
-static name_pointer id_being_defined; /* the definee */
 @z
 
 @x
@@ -1551,13 +1084,13 @@
 @x
 @.Improper macro definition@>
   else {
-    app('$'); app_cur_id(false);
+    app_cur_id(false);
 @y
 @.Improper macro definition@>
   else {
     id_being_defined=id_lookup(id_first,id_loc,normal);
-    app('$'); app_cur_id(false);
-    def_diff=*loc-'(';
+    app_cur_id(false);
+    def_diff=(*loc!='(');
 @z
 
 @x
@@ -1570,22 +1103,6 @@
 @ @<Start a format...@>= {
   doing_format=true;
 @y
-@ @<Make ministring for a new macro@>=
-{
-  ms_mode=true; ministring_ptr=ministring_buf;
-  *ministring_ptr++='=';
-  if (def_diff) { /* parameterless */
-    scrap_pointer s=scrap_ptr;
-    text_pointer t;
-    token_pointer j;
-    while (s->cat==insert) s--;
-    if ((s-1)->cat==dead && s->cat==exp && **(t=s->trans)=='\\'
-         && *(*t+1)=='T') /* it's just a constant */
-      for (j=*t;j<*(t+1);j++) *ministring_ptr++=*j;
-    else out_str("macro");
-  } else out_str("macro (\\,)");
-  new_meaning(id_being_defined);
-}
 
 @ @<Start a format...@>= {
   doing_format=true;
@@ -1617,94 +1134,10 @@
 @y
 finish_line(); out_str("\\mini"); finish_line();
 @.\\mini@>
-@<Output information about usage of id's defined in other sections@>;
+@<Output information about usage of id's defined in other sections@>@;
 out_str("}\\FI"); finish_line();
 @.\\FI@>
 flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */
-
-@ The following code is performed for each identifier parsed during
-a section. Variable |top_usage| is always nonzero; it has the sentinel
-value~1 initially, then it points to each variable scheduled for
-possible citation. A variable is on this list if and only if its
-|link| field is nonzero. All variables mentioned in the section are
-placed on the list, unless they are reserved and their current
-\TeX\ meaning is uninitialized.
-
-@<Flag the usage of this identifier, for the mini-index@>=
-{ struct perm_meaning *q=p-name_dir+cur_meaning;
-  if (!(abnormal(p)) || strcmp(q->perm.tex_part,"\\uninitialized")!=0)
-    if (q->link==0) {
-      q->link=top_usage;
-      top_usage=q;
-    }
-}
-
-@ @<Output information about usage of id's defined in other sections@>=
-{ struct perm_meaning *q;
-  while (temp_meaning_ptr>temp_meaning_stack) {
-    out_mini(--temp_meaning_ptr);
-    q=temp_meaning_ptr->id-name_dir+cur_meaning;
-    q->stamp=section_count; /* suppress output from ``permanent'' data */
-  }
-  while (top_usage!=usage_sentinel) {
-    q=top_usage;
-    top_usage=q->link;
-    q->link=NULL;
-    if (q->stamp!=section_count) out_mini(&(q->perm));
-  }
-}
-
-@ @c static void
-out_mini(
-  meaning_struct *m)
-{ char s[60];
-  name_pointer cur_name=m->id;
-  if (m->prog_no==0) { /* reference within current program */
-    if (m->sec_no==section_count) return; /* defined in current section */
-    sprintf(s,"\\[%d",m->sec_no);
-  } else { name_pointer n=title_code[m->prog_no];
-    if (*(n->byte_start)=='{')
-      sprintf(s,"\\]%.*s%d",(int)((n+1)->byte_start-n->byte_start),n->byte_start,
-             m->sec_no);
-    else sprintf(s,"\\]%.*s",(int)((n+1)->byte_start-n->byte_start),n->byte_start);
-  }
-  out_str(s); out(' ');
-  @<Mini-output the name at |cur_name|@>;
-  out(' '); out_str(m->tex_part); finish_line();
-}
-
-@ @<Predec...@>=@+static void out_mini(meaning_struct *);
-
-@ @<Mini-output...@>=
-switch (cur_name->ilk) {
-  case normal: case func_template: if (length(cur_name)==1) out_str("\\|");
-    else {char *j;
-      for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
-        if (xislower(*j)) goto lowcase;
-      out_str("\\."); break;
-lowcase: out_str("\\\\");
-    }
-  break;
- at .\\|@>
- at .\\.@>
- at .\\\\@>
-  case roman: break;
-  case wildcard: out_str("\\9"); break;
- at .\\9@>
-  case typewriter: out_str("\\."); break;
- at .\\.@>
-  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);
-    out('$');
-    goto name_done;
-    }
-  default: out_str("\\&");
- at .\\\&@>
-}
-out_name(cur_name,true);
-name_done:
-
 @z
 
 @x
@@ -1776,21 +1209,20 @@
 @z
 
 @x
-@ @<Tell about changed sections@>= {
-  /* remember that the index is already marked as changed */
-  k_section=0;
+@ @<Tell about changed sections@>=
+/* remember that the index is already marked as changed */
+k_section=0;
+while (!changed_section[++k_section]);
+out_str("\\ch ");
+ at .\\ch@>
+out_section(k_section);
+while (k_section<section_count) {
   while (!changed_section[++k_section]);
-  out_str("\\ch ");
- at .\\ch@>
-  out_section(k_section);
-  while (k_section<section_count) {
-    while (!changed_section[++k_section]);
-    out_str(", "); out_section(k_section);
-  }
-  out('.');
+  out_str(", "); out_section(k_section);
 }
-
+out('.');
 @y
+@ No need to tell about changed sections.
 @z
 
 @x
@@ -1801,34 +1233,42 @@
 
 @x
 @ @<Output the name...@>=
+switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
 @y
 @ We don't format the index completely; the \.{twinx} program does the
 rest of the job.
 
 @<Output the name...@>=
+switch (cur_name->ilk) {
 @z
 
 @x
-  case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|");
+  case normal: case func_template:
 @y
-  case normal: if (is_tiny(cur_name)) out_str("\\|");
+  case normal:
 @z
 
 @x
+    else {
+ at y
+    else {@+char *j;@+ at t}\6{@>
+ at z
+
+ at x
   case wildcard: out_str("\\9");@+ goto not_an_identifier;
 @y
-  case roman: out_str("  "); goto not_an_identifier;
-  case wildcard: out_str("\\9"); goto not_an_identifier;
+  case roman: out_str("  ");@+ goto not_an_identifier;
+  case wildcard: out_str("\\9");@+ goto not_an_identifier;
 @z
 
 @x
   case roman: not_an_identifier: out_name(cur_name,false); goto name_done;
-  case custom: {char *j; out_str("$\\");
+  case custom:
+    out_str("$\\");
     for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
       out(*j=='_'? 'x': *j=='$'? 'X': *j);
     out('$');
     goto name_done;
-    }
 @y
 not_an_identifier: out_name(cur_name,false); goto name_done;
   case custom: out_str("\\$"); break;
@@ -1838,14 +1278,7 @@
 @x
 out_name(cur_name,true);
 @y
-if (proofing) out_name(cur_name,true);
-else {
-  out('{');
-  {char *j;
-    for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++) out(*j);
-  }
-  out('}');
-}
+out_name(cur_name,proofing);
 @z
 
 @x
@@ -1900,20 +1333,636 @@
 @x
 @** Index.
 @y
-@** 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.
+ at q Section 271. @>
+@** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}.  The following sections
+introduce material that is specific to \.{CTWILL}.
 
-\bigskip
-\font\itt=cmitt10
-{\noindent \it Although \.{\itt CTWILL} is based on \.{\itt cweave.w}, new and
-modified material is incorporated all over the place, without taking special
-care for keeping the original section numbering intact.}
+Care has been taken to keep the original section numbering of \.{CWEAVE}
+up to this point intact, so this new material should nicely integrate
+with the original ``\&{271.~Index}.''
 
+ at q Section 2->272. @>
+@* {\tentex CTWILL} user manual.
+Here is a sort of user manual for \.{CTWILL}---which is exactly like
+\.{CWEAVE} except that it produces much better documentation, for which you
+must work harder. As with \.{CWEAVE}, input comes from a source file
+\.{foo.w} and from an optional (but now almost mandatory) change file
+\.{foo.ch}; output goes to \.{foo.tex}, \.{foo.idx}, and \.{foo.scn}.
+Unlike \.{CWEAVE}, there is an additional output file, \.{foo.aux},
+which records all nonexternal definitions.  The \.{.aux} file also
+serves as an input file on subsequent runs. You should run \.{CTWILL}
+twice, once to prime the pump and once to get decent answers.
+
+Moreover, you must run the output twice through \TeX. (This double duplicity
+suggested the original name \.{TWILL}.) After `\.{tex} \.{foo}' you
+will have output that looks like final pages except that the entries
+of mini-indexes won't be alphabetized. \TeX\ will say `This is the first
+pass', and it will produce a weird file called \.{foo.ref}. Say
+$$\.{refsort < foo.ref > foo.sref}$$
+and then another `\.{tex} \.{foo}' will produce alphabetized output.
+While \TeX\ runs it emits messages filled with numeric data, indicating how
+much space is consumed by each program section. If you can decipher these
+numbers (see \.{ctwimac.tex}), you can use them to fine-tune the page
+layout. You might be tempted to do fine tuning by editing \.{foo.tex}
+directly, but it's better to incorporate all changes into \.{foo.ch}.
+
+The mini-indexes list identifiers that are used but not defined on
+each two-page spread. At the end of each section, \.{CTWILL} gives
+\TeX\ a list of identifiers used in that section and information
+about where they are defined. The macros in \.{ctwimac.tex} figure out
+which identifiers should go in each mini-index, based on how the pages
+break. (Yes, those macros are pretty hairy.)
+
+The information that \.{CTWILL} concocts from \.{foo.w} is not always
+correct. Sometimes you'll use an identifier that you don't want
+indexed; for example, your exposition might talk about |f(x)| when you
+don't mean to refer to program variables |f| or |x|. Sometimes you'll
+use an identifier that's defined in a header file, unknown to
+\.{CTWILL}. Sometimes you'll define a single identifier in several
+different places, and \.{CTWILL} won't know which definition to choose.
+But all is not lost. \.{CTWILL} guesses right most of the time, and you can
+give it the necessary hints in other places via your change file.
+
+If you think it's easy to write a completely automatic system that doesn't
+make \.{CTWILL}'s mistakes and doesn't depend so much on change files,
+please do so.
+
+\.{CTWILL} uses a very simple method to generate mini-index info. By
+understanding this method, you will understand how to fix it when things
+go wrong. Every identifier has a current ``meaning,'' consisting of its
+abstract type and the number of the section in which it was most recently
+defined. For example, if your \Cee\ program says `\&{char}~$*$|s|' in section~3,
+the meaning of~|s| gets changed to `\&{char}~$*$,~\S3' while \.{CTWILL}
+is processing that section. If you refer to~|s| in section~10, and if
+|s|~hasn't been redefined in the meantime, and if section~10 doesn't
+wind up on the same two-page spread as section~3, the mini-index generated
+by section~10 will say ``|s|:~\&{char}~$*$,~\S3.''
+
+The current meaning of every identifier is initially `\.{\\uninitialized}'.
+Then \.{CTWILL} reads the \.{.aux} file for your job, if any; this
+\.{.aux} file contains all definitions of new meanings in the previous
+run, so it tells \.{CTWILL} about definitions that will be occurring
+in the future. If all identifiers have a unique definition, they will
+have a unique and appropriate meaning in the mini-indexes.
+
+But some identifiers, like parameters to procedures, may be defined
+several times. Others may not be defined at all, because they are
+defined elsewhere and mentioned in header files included by the \Cee\
+preprocessor. To solve this problem, \.{CTWILL} provides mechanisms by which
+the current meaning of an identifier can be temporarily or permanently
+changed.
+
+For example, the operation
+$$\.{@@\$s \{FOO\}3 \\\&\{char\} \$*\$@@>}$$
+changes the current meaning of |s| to the \TeX\ output of `\.{\\\&\{char\}}
+\.{\$*\$}' in section~3 of program {\sc FOO}. All entries in the \.{.aux}
+file are expressed in the form of this \.{@@\$} operator; therefore you
+can use a text editor to paste such entries into a \.{.ch} file, whenever
+you want to tell \.{CTWILL} about definitions that are out of order
+or from other programs.
+
+Before reading the \.{.aux} file, \.{CTWILL} actually looks for a file
+called \.{system.bux}, which will be read if present. And after
+\.{foo.aux}, a third possibility is \.{foo.bux}. The general
+convention is to put definitions of system procedures such as |printf|
+into \.{system.bux}, and to put definitions found in specifically
+foo-ish header files into \.{foo.bux}. Like the \.{.aux}
+files, \.{.bux} files should contain only \.{@@\$} specifications;
+this rule corresponds to the fact that `bux' is the plural of `\$'.
+The \.{.bux} files may also contain \.{@@i} includes.
+
+A companion operation \.{@@\%} signifies that all \.{@@\$}
+specifications from the present point to the beginning of the next
+section will define {\it temporary\/} meanings instead of permanent
+ones. Temporary meanings are placed into the
+mini-index of the current section; the permanent (current) meaning of
+the identifier will not be changed, nor will it appear in the
+mini-index of the section. If several temporary meanings are assigned
+to the same identifier in a section, all will appear in the mini-index.
+Each \.{@@\%} toggles the temporary/permanent convention; thus, after
+an even number of \.{@@\%} operations in a section, meanings specified
+by \.{@@\$} are permanent.
+
+The operation \.{@@-} followed by an identifier followed by \.{@@>}
+specifies that the identifier should not generate a mini-index entry
+in the current section (unless, of course, a temporary meaning is assigned).
+
+If \.{@@-foo@@>} appears in a section where a new permanent meaning is
+later defined by the semantics of~\Cee, the current meaning of \\{foo}
+will not be redefined; moreover, this current meaning, which may have
+been changed by \.{@@\$foo ...@@>}, will also be written to the
+\.{.aux} file. Therefore you can control what \.{CTWILL} outputs; you
+can keep it from repeatedly contaminating the \.{.aux} file with
+things you don't like.
+
+The meaning specified by \.{@@\$...@@>} generally has four components:
+an identifier (followed by space), a program name (enclosed in braces),
+a section number (followed by space), and a \TeX\ part. The \TeX\ part
+must have fewer than 50 characters. If the \TeX\ part starts
+with `\.=', the mini-index entry will contain an equals sign instead
+of a colon; for example,
+$$\.{@@\$buf\_size \{PROG\}10 =\\T\{200\}@@>}$$
+generates either `$\\{buf\_size}=200$, \S10' or
+`$\\{buf\_size}=200$, {\sc PROG}~\S10', depending on whether
+`{\sc PROG}' is or isn't the title of the current program. If the
+\TeX\ part is `\.{\\zip}', the mini-index entry will contain neither
+colon nor equals, just a comma. The program name and section number
+can also be replaced by a string. For example,
+$$\.{@@\$printf "<stdio.h>" \\zip@@>}$$
+will generate a mini-index entry like `\\{printf}, \.{<stdio.h>}.'.
+
+A special ``proofmode'' is provided so that you can check \.{CTWILL}'s
+conclusions about cross-references. Run \.{CTWILL} with the
+flag \.{+P}, and \TeX\ will produce a specially formatted document
+({\it without\/} mini-indexes)
+in which you can check that your specifications are correct.
+You should always do this before generating mini-indexes, because
+mini-indexes can mask errors if page breaks are favorable but the
+errors might reveal themselves later after your program has changed.
+The proofmode output is much easier to check than the mini-indexes themselves.
+
+The control code \.{@@r} or \.{@@R} causes \.{CTWILL} to emit
+the \TeX\ macro `\.{\\shortpage}' just before starting the next
+section of the program. This causes the section to appear at the top of
+a right-hand page, if it would ordinarily have appeared near the bottom
+of a left-hand page and split across the pages. (The \.{\\shortpage} macro
+is fragile and should be used only in cases where it will not mess up
+the output; insert it only when fine-tuning a set of pages.) If the
+next section is a starred section, the behavior is slightly different
+(but still fragile): The starred section will either be postponed to
+a left-hand page, if it normally would begin on a right-hand page,
+or vice versa. In other words, \.{@@r@@*} inverts the left/right logic.
+
+\.{CTANGLE} does not recognize the operations \.{@@\$}, \.{@@\%}, \.{@@-},
+and \.{@@r}, which are unique to \.{CTWILL}. But that is no problem,
+since you use them only in change files set up for book publishing,
+which are quite different from the change files you set up for tangling.
+
+(End of user manual.)
+
+ at d max_tex_chars 50 /* limit on the \TeX\ part of a meaning */
+
+ at q Section 25->273. @>
+@* Temporary and permanent meanings.
+\.{CTWILL} has special data structures to keep track of current
+and temporary meanings. These structures were not designed for maximum
+efficiency; they were designed to be easily grafted into \.{CWEAVE}'s
+existing code without major surgery.
+
+ at d max_meanings 100 /* max temporary meanings per section */
+ at d max_titles 100 /* max distinct program or header names in meanings */
+
+@<Type...@>=
+typedef struct {
+  name_pointer id; /* identifier whose meaning is being recorded */
+  sixteen_bits prog_no; /* title of program or header in which defined */
+  sixteen_bits sec_no; /* section number in which defined */
+  char tex_part[max_tex_chars]; /* \TeX\ part of meaning */
+} meaning_struct;
+
+ at q Section 26->274. @>
+@ @<Private...@>=
+static struct perm_meaning {
+  meaning_struct perm; /* current meaning of an identifier */
+  int stamp; /* last section number in which further output suppressed */
+  struct perm_meaning *link; /* another meaning to output in this section */
+} cur_meaning[max_names]; /* the current ``permanent'' meanings */
+static struct perm_meaning *top_usage; /* first meaning to output in this section */
+static meaning_struct temp_meaning_stack[max_meanings]; /* the current ``temporary'' meanings */
+static meaning_struct *temp_meaning_stack_end=temp_meaning_stack+max_meanings-1;
+  /* end of |temp_meaning_stack| */
+static meaning_struct *temp_meaning_ptr; /* first available slot in |temp_meaning_stack| */
+static meaning_struct *max_temp_meaning_ptr; /* its maximum value so far */
+static name_pointer title_code[max_titles]; /* program names seen so far */
+static name_pointer *title_code_end=title_code+max_titles-1;
+  /* end of |title_code| */
+static name_pointer *title_code_ptr; /* first available slot in |title_code| */
+static char ministring_buf[max_tex_chars]; /* \TeX\ code being generated */
+static char *ministring_buf_end=ministring_buf+max_tex_chars-1;
+  /* end of |ministring_buf| */
+static char *ministring_ptr; /* first available slot in |ministring_buf| */
+static boolean ms_mode; /* are we outputting to |ministring_buf|? */
+
+ at q Section 27->275. @>
+@ @<Set init...@>=
+max_temp_meaning_ptr=temp_meaning_stack;
+title_code_ptr=title_code;
+ms_mode=false;
+
+ at q Section 276. @>
+@ @<Predec...@>=@+static void new_meaning(name_pointer);
+
+ at q Section 30->277. @>
+@ The |new_meaning| routine changes the current ``permanent meaning''
+when an identifier is redeclared. It gets the |tex_part| from
+|ministring_buf|.
+
+ at c
+static void
+new_meaning(
+  name_pointer p)
+{
+  struct perm_meaning *q=get_meaning(p);
+  ms_mode=false;
+  if (q->stamp!=section_count) {
+    if (*(ministring_ptr-1)==' ') ministring_ptr--;
+    if (ministring_ptr>=ministring_buf_end)
+      strcpy(ministring_buf,"\\zip"); /* ignore |tex_part| if too long */
+ at .\\zip@>
+    else *ministring_ptr='\0';
+    q->perm.prog_no=0; /* |q->perm.id=p| */
+    q->perm.sec_no=section_count;
+    strcpy(q->perm.tex_part,ministring_buf);
+  }
+  @<Write the new meaning to the \.{.aux} file@>@;
+}
+
+ at q Section 75->278. @>
+@ @<Process a user-generated meaning@>=
+{ char *first=id_first;
+  while (xisspace(*first)) first++;
+  loc=first;
+  while (xisalpha(*loc)||xisdigit(*loc)||*loc=='_') loc++;
+  if (*loc++!=' ')
+    err_print(_("! Identifier in meaning should be followed by space"));
+  else {@+ int n=0;
+    name_pointer p=id_lookup(first,loc-1,normal);
+    sixteen_bits t=title_lookup();
+    if (*(loc-1)=='}')
+      while (xisdigit(*loc)) n=10*n+(*loc++)-'0';
+    if (*loc++!=' ')
+      err_print(_("! Location in meaning should be followed by space"));
+    else @<Digest the meaning of |p|, |t|, |n|@>@;
+  }
+  loc=id_loc+2;
+}
+
+ at q Section 76->279. @>
+@ @<Suppress mini-index entry@>=
+{ char *first=id_first,*last=id_loc;
+  while (xisspace(*first)) first++;
+  while (xisspace(*(last-1))) last--;
+  if (first<last) {
+    struct perm_meaning *q=get_meaning(id_lookup(first,last,normal));
+    q->stamp=section_count; /* this is what actually suppresses output */
+  }
+}
+
+ at q Section 77->280. @>
+@ @<Digest...@>=
+{ meaning_struct *m;
+  struct perm_meaning *q=get_meaning(p);
+  if (temp_switch) {
+    m=temp_meaning_ptr++;
+    if (temp_meaning_ptr>max_temp_meaning_ptr) {
+      if (temp_meaning_ptr>=temp_meaning_stack_end)
+        overflow(_("temp meanings"));
+      max_temp_meaning_ptr=temp_meaning_ptr;
+    }
+  } else m=&(q->perm);
+  m->id=p;
+  m->prog_no=t;
+  m->sec_no=n;
+  if (id_loc-loc>=max_tex_chars) strcpy(m->tex_part,"\\zip");
+ at .\\zip@>
+  else { char *q=m->tex_part;
+    while (loc<id_loc) *q++=*loc++;
+    *q='\0';
+  }
+}
+
+ at q Section 141->281/2. @>
+@* Make ministrings.
+ \.{CTWILL} needs the following procedure, which appends tokens of a
+translated text until coming to |tok_loc|, then suppresses text that may
+appear between parentheses or brackets. The calling routine |make_ministring|
+should set |ident_seen=false| first. (This is admittedly tricky.)
+
+@<Private var...@>=
+static boolean ident_seen;
+
+@ @c
+static boolean app_supp(
+  text_pointer p)
+{ token_pointer j;
+  if (ident_seen && **p>=tok_flag)
+    switch (**(**p-tok_flag+tok_start)) {
+    case '(': app_str("(\\,)"); goto catch14;
+    case '[': app_str("[\\,]"); goto catch14;
+    }
+  for (j=*p;j<*(p+1);j++)
+    if (*j<tok_flag) {
+      if (*j==inserted) break;
+      if (j==tok_loc) ident_seen=true;
+      else app(*j);
+    } else if (*j>=inner_tok_flag) confusion(_("inner"));
+    else if (app_supp(*j-tok_flag+tok_start)) goto catch14;
+  return false;
+catch14: return *(*(p+1)-1)=='9'; /* was production 14 used? */
+}
+
+ at q Section 283. @>
+@ @<Predec...@>=@+static boolean app_supp(text_pointer);
+
+ at q Section 142->284. @>
+@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(l)|,
+which tries to figure out a symbolic form of definition after
+|make_underlined(pp+l)| has been called. We rely heavily on the
+existing productions, which force the translated texts to have a
+structure that's decodable even though the underlying |cat| and |mathness|
+codes have disappeared.
+
+ at c static void
+make_ministring(
+  int l) /* 0, 1, or 2 */
+{
+  name_pointer cn;
+  if (tok_loc<=operator_found) return;
+  cn=((*tok_loc)%id_flag)+name_dir;
+  @<Append the type of the declaree; |return| if it begins with \&{extern}@>@;
+  null_scrap.mathness=(((pp+l)->mathness)%4)*5; big_app1(&null_scrap);
+    /* now we're ready for the mathness that follows (I think);
+       (without the mod 4 times 5, comments posed a problem,
+       namely in cases like |int a(b,c)| followed by comment) */
+  ident_seen=false;@+app_supp((pp+l)->trans);
+  null_scrap.mathness=10; big_app1(&null_scrap);
+   /* now |cur_mathness==no_math| */
+  ms_mode=true; ministring_ptr=ministring_buf;
+  if (l==2) *ministring_ptr++='=';
+  make_output(); /* translate the current text into a ministring */
+  tok_ptr=*(--text_ptr); /* delete that text */
+  new_meaning(cn);
+  cur_mathness=maybe_math; /* restore it */
+}
+
+ at q Section 285. @>
+@ @<Predec...@>=@+static void make_ministring(int);
+
+ at q Section 43->286. @>
+@ @<Private...@>=
+static sixteen_bits int_loc, ext_loc; /* locations of special reserved words */
+
+ at q Section 143->287. @>
+@ Here we use the fact that a |decl_head| comes from |int_like| only in
+production~27, whose translation is fairly easy to recognize. (Well,
+production 28 has been added for \CPLUSPLUS/, but we hope that doesn't
+mess us up.) And we also use other similar facts.
+
+If an identifier is given an \&{extern} definition, we don't change
+its current meaning, but we do suppress mini-index entries to its
+current meaning in other sections.
+
+@<Append the type of the declaree; |return| if it begins with \&{extern}@>=
+if (l==0) { app(int_loc+res_flag); app(' '); cur_mathness=no_math; }
+else {
+  text_pointer q=(pp+l-1)->trans, r;
+  token t;
+  int ast_count=0; /* asterisks preceding the expression */
+  boolean non_ast_seen=false; /* have we seen a non-asterisk? */
+  while (true) {
+    if (*(q+1)==*q+1) {
+      r=q;@+break; /* e.g. \&{struct}; we're doing production 45 or 46 */
+    }
+    if (**q<tok_flag) confusion(_("find type"));
+    r=**q-tok_flag+tok_start;
+    if ((t=*(*(q+1)-2))>=tok_flag && **(t-tok_flag+tok_start)=='*') {
+           /* production 34 */
+      if (!non_ast_seen) ast_count++; /* count immediately preceding |*|'s */
+    } else non_ast_seen=true;
+    if (*(*q+1)==' ' && *(q+1)==*q+2) break; /* production 27 */
+    if (*(*q+1)=='{' && *(*q+2)=='}' && *(*q+3)=='$' && *(*q+4)==' '@|
+       && *(q+1)==*q+5) break; /* production 27 in disguise */
+    q=r;
+  }
+  while (**r>=tok_flag) {
+    if (*(r+1)>*r+9 && *(*r+1)=='{' && *(*r+2)=='}' && *(*r+3)=='$' @|
+        && *(*r+4)==indent) q=**r-tok_flag+tok_start; /* production 49 */
+    r=**r-tok_flag+tok_start;
+  }
+  if (**r==ext_loc+res_flag) return; /* \&{extern} gives no definition */
+  @<Append tokens for type |q|@>@;
+}
+
+ at q Section 144->288. @>
+@ @<Append tokens for type |q|@>=
+cur_mathness=no_math; /* it was |maybe_math| */
+if (*(q+1)==*q+8 && *(*q+1)==' ' && *(*q+3)==' ') {
+  app(**q);@+app(' ');@+app(*(*q+2)); /* production 46 */
+} else if ((t=*(*(q+1)-1))>=tok_flag && **(r=t-tok_flag+tok_start)=='\\'
+   && *(*r+1)=='{') app(**q); /* |struct_like| identifier */
+else app((q-tok_start)+tok_flag);
+while (ast_count) {
+  big_app('{');@+app('*');@+app('}');@+ast_count--;
+}
+
+ at q Section 253->289. @>
+@ @<Private...@>=
+static boolean is_macro; /* it's a macro def, not a format def */
+static boolean def_diff; /* |false| iff the current macro has parameters */
+static name_pointer id_being_defined; /* the definee */
+
+ at q Section 257->290. @>
+@ @<Make ministring for a new macro@>=
+{
+  ms_mode=true; ministring_ptr=ministring_buf;
+  *ministring_ptr++='=';
+  if (def_diff) { /* parameterless */
+    scrap_pointer s=scrap_ptr;
+    text_pointer t;
+    token_pointer j;
+    while (s->cat==insert) s--;
+    if ((s-1)->cat==dead && s->cat==exp && **(t=s->trans)=='\\'
+         && *(*t+1)=='T') /* it's just a constant */
+      for (j=*t;j<*(t+1);j++) *ministring_ptr++=*j;
+    else out_str("macro");
+  } else out_str("macro (\\,)");
+  new_meaning(id_being_defined);
+}
+
+ at q Section 246->291. @>
+@* Process {\tentex .aux} files.
+
+@<Private...@>=
+static FILE *aux_file;
+static char aux_file_name[max_file_name_length]; /* name of \.{.aux} file */
+
+ at q Section 247->292. @>
+@ @<Read the \.{.aux} file, if present; then open it for output@>=
+memcpy(aux_file_name,tex_file_name,strlen(tex_file_name)-4);
+strcat(aux_file_name,".bux");
+include_depth=1; /* we simulate \.{@@i} */
+strcpy(cur_file_name,aux_file_name); /* first in, third out */
+if ((cur_file=fopen(cur_file_name,"r"))) { cur_line=0; include_depth++; }
+strcpy(aux_file_name+strlen(aux_file_name)-4,".aux");@/
+strcpy(cur_file_name,aux_file_name); /* second in, second out */
+if ((cur_file=fopen(cur_file_name,"r"))) { cur_line=0; include_depth++; }
+strcpy(cur_file_name,"system.bux"); /* third in, first out */
+if ((cur_file=fopen(cur_file_name,"r"))) cur_line=0;
+else include_depth--;
+if (include_depth) { /* at least one new file was opened */
+  while (get_next()==meaning) ; /* new meaning is digested */
+  if (include_depth) err_print(_("! Only @@$ is allowed in aux and bux files"));
+  finish_line(); loc=buffer; /* now reading beginning of line 1 */
+}
+if ((aux_file=fopen(aux_file_name,"wb"))==NULL)
+  fatal(_("! Cannot open aux output file "),aux_file_name);
+
+ at q Section 31->293. @>
+@ @<Write the new meaning to the \.{.aux} file@>=
+{@+int n=q->perm.prog_no;
+  fprintf(aux_file,"@@$%.*s %.*s",@|
+    (int)length(p),p->byte_start,@|
+    (int)length(title_code[n]),title_code[n]->byte_start);
+  if (*(title_code[n]->byte_start)=='{') fprintf(aux_file,"%d",q->perm.sec_no);
+  fprintf(aux_file," %s@@>\n",q->perm.tex_part);
+}
+
+ at q Section 268->294. @>
+@* Usage of identifiers.
+The following code is performed for each identifier parsed during
+a section. Variable |top_usage| is always nonzero; it has the sentinel
+value~1 initially, then it points to each variable scheduled for
+possible citation. A variable is on this list if and only if its
+|link| field is nonzero. All variables mentioned in the section are
+placed on the list, unless they are reserved and their current
+\TeX\ meaning is uninitialized.
+
+@<Flag the usage of this identifier, for the mini-index@>=
+{ struct perm_meaning *q=get_meaning(p);
+  if (!abnormal(p) || strcmp(q->perm.tex_part,"\\uninitialized")!=0)
+    if (q->link==NULL) {
+      q->link=top_usage;
+      top_usage=q;
+    }
+}
+
+ at q Section 269->295. @>
+@ @<Output information about usage of id's defined in other sections@>=
+{ struct perm_meaning *q;
+  while (temp_meaning_ptr>temp_meaning_stack) {
+    out_mini(--temp_meaning_ptr);
+    q=get_meaning(temp_meaning_ptr->id);
+    q->stamp=section_count; /* suppress output from ``permanent'' data */
+  }
+  while (top_usage!=usage_sentinel) {
+    q=top_usage;
+    top_usage=q->link;
+    q->link=NULL;
+    if (q->stamp!=section_count) out_mini(&(q->perm));
+  }
+}
+
+ at q Section 270->296. @>
+@ @c static void
+out_mini(
+  meaning_struct *m)
+{ char s[60];
+  name_pointer cur_name=m->id;
+  if (m->prog_no==0) { /* reference within current program */
+    if (m->sec_no==section_count) return; /* defined in current section */
+    sprintf(s,"\\[%d",m->sec_no);
+  } else { name_pointer n=title_code[m->prog_no];
+    if (*(n->byte_start)=='{')
+      sprintf(s,"\\]%.*s%d",(int)length(n),n->byte_start,m->sec_no);
+    else sprintf(s,"\\]%.*s",(int)length(n),n->byte_start);
+  }
+  out_str(s); out(' ');
+  @<Mini-output the name at |cur_name|@>@;
+  out(' '); out_str(m->tex_part); finish_line();
+}
+
+ at q Section 271->297. @>
+@ @<Predec...@>=@+static void out_mini(meaning_struct *);
+
+ at q Section 272->298. @>
+@ Compare this code with section |@<Output the name...@>|.
+
+@<Mini-output...@>=
+switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
+  case normal: case func_template:
+    if (is_tiny(cur_name)) out_str("\\|");
+    else {
+      for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
+        if (xislower(*j)) goto lowcase;
+      goto allcaps;
+lowcase: out_str("\\\\");
+    }
+  break;
+ at .\\|@>
+ at .\\.@>
+ at .\\\\@>
+  case wildcard: out_str("\\9"); break;
+ at .\\9@>
+  case typewriter: allcaps: out_str("\\.");
+ at .\\.@>
+  case roman: break;
+  case custom:
+    out_str("$\\");
+    for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
+      out(*j=='_'? 'x': *j=='$'? 'X': *j);
+    out('$');
+    goto name_done;
+  default: out_str("\\&");
+ at .\\\&@>
+}
+out_name(cur_name,true);
+name_done:@;
+
+ at q Section 28->299. @>
+@* Handle program title.
+Here's a routine that converts a program title from the buffer
+into an internal number for the |prog_no| field of a meaning.
+It advances |loc| past the title found.
+
+ at c static sixteen_bits title_lookup(void)
+{
+  char *first=loc,*last; /* boundaries */
+  register name_pointer *p;
+  if (*loc=='"') {
+    while (++loc<=limit && *loc!='"') if (*loc=='\\') loc++;
+  } else if (*loc=='{') {
+    int balance=1; /* excess of left over right */
+    while (++loc<=limit) {
+      if (*loc==' ' && balance==1)
+        *loc='}'; /* Skip ``version'' after module name and fall through */
+      if (*loc=='}' && --balance==0) break;
+      if (*loc=='{') balance++;
+    }
+  } else err_print(_("! Title should be enclosed in braces or doublequotes"));
+  last=++loc;
+  if (last>limit) err_print(_("! Title name didn't end"));
+  if (title_code_ptr==title_code_end) overflow(_("titles"));
+  *title_code_ptr=id_lookup(first,last,title);
+  for (p=title_code;true;p++) if (*p==*title_code_ptr) break;
+  if (p==title_code_ptr) title_code_ptr++;
+  return p-title_code;
+}
+
+ at q Section 300. @>
+@ @<Predec...@>=@+static sixteen_bits title_lookup(void);
+
+ at q Section 29->301. @>
+@ @<Give a default title to the program, if necessary@>=
+if (title_code_ptr==title_code) { /* no \.{\\def\\title} found in limbo */
+  char *saveloc=loc,*savelimit=limit; /* save */
+  loc=limit+1; limit=loc;
+  *limit++='{';
+  memcpy(limit,tex_file_name,strlen(tex_file_name)-4);
+  limit+=strlen(tex_file_name)-4;
+  *limit++='}';
+  title_lookup();@/
+  loc=saveloc; limit=savelimit; /* restore */
+}
+
+ at q Section 302. @>
+@** Extensions to {\tentex CWEB}.  The following sections introduce new or
+improved features that have been created by numerous contributors over the
+course of a quarter century.
+
 @* 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.
+\.{CWEAVE} indents declarations after old-style function definitions and
+long parameter lists of modern function definitions.
+With the \.{-i} option they will come out flush left.
 
 @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
 
@@ -1940,14 +1989,13 @@
 
 @<Update the result...@>=
 if((tex_file=fopen(tex_file_name,"r"))!=NULL) {
-  char x[BUFSIZ],y[BUFSIZ];
-  int x_size,y_size,comparison=false;
+  boolean comparison=false;
 
   if((check_file=fopen(check_file_name,"r"))==NULL)
     fatal(_("! Cannot open output file "),check_file_name);
 @.Cannot open output file@>
 
-  if (temporary_output) @<Compare the temporary output...@>@;
+  if (check_for_change) @<Compare the temporary output...@>@;
 
   fclose(tex_file); tex_file=NULL;
   fclose(check_file); check_file=NULL;
@@ -1962,10 +2010,10 @@
 
 @<Compare the temporary output to the previous output@>=
 do {
-  x_size = fread(x,1,BUFSIZ,tex_file);
-  y_size = fread(y,1,BUFSIZ,check_file);
-  comparison = (x_size == y_size); /* Do not merge these statements! */
-  if(comparison) comparison = !memcmp(x,y,x_size);
+  char x[BUFSIZ],y[BUFSIZ];
+  int x_size = fread(x,sizeof(char),BUFSIZ,tex_file);
+  int y_size = fread(y,sizeof(char),BUFSIZ,check_file);
+  comparison = (x_size == y_size) && !memcmp(x,y,x_size);
 } while(comparison && !feof(tex_file) && !feof(check_file));
 
 @ Note the superfluous call to |remove| before |rename|.  We're using it to
@@ -1979,7 +2027,7 @@
   rename(check_file_name,tex_file_name);
 }
 
-@* Put ``version'' information in \.{COMMON}.
+@* Print ``version'' information.
 Don't do this at home, kids! Push our local macro to the variable in \.{COMMON}
 for printing the |banner| and the |versionstring| from there.
 

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctwill.bux
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctwill.bux	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctwill.bux	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,17 +1,18 @@
+@$ctangle {CTWILL}3 \&{enum} \&{cweb}@>
+@$ctwill {CTWILL}3 \&{enum} \&{cweb}@>
+@$cweave {CTWILL}3 \&{enum} \&{cweb}@>
+
 @$program {COMMON.W}18 \&{int}@>
-@$ctangle {COMMON.W}18 \&{int}@>
-@$ctwill {COMMON.W}18 \&{int}@>
-@$cweave {COMMON.W}18 \&{int}@>
 @$phase {COMMON.W}19 \&{int}@>
 @$common_init {COMMON.W}20 \&{void} (\,)@>
+@$section_text {COMMON.W}21 \&{char} [\,][\,]@>
+@$section_text_end {COMMON.W}21 \&{char} ${*}$@>
 @$id_first {COMMON.W}21 \&{char} ${*}$@>
 @$id_loc {COMMON.W}21 \&{char} ${*}$@>
-@$section_text {COMMON.W}21 \&{char} [\,][\,]@>
-@$section_text_end {COMMON.W}21 \&{char} ${*}$@>
 @$buffer {COMMON.W}22 \&{char} [\,]@>
 @$buffer_end {COMMON.W}22 \&{char} ${*}$@>
+@$loc {COMMON.W}22 \&{char} ${*}$@>
 @$limit {COMMON.W}22 \&{char} ${*}$@>
-@$loc {COMMON.W}22 \&{char} ${*}$@>
 
 @$include_depth {COMMON.W}25 \&{int}@>
 @$file {COMMON.W}25 \&{FILE} ${*}$ [\,]@>
@@ -18,7 +19,6 @@
 @$change_file {COMMON.W}25 \&{FILE} ${*}$@>
 @$file_name {COMMON.W}25 \&{char} [\,][\,]@>
 @$change_file_name {COMMON.W}25 \&{char} [\,]@>
-@$alt_web_file_name {COMMON.W}25 \&{char} [\,]@>
 @$line {COMMON.W}25 \&{int} [\,]@>
 @$change_line {COMMON.W}25 \&{int}@>
 @$change_depth {COMMON.W}25 \&{int}@>
@@ -43,9 +43,9 @@
 @$byte_ptr {COMMON.W}44 \&{char} ${*}$@>
 @$name_ptr {COMMON.W}44 \&{name\_pointer}@>
 
-@$h {COMMON.W}46 \&{hash\_pointer}@>
 @$hash {COMMON.W}46 \&{name\_pointer} [\,]@>
 @$hash_end {COMMON.W}46 \&{hash\_pointer}@>
+@$h {COMMON.W}46 \&{hash\_pointer}@>
 
 @$id_lookup {COMMON.W}48 \&{name\_pointer} (\,)@>
 
@@ -72,7 +72,6 @@
 @$scn_file_name {COMMON.W}73 \&{char} [\,]@>
 @$check_file_name {COMMON.W}73 \&{char} [\,]@>
 @$flags {COMMON.W}73 \&{boolean} [\,]@>
-@$use_language {COMMON.W}86 \&{const char} ${*}$@>
 
 @$C_file {COMMON.W}83 \&{FILE} ${*}$@>
 @$tex_file {COMMON.W}83 \&{FILE} ${*}$@>
@@ -81,6 +80,8 @@
 @$check_file {COMMON.W}83 \&{FILE} ${*}$@>
 @$active_file {COMMON.W}83 \&{FILE} ${*}$@>
 
+@$use_language {COMMON.W}86 \&{const char} ${*}$@>
+
 @$cb_banner {COMMON.W}87 \&{char} [\,]@>
 
 @$cb_show_banner {COMMON.W}99 \&{void} (\,)@>

Modified: branches/stable/source/src/texk/web2c/cwebdir/ctwimac.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/ctwimac.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/ctwimac.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,9 +1,9 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 3.6 --- May 2000
+% Version 4.4 --- June 2021
 % modified for pages produced by CTWILL
 % further modified for page size of the MMIXware book
 \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CTWILL3.6+LNCS}
+\xdef\fmtversion{\fmtversion+CTWILL4.4+LNCS}
 
 \let\:=\. % preserve a way to get the dot accent
  % (all other accents will still work as usual)
@@ -218,6 +218,7 @@
 \newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
 \let\yskip=\smallskip
 \def\?{\mathrel?}
+\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \def\note#1#2.{\par\penalty5000
   \Y\noindent{\hangindent2\em\baselineskip10pt\eightrm#1~#2.\par}}
 \def\lapstar{\rlap{*}}
@@ -278,7 +279,8 @@
   \hbox{$\def\?{\kern.2em}%
     \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant
     \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
-    \let\~=\oct \let\^=\hex {#1}$}}
+    \def\%{\cdot 16^{\aftergroup}}% power of sixteen (via dirty trick)
+    \let\~=\oct \let\^=\hex \let\\=\bin{#1}$}}%$%
 \def\U{\note{This code is used in section}} % xref for use of a section
 \def\Us{\note{This code is used in sections}} % xref for uses of a section
 \let\V=\lor % logical or
@@ -292,16 +294,16 @@
 
 %\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style
 %\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style
-\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}% CWEB style
-\def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style
+\def\oct{\hbox{$^\circ$\kern-.1em}\Od}% CWEB style
+\def\hex{\hbox{$^{\scriptscriptstyle\#}$}\Hd} % CWEB style
+\def\bin{\hbox{$^{\scriptscriptstyle b}$}\Bd}
+\def\Od#1/{{\it#1}} % octal digit
+\def\Hd#1/{{\tt#1}} % hexadecimal digit
+\def\Bd#1/{{\tt#1}} % binary digit
 \def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule
         \hbox{\strut\kern2pt\.{#1}\kern2pt}}
       \hrule}\vrule\kern2pt}} % verbatim string
 
-\def\TeX{{\ifmmode\it\fi
-   \leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
-\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
-
 % now here's the mini-index formatting control
 \newcount\nrefs % total number of references in partial page
 \newcount\baseno % smallest section number in partial page

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-bs.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -20,16 +20,16 @@
 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
 is modified.
 
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
 is modified.
 
- at d banner "This is CWEAVE (Version 4.2pc/big)"
+ at d banner "This is CWEAVE (Version 4.4pc/big)"
 @z
 
 
- at x Section 7.
+ at x Section 10.
   for section names */
 
 @<Common code...@>=
@@ -119,11 +119,11 @@
 
 
 @x Section 24.
-xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0;
+xref_ptr=xmem; init_node(name_dir); xref_switch=section_xref_switch=0;
 xmem->num=0; /* sentinel value */
 @y
 xmem_end = xmem + max_refs - 1;
-xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0;
+xref_ptr=xmem; init_node(name_dir); xref_switch=section_xref_switch=0;
 xmem->num=0; /* sentinel value */
 @z
 
@@ -165,7 +165,7 @@
 @z
 
 
- at x Section 74.
+ at x Section 78.
       if (unindexed(lhs)) { /* retain only underlined entries */
         xref_pointer q,r=NULL;
         for (q=(xref_pointer)lhs->xref;q>xmem;q=q->xlink)
@@ -186,7 +186,7 @@
 @z
 
 
- at x Section 93.
+ at x Section 97.
   char *k, *k_end=(p+1)->byte_start; /* pointers into |byte_mem| */
   out('{');
   for (k=p->byte_start; k<k_end; k++) {
@@ -197,7 +197,7 @@
 @z
 
 
- at x Section 209.
+ at x Section 218.
   char *p; /* index into |byte_mem| */
 @y
   char huge *p; /* index into |byte_mem| */
@@ -204,7 +204,7 @@
 @z
 
 
- at x Section 244.
+ at x Section 253.
     if (cur_name->xref!=(void *)xmem) {
 @y
     if (cur_name->xref!=(void huge*)xmem) {
@@ -211,7 +211,7 @@
 @z
 
 
- at x Section 246.
+ at x Section 255.
 static char *cur_byte; /* index into |byte_mem| */
 @y
 static char huge* cur_byte; /* index into |byte_mem| */
@@ -218,19 +218,8 @@
 @z
 
 
- at x Section 255.
-switch (cur_name->ilk) {
-  case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|");
-    else {char *j;
+ at x Section 264.
+switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
 @y
-switch (cur_name->ilk) {
-  case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|");
-    else {char huge* j;
+switch (cur_name->ilk) {@+char huge* j;@+ at t}\6{\4@>
 @z
-
-
- at x Section 255.
-  case custom: {char *j; out_str("$\\");
- at y
-  case custom: {char huge* j; out_str("$\\");
- at z

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-man.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-man.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-man.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -16,7 +16,7 @@
 }
 @y
 \def\botofcontents{\vfill\titlefalse}
-\def\contentspagenumber{111}
+\def\contentspagenumber{108}
 \def\title{APPENDIX F: CWEAVE}
 \let\K=\leftarrow
 @z

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-pc.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -11,18 +11,18 @@
 change files that have -bs in their name instead of -pc.)
 
 @x section 1
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
- at d banner "This is CWEAVE (Version 4.2pc)"
+ at d banner "This is CWEAVE (Version 4.4pc)"
 @z
 
- at x section 4
- at d max_bytes 1000000 /* the number of bytes in identifiers,
+ at x section 17
+ at d max_bytes 90000 /* the number of bytes in identifiers,
 @y
 @d max_bytes (unsigned)60000 /* the number of bytes in identifiers,
 @z
 @x
- at d max_refs 65535 /* number of cross-references; must be less than 65536 */
+ at d max_refs 20000 /* number of cross-references; must be less than 65536 */
 @y
 @d max_refs 10000 /* number of cross-references; must be less than 65536 */
 @z

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-ql.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -7,15 +7,15 @@
 
 
 @x
-\def\title{CWEAVE (Version 4.2)}
+\def\title{CWEAVE (Version 4.4)}
 @y
-\def\title{CWEAVE (QL Version 4.2)}
+\def\title{CWEAVE (QL Version 4.4)}
 @z
 
 @x section 1
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
- at d banner "This is CWEAVE (QL Version 4.2)"
+ at d banner "This is CWEAVE (QL Version 4.4)"
 @z
 
 @x

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-vms.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -13,12 +13,12 @@
 (also modified by Don Knuth to keep version numbers uptodate)
 
 @x section 1 (01-FEB-1992 ST)
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
- at d banner "This is CWEAVE (VAX/VMS Version 4.2)"
+ at d banner "This is CWEAVE (VAX/VMS Version 4.4)"
 @z
 
- at x section 3 (01-FEB-1992 ST)
+ at x section 4 (01-FEB-1992 ST)
 #include <ctype.h> /* definition of |@!isalpha|, |@!isdigit| and so on */
 #include <stdbool.h> /* definition of |@!bool|, |@!true| and |@!false| */
 #include <stddef.h> /* definition of |@!ptrdiff_t| */

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-w2c.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -17,15 +17,15 @@
 @q Please send comments, suggestions, etc. to tex-k@@tug.org.            @>
 
 @x
-\def\title{CWEAVE (Version 4.2)}
+\def\title{CWEAVE (Version 4.4)}
 @y
-\def\title{CWEAVE (Version 4.2 [\TeX~Live])}
+\def\title{CWEAVE (Version 4.4 [\TeX~Live])}
 @z
 
 @x
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
 @y
-  \centerline{(Version 4.2 [\TeX~Live])}
+  \centerline{(Version 4.4 [\TeX~Live])}
 @z
 
 @x
@@ -41,9 +41,9 @@
 @z
 
 @x
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
- at d banner "This is CWEAVE, Version 4.2"
+ at d banner "This is CWEAVE, Version 4.4"
   /* will be extended by the \TeX~Live |versionstring| */
 @z
 
@@ -60,6 +60,14 @@
 @z
 
 @x
+ at d max_refs 20000 /* number of cross-references; must be less than 65536 */
+ at d max_scraps 2000 /* number of tokens in \CEE/ texts being parsed */
+ at y
+ at d max_refs 65535 /* number of cross-references; must be less than 65536 */
+ at d max_scraps 5000 /* number of tokens in \CEE/ texts being parsed */
+ at z
+
+ at 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"));
@@ -66,6 +74,18 @@
 @z
 
 @x
+ at d max_toks 20000 /* number of symbols in \CEE/ texts being parsed;
+  must be less than 65536 */
+ at d max_texts 4000 /* number of phrases in \CEE/ texts being parsed;
+  must be less than 10240 */
+ at y
+ at d max_toks 65535 /* number of symbols in \CEE/ texts being parsed;
+  must be less than 65536 */
+ at d max_texts 10239 /* number of phrases in \CEE/ texts being parsed;
+  must be less than 10240 */
+ at z
+
+ at x
         err_print("! String didn't end"); loc=limit; break;
 @y
         err_print(_("! String didn't end")); loc=limit; break;
@@ -84,9 +104,9 @@
 @z
 
 @x
-    case translit_code: err_print("! Use @@l in limbo only"); continue;
+  case translit_code: err_print("! Use @@l in limbo only"); continue;
 @y
-    case translit_code: err_print(_("! Use @@l in limbo only")); continue;
+  case translit_code: err_print(_("! Use @@l in limbo only")); continue;
 @z
 
 @x
@@ -126,9 +146,9 @@
 @z
 
 @x
-  if (loc>=limit) err_print("! Verbatim string didn't end");
+if (loc>=limit) err_print("! Verbatim string didn't end");
 @y
-  if (loc>=limit) err_print(_("! Verbatim string didn't end"));
+if (loc>=limit) err_print(_("! Verbatim string didn't end"));
 @z
 
 @x
@@ -144,15 +164,15 @@
 @z
 
 @x
-    err_print("! Missing left identifier of @@s");
+  err_print("! Missing left identifier of @@s");
 @y
-    err_print(_("! Missing left identifier of @@s"));
+  err_print(_("! Missing left identifier of @@s"));
 @z
 
 @x
-      err_print("! Missing right identifier of @@s");
+    err_print("! Missing right identifier of @@s");
 @y
-      err_print(_("! Missing right identifier of @@s"));
+    err_print(_("! Missing right identifier of @@s"));
 @z
 
 @x
@@ -248,18 +268,23 @@
 @z
 
 @x
- at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+ at d inner_tok_flag (5*id_flag) /* signifies a token list in `\pb' */
 
 @c
 static void
-print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
+print_text( /* prints a token list for debugging; not used in |main| */
 @y
- at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+ at d inner_tok_flag (5*id_flag) /* signifies a token list in `\pb' */
 
- at c
+@<Predecl...@>=
 #if 0
-static void
-print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
+static void print_text(text_pointer p);
+#endif
+
+@ @c
+#if 0
+ at t\4\4@>static void
+print_text( /* prints a token list for debugging; not used in |main| */
 @z
 
 @x
@@ -272,25 +297,18 @@
 @x
 @ @<Predecl...@>=@+static void print_text(text_pointer p);
 @y
-@ @<Predecl...@>=
-#if 0
-static void print_text(text_pointer p);
-#endif
 @z
 
 @x
 @<Cases for |exp|@>=
 if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  make_underlined(pp); big_app1(pp); big_app(indent); app(indent);
+  make_underlined(pp); big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,1);
 }
 @y
 @<Cases for |exp|@>=
 if(cat1==lbrace || cat1==int_like || cat1==decl) {
-  make_underlined(pp); big_app1(pp);
-  if (indent_param_decl) {
-    big_app(indent); app(indent);
-  }
+  make_underlined(pp); if (indent_param_decl) big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,1);
 }
 @z
@@ -301,10 +319,9 @@
   big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33);
 }
 else if (cat1==ubinop) {
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
-  reduce(pp,2,decl_head,-1,34);
+  big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,decl_head,-1,34);
 }
-else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
+else if (cat1==exp && cat2!=lpar && cat2!=lbrack && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1); squash(pp,2,decl_head,-1,35);
 }
 else if ((cat1==binop||cat1==colon) && cat2==exp && (cat3==comma ||
@@ -312,7 +329,7 @@
   squash(pp,3,decl_head,-1,36);
 else if (cat1==cast) squash(pp,2,decl_head,-1,37);
 else if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  big_app1(pp); big_app(indent); app(indent); reduce(pp,1,fn_decl,0,38);
+  big_app(dindent); big_app1(pp); reduce(pp,1,fn_decl,0,38);
 }
 else if (cat1==semi) squash(pp,2,decl,-1,39);
 @y
@@ -321,10 +338,10 @@
   big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33);
 }
 else if (cat1==ubinop) {
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
+  big_app1_insert(pp,'{'); big_app('}');
   reduce(pp,2,decl_head,-1,34);
 }
-else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
+else if (cat1==exp && cat2!=lpar && cat2!=lbrack && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1); squash(pp,2,decl_head,-1,35);
 }
 else if ((cat1==binop||cat1==colon) && cat2==exp && (cat3==comma ||
@@ -332,10 +349,7 @@
   squash(pp,3,decl_head,-1,36);
 else if (cat1==cast) squash(pp,2,decl_head,-1,37);
 else if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  big_app1(pp);
-  if (indent_param_decl) {
-    big_app(indent); app(indent);
-  }
+  if (indent_param_decl) big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,38);
 }
 else if (cat1==semi) squash(pp,2,decl,-1,39);
@@ -344,24 +358,19 @@
 @x
 @ @<Cases for |decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1);
-  reduce(pp,2,decl,-1,40);
+  big_app1_insert(pp,force); reduce(pp,2,decl,-1,40);
 }
 else if (cat1==stmt || cat1==function) {
-  big_app1(pp); big_app(big_force);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,41);
+  big_app1_insert(pp,big_force); reduce(pp,2,cat1,-1,41);
 }
 @y
 @ @<Cases for |decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1);
-  reduce(pp,2,decl,-1,40);
+  big_app1_insert(pp,force); reduce(pp,2,decl,-1,40);
 }
 else if (cat1==stmt || cat1==function) {
-  big_app1(pp);
-  if(order_decl_stmt) big_app(big_force);
-  else big_app(force);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,41);
+  big_app1_insert(pp,order_decl_stmt ? big_force : force);
+  reduce(pp,2,cat1,-1,41);
 }
 @z
 
@@ -368,7 +377,7 @@
 @x
 @ @<Cases for |fn_decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51);
+  big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51);
 }
 else if (cat1==stmt) {
   big_app1(pp); app(outdent); app(outdent); big_app(force);
@@ -377,7 +386,7 @@
 @y
 @ @<Cases for |fn_decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51);
+  big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51);
 }
 else if (cat1==stmt) {
   big_app1(pp);
@@ -384,12 +393,18 @@
   if (indent_param_decl) {
     app(outdent); app(outdent);
   }
-  big_app(force);
-  big_app1(pp+1); reduce(pp,2,function,-1,52);
+  big_app(force); big_app1(pp+1); reduce(pp,2,function,-1,52);
 }
 @z
 
 @x
+  big_app1_insert(pp,dindent); reduce(pp,2,fn_decl,0,73);
+ at y
+  big_app1(pp); if (indent_param_decl) big_app(dindent);
+  big_app1(pp+1); reduce(pp,2,fn_decl,0,73);
+ at z
+
+ at x
     overflow("token");
 @y
     overflow(_("token"));
@@ -402,9 +417,9 @@
 @z
 
 @x
-    if (tok_ptr+6>tok_mem_end) overflow("token");
+  if (tok_ptr+6>tok_mem_end) overflow("token");
 @y
-    if (tok_ptr+6>tok_mem_end) overflow(_("token"));
+  if (tok_ptr+6>tok_mem_end) overflow(_("token"));
 @z
 
 @x
@@ -468,9 +483,9 @@
 @z
 
 @x
-reset_input(); if (show_progress) fputs("\nWriting the output file...",stdout);
+if (show_progress) fputs("\nWriting the output file...",stdout);
 @y
-reset_input(); if (show_progress) fputs(_("\nWriting the output file..."),stdout);
+if (show_progress) fputs(_("\nWriting the output file..."),stdout);
 @z
 
 @x
@@ -620,17 +635,17 @@
 @x
 @** Index.
 @y
-@** 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.
+@** Extensions to {\tentex 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
-material should nicely integrate with the original ``\&{263.~Index}.''
+material should nicely integrate with the original ``\&{271.~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.
+\.{CWEAVE} indents declarations after old-style function definitions and
+long parameter lists of modern function definitions.
+With the \.{-i} option they will come out flush left.
 
 @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */
 
@@ -657,14 +672,13 @@
 
 @<Update the result...@>=
 if((tex_file=fopen(tex_file_name,"r"))!=NULL) {
-  char x[BUFSIZ],y[BUFSIZ];
-  int x_size,y_size,comparison=false;
+  boolean comparison=false;
 
   if((check_file=fopen(check_file_name,"r"))==NULL)
     fatal(_("! Cannot open output file "),check_file_name);
 @.Cannot open output file@>
 
-  if (temporary_output) @<Compare the temporary output...@>@;
+  if (check_for_change) @<Compare the temporary output...@>@;
 
   fclose(tex_file); tex_file=NULL;
   fclose(check_file); check_file=NULL;
@@ -679,10 +693,10 @@
 
 @<Compare the temporary output to the previous output@>=
 do {
-  x_size = fread(x,1,BUFSIZ,tex_file);
-  y_size = fread(y,1,BUFSIZ,check_file);
-  comparison = (x_size == y_size); /* Do not merge these statements! */
-  if(comparison) comparison = !memcmp(x,y,x_size);
+  char x[BUFSIZ],y[BUFSIZ];
+  int x_size = fread(x,sizeof(char),BUFSIZ,tex_file);
+  int y_size = fread(y,sizeof(char),BUFSIZ,check_file);
+  comparison = (x_size == y_size) && !memcmp(x,y,x_size);
 } while(comparison && !feof(tex_file) && !feof(check_file));
 
 @ Note the superfluous call to |remove| before |rename|.  We're using it to
@@ -696,7 +710,7 @@
   rename(check_file_name,tex_file_name);
 }
 
-@* Put ``version'' information in a single spot.
+@* Print ``version'' information.
 Don't do this at home, kids! Push our local macro to the variable in \.{COMMON}
 for printing the |banner| and the |versionstring| from there.
 

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweav-w32.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,23 +2,23 @@
 (Contributed by Fabrice Popineau, February 2002)
 
 @x section 1
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 @y
- at d banner "This is CWEAVE (Version 4.2win32)"
+ at d banner "This is CWEAVE (Version 4.4win32)"
 @z
 
 @x
-boolean names_match(@t\1\1@>
+boolean names_match(
 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 at t\2\2@>) /* desired |ilk| */
+eight_bits t) /* desired |ilk| */
 @y
-boolean __cdecl names_match(@t\1\1@>
+boolean __cdecl names_match(
 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 at t\2\2@>) /* desired |ilk| */
+eight_bits t) /* desired |ilk| */
 @z
 
 @x

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweave.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweave.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweave.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -2,7 +2,7 @@
 % This program by Silvio Levy and Donald E. Knuth
 % is based on a program by Knuth.
 % It is distributed WITHOUT ANY WARRANTY, express or implied.
-% Version 4.2 --- February 2021
+% Version 4.4 --- June 2021
 
 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
 
@@ -32,11 +32,11 @@
 \def\skipxTeX{\\{skip\_\TEX/}}
 \def\copyxTeX{\\{copy\_\TEX/}}
 
-\def\title{CWEAVE (Version 4.2)}
+\def\title{CWEAVE (Version 4.4)}
 \def\topofcontents{\null\vfill
   \centerline{\titlefont The {\ttitlefont CWEAVE} processor}
   \vskip 15pt
-  \centerline{(Version 4.2)}
+  \centerline{(Version 4.4)}
   \vfill}
 \def\botofcontents{\vfill
 \noindent
@@ -67,9 +67,10 @@
 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
 is modified.
 
- at d banner "This is CWEAVE (Version 4.2)"
+ at d banner "This is CWEAVE (Version 4.4)"
 
- at c @<Include files@>@/
+ at c
+@<Include files@>@/
 @h
 @<Common code for \.{CWEAVE} and \.{CTANGLE}@>@/
 @<Typedef declarations@>@/
@@ -85,9 +86,9 @@
 to \.{CTANGLE} and \.{CWEAVE}, before proceeding further.
 
 @c
-int main (@t\1\1@>
+int main (
 int ac, /* argument count */
-char **av at t\2\2@>) /* argument values */
+char **av) /* argument values */
 {
   argc=ac; argv=av;
   program=cweave;
@@ -99,7 +100,7 @@
   phase_one(); /* read all the user's text and store the cross-references */
   phase_two(); /* read all the text again and translate it to \TEX/ form */
   phase_three(); /* output the cross-reference index */
-  if (tracing==2 && !show_progress) new_line;
+  if (tracing==fully && !show_progress) new_line;
   return wrap_up(); /* and exit gracefully */
 }
 
@@ -115,10 +116,8 @@
 
 @d line_length 80 /* lines of \TEX/ output have at most this many characters;
   should be less than 256 */
- at d max_refs 65535 /* number of cross-references; must be less than 65536 */
- at d max_texts 10239 /* number of phrases in \CEE/ texts being parsed;
-  must be less than 10240 */
- at d max_scraps 10000 /* number of tokens in \CEE/ texts being parsed */
+ at d max_refs 20000 /* number of cross-references; must be less than 65536 */
+ at d max_scraps 2000 /* 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
@@ -143,7 +142,7 @@
 \yskip\hang |typewriter| identifiers are index entries that appear after
 \.{@@.} in the \.{CWEB} file.
 
-\yskip\hang |alfop|, \dots, |template_like|
+\yskip\hang |alfop|, \dots, |attr|
 identifiers are \CEE/ or \CPLUSPLUS/ reserved words whose |ilk|
 explains how they are to be treated when \CEE/ code is being
 formatted.
@@ -153,7 +152,7 @@
 @d roman 1 /* normal index entries have |roman| ilk */
 @d wildcard 2 /* user-formatted index entries have |wildcard| ilk */
 @d typewriter 3 /* `typewriter type' entries have |typewriter| ilk */
- at d abnormal(a) (a->ilk>typewriter) /* tells if a name is special */
+ at d abnormal(a) ((a)->ilk>typewriter) /* tells if a name is special */
 @d func_template 4 /* identifiers that can be followed by optional template */
 @d custom 5 /* identifiers with user-given control sequence */
 @d alfop 22 /* alphabetic operators like \&{and} or \&{not\_eq} */
@@ -168,7 +167,7 @@
 @d delete_like 48 /* \&{delete} */
 @d raw_ubin 49 /* `\.\&' or `\.*' when looking for \&{const} following */
 @d const_like 50 /* \&{const}, \&{volatile} */
- at d raw_int 51 /* \&{int}, \&{char}, \dots; also structure and class names  */
+ at d raw_int 51 /* \&{int}, \&{char}, \dots; also structure and class names */
 @d int_like 52 /* same, when not followed by left parenthesis or \DC\ */
 @d case_like 53 /* \&{case}, \&{return}, \&{goto}, \&{break}, \&{continue} */
 @d sizeof_like 54 /* \&{sizeof} */
@@ -176,6 +175,10 @@
 @d typedef_like 56 /* \&{typedef} */
 @d define_like 57 /* \&{define} */
 @d template_like 58 /* \&{template} */
+ at d alignas_like 59 /* \&{alignas} */
+ at d using_like 60 /* \&{using} */
+ at d default_like 61 /* \&{default} */
+ at d attr 62 /* \&{noexcept} and attributes */
 
 @ We keep track of the current section number in |section_count|, which
 is the total number of sections that have started.  Sections which have
@@ -229,7 +232,7 @@
 @d xref equiv_or_xref
 
 @<Set init...@>=
-xref_ptr=xmem; init_node(name_dir); xref_switch=0; section_xref_switch=0;
+xref_ptr=xmem; init_node(name_dir); xref_switch=section_xref_switch=0;
 xmem->num=0; /* sentinel value */
 
 @ A new cross-reference for an identifier is formed by calling |new_xref|,
@@ -239,13 +242,13 @@
 If the user has sent the |no_xref| flag (the \.{-x} option of the command line),
 it is unnecessary to keep track of cross-references for identifiers.
 If one were careful, one could probably make more changes around section
-100 to avoid a lot of identifier looking up.
+115 to avoid a lot of identifier looking up.
 
 @d append_xref(c) if (xref_ptr==xmem_end) overflow("cross-reference");
   else (++xref_ptr)->num=c;
- at d no_xref (!make_xrefs)
- at d is_tiny(p) ((p+1)->byte_start==(p)->byte_start+1)
- at d unindexed(a) (a<res_wd_end && a->ilk>=custom)
+ at d no_xref !make_xrefs
+ at d is_tiny(p) length(p)==1
+ at d unindexed(a) ((a)<res_wd_end && (a)->ilk>=custom)
       /* tells if uses of a name are to be indexed */
 
 @<Predecl...@>=
@@ -289,9 +292,9 @@
 new_section_xref(
 name_pointer p)
 {
-  xref_pointer q,r; /* pointers to previous cross-references */
-  q=(xref_pointer)p->xref; r=xmem;
-  if (q>xmem)
+  xref_pointer q=(xref_pointer)p->xref;
+  xref_pointer r=xmem; /* pointers to previous cross-references */
+  if (q>r)
         while (q->num>section_xref_switch) {r=q; q=q->xlink;}
   if (r->num==section_count+section_xref_switch)
         return; /* don't duplicate entries */
@@ -309,8 +312,7 @@
 set_file_flag(
 name_pointer p)
 {
-  xref_pointer q;
-  q=(xref_pointer)p->xref;
+  xref_pointer q=(xref_pointer)p->xref;
   if (q->num==file_flag) return;
   append_xref(file_flag);
   xref_ptr->xlink = q;
@@ -333,6 +335,11 @@
 unused location of |tok_start| is called |text_ptr|.
 Thus, we usually have |*text_ptr==tok_ptr|.
 
+ at d max_toks 20000 /* number of symbols in \CEE/ texts being parsed;
+  must be less than 65536 */
+ at d max_texts 4000 /* number of phrases in \CEE/ texts being parsed;
+  must be less than 10240 */
+
 @<Private...@>=
 static token tok_mem[max_toks]; /* tokens */
 static token_pointer tok_mem_end = tok_mem+max_toks-1; /* end of |tok_mem| */
@@ -350,11 +357,11 @@
 
 @ Here are the three procedures needed to complete |id_lookup|:
 @c
-boolean names_match(@t\1\1@>
+boolean names_match(
 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 at t\2\2@>) /* desired |ilk| */
+eight_bits t) /* desired |ilk| */
 {
   if (length(p)!=l) return false;
   if (p->ilk!=t && !(t==normal && abnormal(p))) return false;
@@ -376,23 +383,22 @@
   p->xref=(void *)xmem;
 }
 
-static void
-update_node(
-name_pointer p)
-{
-  p->xref=(void *)xref_ptr;
-}
+@ And here's a small helper function to simplify the code.
 
-@ @<Predecl...@>=@+static void update_node(name_pointer p);
+ at d update_node(p) (p)->xref=(void *)xref_ptr
 
-@ We have to get \CEE/'s
+@ We have to get \CEE/'s and \CPLUSPLUS/'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
 few reserved words. (Some of these are not strictly ``reserved,'' but
-are defined in header files of the ISO Standard \CEE/ Library.)
+are defined in header files of the ISO Standard \CEE/ Library.
+An ever growing list of \CPLUSPLUS/ keywords can be found here:
+\.{https://en.cppreference.com/w/cpp/keyword}.)
 @^reserved words@>
 
 @<Store all the reserved words@>=
+id_lookup("alignas",NULL,alignas_like);
+id_lookup("alignof",NULL,sizeof_like);
 id_lookup("and",NULL,alfop);
 id_lookup("and_eq",NULL,alfop);
 id_lookup("asm",NULL,sizeof_like);
@@ -404,13 +410,24 @@
 id_lookup("case",NULL,case_like);
 id_lookup("catch",NULL,catch_like);
 id_lookup("char",NULL,raw_int);
+id_lookup("char8_t",NULL,raw_int);
+id_lookup("char16_t",NULL,raw_int);
+id_lookup("char32_t",NULL,raw_int);
 id_lookup("class",NULL,struct_like);
 id_lookup("clock_t",NULL,raw_int);
 id_lookup("compl",NULL,alfop);
+id_lookup("concept",NULL,int_like);
 id_lookup("const",NULL,const_like);
+id_lookup("consteval",NULL,const_like);
+id_lookup("constexpr",NULL,const_like);
+id_lookup("constinit",NULL,const_like);
 id_lookup("const_cast",NULL,raw_int);
 id_lookup("continue",NULL,case_like);
-id_lookup("default",NULL,case_like);
+id_lookup("co_await",NULL,case_like);
+id_lookup("co_return",NULL,case_like);
+id_lookup("co_yield",NULL,case_like);
+id_lookup("decltype",NULL,sizeof_like);
+id_lookup("default",NULL,default_like);
 id_lookup("define",NULL,define_like);
 id_lookup("defined",NULL,sizeof_like);
 id_lookup("delete",NULL,delete_like);
@@ -427,6 +444,7 @@
 id_lookup("export",NULL,int_like);
 id_lookup("extern",NULL,int_like);
 id_lookup("FILE",NULL,raw_int);
+id_lookup("false",NULL,normal);
 id_lookup("float",NULL,raw_int);
 id_lookup("for",NULL,for_like);
 id_lookup("fpos_t",NULL,raw_int);
@@ -445,9 +463,11 @@
 id_lookup("mutable",NULL,int_like);
 id_lookup("namespace",NULL,struct_like);
 id_lookup("new",NULL,new_like);
+id_lookup("noexcept",NULL,attr);
 id_lookup("not",NULL,alfop);
 id_lookup("not_eq",NULL,alfop);
 id_lookup("NULL",NULL,custom);
+id_lookup("nullptr",NULL,custom);
 id_lookup("offsetof",NULL,raw_int);
 id_lookup("operator",NULL,operator_like);
 id_lookup("or",NULL,alfop);
@@ -459,6 +479,8 @@
 id_lookup("public",NULL,public_like);
 id_lookup("register",NULL,int_like);
 id_lookup("reinterpret_cast",NULL,raw_int);
+id_lookup("requires",NULL,int_like);
+id_lookup("restrict",NULL,int_like);
 id_lookup("return",NULL,case_like);
 id_lookup("short",NULL,raw_int);
 id_lookup("sig_atomic_t",NULL,raw_int);
@@ -466,21 +488,24 @@
 id_lookup("size_t",NULL,raw_int);
 id_lookup("sizeof",NULL,sizeof_like);
 id_lookup("static",NULL,int_like);
+id_lookup("static_assert",NULL,sizeof_like);
 id_lookup("static_cast",NULL,raw_int);
 id_lookup("struct",NULL,struct_like);
 id_lookup("switch",NULL,for_like);
 id_lookup("template",NULL,template_like);
 id_lookup("this",NULL,custom);
+id_lookup("thread_local",NULL,raw_int);
 id_lookup("throw",NULL,case_like);
 id_lookup("time_t",NULL,raw_int);
+id_lookup("true",NULL,normal);
 id_lookup("try",NULL,else_like);
 id_lookup("typedef",NULL,typedef_like);
-id_lookup("typeid",NULL,raw_int);
+id_lookup("typeid",NULL,sizeof_like);
 id_lookup("typename",NULL,struct_like);
 id_lookup("undef",NULL,if_like);
 id_lookup("union",NULL,struct_like);
 id_lookup("unsigned",NULL,raw_int);
-id_lookup("using",NULL,int_like);
+id_lookup("using",NULL,using_like);@/
 id_lookup("va_dcl",NULL,decl); /* Berkeley's variable-arg-list convention */
 id_lookup("va_list",NULL,raw_int); /* ditto */
 id_lookup("virtual",NULL,int_like);
@@ -491,6 +516,8 @@
 id_lookup("xor",NULL,alfop);
 id_lookup("xor_eq",NULL,alfop);@+ res_wd_end=name_ptr;
 id_lookup("TeX",NULL,custom);
+id_lookup("complex",NULL,int_like);
+id_lookup("imaginary",NULL,int_like);
 id_lookup("make_pair",NULL,func_template);
 
 @* Lexical scanning.
@@ -513,11 +540,11 @@
 @^ASCII code dependencies@>
 
 @d ignore 00 /* control code of no interest to \.{CWEAVE} */
- at d verbatim 02 /* takes the place of extended ASCII \.{\char2} */
+ at d verbatim 02 /* takes the place of ASCII \.{STX} */
 @d begin_short_comment 03 /* \CPLUSPLUS/ short comment */
 @d begin_comment '\t' /* tab marks will not appear */
 @d underline '\n' /* this code will be intercepted without confusion */
- at d noop 0177 /* takes the place of ASCII delete */
+ at d noop 0177 /* takes the place of ASCII \.{DEL} */
 @d xref_roman 0203 /* control code for `\.{@@\^}' */
 @d xref_wildcard 0204 /* control code for `\.{@@:}' */
 @d xref_typewriter 0205 /* control code for `\.{@@.}' */
@@ -548,10 +575,12 @@
 @<Private...@>=
 static eight_bits ccode[256]; /* meaning of a char following \.{@@} */
 
-@ @<Set ini...@>=
-{int c; for (c=0; c<256; c++) ccode[c]=0;}
+@ @<Set ini...@>= {
+  int c; /* must be |int| so the |for| loop will end */
+  for (c=0; c<256; c++) ccode[c]=ignore;
+}
 ccode[' ']=ccode['\t']=ccode['\n']=ccode['\v']=ccode['\r']=ccode['\f']
-   =ccode['*']=new_section;
+  =ccode['*']=new_section;
 ccode['@@']='@@'; /* `quoted' at sign */
 ccode['=']=verbatim;
 ccode['d']=ccode['D']=definition;
@@ -597,11 +626,12 @@
     if (loc>limit && get_line()==false) return;
     *(limit+1)='@@';
     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) @<Process simple format in limbo@>@;
-    }
+    if (loc++ <=limit)
+      switch (ccode[(eight_bits)*loc++]) {
+      case new_section: return;
+      case noop: skip_restricted(); break;
+      case format_code: @<Process simple format in limbo@>@;
+      }
   }
 }
 
@@ -671,14 +701,7 @@
 
 @ As one might expect, |get_next| consists mostly of a big switch
 that branches to the various special cases that can arise.
-\CEE/ allows underscores to appear in identifiers, and some \CEE/
-compilers even allow the dollar sign.
 
- at d isxalpha(c) ((c)=='_' || (c)=='$')
-   /* non-alpha characters allowed in identifier */
- at d ishigh(c) ((eight_bits)(c)>0177)
-@^high-bit character handling@>
-
 @c
 static eight_bits
 get_next(void) /* produces the next input token */
@@ -694,7 +717,7 @@
            || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))@|
            || (c=='<' && sharp_include_line==true))
         @<Get a string@>@;
-    else if (xisalpha(c) || isxalpha(c) || ishigh(c))
+    else if (isalpha(c) || isxalpha(c) || ishigh(c))
       @<Get an identifier@>@;
     else if (c=='@@') @<Get control code and possible section name@>@;
     else if (xisspace(c)) continue; /* ignore spaces and tabs */
@@ -733,7 +756,8 @@
 name as a string.
 
 @<Private...@>=
-static boolean sharp_include_line=false; /* are we scanning a \&{\#include} line? */
+static boolean sharp_include_line=false;
+  /* are we scanning a \#\&{include} line? */
 
 @ @<Check if next token is |include|@>=
 while (loc<=buffer_end-7 && xisspace(*loc)) loc++;
@@ -752,32 +776,31 @@
   }
 
 @ The following code assigns values to the combinations \.{++},
-\.{--}, \.{->}, \.{>=}, \.{<=}, \.{==}, \.{<<}, \.{>>}, \.{!=}, \.{\v\v}, and
-\.{\&\&}, and to the \CPLUSPLUS/
+\.{--}, \.{->}, \.{>=}, \.{<=}, \.{==}, \.{<<}, \.{>>}, \.{!=}, %\.{||}
+\.{\v\v} and~\.{\&\&}, and to the \CPLUSPLUS/
 combinations \.{...}, \.{::}, \.{.*} and \.{->*}.
 The compound assignment operators (e.g., \.{+=}) are
 treated as separate tokens.
 
- at d compress(c) if (loc++<=limit) return c
-
 @<Compress tw...@>=
 switch(c) {
-  case '/': if (*loc=='*') {compress(begin_comment);}
+  case '/': if (*loc=='*') {@+compress(begin_comment);@+}
     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;
-  case '.': if (*loc=='*') {compress(period_ast);}
+  case '-': if (*loc=='-') {@+compress(minus_minus);@+}
+            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);
-            }
-            break;
+              loc++;@+compress(dot_dot_dot);
+            } break;
   case ':': if (*loc==':') compress(colon_colon); break;
   case '=': if (*loc=='=') compress(eq_eq); break;
-  case '>': if (*loc=='=') {compress(gt_eq);}
+  case '>': if (*loc=='=') {@+compress(gt_eq);@+}
     else if (*loc=='>') compress(gt_gt); break;
-  case '<': if (*loc=='=') {compress(lt_eq);}
+  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;
@@ -786,7 +809,9 @@
 
 @ @<Get an identifier@>= {
   id_first=--loc;
-  while (isalpha((eight_bits)*++loc) || isdigit((eight_bits)*loc) @|
+  do
+    ++loc;
+  while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @|
       || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));
   id_loc=loc; return identifier;
 }
@@ -798,28 +823,38 @@
 with \TEX/ macros that the user can redefine to fit the context.
 In order to simplify such macros, we replace some of the characters.
 
+On output, the \.{\ } that replaces \.{'} in \CPLUSPLUS/ literals will become
+``\.{\\\ }''.
+
 Notice that in this section and the next, |id_first| and |id_loc|
 are pointers into the array |section_text|, not into |buffer|.
 
+ at d gather_digits_while(t) while ((t) || *loc=='\'')
+  if (*loc=='\'') { /* \CPLUSPLUS/-style digit separator */
+    *id_loc++=' '; loc++; /* insert a little bit of space */
+  }@+else *id_loc++=*loc++;
+
 @<Get a constant@>= {
   id_first=id_loc=section_text+1;
+  if (*(loc-1)=='.' && !xisdigit(*loc)) goto mistake; /* not a constant */
   if (*(loc-1)=='0') {
-    if (*loc=='x' || *loc=='X') {*id_loc++='^'; loc++;
-      while (xisxdigit(*loc)) *id_loc++=*loc++;} /* hex constant */
-    else if (xisdigit(*loc)) {*id_loc++='~';
-      while (xisdigit(*loc)) *id_loc++=*loc++;} /* octal constant */
-    else goto dec; /* decimal constant */
+    if (*loc=='x' || *loc=='X') @<Get a hexadecimal constant@>@;
+    else if (*loc=='b' || *loc=='B') @<Get a binary constant@>@;
+    else if (xisdigit(*loc)) @<Get an octal constant@>@;
   }
-  else { /* decimal constant */
-    if (*(loc-1)=='.' && !xisdigit(*loc)) goto mistake; /* not a constant */
-    dec: *id_loc++=*(loc-1);
-    while (xisdigit(*loc) || *loc=='.') *id_loc++=*loc++;
-    if (*loc=='e' || *loc=='E') { /* float constant */
-      *id_loc++='_'; loc++;
-      if (*loc=='+' || *loc=='-') *id_loc++=*loc++;
-      while (xisdigit(*loc)) *id_loc++=*loc++;
-    }
-  }
+  *id_loc++=*(loc-1); /* decimal constant */
+  gather_digits_while(xisdigit(*loc) || *loc=='.');
+get_exponent:
+  if (*loc=='e' || *loc=='E')
+    *id_loc++='_';
+  else if (*loc=='p' || *loc=='P')
+    *id_loc++='%';
+  else
+    goto digit_suffix;
+  loc++;
+  if (*loc=='+' || *loc=='-') *id_loc++=*loc++;
+  gather_digits_while(xisdigit(*loc));
+digit_suffix:
   while (*loc=='u' || *loc=='U' || *loc=='l' || *loc=='L'
          || *loc=='f' || *loc=='F') {
     *id_loc++='$'; *id_loc++=toupper((eight_bits)*loc); loc++;
@@ -827,22 +862,37 @@
   return constant;
 }
 
+@ @<Get a hex...@>={
+  *id_loc++='^'; loc++;
+  gather_digits_while(xisxdigit(*loc) || *loc=='.');
+  *id_loc++='/'; goto get_exponent;
+}
+
+@ @<Get a bin...@>={
+  *id_loc++='\\'; loc++;
+  gather_digits_while(*loc=='0' || *loc=='1');
+  *id_loc++='/'; goto digit_suffix;
+}
+
+@ @<Get an oct...@>={
+  *id_loc++='~'; gather_digits_while(xisdigit(*loc));
+  *id_loc++='/'; goto digit_suffix;
+}
+
 @ \CEE/ strings and character constants, delimited by double and single
 quotes, respectively, can contain newlines or instances of their own
 delimiters if they are protected by a backslash.  We follow this
 convention, but do not allow the string to be longer than |longest_name|.
 
-@<Get a string@>= {
+@<Get a string@>= {@+
   char delim = c; /* what started the string */
   id_first = section_text+1;
   id_loc = section_text;
   if (delim=='\'' && *(loc-2)=='@@') {*++id_loc='@@'; *++id_loc='@@';}
   *++id_loc=delim;
-  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 */
+  if (delim=='L' || delim=='u' || delim=='U')
+    @<Get a wide character constant@>@;
+  if (delim=='<') delim='>'; /* for file names in \#\&{include} lines */
   while (true) {
     if (loc>=limit) {
       if(*(limit-1)!='\\') {
@@ -858,10 +908,14 @@
       if (++id_loc<=section_text_end) *id_loc=c;
       break;
     }
-    if (c=='\\') { if (loc>=limit) continue;
-      else { if (++id_loc<=section_text_end) {
-        *id_loc = '\\'; c=*loc++;
-      } } }
+    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) {
@@ -874,24 +928,27 @@
   return string;
 }
 
+@ @<Get a wide...@>={
+  if (delim=='u' && *loc=='8') *++id_loc=*loc++;
+  delim=*loc++; *++id_loc=delim;
+}
+
 @ After an \.{@@} sign has been scanned, the next character tells us
 whether there is more work to do.
 
-@<Get control code and possible section name@>= {
-  c=*loc++;
-  switch(ccode[(eight_bits)c]) {
-    case translit_code: err_print("! Use @@l in limbo only"); continue;
+@<Get control code and possible section name@>=
+switch(ccode[(eight_bits)(c=*loc++)]) {
+  case translit_code: err_print("! Use @@l in limbo only"); continue;
 @.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[(eight_bits)c]; skip_restricted(); return c;
-    case section_name:
-      @<Scan the section name and make |cur_section| point to it@>@;
-    case verbatim: @<Scan a verbatim string@>@;
-    case ord: @<Get a string@>@;
-    default: return ccode[(eight_bits)c];
-  }
+  case underline: xref_switch=def_flag; continue;
+  case trace: tracing=c-'0'; continue;
+  case section_name:
+    @<Scan the section name and make |cur_section| point to it@>@;
+  case verbatim: @<Scan a verbatim string@>@;
+  case ord: @<Get a string@>@;
+  case xref_roman: case xref_wildcard: case xref_typewriter: case noop:
+  case TeX_string: skip_restricted();
+  default: return ccode[(eight_bits)c];
 }
 
 @ The occurrence of a section name sets |xref_switch| to zero,
@@ -898,12 +955,13 @@
 because the section name might (for example) follow \&{int}.
 
 @<Scan the section name...@>= {
-  char *k; /* pointer into |section_text| */
+  char *k=section_text; /* pointer into |section_text| */
   cur_section_char=*(loc-1);
   @<Put section name into |section_text|@>@;
   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);
+        cur_section=section_lookup(section_text+1,k-3,true);
+          /* |true| indicates a prefix */
+  else cur_section=section_lookup(section_text+1,k,false);
   xref_switch=0; return section_name;
 }
 
@@ -916,7 +974,6 @@
 @<Set init...@>=section_text[0]=' ';
 
 @ @<Put section name...@>=
-k=section_text;
 while (true) {
   if (loc>limit && get_line()==false) {
     err_print("! Input ended in section name");
@@ -969,8 +1026,7 @@
   if (loc++>limit) {
     err_print("! Control text didn't end"); loc=limit;
 @.Control text didn't end@>
-  }
-  else {
+  } else {
     if (*loc=='@@'&&loc<=limit) {loc++; goto false_alarm;}
     if (*loc++!='>')
       err_print("! Control codes are forbidden in control text");
@@ -985,14 +1041,13 @@
 of the string itself, and |id_loc| to its ending-plus-one location in the
 buffer.  We also set |loc| to the position just after the ending delimiter.
 
-@<Scan a verbatim string@>= {
-  id_first=loc++; *(limit+1)='@@'; *(limit+2)='>';
-  while (*loc!='@@' || *(loc+1)!='>') loc++;
-  if (loc>=limit) err_print("! Verbatim string didn't end");
+@<Scan a verbatim string@>=
+id_first=loc++; *(limit+1)='@@'; *(limit+2)='>';
+while (*loc!='@@' || *(loc+1)!='>') loc++;
+if (loc>=limit) err_print("! Verbatim string didn't end");
 @.Verbatim string didn't end@>
-  id_loc=loc; loc+=2;
-  return verbatim;
-}
+id_loc=loc; loc+=2;
+return verbatim;
 
 @** Phase one processing.
 We now have accumulated enough subroutines to make it possible to carry out
@@ -1019,7 +1074,6 @@
     @<Store cross-reference data for the current section@>@;
   changed_section[section_count]=change_exists;
     /* the index changes if anything does */
-  phase=2; /* prepare for second phase */
   @<Print error messages about unused or undefined section names@>@;
 }
 
@@ -1067,14 +1121,13 @@
 
 @ @c
 static void
-C_xref(@t\1\1@> /* makes cross-references for \CEE/ identifiers */
-  eight_bits spec_ctrl at t\2\2@>)
+C_xref( /* makes cross-references for \CEE/ identifiers */
+  eight_bits spec_ctrl)
 {
-  name_pointer p; /* a referenced name */
   while (next_control<format_code || next_control==spec_ctrl) {
     if (next_control>=identifier && next_control<=xref_typewriter) {
-      if (next_control>identifier) @<Replace |"@@@@"| by |"@@"| @>@;
-      p=id_lookup(id_first, id_loc,next_control-identifier); new_xref(p);
+      if (next_control>identifier) @<Replace |"@@@@"| by |"@@"|@>@;
+      new_xref(id_lookup(id_first,id_loc,next_control-identifier));
     }
     if (next_control==section_name) {
       section_xref_switch=cite_flag;
@@ -1126,8 +1179,8 @@
     case noop: case section_name:
       loc-=2; next_control=get_next(); /* scan to \.{@@>} */
       if (next_control>=xref_roman && next_control<=xref_typewriter) {
-        @<Replace |"@@@@"| by |"@@"| @>@;
-        new_xref(id_lookup(id_first, id_loc,next_control-identifier));
+        @<Replace |"@@@@"| by |"@@"|@>@;
+        new_xref(id_lookup(id_first,id_loc,next_control-identifier));
       }
       break;
   }
@@ -1203,19 +1256,17 @@
 definition is found in limbo.
 
 @<Process simple format in limbo@>=
-{
+if (get_next()!=identifier)
+  err_print("! Missing left identifier of @@s");
+ at .Missing left identifier...@>
+else {
+  lhs=id_lookup(id_first,id_loc,normal);
   if (get_next()!=identifier)
-    err_print("! Missing left identifier of @@s");
- at .Missing left identifier...@>
+    err_print("! Missing right identifier of @@s");
+ at .Missing right identifier...@>
   else {
-    lhs=id_lookup(id_first,id_loc,normal);
-    if (get_next()!=identifier)
-      err_print("! Missing right identifier of @@s");
- at .Missing right identifier...@>
-    else {
-      rhs=id_lookup(id_first,id_loc,normal);
-      lhs->ilk=rhs->ilk;
-    }
+    rhs=id_lookup(id_first,id_loc,normal);
+    lhs->ilk=rhs->ilk;
   }
 }
 
@@ -1223,7 +1274,7 @@
 |next_control>=begin_C|.
 
 @<Store cross-references in the \CEE/...@>=
-if (next_control<=section_name) {  /* |begin_C| or |section_name| */
+if (next_control<=section_name) { /* |begin_C| or |section_name| */
   if (next_control==begin_C) section_xref_switch=0;
   else {
     section_xref_switch=def_flag;
@@ -1257,8 +1308,7 @@
   if (p) {
     section_check(p->llink);
     cur_xref=(xref_pointer)p->xref;
-    if (cur_xref->num==file_flag) {an_output=true; cur_xref=cur_xref->xlink;}
-    else an_output=false;
+    if ((an_output=(cur_xref->num==file_flag))==true) cur_xref=cur_xref->xlink;
     if (cur_xref->num <def_flag) {
       fputs("\n! Never defined: <",stdout);
       print_section_name(p); putchar('>'); mark_harmless;
@@ -1297,7 +1347,7 @@
 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
+if the |carryover| parameter is |true|, a |"%"| in that line will be
 carried over to the next line (so that \TEX/ will ignore the completion
 of commented-out text).
 
@@ -1313,11 +1363,11 @@
 
 @ @c
 static void
-flush_buffer(@t\1\1@>
+flush_buffer(
 char *b, /* outputs from |out_buf+1| to |b|, where |b<=out_ptr| */
-boolean per_cent,boolean carryover at t\2\2@>)
+boolean per_cent,boolean carryover)
 {
-  char *j; j=b; /* pointer into |out_buf| */
+  char *j=b; /* pointer into |out_buf| */
   if (! per_cent) /* remove trailing blanks */
     while (j>out_buf && *j==' ') j--;
   c_line_write(j-out_buf);
@@ -1378,8 +1428,8 @@
 
 @ @c
 static void
-out_str(@t\1\1@> /* output characters from |s| to end of string */
-const char*s at t\2\2@>)
+out_str( /* output characters from |s| to end of string */
+const char*s)
 {
   while (*s) out(*s++);
 }
@@ -1441,7 +1491,7 @@
 {
   char s[6];
   sprintf(s,"%d",n); out_str(s);
-  if(changed_section[n]) out_str ("\\*");
+  if (changed_section[n]) out_str("\\*");
 @.\\*@>
 }
 
@@ -1546,9 +1596,9 @@
 @d app_tok(c) {if (tok_ptr+2>tok_mem_end) overflow("token"); *(tok_ptr++)=c;}
 
 @c
-static int copy_comment(@t\1\1@> /* copies \TeX\ code in comments */
+static int copy_comment( /* copies \TeX\ code in comments */
 boolean is_long_comment, /* is this a traditional \CEE/ comment? */
-int bal at t\2\2@>) /* brace balance */
+int bal) /* brace balance */
 {
   char c; /* current character being copied */
   while (true) {
@@ -1559,8 +1609,7 @@
 @.Input ended in mid-comment@>
           loc=buffer+1; goto done;
         }
-      }
-      else {
+      } else {
         if (bal>1) err_print("! Missing } in comment");
 @.Missing \} in comment@>
         goto done;
@@ -1583,7 +1632,7 @@
       }
     }
   }
-done:@<Clear |bal| and |return|@>@;
+done: @<Clear |bal| and |return|@>@;
 }
 
 @ @<Check for end of comment@>=
@@ -1601,9 +1650,11 @@
 @.Illegal use of @@...@>
     loc-=2; if (phase==2) *(tok_ptr-1)=' '; goto done;
   }
+} else {
+  if (c=='\\' && *loc!='@@') {
+    if (phase==2) app_tok(*(loc++))@t;@>@; else loc++;
+  }
 }
-else { if (c=='\\' && *loc!='@@') {
-  if (phase==2) app_tok(*(loc++))@; else loc++; } }
 
 @ We output
 enough right braces to keep \TEX/ happy.
@@ -1683,8 +1734,8 @@
 @d rbrace 8 /* denotes a right brace */
 @d decl_head 9 /* denotes an incomplete declaration */
 @d comma 10 /* denotes a comma */
- at d lpar 11 /* denotes a left parenthesis or left bracket */
- at d rpar 12 /* denotes a right parenthesis or right bracket */
+ at d lpar 11 /* denotes a left parenthesis */
+ at d rpar 12 /* denotes a right parenthesis */
 @d prelangle 13 /* denotes `$<$' before we know what it is */
 @d prerangle 14 /* denotes `$>$' before we know what it is */
 @d langle 15 /* denotes `$<$' when it's used as angle bracket in a template */
@@ -1706,10 +1757,13 @@
 @d insert 37 /* a scrap that gets combined with its neighbor */
 @d section_scrap 38 /* section name */
 @d dead 39 /* scrap that won't combine */
- at d ftemplate 59 /* \\{make\_pair} */
- at d new_exp 60 /* \&{new} and a following type identifier */
- at d begin_arg 61 /* \.{@@[} */
- at d end_arg 62 /* \.{@@]} */
+ at d ftemplate 63 /* \\{make\_pair} */
+ at d new_exp 64 /* \&{new} and a following type identifier */
+ at d begin_arg 65 /* \.{@@[} */
+ at d end_arg 66 /* \.{@@]} */
+ at d lbrack 67 /* denotes a left bracket */
+ at d rbrack 68 /* denotes a right bracket */
+ at d attr_head 69 /* denotes beginning of attribute */
 
 @<Private...@>=
 static char cat_name[256][12];
@@ -1774,20 +1828,19 @@
     strcpy(cat_name[new_exp],"new_exp");
     strcpy(cat_name[begin_arg],"@@["@q]@>);
     strcpy(cat_name[end_arg], at q[@>"@@]");
+    strcpy(cat_name[lbrack],"[");
+    strcpy(cat_name[rbrack],"]");
+    strcpy(cat_name[attr_head],"attr_head");
+    strcpy(cat_name[attr],"attr");
+    strcpy(cat_name[alignas_like],"alignas");
+    strcpy(cat_name[using_like],"using");
+    strcpy(cat_name[default_like],"default");
     strcpy(cat_name[0],"zero");
 
 @ This code allows \.{CWEAVE} to display its parsing steps.
 
- at c
-static void
-print_cat(@t\1\1@> /* symbolic printout of a category */
-eight_bits c at t\2\2@>)
-{
-  fputs(cat_name[c],stdout);
-}
+ at d print_cat(c) fputs(cat_name[(eight_bits)(c)],stdout)
 
-@ @<Predecl...@>=@+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.
@@ -1813,8 +1866,10 @@
 
 \yskip\hang |indent| causes future lines to be indented one more em;
 
-\yskip\hang |outdent| causes future lines to be indented one less em.
+\yskip\hang |outdent| causes future lines to be indented one less em;
 
+\yskip\hang |dindent| causes future lines to be indented two more ems.
+
 \yskip\noindent All of these tokens are removed from the \TEX/ output that
 comes from \CEE/ text between \pb\ signs; |break_space| and |force| and
 |big_force| become single spaces in this mode. The translation of other
@@ -1827,6 +1882,10 @@
 |force|, and/or |big_force| tokens is first replaced by a single token
 (the maximum of the given ones).
 
+A |dindent| token becomes \.{\\1\\1}. It is equivalent to a pair of |indent|
+tokens. However, if |dindent| immediately precedes |big_force|, the two tokens
+are swapped, so that the indentation happens after the line break.
+
 The token |math_rel| will be translated into
 \.{\\MRL\{}, and it will get a matching \.\} later.
 Other control sequences in the \TEX/ output will be
@@ -1854,6 +1913,7 @@
 @d end_translation 0223 /* special sentinel token at end of list */
 @d inserted 0224 /* sentinel to mark translations of inserts */
 @d qualifier 0225 /* introduces an explicit namespace qualifier */
+ at d dindent 0226 /* two more tabs (\.{\\1\\1}) */
 
 @ The raw input is converted into scraps according to the following table,
 which gives category codes followed by the translations.
@@ -1892,11 +1952,14 @@
 \.{@@=}string\.{@@>}&|exp|: \.{\\vb\{}string with special characters
   quoted\.\}&maybe\cr
 \.{@@'7'}&|exp|: \.{\\.\{@@'7'\}}&maybe\cr
-\.{077} or \.{\\77}&|exp|: \.{\\T\{\\\~77\}}&maybe\cr
-\.{0x7f}&|exp|: \.{\\T\{\\\^7f\}}&maybe\cr
+\.{077} or \.{\\77}&|exp|: \.{\\T\{\\\~77/\}}&maybe\cr
+\.{0x7f}&|exp|: \.{\\T\{\\\^7f/\}}&maybe\cr
+\.{0b10111}&|exp|: \.{\\T\{\\\\10111/\}}&maybe\cr
 \.{77}&|exp|: \.{\\T\{77\}}&maybe\cr
 \.{77L}&|exp|: \.{\\T\{77\\\$L\}}&maybe\cr
 \.{0.1E5}&|exp|: \.{\\T\{0.1\\\_5\}}&maybe\cr
+\.{0x10p3}&|exp|: \.{\\T\{\\\^10/\\\%3\}}&maybe\cr
+\.{1'000'000}&|exp|: \.{\\T\{1\\\ 000\\\ 000\}}&maybe\cr
 \.+&|ubinop|: \.+&yes\cr
 \.-&|ubinop|: \.-&yes\cr
 \.*&|raw_ubin|: \.*&yes\cr
@@ -1913,9 +1976,9 @@
 \.\~&|unop|: \.{\\CM}&yes\cr
 \.\&&|raw_ubin|: \.{\\AND}&yes\cr
 \.(&|lpar|: \.(&maybe\cr
-\.[&|lpar|: \.[&maybe\cr
 \.)&|rpar|: \.)&maybe\cr
-\.]&|rpar|: \.]&maybe\cr
+\.[&|lbrack|: \.[&maybe\cr
+\.]&|rbrack|: \.]&maybe\cr
 \.\{&|lbrace|: \.\{&yes\cr
 \.\}&|lbrace|: \.\}&yes\cr
 \.,&|comma|: \.,&yes\cr
@@ -1922,10 +1985,12 @@
 \.;&|semi|: \.;&maybe\cr
 \.:&|colon|: \.:&no\cr
 \.\# (within line)&|ubinop|: \.{\\\#}&yes\cr
-\.\# (at beginning)&|lproc|:  |force| |preproc_line| \.{\\\#}&no\cr
-end of \.\# line&|rproc|:  |force|&no\cr
+\.\# (at beginning)&|lproc|: |force| |preproc_line| \.{\\\#}&no\cr
+end of \.\# line&|rproc|: |force|&no\cr
 identifier&|exp|: \.{\\\\\{}identifier with underlines and
              dollar signs quoted\.\}&maybe\cr
+\.{alignas}&|alignas_like|: \stars&maybe\cr
+\.{alignof}&|sizeof_like|: \stars&maybe\cr
 \.{and}&|alfop|: \stars&yes\cr
 \.{and\_eq}&|alfop|: \stars&yes\cr
 \.{asm}&|sizeof_like|: \stars&maybe\cr
@@ -1937,13 +2002,25 @@
 \.{case}&|case_like|: \stars&maybe\cr
 \.{catch}&|catch_like|: \stars&maybe\cr
 \.{char}&|raw_int|: \stars&maybe\cr
+\.{char8\_t}&|raw_int|: \stars&maybe\cr
+\.{char16\_t}&|raw_int|: \stars&maybe\cr
+\.{char32\_t}&|raw_int|: \stars&maybe\cr
 \.{class}&|struct_like|: \stars&maybe\cr
 \.{clock\_t}&|raw_int|: \stars&maybe\cr
 \.{compl}&|alfop|: \stars&yes\cr
+\.{complex}&|int_like|: \stars&yes\cr
+\.{concept}&|int_like|: \stars&maybe\cr
 \.{const}&|const_like|: \stars&maybe\cr
+\.{consteval}&|const_like|: \stars&maybe\cr
+\.{constexpr}&|const_like|: \stars&maybe\cr
+\.{constinit}&|const_like|: \stars&maybe\cr
 \.{const\_cast}&|raw_int|: \stars&maybe\cr
 \.{continue}&|case_like|: \stars&maybe\cr
-\.{default}&|case_like|: \stars&maybe\cr
+\.{co\_await}&|case_like|: \stars&maybe\cr
+\.{co\_return}&|case_like|: \stars&maybe\cr
+\.{co\_yield}&|case_like|: \stars&maybe\cr
+\.{decltype}&|sizeof_like|: \stars&maybe\cr
+\.{default}&|default_like|: \stars&maybe\cr
 \.{define}&|define_like|: \stars&maybe\cr
 \.{defined}&|sizeof_like|: \stars&maybe\cr
 \.{delete}&|delete_like|: \stars&maybe\cr
@@ -1960,6 +2037,7 @@
 \.{export}&|int_like|: \stars&maybe\cr
 \.{extern}&|int_like|: \stars&maybe\cr
 \.{FILE}&|raw_int|: \stars&maybe\cr
+\.{false}&|normal|: \stars&maybe\cr
 \.{float}&|raw_int|: \stars&maybe\cr
 \.{for}&|for_like|: \stars&maybe\cr
 \.{fpos\_t}&|raw_int|: \stars&maybe\cr
@@ -1968,6 +2046,7 @@
 \.{if}&|if_like|: \stars&maybe\cr
 \.{ifdef}&|if_like|: \stars&maybe\cr
 \.{ifndef}&|if_like|: \stars&maybe\cr
+\.{imaginary}&|int_like|: \stars&maybe\cr
 \.{include}&|if_like|: \stars&maybe\cr
 \.{inline}&|int_like|: \stars&maybe\cr
 \.{int}&|raw_int|: \stars&maybe\cr
@@ -1979,9 +2058,11 @@
 \.{mutable}&|int_like|: \stars&maybe\cr
 \.{namespace}&|struct_like|: \stars&maybe\cr
 \.{new}&|new_like|: \stars&maybe\cr
+\.{noexcept}&|attr|: \stars&maybe\cr
 \.{not}&|alfop|: \stars&yes\cr
 \.{not\_eq}&|alfop|: \stars&yes\cr
 \.{NULL}&|exp|: \.{\\NULL}&yes\cr
+\.{nullptr}&|exp|: \.{\\NULL}&yes\cr
 \.{offsetof}&|raw_int|: \stars&maybe\cr
 \.{operator}&|operator_like|: \stars&maybe\cr
 \.{or}&|alfop|: \stars&yes\cr
@@ -1993,6 +2074,8 @@
 \.{public}&|public_like|: \stars&maybe\cr
 \.{register}&|int_like|: \stars&maybe\cr
 \.{reinterpret\_cast}&|raw_int|: \stars&maybe\cr
+\.{requires}&|int_like|: \stars&maybe\cr
+\.{restrict}&|int_like|: \stars&maybe\cr
 \.{return}&|case_like|: \stars&maybe\cr
 \.{short}&|raw_int|: \stars&maybe\cr
 \.{sig\_atomic\_t}&|raw_int|: \stars&maybe\cr
@@ -2000,6 +2083,7 @@
 \.{size\_t}&|raw_int|: \stars&maybe\cr
 \.{sizeof}&|sizeof_like|: \stars&maybe\cr
 \.{static}&|int_like|: \stars&maybe\cr
+\.{static\_assert}&|sizeof_like|: \stars&maybe\cr
 \.{static\_cast}&|raw_int|: \stars&maybe\cr
 \.{struct}&|struct_like|: \stars&maybe\cr
 \.{switch}&|for_like|: \stars&maybe\cr
@@ -2006,16 +2090,17 @@
 \.{template}&|template_like|: \stars&maybe\cr
 \.{TeX}&|exp|: \.{\\TeX}&yes\cr
 \.{this}&|exp|: \.{\\this}&yes\cr
+\.{thread\_local}&|raw_int|: \stars&maybe\cr
 \.{throw}&|case_like|: \stars&maybe\cr
 \.{time\_t}&|raw_int|: \stars&maybe\cr
 \.{try}&|else_like|: \stars&maybe\cr
 \.{typedef}&|typedef_like|: \stars&maybe\cr
-\.{typeid}&|raw_int|: \stars&maybe\cr
+\.{typeid}&|sizeof_like|: \stars&maybe\cr
 \.{typename}&|struct_like|: \stars&maybe\cr
 \.{undef}&|if_like|: \stars&maybe\cr
 \.{union}&|struct_like|: \stars&maybe\cr
 \.{unsigned}&|raw_int|: \stars&maybe\cr
-\.{using}&|int_like|: \stars&maybe\cr
+\.{using}&|using_like|: \stars&maybe\cr
 \.{va\_dcl}&|decl|: \stars&maybe\cr
 \.{va\_list}&|raw_int|: \stars&maybe\cr
 \.{virtual}&|int_like|: \stars&maybe\cr
@@ -2026,10 +2111,10 @@
 \.{xor}&|alfop|: \stars&yes\cr
 \.{xor\_eq}&|alfop|: \stars&yes\cr
 \.{@@,}&|insert|: \.{\\,}&maybe\cr
-\.{@@\v}&|insert|:  |opt| \.0&maybe\cr
-\.{@@/}&|insert|:  |force|&no\cr
-\.{@@\#}&|insert|:  |big_force|&no\cr
-\.{@@+}&|insert|:  |big_cancel| \.{\{\}} |break_space|
+\.{@@\v}&|insert|: |opt| \.0&maybe\cr
+\.{@@/}&|insert|: |force|&no\cr
+\.{@@\#}&|insert|: |big_force|&no\cr
+\.{@@+}&|insert|: |big_cancel| \.{\{\}} |break_space|
   \.{\{\}} |big_cancel|&no\cr
 \.{@@;}&|semi|: &maybe\cr
 \.{@@[@q]@>}&|begin_arg|: &maybe\cr
@@ -2049,7 +2134,7 @@
 
 \smallskip
 The construction \.{@@t}\thinspace stuff\/\thinspace\.{@@>} contributes
-\.{\\hbox\{}\thinspace  stuff\/\thinspace\.\} to the following scrap.
+\.{\\hbox\{}\thinspace stuff\/\thinspace\.\} to the following scrap.
 
 @i prod.w
 
@@ -2090,7 +2175,7 @@
   eight_bits cat;
   eight_bits mathness;
   union {
-    text_pointer Trans;
+    text_pointer Trans;@+ at t}\6{@>
     @<Rest of |trans_plus| union@>@;
   } trans_plus;
 } scrap;
@@ -2130,15 +2215,15 @@
 translated without line-break controls.
 
 @d id_flag 10240 /* signifies an identifier */
- at d res_flag 2*id_flag /* signifies a reserved word */
- at d section_flag 3*id_flag /* signifies a section name */
- at d tok_flag 4*id_flag /* signifies a token list */
- at d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+ at d res_flag (2*id_flag) /* signifies a reserved word */
+ at d section_flag (3*id_flag) /* signifies a section name */
+ at d tok_flag (4*id_flag) /* signifies a token list */
+ at d inner_tok_flag (5*id_flag) /* signifies a token list in `\pb' */
 
 @c
 static void
-print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
-text_pointer p at t\2\2@>)
+print_text( /* prints a token list for debugging; not used in |main| */
+text_pointer p)
 {
   token_pointer j; /* index into |tok_mem| */
   sixteen_bits r; /* remainder of token after the flag has been stripped off */
@@ -2145,15 +2230,18 @@
   if (p>=text_ptr) printf("BAD");
   else for (j=*p; j<*(p+1); j++) {
     r=*j%id_flag;
-    switch (*j/id_flag) {
-      case 1: printf("\\\\{"@q}@>); print_id((name_dir+r)); printf(@q{@>"}");
-        break; /* |id_flag| */
-      case 2: printf("\\&{"@q}@>); print_id((name_dir+r)); printf(@q{@>"}");
-        break; /* |res_flag| */
-      case 3: printf("<"); print_section_name((name_dir+r)); printf(">");
-        break; /* |section_flag| */
-      case 4: printf("[[%d]]",r); break; /* |tok_flag| */
-      case 5: printf("|[[%d]]|",r); break; /* |inner_tok_flag| */
+    switch (*j) {
+      case id_flag:
+        printf("\\\\{"@q}@>); print_id((name_dir+r)); putchar(@q{@>'}');
+        break;
+      case res_flag:
+        printf("\\&{"@q}@>); print_id((name_dir+r)); putchar(@q{@>'}');
+        break;
+      case section_flag:
+        putchar('<'); print_section_name((name_dir+r)); putchar('>');
+        break;
+      case tok_flag: printf("[[%d]]",r); break;
+      case inner_tok_flag: printf("|[[%d]]|",r); break;
       default: @<Print token |r| in symbolic form@>@;
     }
   }
@@ -2169,6 +2257,7 @@
   case cancel: printf("[cancel]"); break;
   case indent: printf("[indent]"); break;
   case outdent: printf("[outdent]"); break;
+  case dindent: printf("[dindent]"); break;
   case backup: printf("[backup]"); break;
   case opt: printf("[opt]"); break;
   case break_space: printf("[break]"); break;
@@ -2178,7 +2267,7 @@
   case quoted_char: j++; printf("[%o]",(unsigned int)*j); break;
   case end_translation: printf("[quit]"); break;
   case inserted: printf("[inserted]"); break;
-  default: putxchar(r);
+  default: putchar(r);
 }
 
 @ The production rules listed above are embedded directly into \.{CWEAVE},
@@ -2242,7 +2331,7 @@
 a different mathness from the left boundary of the second, we
 insert a \.{\$} in between.  Similarly, if at printing time some
 irreducible scrap has a |yes_math| boundary the scrap gets preceded
-or followed by a \.{\$}. The left boundary is |maybe_math| if and
+or followed by a~\.{\$}. The left boundary is |maybe_math| if and
 only if the right boundary is.
 
 The code below is an exact translation of the production rules into
@@ -2253,8 +2342,9 @@
 @d no_math 2 /* should be in horizontal mode */
 @d yes_math 1 /* should be in math mode */
 @d maybe_math 0 /* works in either horizontal or math mode */
- at d big_app2(a) big_app1(a);big_app1(a+1)
- at d big_app3(a) big_app2(a);big_app1(a+2)
+ at d big_app2(a) big_app1(a);@+big_app1(a+1)
+ at d big_app3(a) big_app2(a);@+big_app1(a+2)
+ at d big_app1_insert(p,c) big_app1(p);@+big_app(c);@+big_app1(p+1)
 @d app(a) *(tok_ptr++)=(token)(a)
 @d app1(a) *(tok_ptr++)=(token)(tok_flag+(int)((a)->trans-tok_start))
 
@@ -2271,7 +2361,7 @@
 app_str(
 const char *s)
 {
-  while (*s) app_tok(*(s++));
+  while (*s) app_tok(*s++);
 }
 
 static void
@@ -2278,12 +2368,12 @@
 big_app(
 token a)
 {
-        if (a==' ' || (a>=big_cancel && a<=big_force)) /* non-math token */ {
+        if (a==' ' || (a>=big_cancel && a<=big_force) || a==dindent)
+            /* non-math token */ {
                 if (cur_mathness==maybe_math) init_mathness=no_math;
                 else if (cur_mathness==yes_math) app_str("{}$");
                 cur_mathness=no_math;
-        }
-        else {
+        } else {
                 if (cur_mathness==maybe_math) init_mathness=yes_math;
                 else if (cur_mathness==no_math) app_str("${}");
                 cur_mathness=yes_math;
@@ -2320,7 +2410,7 @@
 @d cat2 (pp+2)->cat
 @d cat3 (pp+3)->cat
 @d lhs_not_simple (pp->cat!=public_like
-        && pp->cat!=semi 
+        && pp->cat!=semi
         && pp->cat!=prelangle
         && pp->cat!=prerangle @|
         && pp->cat!=template_like
@@ -2333,14 +2423,16 @@
         && pp->cat!=operator_like)
  /* not a production with left side length 1 */
 
-@<Match a production at |pp|, or increase |pp| if there is no match@>= {
-  if (cat1==end_arg && lhs_not_simple)
-    if (pp->cat==begin_arg) squash(pp,2,exp,-2,124);
-    else squash(pp,2,end_arg,-1,125);
-  else if (cat1==insert) squash(pp,2,pp->cat,-2,0);
-  else if (cat2==insert) squash(pp+1,2,(pp+1)->cat,-1,0);
-  else if (cat3==insert) squash(pp+2,2,(pp+2)->cat,0,0);
-  else
+@<Match a production at |pp|, or increase |pp| if there is no match@>=
+if (cat1==end_arg && lhs_not_simple)
+  if (pp->cat==begin_arg) squash(pp,2,exp,-2,124);
+  else squash(pp,2,end_arg,-1,125);
+else if (pp->cat==rbrack) squash(pp,1,rpar,-3,130);
+else if (pp->cat==using_like) squash(pp,1,int_like,-3,140);
+else if (cat1==insert) squash(pp,2,pp->cat,-2,0);
+else if (cat2==insert) squash(pp+1,2,(pp+1)->cat,-1,0);
+else if (cat3==insert) squash(pp+2,2,(pp+2)->cat,0,0);
+else
   switch (pp->cat) {
     case exp: @<Cases for |exp|@>@; @+break;
     case lpar: @<Cases for |lpar|@>@; @+break;
@@ -2389,9 +2481,13 @@
     case typedef_like: @<Cases for |typedef_like|@>@; @+break;
     case delete_like: @<Cases for |delete_like|@>@; @+break;
     case question: @<Cases for |question|@>@; @+break;
+    case alignas_like: @<Cases for |alignas_like|@>@; @+break;
+    case lbrack: @<Cases for |lbrack|@>@; @+break;
+    case attr_head: @<Cases for |attr_head|@>@; @+break;
+    case attr: @<Cases for |attr|@>@; @+break;
+    case default_like: @<Cases for |default_like|@>@; @+break;
   }
-  pp++; /* if no match was found, we move to the right */
-}
+pp++; /* if no match was found, we move to the right */
 
 @ In \CEE/, new specifier names can be defined via |typedef|, and we want
 to make the parser recognize future occurrences of the identifier thus
@@ -2457,8 +2553,8 @@
 
 @c
 static void
-make_reserved(@t\1\1@> /* make the first identifier in |p->trans| like |int| */
-scrap_pointer p at t\2\2@>)
+make_reserved( /* make the first identifier in |p->trans| like |int| */
+scrap_pointer p)
 {
   sixteen_bits tok_value; /* the name of this identifier, plus its flag */
   token_pointer tok_loc; /* pointer to |tok_value| */
@@ -2465,14 +2561,12 @@
   if ((tok_loc=find_first_ident(p->trans))<=operator_found)
     return; /* this should not happen */
   tok_value=*tok_loc;
-  for (;p<=scrap_ptr; p==lo_ptr? p=hi_ptr: p++) {
-    if (p->cat==exp) {
+  for (;p<=scrap_ptr; p==lo_ptr? p=hi_ptr: p++)
+    if (p->cat==exp)
       if (**(p->trans)==tok_value) {
         p->cat=raw_int;
         **(p->trans)=tok_value%id_flag+res_flag;
       }
-    }
-  }
   (name_dir+(sixteen_bits)(tok_value%id_flag))->ilk=raw_int;
   *tok_loc=tok_value%id_flag+res_flag;
 }
@@ -2488,9 +2582,9 @@
 
 @c
 static void
-make_underlined(@t\1\1@>
+make_underlined(
 /* underline the entry for the first identifier in |p->trans| */
-scrap_pointer p at t\2\2@>)
+scrap_pointer p)
 {
   token_pointer tok_loc; /* where the first identifier appears */
   if ((tok_loc=find_first_ident(p->trans))<=operator_found)
@@ -2535,11 +2629,11 @@
 (namely, at |p->xref|), but rather right before |q|.
 
 @<Insert new cross-reference at |q|...@>=
-  append_xref(0); /* this number doesn't matter */
-  xref_ptr->xlink=(xref_pointer)p->xref; r=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 */
+append_xref(0); /* this number doesn't matter */
+xref_ptr->xlink=(xref_pointer)p->xref; r=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 */
 
 @ Now comes the code that tries to match each production starting
 with a particular type of scrap. Whenever a match is discovered,
@@ -2548,7 +2642,7 @@
 
 @<Cases for |exp|@>=
 if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  make_underlined(pp); big_app1(pp); big_app(indent); app(indent);
+  make_underlined(pp); big_app(dindent); big_app1(pp);
   reduce(pp,1,fn_decl,0,1);
 }
 else if (cat1==unop) squash(pp,2,exp,-2,2);
@@ -2562,21 +2656,25 @@
 else if (cat1==cast && cat2==colon) squash(pp+2,1,base,0,5);
 else if (cat1==semi) squash(pp,2,stmt,-1,6);
 else if (cat1==colon) {
-  make_underlined (pp);  squash(pp,2,tag,-1,7);
+  make_underlined (pp); squash(pp,2,tag,-1,7);
 }
 else if (cat1==rbrace) squash(pp,1,stmt,-1,8);
 else if (cat1==lpar && cat2==rpar && (cat3==const_like || cat3==case_like)) {
-  big_app1(pp+2); big_app(' '); big_app1(pp+3); reduce(pp+2,2,rpar,0,9);
+  big_app1_insert(pp+2,' '); reduce(pp+2,2,rpar,0,9);
 }
 else if (cat1==cast && (cat2==const_like || cat2==case_like)) {
-  big_app1(pp+1); big_app(' '); big_app1(pp+2); reduce(pp+1,2,cast,0,9);
+  big_app1_insert(pp+1,' '); reduce(pp+1,2,cast,0,9);
 }
 else if (cat1==exp || cat1==cast) squash(pp,2,exp,-2,10);
+else if (cat1==attr) {
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,142);
+}
+else if (cat1==colcol && cat2==int_like) squash(pp,3,int_like,-2,152);
 
 @ @<Cases for |lpar|@>=
 if ((cat1==exp||cat1==ubinop) && cat2==rpar) squash(pp,3,exp,-2,11);
 else if (cat1==rpar) {
-  big_app1(pp); app('\\'); app(','); big_app1(pp+1);
+  big_app1(pp); app_str("\\,"); big_app1(pp+1);
 @.\\,@>
   reduce(pp,2,exp,-2,12);
 }
@@ -2594,15 +2692,13 @@
 
 @ @<Cases for |ubinop|@>=
 if (cat1==cast && cat2==rpar) {
-  big_app('{'); big_app1(pp); big_app('}'); big_app1(pp+1);
-  reduce(pp,2,cast,-2,17);
+  big_app('{'); big_app1_insert(pp,'}'); reduce(pp,2,cast,-2,17);
 }
 else if (cat1==exp || cat1==int_like) {
-  big_app('{'); big_app1(pp); big_app('}'); big_app1(pp+1);
-  reduce(pp,2,cat1,-2,18);
+  big_app('{'); big_app1_insert(pp,'}'); reduce(pp,2,cat1,-2,18);
 }
 else if (cat1==binop) {
-  big_app(math_rel); big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
+  big_app(math_rel); big_app1_insert(pp,'{'); big_app('}');
   big_app('}'); reduce(pp,2,binop,-1,19);
 }
 
@@ -2616,7 +2712,7 @@
 @ @<Cases for |cast|@>=
 if (cat1==lpar) squash(pp,2,lpar,-1,21);
 else if (cat1==exp) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,exp,-2,21);
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,21);
 }
 else if (cat1==semi) squash(pp,1,exp,-2,22);
 
@@ -2623,12 +2719,12 @@
 @ @<Cases for |sizeof_like|@>=
 if (cat1==cast) squash(pp,2,exp,-2,23);
 else if (cat1==exp) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,exp,-2,24);
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,24);
 }
 
 @ @<Cases for |int_like|@>=
 if (cat1==int_like|| cat1==struct_like) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,cat1,-2,25);
+  big_app1_insert(pp,' '); reduce(pp,2,cat1,-2,25);
 }
 else if (cat1==exp && (cat2==raw_int||cat2==struct_like))
   squash(pp,2,int_like,-2,26);
@@ -2644,7 +2740,8 @@
 @ @<Cases for |colcol|@>=
 if (cat1==exp||cat1==int_like) {
   app(qualifier); squash(pp,2,cat1,-2,31);
-}@+else if (cat1==colcol) squash(pp,2,colcol,-1,32);
+}
+else if (cat1==colcol) squash(pp,2,colcol,-1,32);
 
 @ @<Cases for |decl_head|@>=
 if (cat1==comma) {
@@ -2651,10 +2748,9 @@
   big_app2(pp); big_app(' '); reduce(pp,2,decl_head,-1,33);
 }
 else if (cat1==ubinop) {
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
-  reduce(pp,2,decl_head,-1,34);
+  big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,decl_head,-1,34);
 }
-else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
+else if (cat1==exp && cat2!=lpar && cat2!=lbrack && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1); squash(pp,2,decl_head,-1,35);
 }
 else if ((cat1==binop||cat1==colon) && cat2==exp && (cat3==comma ||
@@ -2662,18 +2758,19 @@
   squash(pp,3,decl_head,-1,36);
 else if (cat1==cast) squash(pp,2,decl_head,-1,37);
 else if (cat1==lbrace || cat1==int_like || cat1==decl) {
-  big_app1(pp); big_app(indent); app(indent); reduce(pp,1,fn_decl,0,38);
+  big_app(dindent); big_app1(pp); reduce(pp,1,fn_decl,0,38);
 }
 else if (cat1==semi) squash(pp,2,decl,-1,39);
+else if (cat1==attr) {
+  big_app1_insert(pp,' '); reduce(pp,2,decl_head,-1,139);
+}
 
 @ @<Cases for |decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1);
-  reduce(pp,2,decl,-1,40);
+  big_app1_insert(pp,force); reduce(pp,2,decl,-1,40);
 }
 else if (cat1==stmt || cat1==function) {
-  big_app1(pp); big_app(big_force);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,41);
+  big_app1_insert(pp,big_force); reduce(pp,2,cat1,-1,41);
 }
 
 @ @<Cases for |base|@>=
@@ -2683,7 +2780,7 @@
     app(opt); app('9'); reduce(pp,3,base,0,42);
   }
   else if (cat2==lbrace) {
-    big_app1(pp); big_app(' '); big_app1(pp+1); big_app(' '); big_app1(pp+2);
+    big_app1_insert(pp,' '); big_app(' '); big_app1(pp+2);
     reduce(pp,3,lbrace,-2,43);
   }
 }
@@ -2690,12 +2787,12 @@
 
 @ @<Cases for |struct_like|@>=
 if (cat1==lbrace) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,struct_head,0,44);
+  big_app1_insert(pp,' '); reduce(pp,2,struct_head,0,44);
 }
 else if (cat1==exp||cat1==int_like) {
   if (cat2==lbrace || cat2==semi) {
     make_underlined(pp+1); make_reserved(pp+1);
-    big_app1(pp); big_app(' '); big_app1(pp+1);
+    big_app1_insert(pp,' ');
     if (cat2==semi) reduce(pp,2,decl_head,0,45);
     else {
       big_app(' '); big_app1(pp+2);reduce(pp,3,struct_head,0,46);
@@ -2703,14 +2800,20 @@
   }
   else if (cat2==colon) squash(pp+2,1,base,2,47);
   else if (cat2!=base) {
-    big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,int_like,-2,48);
+    big_app1_insert(pp,' '); reduce(pp,2,int_like,-2,48);
   }
 }
+else if (cat1==attr) {
+  big_app1_insert(pp,' '); reduce(pp,2,struct_like,-3,141);
+}
+else if (cat1==struct_like) {
+  big_app1_insert(pp,' '); reduce(pp,2,struct_like,-3,151);
+}
 
 @ @<Cases for |struct_head|@>=
 if ((cat1==decl || cat1==stmt || cat1==function) && cat2==rbrace) {
   big_app1(pp); big_app(indent); big_app(force); big_app1(pp+1);
-  big_app(outdent); big_app(force);  big_app1(pp+2);
+  big_app(outdent); big_app(force); big_app1(pp+2);
   reduce(pp,3,int_like,-2,49);
 }
 else if (cat1==rbrace) {
@@ -2721,27 +2824,30 @@
 
 @ @<Cases for |fn_decl|@>=
 if (cat1==decl) {
-  big_app1(pp); big_app(force); big_app1(pp+1); reduce(pp,2,fn_decl,0,51);
+  big_app1_insert(pp,force); reduce(pp,2,fn_decl,0,51);
 }
 else if (cat1==stmt) {
   big_app1(pp); app(outdent); app(outdent); big_app(force);
   big_app1(pp+1); reduce(pp,2,function,-1,52);
 }
+else if (cat1==attr) {
+  big_app1_insert(pp,' '); reduce(pp,2,fn_decl,0,157);
+}
 
 @ @<Cases for |function|@>=
 if (cat1==function || cat1==decl || cat1==stmt) {
-  big_app1(pp); big_app(big_force); big_app1(pp+1); reduce(pp,2,cat1,-1,53);
+  big_app1_insert(pp,big_force); reduce(pp,2,cat1,-1,53);
 }
 
 @ @<Cases for |lbrace|@>=
 if (cat1==rbrace) {
-  big_app1(pp); app('\\'); app(','); big_app1(pp+1);
+  big_app1(pp); app_str("\\,"); big_app1(pp+1);
 @.\\,@>
   reduce(pp,2,stmt,-1,54);
 }
 else if ((cat1==stmt||cat1==decl||cat1==function) && cat2==rbrace) {
-  big_app(force); big_app1(pp);  big_app(indent); big_app(force);
-  big_app1(pp+1); big_app(force); big_app(backup);  big_app1(pp+2);
+  big_app(force); big_app1(pp); big_app(indent); big_app(force);
+  big_app1(pp+1); big_app(force); big_app(backup); big_app1(pp+2);
   big_app(outdent); big_app(force); reduce(pp,3,stmt,-1,55);
 }
 else if (cat1==exp) {
@@ -2751,7 +2857,7 @@
 
 @ @<Cases for |if_like|@>=
 if (cat1==exp) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,if_clause,0,57);
+  big_app1_insert(pp,' '); reduce(pp,2,if_clause,0,57);
 }
 
 @ @<Cases for |else_like|@>=
@@ -2778,19 +2884,24 @@
     big_app1(pp+1); big_app(outdent); big_app(force); big_app1(pp+2);
     if (cat3==if_like) {
       big_app(' '); big_app1(pp+3); reduce(pp,4,if_like,0,63);
-    }@+else reduce(pp,3,else_like,0,64);
+    }
+    else reduce(pp,3,else_like,0,64);
   }
   else squash(pp,1,else_like,0,65);
 }
+else if (cat1==attr) {
+  big_app1_insert(pp,' '); reduce(pp,2,if_head,0,146);
+}
 
 @ @<Cases for |if_head|@>=
 if (cat1==stmt || cat1==exp) {
   if (cat2==else_like) {
     big_app(force); big_app1(pp); big_app(break_space); app(noop);
-    big_app(cancel); big_app1(pp+1); big_app(force); big_app1(pp+2);
+    big_app(cancel); big_app1_insert(pp+1,force);
     if (cat3==if_like) {
       big_app(' '); big_app1(pp+3); reduce(pp,4,if_like,0,66);
-    }@+else reduce(pp,3,else_like,0,67);
+    }
+    else reduce(pp,3,else_like,0,67);
   }
   else squash(pp,1,else_head,0,68);
 }
@@ -2806,22 +2917,23 @@
 if (cat1==semi) squash(pp,2,stmt,-1,70);
 else if (cat1==colon) squash(pp,2,tag,-1,71);
 else if (cat1==exp) {
-  big_app1(pp); big_app(' ');  big_app1(pp+1);  reduce(pp,2,exp,-2,72);
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,72);
 }
 
 @ @<Cases for |catch_like|@>=
 if (cat1==cast || cat1==exp) {
-  big_app2(pp); big_app(indent); big_app(indent); reduce(pp,2,fn_decl,0,73);
+  big_app1_insert(pp,dindent); reduce(pp,2,fn_decl,0,73);
 }
 
 @ @<Cases for |tag|@>=
 if (cat1==tag) {
-  big_app1(pp); big_app(break_space); big_app1(pp+1); reduce(pp,2,tag,-1,74);
+  big_app1_insert(pp,break_space); reduce(pp,2,tag,-1,74);
 }
 else if (cat1==stmt||cat1==decl||cat1==function) {
-  big_app(force); big_app(backup); big_app1(pp); big_app(break_space);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,75);
+  big_app(force); big_app(backup); big_app1_insert(pp,break_space);
+  reduce(pp,2,cat1,-1,75);
 }
+else if (cat1==rbrace) squash(pp,1,decl,-1,156);
 
 @ The user can decide at run-time whether short statements should be
 grouped together on the same line.
@@ -2833,12 +2945,8 @@
 
 @ @<Cases for |stmt|@>=
 if (cat1==stmt||cat1==decl||cat1==function) {
-  big_app1(pp);
-  if (cat1==function) big_app(big_force);
-  else if (cat1==decl) big_app(big_force);
-  else if (force_lines) big_app(force);
-  else big_app(break_space);
-  big_app1(pp+1); reduce(pp,2,cat1,-1,76);
+  big_app1_insert(pp, (cat1==function || cat1==decl) ? big_force :
+     force_lines ? force : break_space); reduce(pp,2,cat1,-1,76);
 }
 
 @ @<Cases for |semi|@>=
@@ -2846,7 +2954,7 @@
 
 @ @<Cases for |lproc|@>=
 if (cat1==define_like) make_underlined(pp+2);
-if (cat1==else_like || cat1==if_like ||cat1==define_like)
+if (cat1==else_like || cat1==if_like || cat1==define_like)
   squash(pp,2,lproc,0,78);
 else if (cat1==rproc) {
   app(inserted); big_app2(pp); reduce(pp,2,insert,-1,79);
@@ -2856,7 +2964,7 @@
     reduce(pp,3,insert,-1,80);
   }
   else if (cat2==exp && cat3==rproc && cat1==exp) {
-    app(inserted); big_app1(pp); big_app(' '); big_app1(pp+1); app_str(" \\5");
+    app(inserted); big_app1_insert(pp,' '); app_str("\\5");
 @.\\5@>
     big_app2(pp+2); reduce(pp,4,insert,-1,80);
   }
@@ -2880,9 +2988,12 @@
 init_mathness=cur_mathness=yes_math;
 app('>'); reduce(pp,1,binop,-2,85);
 
-@ @<Cases for |langle|@>=
+@ @d reserve_typenames flags['t']
+  /* should we treat \&{typename} in a template like \&{typedef}? */
+
+@<Cases for |langle|@>=
 if (cat1==prerangle) {
-  big_app1(pp); app('\\'); app(','); big_app1(pp+1);
+  big_app1(pp); app_str("\\,"); big_app1(pp+1);
 @.\\,@>
   reduce(pp,2,cast,-1,86);
 }
@@ -2892,31 +3003,42 @@
     big_app3(pp); app(opt); app('9'); reduce(pp,3,langle,0,88);
   }
 }
+else if ((cat1==struct_like) @|
+  && (cat2==exp || cat2==int_like) @|
+  && (cat3==comma || cat3==prerangle)) {
+    make_underlined(pp+2); if (reserve_typenames) make_reserved(pp+2);
+    big_app2(pp); big_app(' '); big_app2(pp+2);
+    if (cat3==comma) reduce(pp,4,langle,0,153);
+    else reduce(pp,4,cast,-1,154);
+  }
 
 @ @<Cases for |template_like|@>=
 if (cat1==exp && cat2==prelangle) squash(pp+2,1,langle,2,89);
 else if (cat1==exp || cat1==raw_int) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,cat1,-2,90);
-}@+ else squash(pp,1,raw_int,0,91);
+  big_app1_insert(pp,' '); reduce(pp,2,cat1,-2,90);
+}
+else if (cat1==cast && cat2==struct_like) {
+  big_app1_insert(pp,' '); reduce(pp,2,struct_like,0,155);
+}
+else squash(pp,1,raw_int,0,91);
 
 @ @<Cases for |new_like|@>=
 if (cat1==lpar && cat2==exp && cat3==rpar) squash(pp,4,new_like,0,92);
 else if (cat1==cast) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,exp,-2,93);
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,93);
 }
 else if (cat1!=lpar) squash(pp,1,new_exp,0,94);
 
 @ @<Cases for |new_exp|@>=
 if (cat1==int_like || cat1==const_like) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,new_exp,0,95);
+  big_app1_insert(pp,' '); reduce(pp,2,new_exp,0,95);
 }
 else if (cat1==struct_like && (cat2==exp || cat2==int_like)) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); big_app(' ');
+  big_app1_insert(pp,' '); big_app(' ');
   big_app1(pp+2); reduce(pp,3,new_exp,0,96);
 }
 else if (cat1==raw_ubin) {
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
-  reduce(pp,2,new_exp,0,97);
+  big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,new_exp,0,97);
 }
 else if (cat1==lpar) squash(pp,1,exp,-2,98);
 else if (cat1==exp) {
@@ -2931,7 +3053,7 @@
 
 @ @<Cases for |for_like|@>=
 if (cat1==exp) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,else_like,-2,102);
+  big_app1_insert(pp,' '); reduce(pp,2,else_like,-2,102);
 }
 
 @ @<Cases for |raw_ubin|@>=
@@ -2938,7 +3060,8 @@
 if (cat1==const_like) {
   big_app2(pp); app_str("\\ "); reduce(pp,2,raw_ubin,0,103);
 @.\\\ @>
-} else squash(pp,1,ubinop,-2,104);
+}
+else squash(pp,1,ubinop,-2,104);
 
 @ @<Cases for |const_like|@>=
 squash(pp,1,int_like,-2,105);
@@ -2948,16 +3071,16 @@
 else if (cat1==colcol) squash(pp,2,colcol,-1,107);
 else if (cat1==cast) squash(pp,2,raw_int,0,108);
 else if (cat1==lpar) squash(pp,1,exp,-2,109);
+else if (cat1==lbrack) squash(pp,1,exp,-2,144);
 else if (cat1!=langle) squash(pp,1,int_like,-3,110);
 
 @ @<Cases for |operator_like|@>=
 if (cat1==binop || cat1==unop || cat1==ubinop) {
   if (cat2==binop) break;
-  big_app1(pp); big_app('{'); big_app1(pp+1); big_app('}');
-  reduce(pp,2,exp,-2,111);
+  big_app1_insert(pp,'{'); big_app('}'); reduce(pp,2,exp,-2,111);
 }
 else if (cat1==new_like || cat1==delete_like) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,exp,-2,112);
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,112);
 }
 else if (cat1==comma) squash(pp,2,exp,-2,113);
 else if (cat1!=raw_ubin) squash(pp,1,new_exp,0,114);
@@ -2966,11 +3089,11 @@
 if ((cat1==int_like || cat1==cast) && (cat2==comma || cat2==semi))
   squash(pp+1,1,exp,-1,115);
 else if (cat1==int_like) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,typedef_like,0,116);
+  big_app1_insert(pp,' '); reduce(pp,2,typedef_like,0,116);
 }
 else if (cat1==exp && cat2!=lpar && cat2!=exp && cat2!=cast) {
   make_underlined(pp+1); make_reserved(pp+1);
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,typedef_like,0,117);
+  big_app1_insert(pp,' '); reduce(pp,2,typedef_like,0,117);
 }
 else if (cat1==comma) {
   big_app2(pp); big_app(' '); reduce(pp,2,typedef_like,0,118);
@@ -2977,18 +3100,17 @@
 }
 else if (cat1==semi) squash(pp,2,decl,-1,119);
 else if (cat1==ubinop && (cat2==ubinop || cat2==cast)) {
-  big_app('{'); big_app1(pp+1); big_app('}'); big_app1(pp+2);
-  reduce(pp+1,2,cat2,0,120);
+  big_app('{'); big_app1_insert(pp+1,'}'); reduce(pp+1,2,cat2,0,120);
 }
 
 @ @<Cases for |delete_like|@>=
 if (cat1==lpar && cat2==rpar) {
-  big_app2(pp); app('\\'); app(','); big_app1(pp+2);
+  big_app2(pp); app_str("\\,"); big_app1(pp+2);
 @.\\,@>
   reduce(pp,3,delete_like,0,121);
 }
 else if (cat1==exp) {
-  big_app1(pp); big_app(' '); big_app1(pp+1); reduce(pp,2,exp,-2,122);
+  big_app1_insert(pp,' '); reduce(pp,2,exp,-2,122);
 }
 
 @ @<Cases for |question|@>=
@@ -2997,6 +3119,51 @@
   squash(pp,3,binop,-2,123);
 }
 
+@ @<Cases for |alignas_like|@>=
+if (cat1==decl_head) squash(pp,2,attr,-1,126);
+else if (cat1==exp) squash(pp,2,attr,-1,127);
+else if (cat1==cast) squash(pp,2,attr,-1,158);
+
+@ @<Cases for |lbrack|@>=
+if (cat1==lbrack)
+  if (cat2==rbrack && cat3==rbrack) squash(pp,4,exp,-2,147);
+  else squash(pp,2,attr_head,-1,128);
+else squash(pp,1,lpar,-1,129);
+
+@ @<Cases for |attr_head|@>=
+if (cat1==rbrack && cat2==rbrack) squash(pp,3,attr,-1,131);
+else if (cat1==exp) squash(pp,2,attr_head,0,132);
+else if (cat1==using_like && cat2==exp && cat3==colon) {
+  big_app2(pp); big_app(' '); big_app2(pp+2); big_app(' ');
+  reduce(pp,4,attr_head,0,133);
+}
+else if (cat1==comma) squash(pp,2,attr_head,0,145);
+
+@ @<Cases for |attr|@>=
+if (cat1==lbrace || cat1==stmt) {
+  big_app1_insert(pp,' '); reduce(pp,2,cat1,-2,134);
+}
+else if (cat1==tag) {
+  big_app1_insert(pp,' '); reduce(pp,2,tag,-1,135);
+}
+else if (cat1==semi) squash(pp,2,stmt,-2,136);
+else if (cat1==attr) {
+  big_app1_insert(pp,' '); reduce(pp,2,attr,-1,137);
+}
+else if (cat1==decl_head) {
+  big_app1_insert(pp,' '); reduce(pp,2,decl_head,-1,138);
+}
+else if (cat1==typedef_like) {
+  big_app1_insert(pp,' '); reduce(pp,2,typedef_like,0,143);
+}
+else if (cat1==function) {
+  big_app1_insert(pp,' '); reduce(pp,2,function,-1,148);
+}
+
+@ @<Cases for |default_like|@>=
+if (cat1==colon) squash(pp,1,case_like,-3,149);
+else squash(pp,1,exp,-2,150);
+
 @ Now here's the |reduce| procedure used in our code for productions.
 
 The `|freeze_text|' macro is used to give official status to a token list.
@@ -3007,7 +3174,7 @@
 stored in the |tok_start| array. After saying |freeze_text|, the
 old current token list becomes legitimate, and its number is the current
 value of |text_ptr-1| since |text_ptr| has been increased. The new
-current token list is empty and ready to be appended to.
+current token list is empty and ready to be appended~to.
 Note that |freeze_text| does not check to see that |text_ptr| hasn't gotten
 too large, since it is assumed that this test was done beforehand.
 
@@ -3096,7 +3263,7 @@
 @<Make sure the entries...@>=
 if (lo_ptr<pp+3) {
   while (hi_ptr<=scrap_ptr && lo_ptr!=pp+3) {
-    (++lo_ptr)->cat=hi_ptr->cat; lo_ptr->mathness=(hi_ptr)->mathness;
+    (++lo_ptr)->cat=hi_ptr->cat; lo_ptr->mathness=hi_ptr->mathness;
     lo_ptr->trans=(hi_ptr++)->trans;
   }
   for (i=lo_ptr+1;i<=pp+3;i++) i->cat=0;
@@ -3103,27 +3270,30 @@
 }
 
 @ If \.{CWEAVE} is being run in debugging mode, the production numbers and
-current stack categories will be printed out when |tracing| is set to 2;
+current stack categories will be printed out when |tracing| is set to |fully|;
 a sequence of two or more irreducible scraps will be printed out when
-|tracing| is set to 1.
+|tracing| is set to |partly|.
 
+ at d off 0
+ at d partly 1
+ at d fully 2
+
 @<Private...@>=
-static int tracing; /* can be used to show parsing details */
+static int tracing=off; /* can be used to show parsing details */
 
 @ @<Print a snapsh...@>=
-{ 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('-');
-    }
-    if (hi_ptr<=scrap_ptr) fputs("...",stdout); /* indicate that more is coming */
+if (tracing==fully) {
+  scrap_pointer k; /* pointer into |scrap_info|; shadows |short k| */
+  printf("\n%d:",n);
+  for (k=scrap_base; k<=lo_ptr; k++) {
+    if (k==pp) putchar('*'); else putchar(' ');
+    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('-');
   }
+  if (hi_ptr<=scrap_ptr) printf("..."); /* indicate that more is coming */
 }
 
 @ The |translate| function assumes that scraps have been stored in
@@ -3143,8 +3313,8 @@
 static text_pointer
 translate(void) /* converts a sequence of scraps */
 {
-  scrap_pointer i, /* index into |cat| */
-  j; /* runs through final scraps */
+  scrap_pointer i; /* index into |cat| */
+  scrap_pointer j; /* runs through final scraps */
   pp=scrap_base; lo_ptr=pp-1; hi_ptr=pp;
   @<If tracing, print an indication of where we are@>@;
   @<Reduce the scraps...@>@;
@@ -3158,30 +3328,29 @@
 blank spaces, with dollar signs surrounding the translations of scraps
 where appropriate.
 
-@<Combine the irreducible...@>= {
-  @<If semi-tracing, show the irreducible scraps@>@;
-  for (j=scrap_base; j<=lo_ptr; j++) {
-    if (j!=scrap_base) app(' ');
-    if (j->mathness % 4 == yes_math) app('$');
-    app1(j);
-    if (j->mathness / 4 == yes_math) app('$');
-    if (tok_ptr+6>tok_mem_end) overflow("token");
-  }
-  freeze_text; return text_ptr-1;
+@<Combine the irreducible...@>=
+@<If semi-tracing, show the irreducible scraps@>@;
+for (j=scrap_base; j<=lo_ptr; j++) {
+  if (j!=scrap_base) app(' ');
+  if (j->mathness % 4 == yes_math) app('$');
+  app1(j);
+  if (j->mathness / 4 == yes_math) app('$');
+  if (tok_ptr+6>tok_mem_end) overflow("token");
 }
+freeze_text; return text_ptr-1;
 
 @ @<If semi-tracing, show the irreducible scraps@>=
-if (lo_ptr>scrap_base && tracing==1) {
+if (lo_ptr>scrap_base && tracing==partly) {
   printf("\nIrreducible scrap sequence in section %d:",section_count);
 @.Irreducible scrap sequence...@>
   mark_harmless;
   for (j=scrap_base; j<=lo_ptr; j++) {
-    printf(" "); print_cat(j->cat);
+    putchar(' '); print_cat(j->cat);
   }
 }
 
 @ @<If tracing,...@>=
-if (tracing==2) {
+if (tracing==fully) {
   printf("\nTracing after l. %d:\n",cur_line); mark_harmless;
 @.Tracing after...@>
   if (loc>buffer+50) {
@@ -3208,10 +3377,9 @@
 
 @c
 static void
-C_parse(@t\1\1@> /* creates scraps from \CEE/ tokens */
-  eight_bits spec_ctrl at t\2\2@>)
+C_parse( /* creates scraps from \CEE/ tokens */
+  eight_bits spec_ctrl)
 {
-  int count; /* characters remaining before string break */
   while (next_control<format_code || next_control==spec_ctrl) {
     @<Append the scrap appropriate to |next_control|@>@;
     next_control=get_next();
@@ -3236,7 +3404,7 @@
 switch (next_control) {
   case section_name:
     app(section_flag+(int)(cur_section-name_dir));
-    app_scrap(section_scrap,maybe_math);
+    app_scrap(section_scrap,maybe_math);@+
     app_scrap(exp,yes_math);@+break;
   case string: case constant: case verbatim:
     @<Append a string or constant@>@;@+break;
@@ -3271,8 +3439,10 @@
 @.\\\#@>
   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(next_control);@+app_scrap(lpar,maybe_math);@+break;
+  case ')': app(next_control);@+app_scrap(rpar,maybe_math);@+break;
+  case '[': app(next_control);@+app_scrap(lbrack,maybe_math);@+break;
+  case ']': app(next_control);@+app_scrap(rbrack,maybe_math);@+break;
   case '{': app_str("\\{"@q}@>);@+app_scrap(lbrace,yes_math);@+break;
 @.\\\{@>@q}@>
   case '}': app_str(@q{@>"\\}");@+app_scrap(rbrace,yes_math);@+break;
@@ -3280,10 +3450,10 @@
   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@>  @<Cases involving nonstandard characters@>@;
+  @t\4@> @<Cases involving nonstandard characters@>@;
   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('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("\\#");
@@ -3320,7 +3490,7 @@
 standard ones. They are converted to \TEX/ control sequences so that it is
 possible to keep \.{CWEAVE} from outputting unusual |char| codes.
 
-@<Cases involving nonstandard...@>=
+@<Cases involving nonstandard...@>=@t\1\quad@>
 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;
@@ -3362,8 +3532,7 @@
 \TEX/ will print them properly.
 @^special string characters@>
 
-@<Append a string or...@>=
-count= -1;
+@<Append a string or...@>={@+ int count=-1; /* characters remaining before string break */
 if (next_control==constant) app_str("\\T{"@q}@>);
 @.\\T@>
 else if (next_control==string) {
@@ -3384,7 +3553,7 @@
   }
   else {
     switch (*id_first) {
-      case  ' ':case '\\':case '#':case '%':case '$':case '^':
+      case ' ':case '\\':case '#':case '%':case '$':case '^':
       case '{': case '}': case '~': case '&': case '_': app('\\'); break;
 @.\\\ @>
 @.\\\\@>
@@ -3407,6 +3576,7 @@
 }
 app(@q{@>'}');
 app_scrap(exp,maybe_math);
+}
 
 @ We do not make the \TEX/ string into a scrap, because there is no
 telling what the user will be putting into it; instead we leave it
@@ -3447,8 +3617,8 @@
 
 @ @c
 static void
-app_cur_id(@t\1\1@>
-boolean scrapping at t\2\2@>) /* are we making this into a scrap? */
+app_cur_id(
+boolean scrapping) /* 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 */
@@ -3459,7 +3629,7 @@
   } else {
     app(res_flag+(int)(p-name_dir));
     if (scrapping) {
-      if (p->ilk==alfop) app_scrap(ubinop,yes_math)@;
+      if (p->ilk==alfop) app_scrap(ubinop,yes_math)@t;@>@;
       else app_scrap(p->ilk,maybe_math);
     }
   }
@@ -3475,8 +3645,8 @@
 C_translate(void)
 {
   text_pointer p; /* points to the translation */
-  scrap_pointer save_base; /* holds original value of |scrap_base| */
-  save_base=scrap_base; scrap_base=scrap_ptr+1;
+  scrap_pointer save_base=scrap_base; /* holds original value of |scrap_base| */
+  scrap_base=scrap_ptr+1;
   C_parse(section_name); /* get the scraps together */
   if (next_control!='|') err_print("! Missing '|' after C text");
 @.Missing '|'...@>
@@ -3493,8 +3663,7 @@
 until |next_control>=format_code|. Thus, it takes care of embedded comments.
 
 The token list created from within `\pb' brackets is output as an argument
-to \.{\\PB}, if the user has invoked \.{CWEAVE} with the \.{+e} flag.
-Although \.{cwebmac} ignores \.{\\PB}, other macro packages
+to \.{\\PB}.  Although \.{cwebmac} ignores \.{\\PB}, other macro packages
 might use it to localize the special meaning of the macros that mark up
 program text.
 
@@ -3528,7 +3697,7 @@
         if (make_pb) app_str("\\PB{");
 @.\\PB@>
         app(inner_tok_flag+(int)(q-tok_start));
-        if (make_pb)  app_tok('}');
+        if (make_pb) app_tok('}');
         if (next_control=='|') {
           bal=copy_comment(is_long_comment,bal);
           next_control=ignore;
@@ -3546,7 +3715,7 @@
 the desired final form. The job of converting token lists to characters in
 the \TEX/ output file is not difficult, although it is an implicitly
 recursive process. Four main considerations had to be kept in mind when
-this part of \.{CWEAVE} was designed.  (a) There are two modes of output:
+this part of \.{CWEAVE} was designed. (a) There are two modes of output:
 |outer| mode, which translates tokens like |force| into line-breaking
 control sequences, and |inner| mode, which ignores them except that blank
 spaces take the place of line breaks. (b) The |cancel| instruction applies
@@ -3554,7 +3723,7 @@
 of recursion since `|cancel|' occurs at the beginning or end of a token
 list on one level. (c) The \TEX/ output file will be semi-readable if line
 breaks are inserted after the result of tokens like |break_space| and
-|force|.  (d) The final line break should be suppressed, and there should
+|force|. (d) The final line break should be suppressed, and there should
 be no |force| token output immediately after `\.{\\Y\\B}'.
 
 @ The output process uses a stack to keep track of what is going on at
@@ -3590,7 +3759,8 @@
 } output_state;
 typedef output_state *stack_pointer;
 
-@ @d cur_end cur_state.end_field /* current ending location in |tok_mem| */
+@ @d stack_size 400 /* number of simultaneous output levels */
+ at d cur_end cur_state.end_field /* current ending location in |tok_mem| */
 @d cur_tok cur_state.tok_field /* location of next output token in |tok_mem| */
 @d cur_mode cur_state.mode_field /* current mode of interpretation */
 @d init_stack stack_ptr=stack;cur_mode=outer /* initialize the stack */
@@ -3615,8 +3785,8 @@
 
 @ @c
 static void
-push_level(@t\1\1@> /* suspends the current level */
-text_pointer p at t\2\2@>)
+push_level( /* suspends the current level */
+text_pointer p)
 {
   if (stack_ptr==stack_end) overflow("stack");
   if (stack_ptr>stack) { /* save current state */
@@ -3701,12 +3871,11 @@
 static void
 output_C(void) /* outputs the current token list */
 {
-  token_pointer save_tok_ptr;
-  text_pointer save_text_ptr;
-  sixteen_bits save_next_control; /* values to be restored */
+  token_pointer save_tok_ptr=tok_ptr;
+  text_pointer save_text_ptr=text_ptr;
+  sixteen_bits save_next_control=next_control; /* values to be restored */
   text_pointer p; /* translation of the \CEE/ text */
-  save_tok_ptr=tok_ptr; save_text_ptr=text_ptr;
-  save_next_control=next_control; next_control=ignore; p=C_translate();
+  next_control=ignore; p=C_translate();
   app(inner_tok_flag+(int)(p-tok_start));
   if (make_pb) {
     out_str("\\PB{"); make_output(); out('}');
@@ -3724,8 +3893,8 @@
 static void
 make_output(void) /* outputs the equivalents of tokens */
 {
-  eight_bits a=0, /* current output byte */
-  b; /* next output byte */
+  eight_bits a=0; /* current output byte */
+  eight_bits b; /* next output byte */
   int c; /* count of |indent| and |outdent| tokens */
   char scratch[longest_name+1]; /* scratch area for section names */
   char *k, *k_limit; /* indices into |scratch| */
@@ -3735,6 +3904,7 @@
   char *save_loc, *save_limit; /* |loc| and |limit| to be restored */
   name_pointer cur_section_name; /* name of section being output */
   boolean save_mode; /* value of |cur_mode| before a sequence of breaks */
+  boolean dindent_pending=false; /* should a |dindent| be output? */
   app(end_translation); /* append a sentinel */
   freeze_text; push_level(text_ptr-1);
   while (true) {
@@ -3751,11 +3921,17 @@
           a=get_output();
           if (a==inserted) continue;
           if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break;
-          if (a==indent) c++; else if (a==outdent) c--;
-          else if (a==opt) a=get_output();
+          if (a==indent) c++;
+          else if (a==outdent) c--;
+            else if (a==opt) a=get_output();
         }
         @<Output saved |indent| or |outdent| tokens@>@;
         goto reswitch;
+      case dindent: a=get_output();
+        if (a!=big_force) {
+          out_str("\\1\\1"); goto reswitch;
+        }
+        else dindent_pending=true; /* fall through */
       case indent: case outdent: case opt: case backup: case break_space:
       case force: case big_force: case preproc_line: @<Output a control,
         look ahead in case of line breaks, possibly |goto reswitch|@>@; break;
@@ -3779,7 +3955,8 @@
     for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
       out(*p=='_'? 'x': *p=='$'? 'X': *p);
     break;
-  } else if (is_tiny(cur_name)) out('|')@;
+  }
+  else if (is_tiny(cur_name)) out('|')@t;@>@;
 @.\\|@>
   else { delim='.';
     for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
@@ -3790,10 +3967,12 @@
   }
 @.\\\\@>
 @.\\.@>
-}@+else if (cur_name->ilk==alfop) {
+}
+else if (cur_name->ilk==alfop) {
   out('X');
   goto custom_out;
-}@+else out('&'); /* |a==res_word| */
+}
+else out('&'); /* |a==res_word| */
 @.\\\&@>
 if (is_tiny(cur_name)) {
   if (isxalpha((cur_name->byte_start)[0]))
@@ -3816,11 +3995,11 @@
 @.\\8@>
     if (a==opt) {
       b=get_output(); /* |opt| is followed by a digit */
-      if (b!='0' || force_lines==false) out(b)@;
+      if (b!='0' || force_lines==false) out(b)@t;@>@;
       else out_str("{-1}"); /* |force_lines| encourages more \.{@@\v} breaks */
     }
   } else if (a==opt) b=get_output(); /* ignore digit following |opt| */
-  }
+}
 else @<Look ahead for strongest line break, |goto reswitch|@>
 
 @ If several of the tokens |break_space|, |force|, |big_force| occur in a
@@ -3830,7 +4009,10 @@
 is suppressed (i.e., a line break that follows `\.{\\Y\\B}').
 
 @<Look ahead for st...@>= {
-  b=a; save_mode=cur_mode; c=0;
+  b=a; save_mode=cur_mode;
+  if (dindent_pending) {
+    c=2; dindent_pending=false;
+  } else c=0;
   while (true) {
     a=get_output();
     if (a==inserted) continue;
@@ -3872,31 +4054,29 @@
 input buffer and the translation process uses the end of the active
 |tok_mem| area.
 
-@<Output a section name@>= {
-  out_str("\\X");
+@<Output a section name@>=
+out_str("\\X");
 @.\\X@>
-  cur_xref=(xref_pointer)cur_name->xref;
-  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) {
-      cur_xref=cur_xref->xlink;
-      while (cur_xref->num>=def_flag) {
-        out_str(", ");
-        out_section(cur_xref->num-def_flag);
-      cur_xref=cur_xref->xlink;
-      }
+cur_xref=(xref_pointer)cur_name->xref;
+if ((an_output=(cur_xref->num==file_flag))==true) cur_xref=cur_xref->xlink;
+if (cur_xref->num>=def_flag) {
+  out_section(cur_xref->num-def_flag);
+  if (phase==3) {
+    cur_xref=cur_xref->xlink;
+    while (cur_xref->num>=def_flag) {
+      out_str(", ");
+      out_section(cur_xref->num-def_flag);
+    cur_xref=cur_xref->xlink;
     }
   }
-  else out('0'); /* output the section number, or zero if it was undefined */
-  out(':');
-  if (an_output) out_str("\\.{"@q}@>);
+}
+else out('0'); /* output the section number, or zero if it was undefined */
+out(':');
+if (an_output) out_str("\\.{"@q}@>);
 @.\\.@>
-  @<Output the text of the section name@>@;
-  if (an_output) out_str(@q{@>" }");
-  out_str("\\X");
-}
+@<Output the text of the section name@>@;
+if (an_output) out_str(@q{@>" }");
+out_str("\\X");
 
 @ @<Output the text...@>=
 sprint_section_name(scratch,cur_name);
@@ -3908,9 +4088,9 @@
   if (b=='@@') @<Skip next character, give error if not `\.{@@}'@>@;
   if (an_output)
     switch (b) {
- case  ' ':case '\\':case '#':case '%':case '$':case '^':
- case '{': case '}': case '~': case '&': case '_':
-    out('\\'); /* falls through */
+    case ' ': case '\\': case '#': case '%': case '$': case '^':
+    case '{': case '}': case '~': case '&': case '_':
+      out('\\'); /* falls through */
 @.\\\ @>
 @.\\\\@>
 @.\\\#@>
@@ -3922,15 +4102,16 @@
 @.\\\~@>
 @.\\\&@>
 @.\\\_@>
- default: out(b);
+    default: out(b);
     }
-  else { if (b!='|') out(b)@;
-  else {
-    @<Copy the \CEE/ text into the |buffer| array@>@;
-    save_loc=loc; save_limit=limit; loc=limit+2; limit=j+1;
-    *limit='|'; output_C();
-    loc=save_loc; limit=save_limit;
-  } }
+  else
+    if (b!='|') out(b)@t;@>@;
+    else {
+      @<Copy the \CEE/ text into the |buffer| array@>@;
+      save_loc=loc; save_limit=limit; loc=limit+2; limit=j+1;
+      *limit='|'; output_C();
+      loc=save_loc; limit=save_limit;
+    }
 }
 
 @ @<Skip next char...@>=
@@ -3984,10 +4165,12 @@
 @c
 static void
 phase_two(void) {
-reset_input(); if (show_progress) fputs("\nWriting the output file...",stdout);
+phase=2; reset_input();
+if (show_progress) fputs("\nWriting the output file...",stdout);
 @.Writing the output file...@>
 section_count=0; format_visible=true; copy_limbo();
-finish_line(); flush_buffer(out_buf,false,false); /* insert a blank line, it looks nice */
+finish_line(); flush_buffer(out_buf,false,false);
+  /* insert a blank line, it looks nice */
 while (!input_has_ended) @<Translate the current section@>@;
 }
 
@@ -4031,7 +4214,7 @@
 output with the \TEX/ control sequence `\.{\\M}', followed by the section
 number. Similarly, `\.{@@*}' sections lead to the control sequence `\.{\\N}'.
 In this case there's an additional parameter, representing one plus the
-specified depth, immediately after the \.{\\N}.
+specified depth, immediately after the~\.{\\N}.
 If the section has changed, we put \.{\\*} just after the section number.
 
 @<Output the code for the beginning...@>=
@@ -4055,14 +4238,13 @@
   if (show_progress)
   printf("*%d",section_count); update_terminal; /* print a progress report */
 }
-out_str("{");out_section(section_count); out_str("}");
+out('{'); out_section(section_count); out('}');
 
 @ In the \TEX/ part of a section, we simply copy the source text, except that
 index entries are not copied and \CEE/ text within \pb\ is translated.
 
-@<Translate the \T...@>= do {
-  next_control=copy_TeX();
-  switch (next_control) {
+@<Translate the \T...@>= do
+  switch (next_control=copy_TeX()) {
     case '|': init_stack; output_C(); break;
     case '@@': out('@@'); break;
     case TeX_string: case noop:
@@ -4078,7 +4260,7 @@
         err_print("! You can't do that in TeX text"); break;
 @.You can't do that...@>
   }
-} while (next_control<format_code);
+while (next_control<format_code);
 
 @ When we get to the following code we have |next_control>=format_code|, and
 the token memory is in its initial empty state.
@@ -4105,8 +4287,8 @@
 
 @c
 static void
-finish_C(@t\1\1@> /* finishes a definition or a \CEE/ part */
-  boolean visible at t\2\2@>) /* nonzero if we should produce \TeX\ output */
+finish_C( /* finishes a definition or a \CEE/ part */
+  boolean visible) /* |true| if we should produce \TeX\ output */
 {
   text_pointer p; /* translation of the scraps */
   if (visible) {
@@ -4114,7 +4296,7 @@
     p=translate();
 @.\\B@>
     app(tok_flag+(int)(p-tok_start)); make_output(); /* output the list */
-    if (out_ptr>out_buf+1) {
+    if (out_ptr>out_buf+1)
       if (*(out_ptr-1)=='\\') {
 @.\\6@>
 @.\\7@>
@@ -4122,7 +4304,6 @@
         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;
@@ -4145,22 +4326,30 @@
 @<Start a macro...@>= {
   if (save_line!=out_line || save_place!=out_ptr || space_checked) app(backup);
   if(!space_checked){emit_space_if_needed;save_position;}
-  app_str("\\D"); /* this will produce `\&{define }' */
+  app_str("\\D"); /* this will produce `\#\&{define }' */
 @.\\D@>
   if ((next_control=get_next())!=identifier)
     err_print("! Improper macro definition");
 @.Improper macro definition@>
   else {
-    app('$'); app_cur_id(false);
-    if (*loc=='(')
+    app_cur_id(false);
+    if (*loc=='(') {
+      app('$');
   reswitch: switch (next_control=get_next()) {
       case '(': case ',': app(next_control); goto reswitch;
       case identifier: app_cur_id(false); goto reswitch;
       case ')': app(next_control); next_control=get_next(); break;
+      case dot_dot_dot: app_str("\\,\\ldots\\,"); @.\\,@> @.\\ldots@>
+        app_scrap(raw_int,no_math);
+        if ((next_control=get_next())==')') {
+          app(next_control); next_control=get_next(); break;
+        } /* otherwise fall through */
       default: err_print("! Improper macro definition"); break;
+      }
+      app('$');
     }
     else next_control=get_next();
-    app_str("$ "); app(break_space);
+    app(break_space);
     app_scrap(dead,no_math); /* scrap won't take part in the parsing */
   }
 }
@@ -4174,7 +4363,6 @@
   next_control=get_next();
   if (next_control==identifier) {
     app(id_flag+(int)(id_lookup(id_first, id_loc,normal)-name_dir));
-    app(' ');
     app(break_space); /* this is syntactically separate from what follows */
     next_control=get_next();
     if (next_control==identifier) {
@@ -4204,7 +4392,7 @@
     @<Check that '=' or '==' follows this section name, and
       emit the scraps to start the section definition@>@;
   }
-  while  (next_control<=section_name) {
+  while (next_control<=section_name) {
     outer_parse();
     @<Emit the scrap for a section name if present@>@;
   }
@@ -4220,7 +4408,7 @@
 if (next_control!='=' && next_control!=eq_eq)
   err_print("! You need an = sign after the section name");
 @.You need an = sign...@>
-  else next_control=get_next();
+else next_control=get_next();
 if (out_ptr>out_buf+1 && *out_ptr=='Y' && *(out_ptr-1)=='\\') app(backup);
     /* the section name will be flush left */
 @.\\Y@>
@@ -4256,8 +4444,7 @@
 @<Show cross...@>=
 if (this_section>name_dir) {
   cur_xref=(xref_pointer)this_section->xref;
-  if (cur_xref->num==file_flag){an_output=true;cur_xref=cur_xref->xlink;}
-  else an_output=false;
+  if ((an_output=(cur_xref->num==file_flag))==true) cur_xref=cur_xref->xlink;
   if (cur_xref->num>def_flag)
     cur_xref=cur_xref->xlink; /* bypass current section number */
   footnote(def_flag); footnote(cite_flag); footnote(0);
@@ -4277,11 +4464,11 @@
 
 @c
 static void
-footnote(@t\1\1@> /* outputs section cross-references */
-sixteen_bits flag at t\2\2@>)
+footnote( /* outputs section cross-references */
+sixteen_bits flag)
 {
-  xref_pointer q; /* cross-reference pointer variable */
-  if (cur_xref->num<=flag) return;
+  xref_pointer q=cur_xref; /* cross-reference pointer variable */
+  if (q->num<=flag) return;
   finish_line(); out('\\');
 @.\\A@>
 @.\\Q@>
@@ -4298,7 +4485,7 @@
 to the first cross-reference, and the last link is a zero.
 
 @<Output all the section numbers...@>=
-q=cur_xref; if (q->xlink->num>flag) out('s'); /* plural */
+if (q->xlink->num>flag) out('s'); /* plural */
 while (true) {
   out_section(cur_xref->num-flag);
   cur_xref=cur_xref->xlink; /* point to the next cross-reference to output */
@@ -4379,19 +4566,18 @@
 @<Private...@>=
 static sixteen_bits k_section; /* runs through the sections */
 
-@ @<Tell about changed sections@>= {
-  /* remember that the index is already marked as changed */
-  k_section=0;
+@ @<Tell about changed sections@>=
+/* remember that the index is already marked as changed */
+k_section=0;
+while (!changed_section[++k_section]);
+out_str("\\ch ");
+ at .\\ch@>
+out_section(k_section);
+while (k_section<section_count) {
   while (!changed_section[++k_section]);
-  out_str("\\ch ");
- at .\\ch@>
-  out_section(k_section);
-  while (k_section<section_count) {
-    while (!changed_section[++k_section]);
-    out_str(", "); out_section(k_section);
-  }
-  out('.');
+  out_str(", "); out_section(k_section);
 }
+out('.');
 
 @ 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
@@ -4443,7 +4629,6 @@
 @f sort_pointer int
 @d sort_pointer scrap_pointer /* ditto */
 @d sort_ptr scrap_ptr /* ditto */
- at d max_sorts max_scraps /* ditto */
 
 @<Private...@>=
 static eight_bits cur_depth; /* depth of current buckets */
@@ -4519,8 +4704,8 @@
 
 @c
 static void
-unbucket(@t\1\1@> /* empties buckets having depth |d| */
-eight_bits d at t\2\2@>)
+unbucket( /* empties buckets having depth |d| */
+eight_bits d)
 {
   int c; /* index into |bucket|; cannot be a simple |char| because of sign
     comparison below */
@@ -4575,15 +4760,16 @@
 }
 
 @ @<Output the name...@>=
-switch (cur_name->ilk) {
-  case normal: case func_template: if (is_tiny(cur_name)) out_str("\\|");
-    else {char *j;
+switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
+  case normal: case func_template:
+    if (is_tiny(cur_name)) out_str("\\|");
+    else {
       for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
         if (xislower(*j)) goto lowcase;
       out_str("\\."); break;
 lowcase: out_str("\\\\");
     }
-  break;
+    break;
 @.\\|@>
 @.\\.@>
 @.\\\\@>
@@ -4592,12 +4778,12 @@
   case typewriter: out_str("\\.");
 @.\\.@>
   case roman: not_an_identifier: out_name(cur_name,false); goto name_done;
-  case custom: {char *j; out_str("$\\");
+  case custom:
+    out_str("$\\");
     for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
       out(*j=='_'? 'x': *j=='$'? 'X': *j);
     out('$');
     goto name_done;
-    }
   default: out_str("\\&");
 @.\\\&@>
 }
@@ -4621,6 +4807,7 @@
 @ List inversion is best thought of as popping elements off one stack and
 pushing them onto another. In this case |cur_xref| will be the head of
 the stack that we push things onto.
+
 @<Private...@>=
 static xref_pointer next_xref, this_xref;
   /* pointer variables for rearranging a list */
@@ -4638,8 +4825,8 @@
 
 @c
 static void
-section_print(@t\1\1@> /* print all section names in subtree |p| */
-name_pointer p at t\2\2@>)
+section_print( /* print all section names in subtree |p| */
+name_pointer p)
 {
   if (p) {
     section_print(p->llink); out_str("\\I");

Modified: branches/stable/source/src/texk/web2c/cwebdir/cweb.1
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cweb.1	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cweb.1	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-.TH CWEB 1 2018-Dec-16
+.TH CWEB 1 2021-Apr-24
 .
 .SH NAME
 ctangle, cweave \- translate CWEB to C and/or TeX
@@ -9,7 +9,7 @@
 [
 .B \-bhp
 ] [
-.B +s
+.B +ks
 ] webfile[.w] [{changefile[.ch]|-} [outputfile[.c]]]
 .br
 .B cweave
@@ -16,7 +16,7 @@
 [
 .B \-befhpx
 ] [
-.B +s
+.B +st
 ] webfile[.w] [{changefile[.ch]|-} [outputfile[.tex]]]
 .ad
 .
@@ -80,7 +80,13 @@
 .B +s
 option prints statistics about memory usage at the end of a run.
 .PP
-There are three other options applicable to
+There is one other option applicable to
+.I ctangle
+only:
+.B +k
+means keep '-separators in numeric literals in the C/C++\ output.
+.PP
+There are four other options applicable to
 .I cweave
 only:
 .B \-f
@@ -89,13 +95,15 @@
 inhibits the enclosure of C\ material formatted by
 .I cweave
 in brackets
-\ePB{...}.
-Such brackets are normally inserted so that special hooks
+\ePB{...};
+such brackets are normally inserted so that special hooks
 can be used by
 .I cweb-latex
 and similar programs.
 .B \-x
-means omit the index and table of contents.
+means omit the index, the names of the sections, and the table of contents.
+.B +t
+means treat 'typename' in templates like 'typedef'.
 .
 .SH FILES
 The location of the files mentioned below varies from system to system.
@@ -129,4 +137,5 @@
 by adapting the WEB conventions to\ C and by recoding everything in CWEB.
 Knuth began using CWEB and made further refinements.
 Many other helpers are acknowledged in the CWEB manual.
+Contemporary development on https://github.com/ascherer/cweb.
 

Modified: branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cwebmac.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,8 +1,8 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.2 --- February 2021
+% Version 4.4 --- June 2021
 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CWEB4.2}
-\chardef\cwebversion=4 \chardef\cwebrevision=1
+\xdef\fmtversion{\fmtversion+CWEB4.4}
+\chardef\cwebversion=4 \chardef\cwebrevision=4
 \newif\ifpdf
 \ifx\pdf+\pdftrue\fi
 % Uncomment the following line if you want PDF goodies to be the default
@@ -31,6 +31,7 @@
 \def\TEX/{\TeX}
 \def\CPLUSPLUS/{{\mc C\PP\spacefactor1000}}
 \def\Cee{\CEE/} % for backward compatibility
+\def\Cpp{\CPLUSPLUS/} % for backward compatibility
 \def\9#1{}
  % with this definition of \9 you can say @:sort key}{TeX code@>
  % to alphabetize an index entry by the sort key but format with the TeX code
@@ -124,6 +125,7 @@
 \newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
 \let\yskip=\smallskip
 \def\?{\mathrel?}
+\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \def\note#1#2.{\Y\noindent{\hangindent2em%
     \baselineskip10pt\eightrm#1~\ifacro{\pdfnote#2.}\else#2\fi.\par}}
 
@@ -287,7 +289,7 @@
     \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\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
 \def\As{\note{See also sections}} % xref for multiply defined section name
 \def\B{\rightskip=0pt plus 100pt minus 10pt % go into C mode
@@ -300,7 +302,7 @@
 \let\SHC\C % "// short comments" treated like "/* ordinary comments */"
 %\def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
 %\def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}}
-\def\D{\defin{\#define}} % macro definition
+\def\D{\defin{{\rm\#}define}} % macro definition
 \let\E=\equiv % equivalence sign
 \def\ET{ and~} % conjunction between two section numbers
 \def\ETs{, and~} % conjunction between the last two of several section numbers
@@ -341,12 +343,15 @@
 \def\Qs{\note{This code is cited in sections}} % xref for mentions of a section
 \let\R=\lnot % logical not
 % \S is section sign
+\def\digitseparator{\,} % a bit of extra space
 \def\T#1{\leavevmode % octal, hex or decimal constant
   \hbox{$\def\?{\kern.2em}%
+    \let\ \digitseparator%
 %    \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant % versions < 3.67
     \def\$##1{\egroup_{\rm##1}\bgroup}% suffix to constant % in version 3.67
     \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
-    \let\~=\oct \let\^=\hex {#1}$}}
+    \def\%{\cdot 2^{\aftergroup}}% power of two (via dirty trick)
+    \let\~=\oct \let\^=\hex \let\\=\bin {#1}$}}
 \def\U{\note{This code is used in section}} % xref for use of a section
 \def\Us{\note{This code is used in sections}} % xref for uses of a section
 \let\V=\lor % logical or
@@ -365,8 +370,12 @@
 
 %\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style
 %\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style
-\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}% CWEB style
-\def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style
+\def\oct{\hbox{$^\circ$\kern-.1em}\Od}% CWEB style
+\def\hex{\hbox{$^{\scriptscriptstyle\#}$}\Hd} % CWEB style
+\def\bin{\hbox{$^{\scriptscriptstyle b}$}\Bd}
+\def\Od#1/{{\it#1}} % octal digit
+\def\Hd#1/{{\tt#1}} % hexadecimal digit
+\def\Bd#1/{{\tt#1}} % binary digit
 \def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule
         \hbox{\strut\kern2pt\.{#1}\kern2pt}}
       \hrule}\vrule\kern2pt}} % verbatim string
@@ -482,14 +491,13 @@
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%
       \pdfoutline goto num \the\toksA \expandafter{\the\toksE}}
-  \else\ifpdf
-    \special{pdf: outline -1 << /Title (\outsecname)
+  \else \special{pdf: outline -1 << /Title (\outsecname)
       /Dest [ @thispage /FitH @ypos ] >>}
     \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
       {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}%
       \special{pdf: outline 0 << /Title (\the\toksE)
         /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}}
-  \fi\fi\fi
+  \fi\fi
   \readsections}
 \def\makebookmarks{\let\ZZ=\writebookmarkline \readcontents\relax}
 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -536,9 +544,6 @@
 \def\printtwodigits{\advance\twodigits100
   \expandafter\gobbleone\number\twodigits
   \advance\twodigits-100 }
-\def\TeX{{\ifmmode\it\fi
-   \leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
-\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip
   \let\startsection=\stsec\stsec}}
   % say `\datethis' in limbo, to get your listing timestamped before section 1

Modified: branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cwebman-w2c.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -93,17 +93,17 @@
 @z
 
 @x
-\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.2)}
+\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.4)}
 @y
 \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}}
-\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.2 [\TeX~Live])}
+\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.4 [\TeX~Live])}
 @z
 
 @x
-\vskip 18pt\centerline{(Version 4.2 --- February 2021)}
+\vskip 18pt\centerline{(Version 4.4 --- June 2021)}
 @y
-\vskip 18pt\centerline{(Version 4.2 --- February 2021)%
-\footnote*{This document describes the extended \.{CWEB} (Version 4.2 [\TeX~Live]).}}
+\vskip 18pt\centerline{(Version 4.4 --- June 2021)%
+\footnote*{This document describes the extended \.{CWEB} (Version 4.4 [\TeX~Live]).}}
 @z
 
 @x
@@ -159,35 +159,38 @@
 @z
 
 @x
-output by \.{CWEAVE}. (On by default.) (Has no effect on \.{CTANGLE}.)
+options are currently implemented:
+
+\yskip
+\def\option#1 {\textindent{\.#1}\hangindent2\parindent}
 @y
-output by \.{CWEAVE}. (On by default.) (Has no effect on \.{CTANGLE}.)%
+\def\option#1 {\textindent{\.#1}\hangindent2\parindent}%
+options are currently implemented:%
 \cwebfootnote{This extended version of \.{CWEB} adds the following options
 to the list:
 \hfil\smallskip
+\option c Overwrite output files with temporary output only if changes occur.
+(On by default.)
+\hfil\vskip\normallineskip
 \option d Set the debugging variable \\{kpathsea\_debug} to the numeric
 value $N\in[0,127]$ of this option.  See section~93 % FIXME
 of \pdfURL{appendix~D}{common-changes.pdf} for details.
 \hfil\vskip\normallineskip
-\option i Indent parameters in function declarations.  This causes the
-formal parameter declarations in function heads to be indented.  (On by
-default; \.{-i} typesets declarations flush left; some people think this
-to be more logical than indenting them) (Has no effect on \.{CTANGLE}.)
+\option i Indent parameters in function declarations.  (On by default;
+\.{-i} typesets declarations flush left; some people think this to be
+more logical than indenting them.) (Has no effect on \.{CTANGLE}.)
 \hfil\vskip\normallineskip
 \option l This option takes the string of characters to its right as its
 argument to switch between different user languages and macro packages.
 For example, if you call \.{CWEAVE} with the `\.{+ld}' (or `\.{-ld}') option,
 the German \.{CWEB} macros \.{dcwebmac.tex} will be loaded in the first line
-of output instead of the English ones. To avoid conflicts, the Danish
-macros could be called \.{dkcwebmac.tex} and would be included by `\.{+ldk}'.
-(Off by default) (Has no effect on \.{CTANGLE}.)
+of output instead of the English ones. (Off by default.) (Has no effect on
+\.{CTANGLE}.)
 \hfil\vskip\normallineskip
 \option o Separate declarations and the first statement in a function block.
-\.{CWEAVE} automatically inserts a bit of extra space.  (On by default.)
-(Has no effect on \.{CTANGLE}.)
-\hfil\vskip\normallineskip
-\option t Overwrite output files with temporary output only if changes occur.
-(On by default.)}
+(On by default.) (Has no effect on\break\hbox{}\qquad\.{CTANGLE}.)}
+
+\yskip
 @z
 
 @x
@@ -270,9 +273,9 @@
 @z
 
 @x
-\def\runninghead{APPENDIX A  --- TRANSLATION BY {\tentt CTANGLE}}
+\def\runninghead{APPENDIX A --- TRANSLATION BY {\tentt CTANGLE}}
 @y
-\def\runninghead{APPENDIX A  --- TRANSLATION BY {\tentt CTANGLE}}
+\def\runninghead{APPENDIX A --- TRANSLATION BY {\tentt CTANGLE}}
 \subsection Translation by CTANGLE.
 @z
 
@@ -311,9 +314,9 @@
 @z
 
 @x
-  \.{ { }\\vskip 15pt \\centerline\{(Version 4.2)\}{ }\\vfill\}}\cr}$$
+  \.{ { }\\vskip 15pt \\centerline\{(Version 4.4)\}{ }\\vfill\}}\cr}$$
 @y
-  \.{ { }\\vskip 15pt \\centerline\{(Version 4.2)\}{ }\\vfill\}}\cr}$$
+  \.{ { }\\vskip 15pt \\centerline\{(Version 4.4)\}{ }\\vfill\}}\cr}$$
 @z
 
 @x

Modified: branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/cwebman.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,5 +1,4 @@
 % This file generates the user manual; TeX it, don't read it!
-% update 14 Nov 2016 by DEK: corrected obsolete remarks re debugging info
 
 \def\tangref{3} % where the main explanation of CTANGLing is given
 \input cwebmac
@@ -36,7 +35,7 @@
 
 \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill}
 \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno}
-\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.2)}
+\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.4)}
 
 % This verbatim mode assumes that ! marks are !! in the text being copied.
 \def\verbatim{\begingroup
@@ -50,7 +49,7 @@
 \null\vfill
 \centerline{\titlefont The {\ttitlefont CWEB} System of
     Structured Documentation}
-\vskip 18pt\centerline{(Version 4.2 --- February 2021)}
+\vskip 18pt\centerline{(Version 4.4 --- June 2021)}
 \vskip 24pt
 \centerline{\authorfont Donald E. Knuth and Silvio Levy}
 \vfill
@@ -140,7 +139,7 @@
 The philosophy behind \.{CWEB} is
 that programmers who want to provide the best
 possible documentation for their programs need two things
-simultaneously:  a language like \TEX/ for formatting, and a language like
+simultaneously: a language like \TEX/ for formatting, and a language like
 \CEE/ for programming. Neither type of language can provide the
 best documentation by itself. But when both are appropriately combined, we
 obtain a system that is much more useful than either language separately.
@@ -394,9 +393,9 @@
 \CEE/ editing within \TEX/ text, if you place `\.|' marks before and
 after the \CEE/ material. For example, suppose you want to say something
 like this:
-$$\hbox{ If \\{pa} is declared as `\&{int} ${}{*}\\{pa}$',
-the assignment $\\{pa}\K{\AND}\|a[\T{0}]$ makes \\{pa}
-point to the zeroth element of \|a.}$$
+$$\hbox{If \PB{\\{pa}} is declared as `\PB{\&{int} ${}{*}\\{pa}$}',
+the assignment \PB{$\\{pa}\K{\AND}\|a[\T{0}]$} makes \PB{\\{pa}}
+point to the zeroth element of \PB{\|a}.}$$
 The \TEX/ text would look like this in your \.{CWEB} file:
 $$\lpile{\.{If |pa| is declared as `|int *pa|', the assignment}\cr
 \.{|pa=\&a[0]| makes |pa| point to the zeroth element of |a|.}\cr}$$
@@ -433,7 +432,7 @@
 $$
 \displaylines{
 \hbox{\.{if} \.{(x==0)} \.{@<Empty} \.{the} \.{|buffer|} \.{array@>}} \cr
-\hbox{\.{...} \.{using}  \.{the} \.{algorithm}
+\hbox{\.{...} \.{using} \.{the} \.{algorithm}
 \.{in} \.{|@<Empty} \.{the} \.{|buffer|} \.{array@>|.}} }
 $$
 The first of these excerpts
@@ -477,14 +476,17 @@
 or \.{0x}.  In \.{CWEB} it seems reasonable to let each convention hold
 in its respective realm; so in \CEE/ text you get $40_8$ by typing
 `\.{040}', which \.{CTANGLE} faithfully copies into the \CEE/ file (for
-the compiler's benefit) and which \.{CWEAVE} prints as $\T{\~40}$.
+the compiler's benefit) and which \.{CWEAVE} prints as $\T{\~40/}$.
 Similarly, \.{CWEAVE} prints the hexadecimal \CEE/ constant `\.{0x20}'
-as \T{\^20}. The use of italic font for octal digits and typewriter font
+as \T{\^20/}. The use of italic font for octal digits and typewriter font
 for hexadecimal digits makes the meaning of such constants clearer in
-a document. For consistency, then, you
-should type `\.{|040|}'  or `\.{|0x20|}'
-in the \TEX/ part of the section.
+a document. For consistency, then, you should type `\.{|040|}' or
+`\.{|0x20|}' in the \TEX/ part of the section.
 
+And if you type a binary constant like `\.{0b00101010}', \.{CWEAVE} prints
+it as $\T{\\00101010/}$. In all numeric literals you may add \.' separators
+for improved readability.
+
 \section Control codes.
 A \.{CWEB} {\sl control code\/}
 is a two-character combination of which the first is `\.@'.
@@ -761,11 +763,11 @@
 them by standard ASCII alphanumeric characters or
 \.{\_}, in order to generate legal \CEE/ code.  It does this by means
 of a transliteration table, which by default associates the string
-\.{Xab} to the character with ASCII code \T{\^}$ab$ (where $a$ and $b$ are
+\.{Xab} to the character with ASCII code \T{\^/}$ab$ (where $a$ and $b$ are
 hexadecimal digits, and $a\ge8$).  By placing the
 construction \.{@l\ ab\ newstring} in limbo, you are telling
 \.{CTANGLE} to replace this character by \.{newstring} instead.
-For example, the ISO Latin-1 code for the letter `\"u' is \T{\^FC}
+For example, the ISO Latin-1 code for the letter `\"u' is \T{\^FC/}
 (or \.{'\char`\\374'}),
 and \.{CTANGLE} will normally change this code to the
 three-character sequence \.{XFC} if it
@@ -843,7 +845,8 @@
 $$\lpile{\.{if (condition) macro @;}\cr
 \.{else break;}\cr}$$
 where \\{macro} is defined to be a compound statement (enclosed in braces).
-This is a well-known infelicity of \CEE/ syntax.
+This is a well-known infelicity of \CEE/ syntax. You can add a visible
+semicolon with \.{@t;@>} (before \.{@;}).
 
 \@{[} [MC] See \.{@]}.
 
@@ -1042,7 +1045,7 @@
 
 \option e Enclose \CEE/ material formatted by \.{CWEAVE} in
 brackets \.{\\PB\{...\}}, so that special hooks can be used.
-(On 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
@@ -1051,14 +1054,19 @@
 \option h Print a happy message at the conclusion of a successful
 run. (On by default.)
 
+\option k Keep single quotes (\.') in numeric literals in the
+\CEE//\CPLUSPLUS/ output. (Off by default.) (\.{CTANGLE} only.)
+
 \option p Give progress reports as the program runs. (On by default.)
 
 \option s Show statistics about memory usage after the program
 runs to completion. (Off by default.)
-If you
-have large \.{CWEB} files or sections, you may need to see
-how close you come to exceeding the capacity of \.{CTANGLE} and/or \.{CWEAVE}.
+If you have large \.{CWEB} files or sections, you may need to see how close
+you come to exceeding the capacity of \.{CTANGLE} and/or \.{CWEAVE}.
 
+\option t Treat \&{typename} in a template like \&{typedef}.
+(Off by default.) (Has no effect on \.{CTANGLE}.)
+
 \option x Include indexes and a table of contents in the \TEX/ file
 output by \.{CWEAVE}. (On by default.) (Has no effect on \.{CTANGLE}.)
 
@@ -1155,7 +1163,7 @@
 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
+And 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
@@ -1211,10 +1219,7 @@
 the change file is exhausted. This procedure is called only when
 |changing| is |true|; hence error messages will be reported correctly.
 
-@<Predecl...@>=
-static void prime_the_change_buffer(void);@/
-
-@ @c
+ at c
 static void
 prime_the_change_buffer(void)
 {
@@ -1224,6 +1229,8 @@
   @<Move |buffer| and |limit| to |change_buffer| and |change_limit|@>@;
 }
 
+@ @<Predecl...@>=@+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).
@@ -1256,25 +1263,23 @@
 } while (limit==buffer);
 
 @ @<Move |buffer| and |limit| to |change_buffer| and |change_limit|@>=
-{
-  change_limit=change_buffer+(ptrdiff_t)(limit-buffer);
-  strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
-}
+change_limit=change_buffer+(ptrdiff_t)(limit-buffer);
+strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
 !endgroup
 \endgroup
 \vfill\eject
 
-\def\runninghead{APPENDIX A  --- TRANSLATION BY {\tentt CTANGLE}}
+\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~29, 30 and~31
-have been tangled into section~28.
+have been tangled into section~27.
 
 \vskip6pt
 \begingroup \def\tt{\eighttt} \baselineskip9pt
 \verbatim
-/*:24*//*28:*/
-#line 234 "common.w"
+/*:23*//*27:*/
+#line 227 "common.w"
 
 static void
 prime_the_change_buffer(void)
@@ -1281,7 +1286,7 @@
 {
 change_limit= change_buffer;
 /*29:*/
-#line 248 "common.w"
+#line 243 "common.w"
 
 while(true){
 change_line++;
@@ -1298,10 +1303,10 @@
 }
 
 /*:29*/
-#line 239 "common.w"
+#line 232 "common.w"
 
 /*30:*/
-#line 265 "common.w"
+#line 260 "common.w"
 
 do{
 change_line++;
@@ -1313,22 +1318,20 @@
 }while(limit==buffer);
 
 /*:30*/
-#line 240 "common.w"
+#line 233 "common.w"
 
 /*31:*/
-#line 275 "common.w"
+#line 270 "common.w"
 
-{
 change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
 strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
-}
 
 /*:31*/
-#line 241 "common.w"
+#line 234 "common.w"
 
 }
 
-/*:28*//*33:*/
+/*:27*//*32:*/
 !endgroup
 \endgroup
 \vfill\eject
@@ -1349,11 +1352,7 @@
 \PB{\\{changing}} is \PB{\\{true}}; hence error messages will be reported
 correctly.
 
-\Y\B\4\X7:Predeclaration of procedures\X${}\mathrel+\E{}$\6
-\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void});\par
-\fi
-
-\M{28}\B\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void})\1\1\2\2\6
+\Y\B\1\1\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void})\2\2\6
 ${}\{{}$\1\6
 ${}\\{change\_limit}\K\\{change\_buffer}{}$;\C{ this value is used if the
 change file ends }\6
@@ -1365,6 +1364,10 @@
 \4${}\}{}$\2\par
 \fi
 
+\M{28}\B\X7:Predeclaration of procedures\X${}\mathrel+\E{}$\5
+\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void});\par
+\fi
+
 \M{29}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
@@ -1392,7 +1395,7 @@
 \\{err\_print}(\.{"!!\ Missing\ @x\ in\ cha}\)\.{nge\ file"});\6
 \4${}\}{}$\2\6
 \4${}\}{}$\2\par
-\U28.\fi
+\U27.\fi
 
 \M{30}Here we are looking at lines following the \.{@x}.
 
@@ -1408,7 +1411,7 @@
 \4${}\}{}$\2\6
 \4${}\}{}$\2\5
 \&{while} ${}(\\{limit}\E\\{buffer}){}$;\par
-\U28.\fi
+\U27.\fi
 !endgroup
 \endgroup
 \vfil\eject
@@ -1427,11 +1430,7 @@
 \PB{\\{changing}} is \PB{\\{true}}; hence error messages will be reported
 correctly.
 
-\Y\B\4\X7:Predeclaration of procedures\X${}\mathrel+\E{}$\6
-\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void});\par
-\fi
-
-\M{28}\B\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void})\1\1\2\2\6
+\Y\B\1\1\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void})\2\2\6
 ${}\{{}$\1\6
 ${}\\{change\_limit}\K\\{change\_buffer}{}$;\C{ this value is used if the
 change file ends }\6
@@ -1443,6 +1442,10 @@
 \4${}\}{}$\2\par
 \fi
 
+\M{28}\B\X7:Predeclaration of procedures\X${}\mathrel+\E{}$\5
+\&{static} \&{void} \\{prime\_the\_change\_buffer}(\&{void});\par
+\fi
+
 \M{29}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
@@ -1470,7 +1473,7 @@
 \\{err\_print}(\.{"!\ Missing\ @x\ in\ cha}\)\.{nge\ file"});\6
 \4${}\}{}$\2\6
 \4${}\}{}$\2\par
-\U28.\fi
+\U27.\fi
 
 \M{30}Here we are looking at lines following the \.{@x}.
 
@@ -1486,17 +1489,15 @@
 \4${}\}{}$\2\6
 \4${}\}{}$\2\5
 \&{while} ${}(\\{limit}\E\\{buffer}){}$;\par
-\U28.\fi
+\U27.\fi
 
 \M{31}\B\X31:Move \PB{\\{buffer}} and \PB{\\{limit}} to \PB{\\{change\_buffer}}
 and \PB{\\{change\_limit}}\X${}\E{}$\6
-${}\{{}$\1\6
-${}\\{change\_limit}\K\\{change\_buffer}+(\&{ptrdiff\_t})(\\{limit}-%
+$\\{change\_limit}\K\\{change\_buffer}+(\&{ptrdiff\_t})(\\{limit}-%
 \\{buffer});{}$\6
 ${}\\{strncpy}(\\{change\_buffer},\39\\{buffer},\39(\&{size\_t})(\\{limit}-%
-\\{buffer}+\T{1}));{}$\6
-\4${}\}{}$\2\par
-\Us28\ET33.\fi
+\\{buffer}+\T{1})){}$;\par
+\Us27\ET32.\fi
 \vfil\eject\titletrue
 \rightskip=0pt % get out of C mode (cf. \B)
 \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50
@@ -1591,7 +1592,7 @@
   \.{ { }\\titlefalse \% include headline on the contents page}\cr
   \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr
   \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont CWEAVE\}{ }processor\}}\cr
-  \.{ { }\\vskip 15pt \\centerline\{(Version 4.2)\}{ }\\vfill\}}\cr}$$
+  \.{ { }\\vskip 15pt \\centerline\{(Version 4.4)\}{ }\\vfill\}}\cr}$$
 Redefining \.{\\rheader}, which is the headline for right-hand pages,
 suffices in this case to put the desired information at the top of the
 contents page.

Added: branches/stable/source/src/texk/web2c/cwebdir/iso_types.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/iso_types.w	                        (rev 0)
+++ branches/stable/source/src/texk/web2c/cwebdir/iso_types.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -0,0 +1,95 @@
+ at q This file defines type names introduced in modern dialects @>
+ at q of C and C++ as special entities for TeX formatting @>
+
+ at q C99 and C11 underscore keywords @>
+ at q http://en.cppreference.com/w/c/keyword @>
+
+ at s _Alignas alignas
+ at s _Alignof alignof
+ at s _Atomic int
+ at s _Bool bool
+ at s _Complex complex
+ at s _Generic class
+ at s _Imaginary imaginary
+ at s _Noreturn noreturn
+ at s _Static_assert static_assert
+ at s _Thread_local thread_local
+
+ at q C99 and C11 core language atomic types @>
+ at q http://en.cppreference.com/w/c/atomic @>
+
+ at s atomic_bool bool
+ at s atomic_char char
+ at s atomic_schar char
+ at s atomic_uchar char
+ at s atomic_short short
+ at s atomic_ushort short
+ at s atomic_int int
+ at s atomic_uint int
+ at s atomic_long long
+ at s atomic_ulong long
+ at s atomic_llong long
+ at s atomic_ullong long
+ at s atomic_char8_t char8_t
+ at s atomic_char16_t char16_t
+ at s atomic_char32_t char32_t
+ at s atomic_wchar_t wchar_t
+ at s atomic_int_least8_t int
+ at s atomic_uint_least8_t int
+ at s atomic_int_least16_t int
+ at s atomic_uint_least16_t int
+ at s atomic_int_least32_t int
+ at s atomic_uint_least32_t int
+ at s atomic_int_least64_t int
+ at s atomic_uint_least64_t int
+ at s atomic_int_fast8_t int
+ at s atomic_uint_fast8_t int
+ at s atomic_int_fast16_t int
+ at s atomic_uint_fast16_t int
+ at s atomic_int_fast32_t int
+ at s atomic_uint_fast32_t int
+ at s atomic_int_fast64_t int
+ at s atomic_uint_fast64_t int
+ at s atomic_intptr_t int
+ at s atomic_uintptr_t int
+ at s atomic_ptrdiff_t ptrdiff_t
+ at s atomic_size_t size_t
+ at s atomic_intmax_t int
+ at s atomic_uintmax_t int
+
+ at q C99 preprocessor @>
+
+ at s _Pragma pragma
+
+ at q Integral types of C99 and C++, see @>
+ at q http://en.cppreference.com/w/c/types/integer and @>
+ at q http://en.cppreference.com/w/cpp/types/integer @>
+
+ at s int8_t int
+ at s int16_t int
+ at s int32_t int
+ at s int64_t int
+ at s int_fast8_t int
+ at s int_fast16_t int
+ at s int_fast32_t int
+ at s int_fast64_t int
+ at s int_least8_t int
+ at s int_least16_t int
+ at s int_least32_t int
+ at s int_least64_t int
+ at s intmax_t int
+ at s intptr_t int
+ at s uint8_t int
+ at s uint16_t int
+ at s uint32_t int
+ at s uint64_t int
+ at s uint_fast8_t int
+ at s uint_fast16_t int
+ at s uint_fast32_t int
+ at s uint_fast64_t int
+ at s uint_least8_t int
+ at s uint_least16_t int
+ at s uint_least32_t int
+ at s uint_least64_t int
+ at s uintmax_t int
+ at s uintptr_t int


Property changes on: branches/stable/source/src/texk/web2c/cwebdir/iso_types.w
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/stable/source/src/texk/web2c/cwebdir/po/cweb-tl.pot
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/cweb-tl.pot	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/cweb-tl.pot	2021-06-17 21:27:03 UTC (rev 855)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: CWEBbin 2021\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-06 15:43+0100\n"
+"POT-Creation-Date: 2021-06-06 11:08+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -30,15 +30,15 @@
 msgstr ""
 
 #: ctang-texlive.ch:39
-msgid "This is CTANGLE, Version 4.2"
+msgid "This is CTANGLE, Version 4.4"
 msgstr ""
 
 #: ctwill-texlive.ch:39
-msgid "This is CTWILL, Version 4.2"
+msgid "This is CTWILL, Version 4.4"
 msgstr ""
 
 #: cweav-texlive.ch:39
-msgid "This is CWEAVE, Version 4.2"
+msgid "This is CWEAVE, Version 4.4"
 msgstr ""
 
 #: comm-texlive.ch:512

Modified: branches/stable/source/src/texk/web2c/cwebdir/po/cweb.pot
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/cweb.pot	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/cweb.pot	2021-06-17 21:27:03 UTC (rev 855)
@@ -523,15 +523,15 @@
 msgstr ""
 
 #: ctang-i18n.ch:17
-msgid "This is CTANGLE (Version 4.2 [CWEBbin 2021])"
+msgid "This is CTANGLE (Version 4.4 [CWEBbin 2021.4])"
 msgstr ""
 
 #: cweav-twill.ch:61
-msgid "This is CTWILL (Version 4.2 [CWEBbin 2021])"
+msgid "This is CTWILL (Version 4.4 [CWEBbin 2021.4])"
 msgstr ""
 
 #: cweav-i18n.ch:17 cweav-twill.ch:42
-msgid "This is CWEAVE (Version 4.2 [CWEBbin 2021])"
+msgid "This is CWEAVE (Version 4.4 [CWEBbin 2021.4])"
 msgstr ""
 
 #: cweav-i18n.ch:301 cweav-i18n.ch:309

Modified: branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb-tl.po
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb-tl.po	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb-tl.po	2021-06-17 21:27:03 UTC (rev 855)
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: CWEBbin 2021\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-06 15:43+0100\n"
-"PO-Revision-Date: 2021-02-06 15:58+0100\n"
+"POT-Creation-Date: 2021-06-06 11:08+0200\n"
+"PO-Revision-Date: 2021-06-06 11:09+0200\n"
 "Last-Translator: Andreas Scherer <andreas_github at freenet.de>\n"
 "Language-Team: German\n"
 "Language: de\n"
@@ -32,16 +32,16 @@
 msgstr "%s: Benötige ein bis drei Dateiargumente.\n"
 
 #: ctang-texlive.ch:39
-msgid "This is CTANGLE, Version 4.2"
-msgstr "Dies ist CTANGLE, Version 4.2"
+msgid "This is CTANGLE, Version 4.4"
+msgstr "Dies ist CTANGLE, Version 4.4"
 
 #: ctwill-texlive.ch:39
-msgid "This is CTWILL, Version 4.2"
-msgstr "Dies ist CTWILL, Version 4.2"
+msgid "This is CTWILL, Version 4.4"
+msgstr "Dies ist CTWILL, Version 4.4"
 
 #: cweav-texlive.ch:39
-msgid "This is CWEAVE, Version 4.2"
-msgstr "Dies ist CWEAVE, Version 4.2"
+msgid "This is CWEAVE, Version 4.4"
+msgstr "Dies ist CWEAVE, Version 4.4"
 
 #: comm-texlive.ch:512
 #, c-format

Modified: branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb.po
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb.po	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/de/cweb.po	2021-06-17 21:27:03 UTC (rev 855)
@@ -603,16 +603,16 @@
 msgstr "Sortieren:"
 
 #: ctang-i18n.ch:17
-msgid "This is CTANGLE (Version 4.2 [CWEBbin 2021])"
-msgstr "Dies ist CTANGLE (Version 4.2 [CWEBbin 2021])"
+msgid "This is CTANGLE (Version 4.4 [CWEBbin 2021.4])"
+msgstr "Dies ist CTANGLE (Version 4.4 [CWEBbin 2021.4])"
 
 #: cweav-twill.ch:61
-msgid "This is CTWILL (Version 4.2 [CWEBbin 2021])"
-msgstr "Dies ist CTWILL (Version 4.2 [CWEBbin 2021])"
+msgid "This is CTWILL (Version 4.4 [CWEBbin 2021.4])"
+msgstr "Dies ist CTWILL (Version 4.4 [CWEBbin 2021.4])"
 
 #: cweav-i18n.ch:17 cweav-twill.ch:42
-msgid "This is CWEAVE (Version 4.2 [CWEBbin 2021])"
-msgstr "Dies ist CWEAVE (Version 4.2 [CWEBbin 2021])"
+msgid "This is CWEAVE (Version 4.4 [CWEBbin 2021.4])"
+msgstr "Dies ist CWEAVE (Version 4.4 [CWEBbin 2021.4])"
 
 #: cweav-i18n.ch:301 cweav-i18n.ch:309
 msgid "buffer"

Modified: branches/stable/source/src/texk/web2c/cwebdir/po/de/web2c-help.po
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/de/web2c-help.po	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/de/web2c-help.po	2021-06-17 21:27:03 UTC (rev 855)
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: CWEBbin 2021\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-06 15:10+0200\n"
-"PO-Revision-Date: 2021-02-06 15:58+0100\n"
+"POT-Creation-Date: 2021-03-24 12:04+0100\n"
+"PO-Revision-Date: 2021-03-24 12:04+0100\n"
 "Last-Translator: Andreas Scherer <andreas_github at freenet.de>\n"
 "Language-Team: German\n"
 "Language: de\n"
@@ -55,6 +55,10 @@
 msgid "+h          print success message on completion"
 msgstr "+h          schreibe die Erfolgsmeldung am Ende"
 
+#: help.h:66
+msgid "+k          keep separators in numeric literals in the output"
+msgstr "+k          konserviere '-Trenner in Zahlen in der Ausgabe"
+
 #: help.h:61 help.h:81 help.h:107
 msgid "+p          print progress report messages"
 msgstr "+p          schreibe die Fortschrittsmeldungen"
@@ -67,13 +71,17 @@
 msgid "+/-v        shortcut for '+bhp'; also '--verbose'"
 msgstr "+/-v        Kurzform für '+bhp'; auch '--verbose'"
 
-#: help.h:64 help.h:90 help.h:117
+#: help.h:64 help.h:85 help.h:112
+msgid "-c          ignore temporary output irrespective of changes"
+msgstr "-c          ignoriere temporäre Ausgabe unabhängig von Änderungen"
+
+#: help.h:66 help.h:93 help.h:121
 msgid "+s          print usage statistics"
 msgstr "+s          melde die Verbrauchsstatistik"
 
-#: help.h:65 help.h:91 help.h:118
-msgid "-t          ignore temporary output irrespective of changes"
-msgstr "-t          ignoriere temporäre Ausgabe unabhängig von Änderungen"
+#: help.h:95 help.h:124
+msgid "+t          treat 'typename' in a template like 'typedef'"
+msgstr "+t          behandle 'typename' in Templates wie 'typedef'"
 
 #: help.h:66 help.h:92 help.h:119
 msgid "--help      display this help and exit"

Modified: branches/stable/source/src/texk/web2c/cwebdir/po/it/cweb.po
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/it/cweb.po	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/it/cweb.po	2021-06-17 21:27:03 UTC (rev 855)
@@ -7,8 +7,8 @@
 msgstr ""
 "Project-Id-Version: CWEBbin 2021\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-06 15:25+0100\n"
-"PO-Revision-Date: 2021-02-06 15:57+0100\n"
+"POT-Creation-Date: 2021-06-06 11:08+0200\n"
+"PO-Revision-Date: 2021-06-06 11:10+0200\n"
 "Last-Translator: Andreas Scherer <andreas_github at freenet.de>\n"
 "Language-Team: Italian\n"
 "Language: it\n"
@@ -598,16 +598,16 @@
 msgstr "Ordinamento:"
 
 #: ctang-i18n.ch:17
-msgid "This is CTANGLE (Version 4.2 [CWEBbin 2021])"
-msgstr "Questo è CTANGLE (Versione 4.2 [CWEBbin 2021])"
+msgid "This is CTANGLE (Version 4.4 [CWEBbin 2021.4])"
+msgstr "Questo è CTANGLE (Versione 4.4 [CWEBbin 2021])"
 
 #: cweav-i18n.ch:17
-msgid "This is CWEAVE (Version 4.2 [CWEBbin 2021])"
-msgstr "Questo è CWEAVE (Versione 4.2 [CWEBbin 2021])"
+msgid "This is CWEAVE (Version 4.4 [CWEBbin 2021.4])"
+msgstr "Questo è CWEAVE (Versione 4.4 [CWEBbin 2021])"
 
 #: cweav-twill.ch:68
-msgid "This is CTWILL (Version 4.2 [CWEBbin 2021])"
-msgstr "Questo è CTWILL (Versione 4.2 [CWEBbin 2021])"
+msgid "This is CTWILL (Version 4.4 [CWEBbin 2021.4])"
+msgstr "Questo è CTWILL (Versione 4.4 [CWEBbin 2021])"
 
 #: cweav-i18n.ch:301 cweav-i18n.ch:309
 msgid "buffer"

Modified: branches/stable/source/src/texk/web2c/cwebdir/po/web2c-help.pot
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/po/web2c-help.pot	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/po/web2c-help.pot	2021-06-17 21:27:03 UTC (rev 855)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: CWEBbin 2021\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-02-06 15:10+0200\n"
+"POT-Creation-Date: 2021-03-24 12:04+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -54,6 +54,10 @@
 msgid "+h          print success message on completion"
 msgstr ""
 
+#: help.h:66
+msgid "+k          keep separators in numeric literals in the output"
+msgstr ""
+
 #: help.h:61 help.h:81 help.h:107
 msgid "+p          print progress report messages"
 msgstr ""
@@ -66,12 +70,16 @@
 msgid "+/-v        shortcut for '+bhp'; also '--verbose'"
 msgstr ""
 
-#: help.h:64 help.h:90 help.h:117
+#: help.h:64 help.h:85 help.h:112
+msgid "-c          ignore temporary output irrespective of changes"
+msgstr ""
+
+#: help.h:66 help.h:93 help.h:121
 msgid "+s          print usage statistics"
 msgstr ""
 
-#: help.h:65 help.h:91 help.h:118
-msgid "-t          ignore temporary output irrespective of changes"
+#: help.h:95 help.h:124
+msgid "+t          treat 'typename' in a template like 'typedef'"
 msgstr ""
 
 #: help.h:66 help.h:92 help.h:119

Modified: branches/stable/source/src/texk/web2c/cwebdir/prod-twill.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/prod-twill.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/prod-twill.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -26,9 +26,8 @@
 production number refers to the notes at the end of this section,
 which deal with various exceptional cases.
 
-We use \\{in}, \\{out}, \\{back} and
-\\{bsp} as shorthands for |indent|, |outdent|, |backup| and
-|break_space|, respectively.
+We use \\{in}, \\{out}, \\{back}, \\{bsp}, and \\{din} as shorthands for
+|indent|, |outdent|, |backup|, |break_space|, and |dindent|, respectively.
 
 \begingroup \lineskip=4pt
 \def\alt #1 #2
@@ -38,9 +37,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip
 \prodno=0 \midcol=2.5in
@@ -58,7 +57,7 @@
 & stmt; \ /$\ast\,$comment$\,*$/\cr
 \+& |exp| \altt|lbrace| |int_like| |decl|
     & |fn_decl| \altt|lbrace| |int_like| |decl|
-        \hfill $F=E^*\,|in|\,|in|$ & \malt {\\{main}()$\{$}
+        \hfill $F=E^*\,\\{din}$ & \malt {\\{main}()$\{$}
            {\\{main}$(\\{ac},\\{av})$ \&{int} \\{ac};} \cr
 \+& |exp| |unop| & |exp| & |x++|\cr
 \+& |exp| \alt |binop| |ubinop| |exp| & |exp| & \malt {|x/y|} {|x+y|} \cr
@@ -65,12 +64,12 @@
 \+& |exp| |comma| |exp| & |exp| \hfill $EC\,|opt|9\,E$& |f(x,y)|\cr
 \+& |exp| \alt {|lpar| |rpar|} |cast| |colon| &
     |exp| \alt {|lpar| |rpar|} |cast| |base| &
-     \malt \&C|()|: {\&C|int i)|:} \cr
+     \malt \&C|()|: {\&C|(int i)|:} \cr
 \+& |exp| |semi| & |stmt| & |x=0;|\cr
 \+& |exp| |colon| & |tag| \hfill $E^*C$ & |found:|\cr
 \+& |exp| |rbrace| & |stmt| |rbrace| & end of \&{enum} list\cr
-\+& |exp| \alt {|lpar| |rpar|} |cast|  \alt|const_like| |case_like| &
-      |exp| \alt {|lpar| |rpar|} |cast|  \hfill
+\+& |exp| \alt {|lpar| |rpar|} |cast| \alt|const_like| |case_like| &
+      |exp| \alt {|lpar| |rpar|} |cast| \hfill
        \alt $R=R\.\ C$ $C_1=C_1\.\ C_2$ &
       \malt {|f() const|} {|f(int) throw|} \cr
 \+& |exp| \alt |exp| |cast| & |exp| & |time()|\cr
@@ -118,7 +117,7 @@
      $D=D$\alt $B$ $C$ \unskip$E$ & \malt {\&{int} $f(\&{int}\ x=2)$} |int b:1| \cr
 \+& |decl_head| |cast| & |decl_head| & |int f(int)|\cr
 \+& |decl_head| \altt|int_like| |lbrace| |decl| & |fn_decl|
-                   \altt|int_like| |lbrace| |decl| \hfill $F=D\,|in|\,|in|$
+                   \altt|int_like| |lbrace| |decl| \hfill $F=D\,\\{din}$
                              & |long time () {|\cr
 \+& |decl_head| |semi| & |decl| & |int n;|\cr
 \+& |decl| |decl| & |decl| \hfill $D_1\,|force|\,D_2$ & |int n;double x;|\cr
@@ -161,24 +160,24 @@
 \+& |else_like| |colon| & |else_like| |base| & \&{try} :\cr
 \+& |else_like| |lbrace| & |else_head| |lbrace| & \&{else} $\{$\cr
 \+& |else_like| |stmt| & |stmt| \hfill
-       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & |else x=0;|\cr
-\+& |else_head| \alt|stmt| |exp|  & |stmt| \hfill
-      $|force|\,E\,\\{bsp}\,|noop|\,|cancel|\,S\,\\{bsp}$ & |else{x=0;}|\cr
+       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & $\!\!$|else x=0;|\cr
+\+& |else_head| \alt|stmt| |exp| & |stmt| \hfill
+      $|force|\,E\,\\{bsp}\,|noop|\,|cancel|\,S\,\\{bsp}$ & $\!\!$|else{x=0;}|\cr
 \+& |if_clause| |lbrace| & |if_head| |lbrace| & |if (x) {|\cr
 \+& |if_clause| |stmt| |else_like| |if_like| & |if_like| \hfill
     $|force|\,I\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|\,E\,\.\ I$ &
-     |if (x) y; else if|\cr
+     $\!\!$|if (x) y; else if|\cr
 \+& |if_clause| |stmt| |else_like| & |else_like| \hfill
     $|force|\,I\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|\,E$ &
-   |if (x) y; else|\cr
+   $\!\!$|if (x) y; else|\cr
 \+& |if_clause| |stmt| & |else_like| |stmt| & |if (x)|\cr
 \+& |if_head| \alt|stmt| |exp| |else_like| |if_like| & |if_like| \hfill
     $|force|\,I\,\\{bsp}\,|noop|\,|cancel|\,S\,|force|\,E\,\.\ I$ &
-     |if (x){y;}else if|\cr
+     $\!\!$|if (x){y;}else if|\cr
 \+& |if_head| \alt|stmt| |exp| |else_like| & |else_like| \hfill
     $|force|\,I\,\\{bsp}\,|noop|\,|cancel|\,S\,|force|\,E$ &
-   |if (x){y;}else|\cr
-\+& |if_head| \alt|stmt| |exp| & |else_head| \alt|stmt| |exp| & |if (x){y;}|\cr
+   $\!\!$|if (x){y;}else|\cr
+\+& |if_head| \alt|stmt| |exp| & |else_head| \alt|stmt| |exp| & $\!\!$|if (x){y;}|\cr
 \advance\midcol20pt
 \+& |do_like| |stmt| |else_like| |semi| & |stmt| \hfill
       $D\,\\{bsp}\,|noop|\,|cancel|\,S\,|cancel|\,|noop|\,\\{bsp}\,ES$%
@@ -191,7 +190,7 @@
     $C$\alt $C$ $E$ \\{in}\,\\{in} & |catch (...)|\cr
 \+& |tag| |tag| & |tag| \hfill $T_1\,\\{bsp}\,T_2$ & |case 0: case 1:|\cr
 \+& |tag| \altt|stmt| |decl| |function| & \altt|stmt| |decl| |function|
-       \hfill $|force|\,\\{back}\,T\,\\{bsp}\,S$ & |case 0: z=0;|\cr
+       \hfill $|force|\,\\{back}\,T\,\\{bsp}\,S$ & $\!\!$|case 0: z=0;|\cr
 \+\dagit& |stmt| \altt|stmt| |decl| |function| &
    \altt|stmt| |decl| |function|
       \hfill $S\,$\altt$|force|\,S$ $|big_force|\,D$ $|big_force|\,F$ &
@@ -198,11 +197,11 @@
       |x=1;y=2;|\cr
 \+& |semi| & |stmt| \hfill \.\ $S$& empty statement\cr
 \+\dagit& |lproc| \altt |if_like| |else_like| |define_like| & |lproc| &
-         \maltt {{\bf \#include}} {\bf\#else} {\bf\#define} \cr
-\+& |lproc| |rproc| & |insert| & {\bf\#endif} \cr
+         \maltt {\#\&{include}} \#\&{else} \#\&{define} \cr
+\+& |lproc| |rproc| & |insert| & \#\&{endif} \cr
 \+& |lproc| \alt {|exp| [|exp|]} |function| |rproc| & |insert| \hfill
     $I$\.\ \alt {$E{[\.{\ \\5}E]}$} {$F$} &
- \malt{{\bf\#define} $a$\enspace 1} {{\bf\#define} $a$\enspace$\{\,b;\,\}$} \cr
+ \malt{\#\&{define} $a$\enspace 1} {\#\&{define} $a$\enspace$\{\,b;\,\}$} \cr
 \+& |section_scrap| |semi| & |stmt|\hfill $MS$ |force|
    &$\langle\,$section name$\,\rangle$;\cr
 \+& |section_scrap| & |exp| &$\langle\,$section name$\,\rangle$\cr
@@ -265,14 +264,63 @@
     \malt |?x:| |?f():| \cr
 \+& |begin_arg| |end_arg| & |exp| & \.{@@[}\&{char}$*$\.{@@]}\cr
 \+& |any_other| |end_arg| & |end_arg| &    \&{char}$*$\.{@@]}\cr
+\+& |alignas_like| |decl_head| & |attr| & |alignas(struct s *)| \cr
+\+& |alignas_like| |exp| & |attr| & |alignas(8)| \cr
+\+& |lbrack| |lbrack| & |attr_head| & attribute begins \cr
+\+& |lbrack| & |lpar| & |[| elsewhere \cr
+\+& |rbrack| & |rpar| & |]| elsewhere \cr
+\+& |attr_head| |rbrack| |rbrack| & |attr| & $[[\ldots]]$ \cr
+\+& |attr_head| |exp| & |attr_head| & $[[$|deprecated| \cr
+\+& |attr_head| |using_like| |exp| |colon| & |attr_head| & $[[$|using NS:| \cr
+\+& |attr| \alt|lbrace| |stmt| & \alt|lbrace| |stmt| \hfill $A\.\ $ \alt $S$ $L$ &
+  |[[likely]] {|\cr
+\+& |attr| |tag| & |tag| \hfill $A\.\ T$ & |[[likely]] case 0:| \cr
+\+& |attr| |semi| & |stmt| & |[[fallthrough]];| \cr
+\+& |attr| |attr| & |attr| \hfill $A\.\ A$ & |alignas(x)| $[[\ldots]]$ \cr
+\+& |attr| |decl_head| & |decl_head| & |[[nodiscard]] f()| \cr
+\+& |decl_head| |attr| & |decl_head| & |(int x [[deprecated]])|\cr
+\+& |using_like| & |int_like| & \&{using} not in attributes \cr
+\+& |struct_like| |attr| & |struct_like| \hfill $S\.\ A$ &
+  |struct [[deprecated]]|\cr
+\+& |exp| |attr| & |attr| \hfill $E\.\ A$ & \&{enum} $\{x\ [[\ldots]]\}$ \cr
+\+& |attr| |typedef_like| & |typedef_like| \hfill $A\.\ T$ &
+  |[[deprecated]] typedef| \cr
+\+& |raw_int| |lbrack| & |exp| & |int[3]| \cr
+\+& |attr_head| |comma| & |attr_head| & $[[$|x, y| \cr
+\+& |if_head| |attr| & |if_head| \hfill $I\.\ A$ & |if (x) [[unlikely]] {| \cr
+\+& |lbrack| |lbrack| |rbrack| |rbrack| & |exp| & |[[]]| \cr
+\+& |attr| |function| & |function| \hfill $A\.\ F$ &
+  attribute and function \cr
+\+& |default_like| |colon| & |case_like| |colon| & |default:| \cr
+\+& |default_like| & |exp| & |f()=default;| \cr
+\+& |struct_like| |struct_like| & |struct_like| \hfill $S\.\ S$ &
+  |enum class| \cr
+\+& |exp| |colcol| |int_like| & |int_like| & $\\{std}\DC\&{atomic}$ \cr
+\advance\midcol-60pt
+\+\dagit& |langle| |struct_like| \alt |exp| |int_like| |comma| &
+  |langle| \hfill $LS$\alt $E^{**}$ $I^{**}$ $C$ & $\langle$\&{typename} $t,$\cr
+\+\dagit& |langle| |struct_like| \alt |exp| |int_like| |prerangle| &
+  |cast| \hfill $LS$\alt $E^{**}$ $I^{**}$ $P$ &
+  \hbox{$\langle$\&{typename} $t\rangle$} \hss \cr
+\advance\midcol60pt
+\+& |template_like| |cast| |struct_like| & |struct_like| \hfill $T\.\ CS$ &
+  |template<@t\dots@>> class| \cr
+\+& |tag| |rbrace| & |decl| |rbrace| & @q{@>|public: }| \cr
+\+& |fn_decl| |attr| & |fn_decl| \hfill $F\.\ A$ & |void f() noexcept| \cr
+\+& |alignas_like| |cast| & |attr| & |alignas(int)| \cr
 \yskip
 \yskip
 \yskip
+\yskip
+\yskip
+\yskip
+\yskip
+\yskip
 \parindent=0pt
 \dag{\bf Notes}
 \yskip
-Rule 35: The |exp| must not be immediately followed by |lpar|, |exp|,
- or~|cast|.
+Rule 35: The |exp| must not be immediately followed by |lpar|, |lbrack|,
+|exp|, or~|cast|.
 
 Rule 48: The |exp| or |int_like| must not be immediately followed by |base|.
 
@@ -296,6 +344,9 @@
 
 Rule 123: The mathness of the |colon| or |base| changes to `yes'.
 
+Rules 153, 154: |make_reserved| is called only if the \.{+t} option is given
+to \.{CWEAVE}.
+
 Rule 200: The |exp| must not be immediately followed by |lpar| or~|exp|.
 
 Rule 202: The |raw_int| must be immediately followed by |semi| or |comma|.

Modified: branches/stable/source/src/texk/web2c/cwebdir/prod.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/prod.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/prod.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -26,9 +26,8 @@
 production number refers to the notes at the end of this section,
 which deal with various exceptional cases.
 
-We use \\{in}, \\{out}, \\{back} and
-\\{bsp} as shorthands for |indent|, |outdent|, |backup| and
-|break_space|, respectively.
+We use \\{in}, \\{out}, \\{back}, \\{bsp}, and \\{din} as shorthands for
+|indent|, |outdent|, |backup|, |break_space|, and |dindent|, respectively.
 
 \begingroup \lineskip=4pt
 \def\alt #1 #2
@@ -38,9 +37,9 @@
 {$\displaystyle\Biggl\{\!\matrix{\strut\hbox{#1}\cr\hbox{#2}\cr
    \strut\hbox{#3}\cr}\!\Biggr\}$ }
 \def\malt #1 #2
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\strut\hbox{#2}\hfill\cr}$}
 \def\maltt #1 #2 #3
-{$\displaystyle\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
+{$\displaystyle\!\matrix{\strut\hbox{#1}\hfill\cr\hbox{#2}\hfill\cr
    \strut\hbox{#3}\hfill\cr}$}
 \yskip
 \prodno=0 \midcol=2.5in
@@ -58,7 +57,7 @@
 & stmt; \ /$\ast\,$comment$\,*$/\cr
 \+& |exp| \altt|lbrace| |int_like| |decl|
     & |fn_decl| \altt|lbrace| |int_like| |decl|
-        \hfill $F=E^*\,|in|\,|in|$ & \malt {\\{main}()$\{$}
+        \hfill $F=E^*\,\\{din}$ & \malt {\\{main}()$\{$}
            {\\{main}$(\\{ac},\\{av})$ \&{int} \\{ac};} \cr
 \+& |exp| |unop| & |exp| & |x++|\cr
 \+& |exp| \alt |binop| |ubinop| |exp| & |exp| & \malt {|x/y|} {|x+y|} \cr
@@ -65,12 +64,12 @@
 \+& |exp| |comma| |exp| & |exp| \hfill $EC\,|opt|9\,E$& |f(x,y)|\cr
 \+& |exp| \alt {|lpar| |rpar|} |cast| |colon| &
     |exp| \alt {|lpar| |rpar|} |cast| |base| &
-     \malt \&C|()|: {\&C|int i)|:} \cr
+     \malt \&C|()|: {\&C|(int i)|:} \cr
 \+& |exp| |semi| & |stmt| & |x=0;|\cr
 \+& |exp| |colon| & |tag| \hfill $E^*C$ & |found:|\cr
 \+& |exp| |rbrace| & |stmt| |rbrace| & end of \&{enum} list\cr
-\+& |exp| \alt {|lpar| |rpar|} |cast|  \alt|const_like| |case_like| &
-      |exp| \alt {|lpar| |rpar|} |cast|  \hfill
+\+& |exp| \alt {|lpar| |rpar|} |cast| \alt|const_like| |case_like| &
+      |exp| \alt {|lpar| |rpar|} |cast| \hfill
        \alt $R=R\.\ C$ $C_1=C_1\.\ C_2$ & 
       \malt {|f() const|} {|f(int) throw|} \cr
 \+& |exp| \alt |exp| |cast| & |exp| & |time()|\cr
@@ -118,7 +117,7 @@
      $D=D$\alt $B$ $C$ \unskip$E$ & \malt {\&{int} $f(\&{int}\ x=2)$} |int b:1| \cr
 \+& |decl_head| |cast| & |decl_head| & |int f(int)|\cr
 \+& |decl_head| \altt|int_like| |lbrace| |decl| & |fn_decl|
-                   \altt|int_like| |lbrace| |decl| \hfill $F=D\,|in|\,|in|$
+                   \altt|int_like| |lbrace| |decl| \hfill $F=D\,\\{din}$
                              & |long time () {|\cr
 \+& |decl_head| |semi| & |decl| & |int n;|\cr
 \+& |decl| |decl| & |decl| \hfill $D_1\,|force|\,D_2$ & |int n;double x;|\cr
@@ -161,24 +160,24 @@
 \+& |else_like| |colon| & |else_like| |base| & \&{try} :\cr
 \+& |else_like| |lbrace| & |else_head| |lbrace| & \&{else} $\{$\cr
 \+& |else_like| |stmt| & |stmt| \hfill
-       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & |else x=0;|\cr
-\+& |else_head| \alt|stmt| |exp|  & |stmt| \hfill
-      $|force|\,E\,\\{bsp}\,|noop|\,|cancel|\,S\,\\{bsp}$ & |else{x=0;}|\cr
+       $|force|\,E\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|$ & $\!\!$|else x=0;|\cr
+\+& |else_head| \alt|stmt| |exp| & |stmt| \hfill
+      $|force|\,E\,\\{bsp}\,|noop|\,|cancel|\,S\,\\{bsp}$ & $\!\!$|else{x=0;}|\cr
 \+& |if_clause| |lbrace| & |if_head| |lbrace| & |if (x) {|\cr
 \+& |if_clause| |stmt| |else_like| |if_like| & |if_like| \hfill
     $|force|\,I\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|\,E\,\.\ I$ &
-     |if (x) y; else if|\cr
+     $\!\!$|if (x) y; else if|\cr
 \+& |if_clause| |stmt| |else_like| & |else_like| \hfill
     $|force|\,I\,\\{in}\,\\{bsp}\,S\,\\{out}\,|force|\,E$ &
-   |if (x) y; else|\cr
+   $\!\!$|if (x) y; else|\cr
 \+& |if_clause| |stmt| & |else_like| |stmt| & |if (x)|\cr
 \+& |if_head| \alt|stmt| |exp| |else_like| |if_like| & |if_like| \hfill
     $|force|\,I\,\\{bsp}\,|noop|\,|cancel|\,S\,|force|\,E\,\.\ I$ &
-     |if (x){y;}else if|\cr
+     $\!\!$|if (x){y;}else if|\cr
 \+& |if_head| \alt|stmt| |exp| |else_like| & |else_like| \hfill
     $|force|\,I\,\\{bsp}\,|noop|\,|cancel|\,S\,|force|\,E$ &
-   |if (x){y;}else|\cr
-\+& |if_head| \alt|stmt| |exp| & |else_head| \alt|stmt| |exp| & |if (x){y;}|\cr
+   $\!\!$|if (x){y;}else|\cr
+\+& |if_head| \alt|stmt| |exp| & |else_head| \alt|stmt| |exp| & $\!\!$|if (x){y;}|\cr
 \advance\midcol20pt
 \+& |do_like| |stmt| |else_like| |semi| & |stmt| \hfill
       $D\,\\{bsp}\,|noop|\,|cancel|\,S\,|cancel|\,|noop|\,\\{bsp}\,ES$%
@@ -191,7 +190,7 @@
     $C$\alt $C$ $E$ \\{in}\,\\{in} & |catch (...)|\cr
 \+& |tag| |tag| & |tag| \hfill $T_1\,\\{bsp}\,T_2$ & |case 0: case 1:|\cr
 \+& |tag| \altt|stmt| |decl| |function| & \altt|stmt| |decl| |function|
-       \hfill $|force|\,\\{back}\,T\,\\{bsp}\,S$ & |case 0: z=0;|\cr
+       \hfill $|force|\,\\{back}\,T\,\\{bsp}\,S$ & $\!\!$|case 0: z=0;|\cr
 \+\dagit& |stmt| \altt|stmt| |decl| |function| &
    \altt|stmt| |decl| |function|
       \hfill $S\,$\altt$|force|\,S$ $|big_force|\,D$ $|big_force|\,F$ &
@@ -198,11 +197,11 @@
       |x=1;y=2;|\cr
 \+& |semi| & |stmt| \hfill \.\ $S$& empty statement\cr
 \+\dagit& |lproc| \altt |if_like| |else_like| |define_like| & |lproc| &
-         \maltt {{\bf \#include}} {\bf\#else} {\bf\#define} \cr
-\+& |lproc| |rproc| & |insert| & {\bf\#endif} \cr
+         \maltt {\#\&{include}} \#\&{else} \#\&{define} \cr
+\+& |lproc| |rproc| & |insert| & \#\&{endif} \cr
 \+& |lproc| \alt {|exp| [|exp|]} |function| |rproc| & |insert| \hfill
     $I$\.\ \alt {$E{[\.{\ \\5}E]}$} {$F$} &
- \malt{{\bf\#define} $a$\enspace 1} {{\bf\#define} $a$\enspace$\{\,b;\,\}$} \cr
+ \malt{\#\&{define} $a$\enspace 1} {\#\&{define} $a$\enspace$\{\,b;\,\}$} \cr
 \+& |section_scrap| |semi| & |stmt|\hfill $MS$ |force|
    &$\langle\,$section name$\,\rangle$;\cr
 \+& |section_scrap| & |exp| &$\langle\,$section name$\,\rangle$\cr
@@ -270,14 +269,63 @@
     \malt |?x:| |?f():| \cr
 \+& |begin_arg| |end_arg| & |exp| & \.{@@[}\&{char}$*$\.{@@]}\cr
 \+& |any_other| |end_arg| & |end_arg| &    \&{char}$*$\.{@@]}\cr
+\+& |alignas_like| |decl_head| & |attr| & |alignas(struct s *)| \cr
+\+& |alignas_like| |exp| & |attr| & |alignas(8)| \cr
+\+& |lbrack| |lbrack| & |attr_head| & attribute begins \cr
+\+& |lbrack| & |lpar| & |[| elsewhere \cr
+\+& |rbrack| & |rpar| & |]| elsewhere \cr
+\+& |attr_head| |rbrack| |rbrack| & |attr| & $[[\ldots]]$ \cr
+\+& |attr_head| |exp| & |attr_head| & $[[$|deprecated| \cr
+\+& |attr_head| |using_like| |exp| |colon| & |attr_head| & $[[$|using NS:| \cr
+\+& |attr| \alt|lbrace| |stmt| & \alt|lbrace| |stmt| \hfill $A\.\ $ \alt $S$ $L$ &
+  |[[likely]] {|\cr
+\+& |attr| |tag| & |tag| \hfill $A\.\ T$ & |[[likely]] case 0:| \cr
+\+& |attr| |semi| & |stmt| & |[[fallthrough]];| \cr
+\+& |attr| |attr| & |attr| \hfill $A\.\ A$ & |alignas(x)| $[[\ldots]]$ \cr
+\+& |attr| |decl_head| & |decl_head| & |[[nodiscard]] f()| \cr
+\+& |decl_head| |attr| & |decl_head| & |(int x [[deprecated]])|\cr
+\+& |using_like| & |int_like| & \&{using} not in attributes \cr
+\+& |struct_like| |attr| & |struct_like| \hfill $S\.\ A$ &
+  |struct [[deprecated]]|\cr
+\+& |exp| |attr| & |attr| \hfill $E\.\ A$ & \&{enum} $\{x\ [[\ldots]]\}$ \cr
+\+& |attr| |typedef_like| & |typedef_like| \hfill $A\.\ T$ &
+  |[[deprecated]] typedef| \cr
+\+& |raw_int| |lbrack| & |exp| & |int[3]| \cr
+\+& |attr_head| |comma| & |attr_head| & $[[$|x, y| \cr
+\+& |if_head| |attr| & |if_head| \hfill $I\.\ A$ & |if (x) [[unlikely]] {| \cr
+\+& |lbrack| |lbrack| |rbrack| |rbrack| & |exp| & |[[]]| \cr
+\+& |attr| |function| & |function| \hfill $A\.\ F$ &
+  attribute and function \cr
+\+& |default_like| |colon| & |case_like| |colon| & |default:| \cr
+\+& |default_like| & |exp| & |f()=default;| \cr
+\+& |struct_like| |struct_like| & |struct_like| \hfill $S\.\ S$ &
+  |enum class| \cr
+\+& |exp| |colcol| |int_like| & |int_like| & $\\{std}\DC\&{atomic}$ \cr
+\advance\midcol-60pt
+\+\dagit& |langle| |struct_like| \alt |exp| |int_like| |comma| &
+  |langle| \hfill $LS$\alt $E^{**}$ $I^{**}$ $C$ & $\langle$\&{typename} $t,$\cr
+\+\dagit& |langle| |struct_like| \alt |exp| |int_like| |prerangle| &
+  |cast| \hfill $LS$\alt $E^{**}$ $I^{**}$ $P$ &
+  \hbox{$\langle$\&{typename} $t\rangle$} \hss \cr
+\advance\midcol60pt
+\+& |template_like| |cast| |struct_like| & |struct_like| \hfill $T\.\ CS$ &
+  |template<@t\dots@>> class| \cr
+\+& |tag| |rbrace| & |decl| |rbrace| & @q{@>|public: }| \cr
+\+& |fn_decl| |attr| & |fn_decl| \hfill $F\.\ A$ & |void f() noexcept| \cr
+\+& |alignas_like| |cast| & |attr| & |alignas(int)| \cr
 \yskip
 \yskip
 \yskip
+\yskip
+\yskip
+\yskip
+\yskip
+\yskip
 \parindent=0pt
 \dag{\bf Notes}
 \yskip
-Rule 35: The |exp| must not be immediately followed by |lpar|, |exp|,
- or~|cast|.
+Rule 35: The |exp| must not be immediately followed by |lpar|, |lbrack|,
+|exp|, or~|cast|.
 
 Rule 48: The |exp| or |int_like| must not be immediately followed by |base|.
 
@@ -304,4 +352,7 @@
 
 Rule 123: The mathness of the |colon| or |base| changes to `yes'.
 
+Rules 153, 154: |make_reserved| is called only if the \.{+t} option is given
+to \.{CWEAVE}.
+
 \endgroup

Added: branches/stable/source/src/texk/web2c/cwebdir/refsort.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/refsort.ch	                        (rev 0)
+++ branches/stable/source/src/texk/web2c/cwebdir/refsort.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -0,0 +1,44 @@
+Changes for the REFSORT utility from the CTWILL tarball.
+
+This minimal set of changes tries to satisfy the GCC compiler.
+
+This file is not copyrighted and can be used freely.
+
+ at x
+\datethis
+ at y
+\datethis
+\let\maybe=\iffalse % print only sections that change
+ at z
+
+ at x standard C library interface
+#include "stdio.h"
+#include "strings.h"
+#include "ctype.h"
+ at y
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+ at z
+
+ at x declare return type
+main()
+ at y
+int main()
+ at z
+
+ at x variable not used
+{ register int k;
+ at y
+{
+ at z
+
+ at x add 'Index.' section
+  for (;*p;p++) *q++=*p;
+}
+ at y
+  for (;*p;p++) *q++=*p;
+}
+
+@* Index.
+ at z


Property changes on: branches/stable/source/src/texk/web2c/cwebdir/refsort.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/stable/source/src/texk/web2c/cwebdir/refsort.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/refsort.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/refsort.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -40,9 +40,9 @@
 
 @d abort(c,m) { fprintf(stderr,"%s!\n%s",m,buf); return c; }
 @c
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
+#include "stdio.h"
+#include "strings.h"
+#include "ctype.h"
 @#
 typedef struct {
   char key[max_key];
@@ -54,7 +54,7 @@
 char buf[max_size]; /* current line of input */
 char *input_status; /* |NULL| if end of input reached, else |buf| */
 @#
-int main()
+main()
 {
   register char *p,*q;
   register int n; /* current number of items */
@@ -86,7 +86,7 @@
 }
 
 @ @<Output the current group@>=
-{
+{ register int k;
   for (y=sorted;y<sorted+n;y++) printf("%s\n",(*y)->entry);
   printf("\\donewithpage%s\n",cur_page);
 }
@@ -162,4 +162,3 @@
   for (;*p;p++) *q++=*p;
 }
 
-@* Index.

Modified: branches/stable/source/src/texk/web2c/cwebdir/system.bux
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/system.bux	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/system.bux	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,13 +1,16 @@
 @$memcmp "<string.h>" \zip@>
 @$memcpy "<string.h>" \zip@>
 @$strcat "<string.h>" \zip@>
+@$strchr "<string.h>" \zip@>
 @$strcmp "<string.h>" \zip@>
 @$strcpy "<string.h>" \zip@>
 @$strlen "<string.h>" \zip@>
 @$strncmp "<string.h>" \zip@>
 @$strncpy "<string.h>" \zip@>
+@$strrchr "<string.h>" \zip@>
 
 @$BUFSIZ "<stdio.h>" \zip@>
+@$EOF "<stdio.h>" \zip@>
 @$fclose "<stdio.h>" \zip@>
 @$feof "<stdio.h>" \zip@>
 @$fflush "<stdio.h>" \zip@>
@@ -16,6 +19,7 @@
 @$fputs "<stdio.h>" \zip@>
 @$fread "<stdio.h>" \zip@>
 @$fwrite "<stdio.h>" \zip@>
+@$getc "<stdio.h>" \zip@>
 @$printf "<stdio.h>" \zip@>
 @$putc "<stdio.h>" \zip@>
 @$putchar "<stdio.h>" \zip@>
@@ -24,6 +28,7 @@
 @$remove "<stdio.h>" \zip@>
 @$sprintf "<stdio.h>" \zip@>
 @$stdout "<stdio.h>" \zip@>
+@$ungetc "<stdio.h>" \zip@>
 
 @$getenv "<stdlib.h>" \zip@>
 @$exit "<stdlib.h>" \zip@>
@@ -43,7 +48,14 @@
 @$bool "<stdbool.h>" \zip@>
 @$false "<stdbool.h>" \zip@>
 @$true "<stdbool.h>" \zip@>
+
 @$ptrdiff_t "<stddef.h>" \zip@>
 @$size_t "<stddef.h>" \zip@>
+
 @$uint8_t "<stdint.h>" \zip@>
 @$uint16_t "<stdint.h>" \zip@>
+
+@$bindtextdomain "<locale.h>" \zip@>
+@$setlocale "<locale.h>" \zip@>
+@$LC_CTYPE "<locale.h>" \zip@>
+@$LC_MESSAGES "<locale.h>" \zip@>

Modified: branches/stable/source/src/texk/web2c/cwebdir/texinputs/Xcwebmac.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/texinputs/Xcwebmac.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/texinputs/Xcwebmac.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -26,13 +26,12 @@
 % Version 3.64 [p21] --- Andreas Scherer, Octobre 2005
 % Version 3.64 [2018] --- Andreas Scherer, Octobre 2018
 % Version 3.64 [2020] --- Andreas Scherer, May 2020
+% Version 4.3 [2021] --- Andreas Scherer, April 2021
 
 \ifx\undefined\botofcontents\input cwebmac.tex\fi
 
-\xdef\fmtversion{\fmtversion[2020]}
+\xdef\fmtversion{\fmtversion[2021]}
 
-\def\Cpp{\CPLUSPLUS/} % for backward compatibility
-
 \font\tenss=cmss10 \let\cmntfont\tenss % comment font
 
 \def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}

Modified: branches/stable/source/src/texk/web2c/cwebdir/texinputs/pdfctwimac.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -234,6 +234,7 @@
 \newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
 \let\yskip=\smallskip
 \def\?{\mathrel?}
+\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
 \def\note#1#2.{\par\penalty5000
   \Y\noindent{\hangindent2\em\baselineskip10pt%
     \eightrm#1~\ifacro{\pdfnote#2.}\else#2\fi.\par}}
@@ -400,7 +401,7 @@
 \def\startsection{\titletrue
   \line{\smash{\titlefont\title}\quad\hrulefill}\bigskip
   \let\startsection=\stsec\stsec}
-\def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format'
+\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
 \def\As{\note{See also sections}} % xref for multiply defined section name
 \def\B{\iftenpoint\ninepoint\fi
@@ -415,7 +416,7 @@
 %\let\SHC\C % "// short comments" treated like "/* ordinary comments */"
 \def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
 \def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}}
-\def\D{\defin{\#define}} % macro definition
+\def\D{\defin{{\rm\#}define}} % macro definition
 \let\E=\equiv % equivalence sign
 \def\ET{ and~} % conjunction between two section numbers
 \def\ETs{, and~} % conjunction between the last two of several section numbers
@@ -469,7 +470,8 @@
   \hbox{$\def\?{\kern.2em}%$%
     \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant
     \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
-    \let\~=\oct \let\^=\hex {#1}$}}%$%
+    \def\%{\cdot 16^{\aftergroup}}% power of sixteen (via dirty trick)
+    \let\~=\oct \let\^=\hex \let\\=\bin{#1}$}}%$%
 \def\U{\note{This code is used in section}} % xref for use of a section
 \def\Us{\note{This code is used in sections}} % xref for uses of a section
 \let\V=\lor % logical or
@@ -484,16 +486,16 @@
 
 %\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style
 %\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style
-\def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}}% CWEB style
-\def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style
+\def\oct{\hbox{$^\circ$\kern-.1em}\Od}% CWEB style
+\def\hex{\hbox{$^{\scriptscriptstyle\#}$}\Hd} % CWEB style
+\def\bin{\hbox{$^{\scriptscriptstyle b}$}\Bd}
+\def\Od#1/{{\it#1}} % octal digit
+\def\Hd#1/{{\tt#1}} % hexadecimal digit
+\def\Bd#1/{{\tt#1}} % binary digit
 \def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule
         \hbox{\strut\kern2pt\.{#1}\kern2pt}}
       \hrule}\vrule\kern2pt}} % verbatim string
 
-\def\TeX{{\ifmmode\it\fi
-   \leavevmode\hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}}
-\def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
-
 % now here's the mini-index formatting control
 \newcount\nrefs % total number of references in partial page
 \newcount\baseno % smallest section number in partial page
@@ -639,7 +641,26 @@
 
 \hsize=\pagewd \vsize=\maxdimen \output={\twillout}
 
+%\let\page=\pagebody \raggedbottom
+% \def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes
+%\def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
+ %\shipout\vbox{
+  %\vbox to\fullpageht{
+  %\iftitle\global\titlefalse
+  %\else\hbox to\pagewd{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi
+  %\vfill#1}} % parameter #1 is the page itself
+  %\global\advance\pageno by1}
+%\def\topofcontents{\centerline{\titlefont\title}\vskip.7in
+  %\vfill} % this material will start the table of contents page
+%\def\startpdf{\ifpdftex\pdfcatalog{/PageMode /UseOutlines}\else
+    %\ifpdf{\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}
+%\def\botofcontents{\vfill
+  %\centerline{\covernote}} % this material will end the table of contents page
+%\def\covernote{}
 \def\contentspagenumber{0} % default page number for table of contents
+%\newdimen\pageshift \pageshift=\hoffset
+   %% shift righthand pages wrt lefthand ones (changed in version 3.70)
+%\def\setpage{\hsize\pagewd\vsize\pageht} % use after changing page size
 \def\contentsfile{\jobname.toc} % file that gets table of contents info
 \def\readcontents{\input \contentsfile}
 \def\readsections{\input \jobname.scn}
@@ -675,7 +696,43 @@
   \let\(=\let \let\)=\let \let\[=\let \let\]=\let \let\/=\let
   \pdfoutline goto num #3 count -\expnumber{chunk#2.#3} {#5}}}
 \let\con=\end % no table of contents
-\def\datethis{} \def\datecontentspage{}
+%\def\con{\par\vfill\eject % finish the section names
+% \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
+  %\rightskip 0pt \hyphenpenalty 50 \tolerance 200
+  %\setpage \output={\normaloutput\page\lheader\rheader}
+  %\titletrue % prepare to output the table of contents
+  %\pageno=\contentspagenumber
+  %\def\grouptitle{TABLE OF CONTENTS}
+  %\message{Table of contents:}
+  %\topofcontents \startpdf
+  %\line{\hfil Section\hbox to3em{\hss Page}}
+  %\let\ZZ=\contentsline
+  %\readcontents\relax % read the contents info
+  %\botofcontents \end} % print the contents page(s) and terminate
+%\def\contentsline#1#2#3#4#5{\ifnum#2=0 \smallbreak\fi
+    %\line{\consetup{#2}#1
+      %\rm\leaders\hbox to .5em{.\hfil}\hfil
+      %\ \ifacro\pdflink{#3}{\romannumeral#3}\else#3\fi\hbox to3em{\hss#4}}}
+%\def\consetup#1{\ifcase#1 \bf % depth -1 (@**)
+  %\or % depth 0 (@*)
+  %\or \hskip2em % depth 1 (@*1)
+  %\or \hskip4em \or \hskip6em \or \hskip8em \or \hskip10em % depth 2,3,4,5
+  %\else \hskip12em \fi} % depth 6 or more
+\def\today{\ifcase\month\or
+  January\or February\or March\or April\or May\or June\or
+  July\or August\or September\or October\or November\or December\fi
+  \space\number\day, \number\year}
+\newcount\twodigits
+\def\hours{\twodigits=\time \divide\twodigits by 60 \printtwodigits
+  \multiply\twodigits by-60 \advance\twodigits by\time :\printtwodigits}
+\def\gobbleone1{}
+\def\printtwodigits{\advance\twodigits100
+  \expandafter\gobbleone\number\twodigits
+  \advance\twodigits-100 }
+\def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip
+  \let\startsection=\stsec\stsec}}
+  % say `\datethis' in limbo, to get your listing timestamped before section 1
+\def\datecontentspage{}
 
 % To produce only a subset of pages, put the page numbers on separate
 % lines in a file called pages.tex

Added: branches/stable/source/src/texk/web2c/cwebdir/twinx-startup.tex
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/twinx-startup.tex	                        (rev 0)
+++ branches/stable/source/src/texk/web2c/cwebdir/twinx-startup.tex	2021-06-17 21:27:03 UTC (rev 855)
@@ -0,0 +1,9 @@
+% special TeX strings from 'ctwill.w':
+\def\copyxTeX{\\{copy\_\TEX/}}
+\def\skipxTeX{\\{skip\_\TEX/}}
+\def\TeXxstring{\\{\TEX/\_string}}
+
+\pageno=101 % dummy page number
+\preinx % pre-index text on full pagewidth
+\noindent Some introductory words about this full index.
+\inx % two-column index


Property changes on: branches/stable/source/src/texk/web2c/cwebdir/twinx-startup.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: branches/stable/source/src/texk/web2c/cwebdir/twinx.ch
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/twinx.ch	                        (rev 0)
+++ branches/stable/source/src/texk/web2c/cwebdir/twinx.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -0,0 +1,156 @@
+Changes for the TWINX utility from the CTWILL tarball.
+
+This minimal set of changes tries to satisfy the GCC compiler
+and it fixes a few minor issues. See the comments after '@x'.
+
+This file is not copyrighted and can be used freely.
+
+Limbo.
+
+ at x l.1
+\datethis
+ at y
+\datethis
+\let\maybe=\iffalse % print only sections that change
+ at z
+
+Section 1.
+
+ at x l.10 Standard C interface.
+#include <stdio.h>
+ at y
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+ at z
+
+ at x l.15
+main(argc,argv)
+  int argc;
+  char *argv[];
+ at y
+int main(
+  int argc,
+  char *argv[])
+ at z
+
+ at x l.21
+    f=fopen(*++argv,"r");
+    if (!f)
+ at y
+    if((f=fopen(*++argv,"r"))==NULL)
+ at z
+
+ at x l.28
+      f=fopen(*argv,"r");
+      if (!f)
+ at y
+      if((f=fopen(*argv,"r"))==NULL)
+ at z
+
+Section 3.
+
+ at x l.49 Document minor change in behavior.
+@ @<Scan file |f|...@>=
+ at y
+@ For your convenience, \.{TWINX} grabs the first ``word'' in \.{\\title} and
+turns it into uppercase form.
+
+@<Scan file |f|...@>=
+ at z
+
+ at x l.57 FIX: Fetch only the first word from the '\title'.
+    for (p=buf+11,q=title;*p && *p!='}';p++) *q++=*p;
+ at y
+    for (p=buf+11,q=title;*p&&*p!=' '&&*p!='}';p++) *q++=toupper(*p);
+ at z
+
+Section 4.
+
+ at x l.96
+@<Type...@>=
+ at y
+ at s node_struct int
+
+@<Type...@>=
+ at z
+
+ at x l.102 Compiler warning.
+  char *id;
+ at y
+  const char *id;
+ at z
+
+Section 5.
+
+ at x l.115
+char *save_string(s)
+  char *s;
+ at y
+char *save_string(
+  char *s)
+ at z
+
+Section 6.
+
+ at x l.145
+node *new_node()
+ at y
+node *new_node(void)
+ at z
+
+Section 11.
+
+ at x l.216 FIX: Don't count masked braces.
+    if (*p=='{') bal++;
+    else if (*p=='}') bal--;
+ at y
+    switch (*p) {
+    case '\\': *q++=*p++; break;
+    case '{': bal++; break;
+    case '}': bal--; break;
+    }
+ at z
+
+Section 17.
+
+ at x l.347
+int compare(p,q)
+  node *p,*q;
+ at y
+int compare(
+  node *p, node *q)
+ at z
+
+Section 19.
+
+ at x l.379 Compiler warning.
+  for (j=1;collate[j];j++) ord[collate[j]]=j;
+ at y
+  for (j=1;collate[j];j++) ord[(int)collate[j]]=j;
+ at z
+
+Section 20.
+
+ at x l.390
+collapse(p,q)
+  node *p,*q;
+ at y
+void collapse(
+  node *p, node *q)
+ at z
+
+Section 22.
+
+ at x l.414 Compiler warning.
+{@+register char *p=x->id;
+ at y
+{@+register const char *p=x->id;
+ at z
+
+ at x l.434 FIX: Don't mask already masked underscore.
+    if (*p=='_') putchar('\\');
+ at y
+    if (*p=='_'&&*(p-1)!='\\') putchar('\\');
+ at z


Property changes on: branches/stable/source/src/texk/web2c/cwebdir/twinx.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: branches/stable/source/src/texk/web2c/cwebdir/twinx.w
===================================================================
--- branches/stable/source/src/texk/web2c/cwebdir/twinx.w	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/cwebdir/twinx.w	2021-06-17 21:27:03 UTC (rev 855)
@@ -8,16 +8,13 @@
 
 @c
 #include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
 @<Type definitions@>@;
 @<Global variables@>@;
 @<Procedures@>@;
 @#
-int main(
-  int argc,
-  char *argv[])
+main(argc,argv)
+  int argc;
+  char *argv[];
 { @<Local variables@>;
   @<Initialize the data structures@>;
   while (--argc) {
@@ -102,7 +99,7 @@
   struct node_struct *n;
 } mixed;
 typedef struct node_struct {
-  const char *id;
+  char *id;
   mixed data;
   struct node_struct *next;
 } node;
@@ -115,8 +112,8 @@
 @d string_block_size 8192 /* number of bytes per string block */
 
 @<Proc...@>=
-char *save_string(
-  char *s)
+char *save_string(s)
+  char *s;
 {
   register char *p,*q; register int l;
   for (p=s;*p;p++) ;
@@ -145,7 +142,7 @@
 @d nodes_per_block 340
 
 @<Proc...@>=
-node *new_node(void)
+node *new_node()
 {
   if (next_node==bad_node) {
     next_node=(node*)calloc(nodes_per_block,sizeof(node));
@@ -347,8 +344,8 @@
 two characters of the |id| field).
 
 @<Proc...@>=
-int compare(
-  node *p, node *q)
+int compare(p,q)
+  node *p,*q;
 {@+register unsigned char *pp,*qq;
   for (pp=(unsigned char*)p->id+3,qq=(unsigned char*)q->id+3;
       *pp&&ord[*pp]==ord[*qq];pp++,qq++) ;
@@ -379,7 +376,7 @@
 !\42#$%&'()*+,-./:;<=>?@@[\\]^`{|~_\
 abcdefghijklmnopqrstuvwxyz0123456789");
 {@+register int j;
-  for (j=1;collate[j];j++) ord[(int)collate[j]]=j;
+  for (j=1;collate[j];j++) ord[collate[j]]=j;
   ord[128]=j; /* this affects the ordering of |sentinel.id| */
   for (j='A';j<='Z';j++) ord[j]=ord[tolower(j)];
 }
@@ -390,8 +387,8 @@
 |q->data.n| should not be considered an active pointer.
 
 @<Proc...@>=
-void collapse(
-  node *p, node *q)
+collapse(p,q)
+  node *p,*q;
 {@+register node *x;
   for (x=q->data.n;x->next;x=x->next) ;
   x->next=p->data.n;
@@ -414,7 +411,7 @@
 }
 
 @ @<Output |x->id|...@>=
-{@+register const char *p=x->id;
+{@+register char *p=x->id;
   if (*p==' ') {
     if (*(p+1)!=' ') goto unknown;
     goto known;

Modified: branches/stable/source/src/texk/web2c/doc/ref.txi
===================================================================
--- branches/stable/source/src/texk/web2c/doc/ref.txi	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/doc/ref.txi	2021-06-17 21:27:03 UTC (rev 855)
@@ -102,7 +102,7 @@
 
 @item [Lia83]
 Franklin Mark Liang.
-Word hy-phen-a-tion by com-pu-ter.
+Word hy-phen-a-tion by com-put-er.
 Technical Report STAN-CS-83-977, Stanford University, August 1983.
 @url{https://tug.org/docs/liang/liang-thesis.pdf}.
 

Modified: branches/stable/source/src/texk/web2c/doc/web2c.info
===================================================================
--- branches/stable/source/src/texk/web2c/doc/web2c.info	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/doc/web2c.info	2021-06-17 21:27:03 UTC (rev 855)
@@ -58,7 +58,7 @@
 
 This document describes how to install and use the programs in the Web2c
 implementation of the TeX system, especially for Unix systems.  It
-corresponds to Web2c version 2021, released in February 2021.
+corresponds to Web2c version 2021, released in May 2021.
 
 * Menu:
 
@@ -83,8 +83,7 @@
 1 Introduction
 **************
 
-This manual corresponds to version 2021 of Web2c, released in February
-2021.
+This manual corresponds to version 2021 of Web2c, released in May 2021.
 
    "Web2c" is the name of a TeX implementation, originally for Unix, but
 now also running under various operating systems.  By "TeX
@@ -113,8 +112,8 @@
 executables are covered by the GNU General Public License or GNU Lesser
 General Public License, and therefore anyone who gets a binary
 distribution must also be able to get the sources, as explained by the
-terms of the GPL (<https://gnu.org/licenses/>.  The GPL covers the Web2c
-executables, including 'tex', because the Free Software Foundation
+terms of the GPL (<https://gnu.org/licenses/>).  The GPL covers the
+Web2c executables, including 'tex', because the Free Software Foundation
 sponsored the initial development of the Kpathsea library that Web2c
 uses.  The basic source files from Stanford, however, have their own
 copyright terms or are in the public domain, and are not covered by the
@@ -865,8 +864,8 @@
 
    As (allowed) extensions to standard TeX, Web2c also supports
 specifying the filename in double quotes ('"some name"') and in braces
-('{"some name"}'), which is convenient for filenames containing spaces
-or other special characters, as described in the sections below.
+('{some name}'), which is convenient for filenames containing spaces or
+other special characters, as described in the sections below.
 
    In all cases, space tokens are ignored after the filename is read.
 
@@ -1044,7 +1043,7 @@
 could run a TeX program that overwrites, say, '~/.rhosts'.  (MetaPost
 has a 'write' primitive with similar implications).  To alleviate this
 and similar problems the functions 'kpathsea_out_name_ok' and
-'kpathsea_in_name_ok' from the Kpathse library (*note (kpathsea)Calling
+'kpathsea_in_name_ok' from the Kpathsea library (*note (kpathsea)Calling
 sequence::) are used to determine if a given filename is acceptable to
 be opened for output or input, depending on the setting of the
 configuration variables 'openout_any' and 'openin_any': 'a' (for "any",
@@ -1501,8 +1500,8 @@
 
    In addition, Patgen prompts interactively for other values.
 
-   For more information, see 'Word hy-phen-a-tion by com-puter' by Frank
-Liang (*note References::), and also the 'patgen.web' source file.
+   For more information, see 'Word hy-phen-a-tion by com-put-er' by
+Frank Liang (*note References::), and also the 'patgen.web' source file.
 
    The only options are '-help' and '-version' (*note Common options::).
 
@@ -2168,7 +2167,7 @@
 simply passes the TEX-INPUT through to TeX.  For example, if you are
 using LaTeX, your MetaPost input file must start with a 'verbatimtex'
 block that gives the necessary '\documentclass' (or '\documentstyle')
-'\begin{document}' command.  You will also need to set the enviroment
+'\begin{document}' command.  You will also need to set the environment
 variable 'TEX' to 'latex'.
 
    TEX-INPUT need not be specifically TeX input; it could also be Troff.
@@ -2197,11 +2196,11 @@
 as Dvips, to determine PostScript fonts that need to be downloaded
 (*note (dvips)psfonts.map::).
 
-   It is posible for pdfTeX to read MetaPost output directly; this is in
-contrast to general EPSF files, which have to be converted for use with
-PDF output.  The easiest way is to name the MetaPost output files with
-the '.mps' extension.  Then the LaTeX '\includegraphics' command, for
-example, will be able to read them, even when outputting PDF.
+   It is possible for pdfTeX to read MetaPost output directly; this is
+in contrast to general EPSF files, which have to be converted for use
+with PDF output.  The easiest way is to name the MetaPost output files
+with the '.mps' extension.  Then the LaTeX '\includegraphics' command,
+for example, will be able to read them, even when outputting PDF.
 
    MetaPost can write output files, via the 'write' primitive; this
 opens a security hole.  *Note tex invocation::.
@@ -2460,7 +2459,7 @@
 '-uppercase'
      These options specify the case of identifiers in the output of
      tangle.  If '-uppercase' ('-lowercase') is specified, tangle will
-     convert all identfiers to uppercase (lowercase).  The default is
+     convert all identifiers to uppercase (lowercase).  The default is
      '-mixedcase', which specifies that the case will not be changed.
 
 '-underline'
@@ -2774,7 +2773,7 @@
 11.1 Font file formats
 ======================
 
-(For another perspective on this, *note (dvips)Font concepts::).
+For another perspective on this, *note (dvips)Font concepts::.
 
    Font files come in several varieties, with suffixes like:
      .tfm  .*pk  .*gf  .*pxl (obsolete)  .pl  .mf  .vf  .vpl
@@ -3002,7 +3001,7 @@
 '-mnemonics'
      Translate all commands in the GF file.
 
-   As an example of the output, here is the (abrdiged) translation of
+   As an example of the output, here is the (abridged) translation of
 the letter 'K' in 'cmr10', as rendered at 600dpi with the mode 'ljfour'
 from 'modes.mf' (available from <ftp://ftp.tug.org/tex/modes.mf>), with
 both '-mnemonics' and '-images' enabled.
@@ -3370,7 +3369,7 @@
 
    MLTeX, pdfTeX, LuaTeX, XeTeX, and all the other derived engines have
 used various license terms for their additions to the base code, often
-the GPL (see <https://www.gnu.org/licenses/#GPL> or (for example) the
+the GPL (see <https://www.gnu.org/licenses/#GPL>) or (for example) the
 file 'web2c/pdftexdir/COPYINGv2'.  They also mostly make use of
 additional libraries with their own (compatible) terms.  Please see each
 program's sources.
@@ -3472,7 +3471,7 @@
      User's Guide and Reference Manual'.  Addison-Wesley, Reading, MA,
      USA, second edition, 1994.  Reprinted with corrections, 1996.
 
-  24. [Lia83] Franklin Mark Liang.  Word hy-phen-a-tion by com-pu-ter.
+  24. [Lia83] Franklin Mark Liang.  Word hy-phen-a-tion by com-put-er.
      Technical Report STAN-CS-83-977, Stanford University, August 1983.
      <https://tug.org/docs/liang/liang-thesis.pdf>.
 
@@ -3668,7 +3667,7 @@
                                                               (line  16)
 * accented character:                    TCX files.           (line   6)
 * accents, hyphenating words with:       MLTeX.               (line   6)
-* acknowledgements:                      Introduction.        (line  54)
+* acknowledgements:                      Introduction.        (line  53)
 * acm.bst:                               Basic BibTeX style files.
                                                               (line  19)
 * Ada, WEB for:                          WEB.                 (line  12)
@@ -3712,7 +3711,7 @@
                                                               (line  15)
 * beamer, package:                       Formats.             (line  57)
 * beginfig:                              mpost invocation.    (line  31)
-* Berry, Karl:                           Introduction.        (line  43)
+* Berry, Karl:                           Introduction.        (line  42)
 * BIBINPUTS, search path for bib files:  bibtex invocation.   (line  18)
 * bibliographies, creating:              BibTeX.              (line   6)
 * bibliography:                          References.          (line   6)
@@ -3730,7 +3729,7 @@
 * braced filename for \input:            \input braced filename.
                                                               (line   6)
 * breakpoints, memory for:               Runtime options.     (line  20)
-* Breitenlohner, Peter:                  Introduction.        (line   9)
+* Breitenlohner, Peter:                  Introduction.        (line   8)
 * BSTINPUTS, search path for bst files:  bibtex invocation.   (line  18)
 * btex for MetaPost labels:              mpost invocation.    (line  44)
 * btxdoc.bib:                            bibtex invocation.   (line  52)
@@ -3802,7 +3801,7 @@
 * cross-references, omitting:            weave invocation.    (line  22)
 * current directory, used for output:    Output file location.
                                                               (line   6)
-* Curtis, Pavel:                         Introduction.        (line  43)
+* Curtis, Pavel:                         Introduction.        (line  42)
 * Cweb:                                  WEB.                 (line  12)
 * CWEB:                                  WEB.                 (line  12)
 * date and time, in memory dumps:        Hardware and memory dumps.
@@ -3924,7 +3923,7 @@
 * fraction routines:                     Compile-time options.
                                                               (line  21)
 * Free Software Foundation documentation system: Formats.     (line  43)
-* freedom of Web2c:                      Introduction.        (line  23)
+* freedom of Web2c:                      Introduction.        (line  22)
 * ftp.math.utah.edu:                     bibtex invocation.   (line  58)
 * generating source specials:            tex invocation.      (line 134)
 * geometric designs:                     Metafont.            (line   6)
@@ -3964,8 +3963,8 @@
 * Herberts, Mathias:                     Online Metafont graphics.
                                                               (line  20)
 * hex character codes, in TCX files:     TCX files.           (line  77)
-* history:                               Introduction.        (line  43)
-* Hobby, John:                           Introduction.        (line   9)
+* history:                               Introduction.        (line  42)
+* Hobby, John:                           Introduction.        (line   8)
 * horizontal escapement:                 pktype invocation.   (line  57)
 * horizontal escapement <1>:             gftype invocation.   (line 106)
 * hp2627:                                Online Metafont graphics.
@@ -3981,7 +3980,7 @@
 * hyphenation and languages:             Languages and hyphenation.
                                                               (line   6)
 * hyphenation patterns, creating:        patgen invocation.   (line   6)
-* ice cream:                             Introduction.        (line  23)
+* ice cream:                             Introduction.        (line  22)
 * identifier case:                       tangle invocation.   (line  35)
 * identifier collisions:                 tangle invocation.   (line  46)
 * identifier length:                     tangle invocation.   (line  27)
@@ -4014,7 +4013,7 @@
 * job name:                              Common options.      (line  60)
 * kerning table, in TFM files:           tftopl invocation.   (line 101)
 * keyboard character code, translating:  TCX files.           (line 101)
-* Knuth, Donald E.:                      Introduction.        (line   9)
+* Knuth, Donald E.:                      Introduction.        (line   8)
 * Knuth, Donald E. <1>:                  mft invocation.      (line  56)
 * KPATHSEA_DEBUG:                        Common options.      (line  64)
 * KRN property:                          tftopl invocation.   (line 101)
@@ -4030,7 +4029,7 @@
 * left side bearing <1>:                 gftype invocation.   (line  82)
 * legalisms:                             Legalisms.           (line   6)
 * libsigsegv library:                    Runtime options.     (line  33)
-* licensing terms:                       Introduction.        (line  23)
+* licensing terms:                       Introduction.        (line  22)
 * LIG property:                          tftopl invocation.   (line 101)
 * ligature table, in TFM files:          tftopl invocation.   (line 101)
 * LIGTABLE property:                     tftopl invocation.   (line 101)
@@ -4058,7 +4057,7 @@
 * magnification <1>:                     dvitype invocation.  (line  28)
 * main_memory:                           Runtime options.     (line  15)
 * Make targets, additional:              Additional targets.  (line   6)
-* Martin, Rick:                          Introduction.        (line  54)
+* Martin, Rick:                          Introduction.        (line  53)
 * Mathematical Reviews:                  Formats.             (line  35)
 * mathematical typesetting:              TeX.                 (line   6)
 * mem file, determining:                 Determining the memory dump to use.
@@ -4123,8 +4122,8 @@
 * mode_def:                              Modes.               (line  15)
 * mode_setup:                            Modes.               (line  15)
 * modifying texmf.cnf in TeX Live:       Runtime options.     (line  56)
-* Morgan, Tim:                           Introduction.        (line  43)
-* Morris, Bob:                           Introduction.        (line  54)
+* Morgan, Tim:                           Introduction.        (line  42)
+* Morris, Bob:                           Introduction.        (line  53)
 * MPEDIT:                                Editor invocation.   (line  10)
 * mpgraph.pdf:                           mpost invocation.    (line  14)
 * mpman.pdf:                             mpost invocation.    (line   6)
@@ -4259,7 +4258,7 @@
 * quoted filename for \input:            \input quoted filename.
                                                               (line   6)
 * Raichle, Bernd:                        MLTeX.               (line   6)
-* reading, additional:                   Introduction.        (line  62)
+* reading, additional:                   Introduction.        (line  61)
 * readonly directory, running TeX in:    Output file location.
                                                               (line  15)
 * readonly directory, running TeX in <1>: Output file location.
@@ -4279,7 +4278,7 @@
 * 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  43)
+* Rokicki, Tomas:                        Introduction.        (line  42)
 * run length encoded bitmaps:            pktype invocation.   (line  76)
 * run length encoded bitmaps <1>:        gftype invocation.   (line  89)
 * runtime options:                       Runtime options.     (line   6)
@@ -4311,13 +4310,13 @@
 * sockets:                               IPC and TeX.         (line   6)
 * space-terminated filenames:            \input filenames.    (line  10)
 * Spiderweb:                             WEB.                 (line  12)
-* Stallman, Richard:                     Introduction.        (line  54)
+* Stallman, Richard:                     Introduction.        (line  53)
 * 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  46)
-* strategy, overall:                     Introduction.        (line  17)
+* strategy, overall:                     Introduction.        (line  16)
 * string numbers, displaying:            pooltype invocation. (line   6)
 * string pool, writing:                  tangle invocation.   (line  16)
 * string representation:                 pooltype invocation. (line  30)
@@ -4368,7 +4367,7 @@
 * 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   9)
+* TeX, Web2c implementation of:          Introduction.        (line   8)
 * tex.fmt:                               Initial TeX.         (line  13)
 * TEXBIB, search path for bib files:     bibtex invocation.   (line  18)
 * TEXEDIT:                               Editor invocation.   (line  10)
@@ -4403,11 +4402,11 @@
                                                               (line  59)
 * torture tests:                         Triptrap.            (line   6)
 * translation file for TeX, specifying:  Common options.      (line 103)
-* translation from WEB to C:             Introduction.        (line  17)
+* translation from WEB to C:             Introduction.        (line  16)
 * trap Make target:                      Additional targets.  (line  41)
 * trap test:                             Triptrap.            (line   6)
 * trapman.tex:                           Triptrap.            (line   6)
-* Trickey, Howard:                       Introduction.        (line  43)
+* Trickey, Howard:                       Introduction.        (line  42)
 * trip Make target:                      Additional targets.  (line  41)
 * trip test:                             Triptrap.            (line   6)
 * tripman.tex:                           Triptrap.            (line   6)
@@ -4462,7 +4461,7 @@
 * 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  43)
+* Weber, Olaf:                           Introduction.        (line  42)
 * webmac.tex:                            weave invocation.    (line  22)
 * webman.tex:                            WEB.                 (line  12)
 * whitespace, in TCX files:              TCX files.           (line  68)
@@ -4506,78 +4505,78 @@
 
 Tag Table:
 Node: Top2759
-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
+Node: Introduction3829
+Node: Installation7165
+Node: configure options9209
+Node: Compile-time options11231
+Node: Additional targets12333
+Node: Triptrap13610
+Node: Commonalities15113
+Node: Option conventions15646
+Node: Common options16869
+Node: Path searching21487
+Node: Output file location22459
+Node: Three programs23761
+Node: Runtime options24468
+Node: Initial and virgin27609
+Node: Memory dumps28558
+Node: Creating memory dumps29010
+Node: Determining the memory dump to use30217
+Node: Hardware and memory dumps31794
+Node: Editor invocation34240
+Node: \input filenames35103
+Node: \input quoted filename36654
+Node: \input braced filename37431
+Node: \input filename caveats38361
+Node: TeX39875
+Node: tex invocation41043
+Node: Initial TeX48029
+Node: Formats49393
+Node: Languages and hyphenation52210
+Node: MLTeX52640
+Node: \charsubdef54268
+Node: \tracingcharsubdef56591
+Node: TCX files57166
+Node: patgen invocation62606
+Node: Shell escapes63313
+Node: IPC and TeX66893
+Node: TeX extensions67463
+Node: Metafont69492
+Node: mf invocation70780
+Node: Initial Metafont74617
+Node: Modes76247
+Node: Online Metafont graphics78497
+Node: gftodvi invocation81922
+Node: mft invocation84742
+Node: MetaPost88740
+Node: mpost invocation89576
+Node: Initial MetaPost94612
+Node: dvitomp invocation95534
+Node: BibTeX96199
+Node: bibtex invocation96560
+Node: Basic BibTeX style files99034
+Node: WEB100364
+Node: tangle invocation101573
+Node: weave invocation103697
+Node: pooltype invocation105104
+Node: DVI utilities106234
+Node: dvicopy invocation107168
+Node: dvitype invocation108453
+Node: dvitype output example110784
+Node: Font utilities113837
+Node: Font file formats115017
+Node: gftopk invocation118284
+Node: pktogf invocation119475
+Node: pktype invocation120641
+Node: gftype invocation123464
+Node: tftopl invocation127967
+Node: pltotf invocation132560
+Node: vftovp invocation133611
+Node: vptovf invocation135846
+Node: Font utilities available elsewhere136873
+Node: Legalisms139078
+Node: References140525
+Node: Index144658
 
 End Tag Table
 

Modified: branches/stable/source/src/texk/web2c/doc/web2c.texi
===================================================================
--- branches/stable/source/src/texk/web2c/doc/web2c.texi	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/doc/web2c.texi	2021-06-17 21:27:03 UTC (rev 855)
@@ -12,7 +12,7 @@
 @end tex
 
 @set version 2021
- at set month-year February 2021
+ at set month-year May 2021
 
 @c Define new indices for commands in auxiliary files, filenames, and options.
 @defcodeindex cm
@@ -174,7 +174,7 @@
 executables are covered by the GNU General Public License or GNU
 Lesser General Public License, and therefore anyone who gets a binary
 distribution must also be able to get the sources, as explained by the
-terms of the GPL (@url{https://gnu.org/licenses/}. The GPL covers the
+terms of the GPL (@url{https://gnu.org/licenses/}). The GPL covers the
 Web2c executables, including @code{tex}, because the Free Software
 Foundation sponsored the initial development of the Kpathsea library
 that Web2c uses.  The basic source files from Stanford, however, have
@@ -909,7 +909,7 @@
 
 As (allowed) extensions to standard @TeX{}, Web2c also supports
 specifying the filename in double quotes (@code{"some name"}) and in
-braces (@code{@{"some name"@}}), which is convenient for filenames
+braces (@code{@{some name@}}), which is convenient for filenames
 containing spaces or other special characters, as described in the
 sections below.
 
@@ -1141,7 +1141,7 @@
 run a @TeX{} program that overwrites, say, @file{~/.rhosts}.  (MetaPost has
 a @code{write} primitive with similar implications).  To alleviate this and
 similar problems the functions @code{kpathsea_out_name_ok} and
- at code{kpathsea_in_name_ok} from the Kpathse library (@pxref{Calling
+ at code{kpathsea_in_name_ok} from the Kpathsea library (@pxref{Calling
 sequence,,, kpathsea, Kpathsea}) are used to determine if a given filename
 is acceptable to be opened for output or input, depending on the setting of
 the configuration variables @code{openout_any} and @code{openin_any}:
@@ -1735,7 +1735,7 @@
 @c @cindex dictionary file
 @c @findex \lefthyphemmin
 @c @findex \righthyphenmin
- at c The first line contains the values of @code{}\lefthyphenmin} and
+ at c The first line contains the values of @code{\lefthyphenmin} and
 @c @code{\righthyphenmin} in columns 1--2 and 3--4. Columns 5, 6, and 7 may
 @c optionally contain replacements for the default characters @samp{.},
 @c @samp{-}, and @samp{*} respectively used in the word lists.
@@ -1749,7 +1749,7 @@
 
 In addition, Patgen prompts interactively for other values.
 
-For more information, see @cite{Word hy-phen-a-tion by com-puter} by
+For more information, see @cite{Word hy-phen-a-tion by com-put-er} by
 Frank Liang (@pxref{References}), and also the @file{patgen.web} source file.
 
 The only options are @samp{-help} and @samp{-version} (@pxref{Common
@@ -2679,7 +2679,7 @@
 must start with a @code{verbatimtex} block that gives the necessary
 @code{\documentclass} (or @code{\documentstyle})
 @code{\begin@{document@}} command.  You will also need to set the
-enviroment variable @code{TEX} to @samp{latex}.
+environment variable @code{TEX} to @samp{latex}.
 
 @var{tex-input} need not be specifically @TeX{} input; it could also be
 Troff.  In that case, you will need the @samp{-m pictures} Troff macro
@@ -2721,7 +2721,7 @@
 
 @cindex PDF, and @code{.mps} files
 @cindex @code{.mps} files and PDF
-It is posible for pdf at TeX{} to read MetaPost output directly; this is
+It is possible for pdf at TeX{} to read MetaPost output directly; this is
 in contrast to general EPSF files, which have to be converted for use
 with PDF output.  The easiest way is to name the MetaPost output files
 with the @code{.mps} extension.  Then the @LaTeX{}
@@ -3080,7 +3080,7 @@
 @cindex identifier case
 These options specify the case of identifiers in the output of tangle.
 If @samp{-uppercase} (@samp{-lowercase}) is specified, tangle will
-convert all identfiers to uppercase (lowercase).  The default is
+convert all identifiers to uppercase (lowercase).  The default is
 @samp{-mixedcase}, which specifies that the case will not be changed.
 
 @item -underline
@@ -3478,8 +3478,8 @@
 @cindex font file formats
 @cindex file formats for fonts
 
-(For another perspective on this, @pxref{Font concepts,,, dvips,
-Dvips}).
+For another perspective on this, @pxref{Font concepts,,, dvips,
+Dvips}.
 
 Font files come in several varieties, with suffixes like:
 @example
@@ -3789,7 +3789,7 @@
 Translate all commands in the GF file.
 @end table
 
-As an example of the output, here is the (abrdiged) translation of the
+As an example of the output, here is the (abridged) translation of the
 letter `K' in @samp{cmr10}, as rendered at 600 at dmn{dpi} with the mode
 @samp{ljfour} from @file{modes.mf} (available from
 @url{ftp://ftp.tug.org/tex/modes.mf}), with both @samp{-mnemonics} and
@@ -4297,7 +4297,7 @@
 
 ML at TeX{}, pdf at TeX{}, Lua at TeX{}, Xe at TeX{}, and all the other derived
 engines have used various license terms for their additions to the
-base code, often the GPL (see @url{https://www.gnu.org/licenses/#GPL}
+base code, often the GPL (see @url{https://www.gnu.org/licenses/#GPL})
 or (for example) the file @file{web2c/pdftexdir/COPYINGv2}. They also
 mostly make use of additional libraries with their own (compatible)
 terms. Please see each program's sources.

Modified: branches/stable/source/src/texk/web2c/help.h
===================================================================
--- branches/stable/source/src/texk/web2c/help.h	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/help.h	2021-06-17 21:27:03 UTC (rev 855)
@@ -61,9 +61,10 @@
     "+p          print progress report messages",
     "+/-q        shortcut for '-bhp'; also '--quiet' (default)",
     "+/-v        shortcut for '+bhp'; also '--verbose'",
+    "-c          ignore temporary output irrespective of changes",
     "-dN         set 'kpathsea_debug' to N (0..127)",
+    "+k          keep separators in numeric literals in the output",
     "+s          print usage statistics",
-    "-t          ignore temporary output irrespective of changes",
     "--help      display this help and exit",
     "--version   output version information and exit",
     NULL
@@ -82,6 +83,7 @@
     "+p          print progress report messages",
     "+/-q        shortcut for '-bhp'; also '--quiet' (default)",
     "+/-v        shortcut for '+bhp'; also '--verbose'",
+    "-c          ignore temporary output irrespective of changes",
     "-dN         set 'kpathsea_debug' to N (0..127)",
     "-e          do not enclose C material in \\PB{...}",
     "-f          do not force a newline after every C statement in output",
@@ -90,7 +92,7 @@
     "-x          omit indices, section names, table of contents",
     "+lX         use macros for language X as of Xcwebmac.tex",
     "+s          print usage statistics",
-    "-t          ignore temporary output irrespective of changes",
+    "+t          treat 'typename' in a template like 'typedef'",
     "--help      display this help and exit",
     "--version   output version information and exit",
     NULL
@@ -109,6 +111,7 @@
     "+p          print progress report messages",
     "+/-q        shortcut for '-bhp'; also '--quiet' (default)",
     "+/-v        shortcut for '+bhp'; also '--verbose'",
+    "-c          ignore temporary output irrespective of changes",
     "-dN         set 'kpathsea_debug' to N (0..127)",
     "-e          do not enclose C material in \\PB{...}",
     "-f          do not force a newline after every C statement in output",
@@ -118,7 +121,7 @@
     "+P          \\input ctproofmac.tex instead of ctwimac.tex",
     "+/-lX       use macros for language X as of Xct{wi|proof}mac.tex",
     "+s          print usage statistics",
-    "-t          ignore temporary output irrespective of changes",
+    "+t          treat 'typename' in a template like 'typedef'",
     "--help      display this help and exit",
     "--version   output version information and exit",
     NULL

Modified: branches/stable/source/src/texk/web2c/lib/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/lib/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/lib/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,24 @@
+2021-05-18  Karl Berry  <karl at freefriends.org>
+
+	* usage.c (usagehelp): if bug_email arg ends in "@tug.org"
+	also output the url for the mailing list.
+
+2021-04-28  Marcel Fabian Krueger  <tex at 2krueger.de>
+	    Hironori KITAGAWA <h_kitagawa2001 at yahoo.co.jp>
+	    Karl Berry <karl at freefriends.org>
+
+	* texmfmp.c (calledit): When looking for the filename to edit,
+	skip \scantokens pseudo-files (streams 18 and 19) and indeed all
+	name_field values <=255 (following tex.web), and token lists
+	(state_field==0).
+	
+	Original reports from Don Hosek,
+	https://tex.stackexchange.com/questions/594702
+	and Hironori (plus patch),
+	https://tug.org/pipermail/tex-k/2021-April/003542.html
+	and Marcel (plus patch) for \scantokens,
+	https://tug.org/pipermail/tex-live/2021-April/046846.html.
+
 2021-03-23  Karl Berry  <karl at tug.org>
 
 	* TL'21.

Modified: branches/stable/source/src/texk/web2c/lib/texmfmp.c
===================================================================
--- branches/stable/source/src/texk/web2c/lib/texmfmp.c	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/lib/texmfmp.c	2021-06-17 21:27:03 UTC (rev 855)
@@ -2624,29 +2624,49 @@
      and a non-file for the insert. https://tex.stackexchange.com/q/552113 
      
      Therefore, we have to traverse down input_stack (not input_file),
-     looking for name_field values >17, which correspond to open
-     files, and then the index_field value of that entry tells us the
+     looking for large enough name_field values corresponding to open
+     files. Then the index_field value of that entry tells us the
      corresponding element of input_file, which is what we need to close.
+     Additionally we have to skip all entries with state_field 0 since these
+     correspond to token lists and not input files.
 
-     We test for >17 because name_field=0 means the terminal,
+     We test for name_field<=255, following tex.web, because the first
+     256 strings are static, initialized by TeX. (Well, many more
+     strings are initialized, but we'll follow tex.web.)
+     
+     For the record, name_field=0 means the terminal,
      name_field=1..16 means \openin stream n - 1,
-     name_field=17 means an invalid stream number (for read_toks).
-     Although ... seems like we should close any opened \openin files also.
-     Whoever is reading this, please implement that? Sigh.
+     name_field=17 means an invalid stream number (for read_toks),
+     name_field=18..19 means \scantokens pseudo-files (except for
+     original TeX of course). But 255 suffices for us.
      
-     Description in modules 300--304 of tex.web: "Input stacks and states."
-     
      Here, we do not have to look at cur_input, the global variable
      which is effectively the top of input_stack, because it will always
      be a terminal (non-file) interaction -- the one where the user
-     typed "e" to start the edit.  */
+     typed "e" to start the edit.
+     
+     In addition, state_field will be zero for token lists. Skip those too.
+     (Does not apply to Metafont.)
+
+     Description in modules 300--304 of tex.web: "Input stacks and states".
+     
+     We should close any opened \openin files also. Whoever is reading
+     this, please implement that?  */
  {  
   int is_ptr; /* element of input_stack, 0 < input_ptr */  
   for (is_ptr = 0; is_ptr < inputptr; is_ptr++) {
-    if (inputstack[is_ptr].namefield <= 17) {
+#ifdef TeX
+    if (inputstack[is_ptr].statefield == 0 /* token list */
+        || inputstack[is_ptr].namefield <= 255) { /* can't be filename */
+#elif defined(MF)
+    if (inputstack[is_ptr].namefield <= 255) {
+#else
+#error "Unable to identify program" /* MetaPost doesn't use this file */
+#endif
         ; /* fprintf (stderr, "calledit: skipped input_stack[%d], ", is_ptr);
-             fprintf (stderr, "namefield=%d <= 17\n",
-                      inputstack[is_ptr].namefield); */
+             fprintf (stderr, "namefield=%d <= 255 or statefield=%d == 0\n",
+                      inputstack[is_ptr].namefield,
+                      inputstack[is_ptr].statefield); */
     } else {
       FILE *f;
       /* when name_field > 17, index_field specifies the element of

Modified: branches/stable/source/src/texk/web2c/lib/usage.c
===================================================================
--- branches/stable/source/src/texk/web2c/lib/usage.c	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/lib/usage.c	2021-06-17 21:27:03 UTC (rev 855)
@@ -5,8 +5,8 @@
 
 #include <w2c/config.h>
 
-/* Call usage if the program exits with an "usage error".  STR is supposed
-   to be the program name. */
+/* Print a message about trying --help with program name STR and exit
+   with bad status. */
 
 void
 usage (const_string str)
@@ -15,21 +15,39 @@
   uexit (1);
 }
 
-/* Call usage if the program exits by printing the help message.
-   MESSAGE is a NULL-terminated array of strings which make up the
-   help message.  Each string is printed on a separate line.
-   We use arrays instead of a single string to work around compiler
-   limitations (sigh).
-*/
+
+/* Print MESSAGE, a NULL-terminated array of strings which make up the
+   help message, and exit successfully.  Each string is printed on a
+   separate line. We use arrays instead of a single string to work
+   around compiler limitations (sigh). Then print a line about sending
+   bug reports to BUG_EMAIL, which defaults to tex-k at tug.org if passed
+   NULL. If BUG_EMAIL is @tug.org, also output a url to the mailing list. */
+
 void
 usagehelp (const_string *message, const_string bug_email)
 {
-    if (!bug_email)
-        bug_email = "tex-k at tug.org";
+    if (!bug_email) {
+      bug_email = "tex-k at tug.org";
+    }
+    
     while (*message) {
-        printf("%s\n", *message);
-        ++message;
+      printf ("%s\n", *message);
+      ++message;
     }
-    printf("\nEmail bug reports to %s.\n", bug_email);
-    uexit(0);
+
+    printf ("\nEmail bug reports to %s", bug_email);
+    if (strlen (bug_email) > 9) {
+      const_string domain = strchr (bug_email, '@');
+      if (domain && strcmp (domain, "@tug.org") == 0) {
+        const_string ptr;
+        
+        printf (" (https://lists.tug.org/");
+        for (ptr = bug_email; ptr < domain; ptr++) {
+          putchar (*ptr);
+        }
+        printf (")");
+      }
+    }
+    puts (".");
+    uexit (0);
 }

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,23 @@
+2021-01-04  Thanh Han The  <hanthethanh at gmail.com>
+
+	* pdftex.web (letter_space_font): use explicit \fontdimen6 (quad)
+	if specified:
+	https://mailman.ntg.nl/pipermail/ntg-pdftex/2021-June/004335.html
+
+	And avoid problem when single-character command
+	is used with \letterspacefont:
+	https://mailman.ntg.nl/pipermail/ntg-pdftex/2021-June/004336.html
+	
+	Both reports from Robert Schlict.
+	(pdftex r853, r854)	
+
+2021-06-15  Marcel Fabian Krueger  <tex at 2krueger.de>
+
+	* ptexlib.h (glyph_unicode_entry): use integer, not long,
+	to allow dumping without making .fmt platform dependent.
+	See surrounding thread at:
+	https://tug.org/pipermail/tex-live/2021-June/047132.html
+
 2021-03-23  Karl Berry  <karl at tug.org>
 
 	* TL'21.
@@ -1493,7 +1513,7 @@
 
 	* pdftex.ch (do_extension): Recover variables unused by TeX.
 
-2009-09-16  Han The Thanh <hanthethanh at gmail.com>
+2009-09-16  Thanh Han The <hanthethanh at gmail.com>
 
 	* writettf.c: patch for TTC from Liu Yubao <yubao.liu at gmail.com>
 
@@ -1531,7 +1551,7 @@
 	* pdftex.web (sup_dest_names_size): increase to 500000;
 	test document from Peter Abbott to Karl, 12 Aug 2009 12:24:43.
 
-2009-07-13  Han The Thanh <hanthethanh at gmail.com>
+2009-07-13  Thanh Han The <hanthethanh at gmail.com>
 
 	* mapfile.c: treat TTC fonts as TTF
 	* writejpg.c: fix bitmap resolution
@@ -1538,7 +1558,7 @@
 	* writettf.c: fix segfault for certain TTF fonts
 	* pdftex.web: enable pk generation by default
 
-2009-06-26  Han The Thanh <hanthethanh at gmail.com>
+2009-06-26  Thanh Han The <hanthethanh at gmail.com>
 
 	* pdftex.web: bugfix from Hartmut: fix \pdfobj file {foo} for files
 	          foo that don't end with '\n'

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h	2021-06-17 21:27:03 UTC (rev 855)
@@ -77,7 +77,7 @@
 
 typedef struct {
     char *name;                 /* glyph name */
-    long code;                  /* -1 = undefined; -2 = multiple codes, stored
+    integer code;               /* -1 = undefined; -2 = multiple codes, stored
                                    as string in unicode_seq; otherwise unicode value */
     char *unicode_seq;          /* multiple unicode sequence */
 } glyph_unicode_entry;

Modified: branches/stable/source/src/texk/web2c/tex.ch
===================================================================
--- branches/stable/source/src/texk/web2c/tex.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/tex.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -259,7 +259,7 @@
 @!sup_param_size = 32767;
 
 @!inf_save_size = 600;
-@!sup_save_size = 80000;
+@!sup_save_size = 30000000;
 
 @!inf_stack_size = 200;
 @!sup_stack_size = 30000;

Modified: branches/stable/source/src/texk/web2c/tiedir/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/tiedir/ChangeLog	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/tiedir/ChangeLog	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,3 +1,7 @@
+2021-04-04  Andreas Scherer  <https://ascherer.github.io>
+
+	* tie-w2c.ch: Delete dot in banner line.
+
 2020-07-24  Andreas Scherer  <https://ascherer.github.io>
 
 	* tie-w2c.ch: Format types in boldface prior to their definition.

Modified: branches/stable/source/src/texk/web2c/tiedir/tie-w2c.ch
===================================================================
--- branches/stable/source/src/texk/web2c/tiedir/tie-w2c.ch	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/tiedir/tie-w2c.ch	2021-06-17 21:27:03 UTC (rev 855)
@@ -62,7 +62,7 @@
 @x l.105
 @d banner  "This is TIE, CWEB Version 2.4."
 @y
- at d banner  "This is TIE, CWEB Version 2.4."
+ at d banner  "This is TIE, CWEB Version 2.4"
   /* will be extended by the \TeX~Live |versionstring| */
 @z
 

Modified: branches/stable/source/src/texk/web2c/web2c/configure
===================================================================
--- branches/stable/source/src/texk/web2c/web2c/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/texk/web2c/web2c/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -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.
+# Generated by GNU Autoconf 2.69 for Web2C Tools 2022/dev.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='Web2C Tools'
 PACKAGE_TARNAME='web2c-tools'
-PACKAGE_VERSION='2021'
-PACKAGE_STRING='Web2C Tools 2021'
+PACKAGE_VERSION='2022/dev'
+PACKAGE_STRING='Web2C Tools 2022/dev'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1328,7 +1328,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Web2C Tools 2021 to adapt to many kinds of systems.
+\`configure' configures Web2C Tools 2022/dev to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1398,7 +1398,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Web2C Tools 2021:";;
+     short | recursive ) echo "Configuration of Web2C Tools 2022/dev:";;
    esac
   cat <<\_ACEOF
 
@@ -1521,7 +1521,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Web2C Tools configure 2021
+Web2C Tools configure 2022/dev
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2360,7 +2360,7 @@
 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, which was
+It was created by Web2C Tools $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -8042,7 +8042,7 @@
 
 # Define the identity of the package.
  PACKAGE='web2c-tools'
- VERSION='2021'
+ VERSION='2022/dev'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14571,7 +14571,7 @@
 # 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, which was
+This file was extended by Web2C Tools $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14637,7 +14637,7 @@
 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
+Web2C Tools config.status 2022/dev
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: branches/stable/source/src/utils/configure
===================================================================
--- branches/stable/source/src/utils/configure	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/utils/configure	2021-06-17 21:27:03 UTC (rev 855)
@@ -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.
+# Generated by GNU Autoconf 2.69 for TeX Live utils 2022/dev.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='TeX Live utils'
 PACKAGE_TARNAME='tex-live-utils'
-PACKAGE_VERSION='2021'
-PACKAGE_STRING='TeX Live utils 2021'
+PACKAGE_VERSION='2022/dev'
+PACKAGE_STRING='TeX Live utils 2022/dev'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1394,7 +1394,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures TeX Live utils 2021 to adapt to many kinds of systems.
+\`configure' configures TeX Live utils 2022/dev to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1464,7 +1464,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of TeX Live utils 2021:";;
+     short | recursive ) echo "Configuration of TeX Live utils 2022/dev:";;
    esac
   cat <<\_ACEOF
 
@@ -1749,7 +1749,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-TeX Live utils configure 2021
+TeX Live utils configure 2022/dev
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1850,7 +1850,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by TeX Live utils $as_me 2021, which was
+It was created by TeX Live utils $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -6106,7 +6106,7 @@
 
 # Define the identity of the package.
  PACKAGE='tex-live-utils'
- VERSION='2021'
+ VERSION='2022/dev'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7103,7 +7103,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by TeX Live utils $as_me 2021, which was
+This file was extended by TeX Live utils $as_me 2022/dev, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7160,7 +7160,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-TeX Live utils config.status 2021
+TeX Live utils config.status 2022/dev
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: branches/stable/source/src/version.ac
===================================================================
--- branches/stable/source/src/version.ac	2021-06-16 20:09:04 UTC (rev 854)
+++ branches/stable/source/src/version.ac	2021-06-17 21:27:03 UTC (rev 855)
@@ -1,4 +1,4 @@
-dnl $Id: version.ac 57769 2021-02-17 03:03:54Z karl $
+dnl $Id: version.ac 58897 2021-04-17 21:02:42Z karl $
 dnl   Copyright 2016-2021 Karl Berry <tex-live at tug.org>
 dnl   Copyright 2010-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
@@ -9,4 +9,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current TeX Live version
-m4_define([tex_live_version], [2021])
+m4_define([tex_live_version], [2022/dev])



More information about the pdftex-commits mailing list.