Skip to content

Commit

Permalink
[CWEB] New release 4.10.
Browse files Browse the repository at this point in the history
This is a major update for CWEB 4.9 from May 2023. The base package
received fixes, internal changes, and significant revisions:

  Fixes:

  * Fix issue #43: 'out_buf' overflow on malign user input
    - Handle border case from bug report
    - Discard rest of input lines exceeding 'buf_size' characters
    - Purge 'ungetc' from the TeX part as well
  * Fix typo in 'examples/wordtest.w' (reported by DEK)
  * 'Ilk' is of type 'eight_bits'
  * Avoid over-/underflow of section depth with malicious user input

  Internal changes:

  * Unroll 'init_p' helper function in COMMON
    - it is used for CWEAVE only (and CTWILL downstream)
  * Match 'common.w' and 'common.h'
    - Reshuffle declarations and some code sections
    - Add starred section titles
  * Demote all starred sections in 'common.w' (single star)
  * Code cleanup
    - Make 'pop_level' a simple macro in CWEAVE
    - Use structure assignment (as in CTANGLE)
    - More compact 'stack' handling
    - Make use of type 'mode'
    - Purge a few 'goto' statements (and add some others)
    - Replace some 'sprintf' with 'snprintf'
    - Syntactic sugar for functional macros
    - Straighten 'byte_start' arithmetic
    - Desolve former section 19 of CWEAVE with internal array sizes
    - Hide 'print_text' analytics function from C compiler with DEBUG
    - Streamline 'phase_two' of CTANGLE
    - Refurbish 'phase_three' of CWEAVE
  * Insert blank line after '\ch' in TeX output (cf. CWEB 3.0)

  Macro changes

  * Cleanup some '\acro' macros in 'cwebmac.tex'

Also the CWEBbin package received updates and amendments:

  Preparation:

  * Fix a bug in 'twinxmac.tex' (3rd patch file applied in 'cwebbin.spec')
  * Apply a 5th patch file to adapt CTWILL macros to CWEB 4.9/4.10

  Special formatting:

  * Format 'common.w' with CTWILL using 'comm-mini.ch'
  * Format 'ctwill.w' with HiTeX using 'proofmac.tex' and 'ctwill-hint.ch'
  * New 'pdfproofmac.tex' for use with HiTeX and pdfTeX and XeTeX
    - pdfctwimac.tex will no longer work with HiTeX
  * Add 'proofsort' script in addition to 'refsort' program
  * Minor improvements in all pdf macros

  TeX Live:

  * CTWILL in TeX Live uses 'kpse_find_file' to look up 'bux' files
  * Slightly extend arrays in 'ctwill' and 'refsort' for TeX Live
  * Max out 'max_refs' for CWEAVE/CTWILL
  * Add 'ctwill.test' for TeX Live

  Revise formatted sources:

  * e.g., 'twinx'
  * 'ctwill' in all its incarnations

git-svn-id: svn://tug.org/texlive/trunk/Build/source@67978 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed Aug 19, 2023
1 parent 98072db commit faaa3cf
Show file tree
Hide file tree
Showing 40 changed files with 151 additions and 119 deletions.
4 changes: 4 additions & 0 deletions texk/web2c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-08-19 Andreas Scherer <https://ascherer.github.io>

* ctangleboot.cin: CWEB 4.10 release.

2023-06-28 Andreas Scherer <https://ascherer.github.io>

* ctangleboot.cin,
Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/ctangleboot.cin
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/*:5*/
#line 67 "cwebdir/ctangle.w"

#define banner "This is CTANGLE, Version 4.9" \
#define banner "This is CTANGLE, Version 4.10" \
\

#define _(s) gettext(s) \
Expand Down
24 changes: 24 additions & 0 deletions texk/web2c/cwebdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
2023-08-19 Andreas Scherer <https://ascherer.github.io>

* Makefile,
* comm-{mac,mini,ql,w2c}.ch,
* comm-w2c.h,
* common.h,
* common.w,
* ctang-{bs,pc,ql,vms,w2c,w32}.ch,
* ctangle.c,
* ctangle.w,
* ctwill-w2c.ch,
* cweav-{bs,pc,ql,vms,w2c,w32}.ch,
* cweave.w,
* cwebmac.tex,
* cwebman-w2c.ch,
* cwebman.tex,
* po/cweb-tl.pot,
* po/cweb.pot,
* po/de/cweb-tl.po,
* po/de/cweb.po,
* po/it/cweb.po,
* prod-{cweave,twill}.w,
* prod.w: CWEB 4.10 release.

2023-08-18 Andreas Scherer <https://ascherer.github.io>

* comm-bs.ch,
Expand Down
6 changes: 3 additions & 3 deletions texk/web2c/cwebdir/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of CWEB.
# It is distributed WITHOUT ANY WARRANTY, express or implied.
# Version 4.9 --- May 2023
# Version 4.10 --- August 2023

# Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth

Expand Down Expand Up @@ -205,6 +205,6 @@ tarball:
tar zcvhf /tmp/cweb.tgz $(ALL) examples

ctan:
git archive -o ~/cweb-4.9.zip --prefix=cweb/ cweb-4.9
git archive -o ~/cweb-4.10.zip --prefix=cweb/ cweb-4.10
make PDF=pdf usermanual
cd ..; zip -r ~/cweb-4.9.zip cweb/cwebman.pdf
cd ..; zip -r ~/cweb-4.10.zip cweb/cwebman.pdf
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/comm-mac.ch
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ No changes to CTANGLE or CWEAVE are needed.
(Contributed 13 Oct 2000 by AndPio@aol.com; slightly edited by Don Knuth)
@x in limbo, change the title page document to specify Mac version
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
@y
\centerline{(Version 4.9 for MacOS)}
\centerline{(Version 4.10 for MacOS)}
@z
@x section 23: Make input_ln accept \n, \r, \n\r, or \r\n as line endings
Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/comm-mini.ch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Limbo.

@x
\def\title{Common code for CTANGLE and CWEAVE (4.9 [\TeX~Live])}
\def\title{Common code for CTANGLE and CWEAVE (4.10 [\TeX~Live])}
@y
\def\title{COMMON (4.9 [\TeX~Live])}
\def\title{COMMON (4.10 [\TeX~Live])}
\def\contentspagenumber{0}
@z

Expand Down
8 changes: 4 additions & 4 deletions texk/web2c/cwebdir/comm-ql.ch
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ ex <dev_>cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c'
@x
\def\v{\char'174} % vertical (|) in typewriter font

\def\title{Common code for CTANGLE and CWEAVE (Version 4.9)}
\def\title{Common code for CTANGLE and CWEAVE (Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
@y
\def\v{\char'174} % vertical (|) in typewriter font
\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.9)}
\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
Expand Down
8 changes: 4 additions & 4 deletions texk/web2c/cwebdir/comm-w2c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -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.9)}
\def\title{Common code for CTANGLE and CWEAVE (Version 4.10)}
@y
\def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi
\def\title{Common code for CTANGLE and CWEAVE (4.9 [\TeX~Live])}
\def\title{Common code for CTANGLE and CWEAVE (4.10 [\TeX~Live])}
@z

@x
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
@y
\centerline{(Version 4.9 [\TeX~Live])}
\centerline{(Version 4.10 [\TeX~Live])}
@z

@x
Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/cwebdir/comm-w2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.9 --- May 2023 (works also with later versions)
% Version 4.10 --- August 2023 (works also with later versions)

% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth

Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/cwebdir/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.9 --- May 2023 (works also with later versions)
% Version 4.10 --- August 2023 (works also with later versions)

% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth

Expand Down
6 changes: 3 additions & 3 deletions texk/web2c/cwebdir/common.w
Original file line number Diff line number Diff line change
Expand Up @@ -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.9 --- May 2023
% Version 4.10 --- August 2023

% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth

Expand All @@ -22,12 +22,12 @@

