Skip to content

Commit

Permalink
CWEB - release 4.11, 2023-12-03.
Browse files Browse the repository at this point in the history
Features:

* Factor out 'cwebacromac.tex' with hypertext macros
* Support LuaTeX as backend engine

Fixes:

* Issue #45: Consistent formatting of terminal output
* Suppress reference to 'l. 0' in error messages

Finesses:

* Revert 'fputs' back to 'printf'
* Avoid shadow variables
* Updates in 'cwebman.tex'
  • Loading branch information
ascherer committed Dec 3, 2023
1 parent 6007f47 commit 0807210
Show file tree
Hide file tree
Showing 26 changed files with 658 additions and 626 deletions.
27 changes: 19 additions & 8 deletions 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.10 --- August 2023
# Version 4.11 --- December 2023

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

Expand Down Expand Up @@ -69,6 +69,7 @@ PDFTEX = dvipdfm
#PDFTEX = pdftex
#PDFTEX = xetex
#PDFTEX = hitex
#PDFTEX = luatex

########## You shouldn't have to change anything after this point #######

Expand All @@ -77,15 +78,17 @@ CTANGLE = ./ctangle
SOURCES = cweave.w common.w ctangle.w
ALL = common.w ctangle.w cweave.w prod.w \
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 \
cwebman.tex cwebacromac.tex cwebmac.tex \
cweb.1 cweb.el c++lib.w iso_types.w \
comm-man.ch ctang-man.ch cweav-man.ch \
comm-bs.ch ctang-bs.ch cweav-bs.ch makefile.bs \
comm-pc.ch ctang-pc.ch cweav-pc.ch comm-amiga.ch \
comm-ql.ch ctang-ql.ch cweav-ql.ch readme.ql \
comm-vms.ch ctang-vms.ch cweav-vms.ch \
comm-w32.ch ctang-w32.ch cweav-w32.ch \
comm-os2.ch comm-mac.ch cweb.1 cweb.el c++lib.w iso_types.w
comm-os2.ch comm-mac.ch

.SUFFIXES: .dvi .tex .w .pdf
.SUFFIXES: .dvi .tex .w .pdf .hnt

.w.tex:
$(CWEAVE) $*
Expand All @@ -110,6 +113,12 @@ ALL = common.w ctangle.w cweave.w prod.w \
dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \
pdftex ) pdftex $* ;; \
xetex ) xetex $* ;; \
luatex ) luatex $* ;; \
esac

.w.hnt:
make $*.tex
case "$(PDFTEX)" in \
hitex ) hitex $* ;; \
esac

Expand Down Expand Up @@ -178,6 +187,8 @@ install: all
$(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT)
chmod 644 $(MANDIR)/cweb.$(MANEXT)
- mkdir $(MACROSDIR)
$(CP) cwebacromac.tex $(MACROSDIR)
chmod 644 $(MACROSDIR)/cwebacromac.tex
$(CP) cwebmac.tex $(MACROSDIR)
chmod 644 $(MACROSDIR)/cwebmac.tex
- mkdir $(EMACSDIR)
Expand Down Expand Up @@ -205,6 +216,6 @@ tarball:
tar zcvhf /tmp/cweb.tgz $(ALL) examples

ctan:
git archive -o ~/cweb-4.10.zip --prefix=cweb/ cweb-4.10
git archive -o ~/cweb-4.11.zip --prefix=cweb/ cweb-4.11
make PDF=pdf usermanual
cd ..; zip -r ~/cweb-4.10.zip cweb/cwebman.pdf
cd ..; zip -r ~/cweb-4.11.zip cweb/cwebman.pdf
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ cweave-w32.ch
cweave.w
cweb.1
cweb.el
cwebacromac.tex
cwebmac.tex
cwebman.tex
examples/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cweb 4.10
# cweb 4.11

people have been accumulating several decades of experience with
[cweb](http://www-cs-faculty.stanford.edu/~uno/cweb.html), and we know that
Expand All @@ -15,7 +15,7 @@ details in the
[releases description](https://github.com/ascherer/cweb/releases).

you can either compile these sources as directed in the
[readme file](README) or stick the recent version “cweb-4.10” into my
[readme file](README) or stick the recent version “cweb-4.11” into my
[cwebbin](https://github.com/ascherer/cwebbin), which introduces convenient
extensions and prepares cweb for inclusion in the “tex live” distribution.

Expand Down
4 changes: 2 additions & 2 deletions 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.10)}
\centerline{(Version 4.11)}
@y
\centerline{(Version 4.10 for MacOS)}
\centerline{(Version 4.11 for MacOS)}
@z
@x section 23: Make input_ln accept \n, \r, \n\r, or \r\n as line endings
Expand Down
20 changes: 12 additions & 8 deletions 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.10)}
\def\title{Common code for CTANGLE and CWEAVE (Version 4.11)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
\centerline{(Version 4.10)}
\centerline{(Version 4.11)}
\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.10)}
\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.11)}
\def\topofcontents{\null\vfill
\centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
{\ttitlefont CWEAVE}}
\vskip 15pt
\centerline{(Version 4.10)}
\centerline{(Version 4.11)}
\vfill}
\def\botofcontents{\vfill
\noindent
Expand Down Expand Up @@ -152,8 +152,10 @@ the routine as if it would work.
}
sprintf(alt_web_file_name,"%s.web",*argv);
sprintf(tex_file_name,"%s.tex",name_pos); /* strip off directory name */
sprintf(idx_file_name,"%s.idx",name_pos);
sprintf(scn_file_name,"%s.scn",name_pos);
if (make_xrefs) { /* indexes will be generated */
sprintf(idx_file_name,"%s.idx",name_pos);
sprintf(scn_file_name,"%s.scn",name_pos);
}
sprintf(C_file_name,"%s.c",name_pos);
found_web=true;
}
Expand All @@ -170,8 +172,10 @@ the routine as if it would work.
}
sprintf(alt_web_file_name,"%s_web",*argv);
sprintf(tex_file_name,"%s_tex",name_pos); /* strip off directory name */
sprintf(idx_file_name,"%s_idx",name_pos);
sprintf(scn_file_name,"%s_scn",name_pos);
if (make_xrefs) { /* indexes will be generated */
sprintf(idx_file_name,"%s_idx",name_pos);
sprintf(scn_file_name,"%s_scn",name_pos);
}
sprintf(C_file_name,"%s_c",name_pos);
found_web=true;
}
Expand Down
Loading

0 comments on commit 0807210

Please sign in to comment.