\def\v{\char'174} % vertical (|) in typewriter font

\def\title{Common code for CTANGLE and CWEAVE (Version 4.9)}
\def\title{Common code for CTANGLE and CWEAVE (Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/ctang-bs.ch
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ by using "huge" pointers.
The ``banner line'' defined here should be changed whenever \.{CTANGLE}
is modified.

@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"
@y
The ``banner line'' defined here should be changed whenever \.{CTANGLE}
is modified.

@d banner "This is CTANGLE (Version 4.9pc/big)"
@d banner "This is CTANGLE (Version 4.10pc/big)"
@z


Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/ctang-pc.ch
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ that allows >64K arrays. If you need lots of bytes and toks, try the
alternate change files with -bs suffix instead of -pc.
@x section 1
@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"
@y
@d banner "This is CTANGLE (Version 4.9pc)"
@d banner "This is CTANGLE (Version 4.10pc)"
@z
@x section 17
@d max_bytes 100000 /* the number of bytes in identifiers,
Expand Down
8 changes: 4 additions & 4 deletions texk/web2c/cwebdir/ctang-ql.ch
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c -=500000 ctangle_c"
@x
\def\title{CTANGLE (Version 4.9)}
\def\title{CTANGLE (Version 4.10)}
@y
\def\title{CTANGLE (QL Version 4.9)}
\def\title{CTANGLE (QL Version 4.10)}
@z
@x section 1
@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"
@y
@d banner "This is CTANGLE (QL Version 4.9)"
@d banner "This is CTANGLE (QL Version 4.10)"
@z
@x
Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/ctang-vms.ch
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ created:
(these changes not necessary for initial bootstrapping)
@x section 1 (01-FEB-1992 ST)
@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"
@y
@d banner "This is CTANGLE (VAX/VMS Version 4.9)"
@d banner "This is CTANGLE (VAX/VMS Version 4.10)"
@z
@x section 5 (01-FEB-1992 ST)
Expand Down
12 changes: 6 additions & 6 deletions texk/web2c/cwebdir/ctang-w2c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
@q Please send comments, suggestions, etc. to tex-k@@tug.org. @>

@x
\def\title{CTANGLE (Version 4.9)}
\def\title{CTANGLE (Version 4.10)}
@y
\def\title{CTANGLE (Version 4.9 [\TeX~Live])}
\def\title{CTANGLE (Version 4.10 [\TeX~Live])}
@z

@x
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
@y
\centerline{(Version 4.9 [\TeX~Live])}
\centerline{(Version 4.10 [\TeX~Live])}
@z

@x
Expand All @@ -41,9 +41,9 @@
@z

@x
@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"
@y
@d banner "This is CTANGLE, Version 4.9"
@d banner "This is CTANGLE, Version 4.10"
/* will be extended by the \TeX~Live |versionstring| */
@z

Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/ctang-w32.ch
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This is the change file for CWEB's CTANGLE under Win32
Changes necessary for compiling with Borland C/C++
@x section 1
@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"
@y
@d banner "This is CTANGLE (Version 4.9win32)"
@d banner "This is CTANGLE (Version 4.10win32)"
@z
@x section 24
Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/cwebdir/ctangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/*:5*/
#line 67 "ctangle.w"

#define banner "This is CTANGLE (Version 4.9)" \
#define banner "This is CTANGLE (Version 4.10)" \

#define ctangle false
#define cweave true \
Expand Down
8 changes: 4 additions & 4 deletions texk/web2c/cwebdir/ctangle.w
Original file line number Diff line number Diff line change
Expand Up @@ -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.9 --- May 2023
% Version 4.10 --- August 2023

% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth

Expand All @@ -27,11 +27,11 @@
\mathchardef\RA="3221 % right arrow
\mathchardef\BA="3224 % double arrow

\def\title{CTANGLE (Version 4.9)}
\def\title{CTANGLE (Version 4.10)}
\def\topofcontents{\null\vfill
\centerline{\titlefont The {\ttitlefont CTANGLE} processor}
\vskip 15pt
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
\vfill}
\def\botofcontents{\vfill
\noindent
Expand Down Expand Up @@ -61,7 +61,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements.
The ``banner line'' defined here should be changed whenever \.{CTANGLE}
is modified.

@d banner "This is CTANGLE (Version 4.9)"
@d banner "This is CTANGLE (Version 4.10)"

@c
@<Include files@>@/
Expand Down
12 changes: 6 additions & 6 deletions texk/web2c/cwebdir/ctwill-w2c.ch
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
@z

@x
\def\title{CWEAVE (Version 4.9)}
\def\title{CWEAVE (Version 4.10)}
@y
\def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi
\def\title{CTWILL (Version 4.9 [\TeX~Live])}
\def\title{CTWILL (Version 4.10 [\TeX~Live])}
@z

@x
Expand All @@ -48,9 +48,9 @@
@z

@x
\centerline{(Version 4.9)}
\centerline{(Version 4.10)}
@y
\centerline{(Version 4.9 [\TeX~Live])}
\centerline{(Version 4.10 [\TeX~Live])}
@z

@x
Expand All @@ -77,7 +77,7 @@ Crusius, and others who have contributed improvements.
The ``banner line'' defined here should be changed whenever \.{CWEAVE}
is modified.

@d banner "This is CWEAVE (Version 4.9)"
@d banner "This is CWEAVE (Version 4.10)"
@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
Expand All @@ -101,7 +101,7 @@ 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}.
@d banner "This is CTWILL, Version 4.9"
@d banner "This is CTWILL, Version 4.10"
/* will be extended by the \TeX~Live |versionstring| */
@z
Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/cweav-bs.ch
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94.
The ``banner line'' defined here should be changed whenever \.{CWEAVE}
is modified.

@d banner "This is CWEAVE (Version 4.9)"
@d banner "This is CWEAVE (Version 4.10)"
@y
The ``banner line'' defined here should be changed whenever \.{CWEAVE}
is modified.

@d banner "This is CWEAVE (Version 4.9pc/big)"
@d banner "This is CWEAVE (Version 4.10pc/big)"
@z


Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/cweav-pc.ch
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ that allows >64K arrays. (If you need lots more bytes, try the alternate
change files that have -bs in their name instead of -pc.)
@x section 1
@d banner "This is CWEAVE (Version 4.9)"
@d banner "This is CWEAVE (Version 4.10)"
@y
@d banner "This is CWEAVE (Version 4.9pc)"
@d banner "This is CWEAVE (Version 4.10pc)"
@z
@x section 17
Expand Down
Loading

0 comments on commit faaa3cf

Please sign in to comment.