History

CWEB — Release 3.61, 2000-07-26.

Andreas Scherer committed 15 years ago

Commit bf39f291 parent 16047cf21 files · +117 −92Browse files

Unified · Split

21 files
  1. Makefile +16 −5
  2. README +2 −2
  3. comm-man.ch +1 −1
  4. comm-ql.ch +4 −4
  5. common.w +5 −5
  6. ctang-bs.ch +2 −2
  7. ctang-man.ch +1 −1
  8. ctang-pc.ch +2 −2
  9. ctang-ql.ch +4 −4
  10. ctang-vms.ch +2 −2
  11. ctangle.c +1 −1
  12. ctangle.w +6 −6
  13. cweav-bs.ch +2 −2
  14. cweav-man.ch +1 −1
  15. cweav-pc.ch +2 −2
  16. cweav-ql.ch +4 −4
  17. cweav-vms.ch +2 −2
  18. cweave.w +8 −7
  19. cweb.el +1 −10
  20. cwebmac.tex +44 −25
  21. cwebman.tex +7 −4
Makefile+16−5
@@ -1,8 +1,8 @@
1# This file is part of CWEB.1# This file is part of CWEB.
2# It is distributed WITHOUT ANY WARRANTY, express or implied.2# It is distributed WITHOUT ANY WARRANTY, express or implied.
3# Version 3.0 --- June 19933# Version 3.61 --- July 2000
4 4
5# Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth5# Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
6 6
7# Permission is granted to make and distribute verbatim copies of this7# Permission is granted to make and distribute verbatim copies of this
8# document provided that the copyright notice and this permission notice8# document provided that the copyright notice and this permission notice
@@ -62,6 +62,10 @@ CC = cc · 53 unmodified lines
62RM= /bin/rm62RM= /bin/rm
63CP= /bin/cp63CP= /bin/cp
64 64
65# uncomment the second line if you use pdftex to bypass .dvi files
66PDFTEX = dvipdfm
67#PDFTEX = pdftex
68
65########## You shouldn't have to change anything after this point #######69########## You shouldn't have to change anything after this point #######
66 70
67CWEAVE = ./cweave71CWEAVE = ./cweave
@@ -97,8 +101,10 @@ ALL = common.w ctangle.w cweave.w prod.w \ · 29 unmodified lines
97 101
98.w.pdf:102.w.pdf:
99 make $*.tex103 make $*.tex
100 tex "\let\pdf+ \input $*"104 case "$(PDFTEX)" in \
101 dvipdfm $*105 dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \
106 pdftex ) pdftex $* ;; \
107 esac
102 108
103all: ctangle cweave109all: ctangle cweave
104 110
@@ -153,19 +159,24 @@ fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch · 48 unmodified lines
153# be sure to leave ctangle.c and common.c for bootstrapping159# be sure to leave ctangle.c and common.c for bootstrapping
154clean:160clean:
155 $(RM) -f -r *~ *.o common.tex cweave.tex cweave.c ctangle.tex \161 $(RM) -f -r *~ *.o common.tex cweave.tex cweave.c ctangle.tex \
156 *.log *.dvi *.toc *.idx *.scn core cweave.w.[12] cweave ctangle162 *.log *.dvi *.toc *.idx *.scn *.pdf core cweave ctangle
157 163
158install: all164install: all
165 - mkdir $(DESTDIR)
159 $(CP) cweave $(DESTDIR)$(DESTPREF)weave166 $(CP) cweave $(DESTDIR)$(DESTPREF)weave
160 chmod 755 $(DESTDIR)$(DESTPREF)weave167 chmod 755 $(DESTDIR)$(DESTPREF)weave
161 $(CP) ctangle $(DESTDIR)$(DESTPREF)tangle168 $(CP) ctangle $(DESTDIR)$(DESTPREF)tangle
162 chmod 755 $(DESTDIR)$(DESTPREF)tangle169 chmod 755 $(DESTDIR)$(DESTPREF)tangle
170 - mkdir $(MANDIR)
163 $(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT)171 $(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT)
164 chmod 644 $(MANDIR)/cweb.$(MANEXT)172 chmod 644 $(MANDIR)/cweb.$(MANEXT)
173 - mkdir $(MACROSDIR)
165 $(CP) cwebmac.tex $(MACROSDIR)174 $(CP) cwebmac.tex $(MACROSDIR)
166 chmod 644 $(MACROSDIR)/cwebmac.tex175 chmod 644 $(MACROSDIR)/cwebmac.tex
176 - mkdir $(EMACSDIR)
167 $(CP) cweb.el $(EMACSDIR)177 $(CP) cweb.el $(EMACSDIR)
168 chmod 644 $(EMACSDIR)/cweb.el178 chmod 644 $(EMACSDIR)/cweb.el
179 - mkdir $(CWEBINPUTS)
169 $(CP) c++lib.w $(CWEBINPUTS)180 $(CP) c++lib.w $(CWEBINPUTS)
170 chmod 644 $(CWEBINPUTS)/c++lib.w181 chmod 644 $(CWEBINPUTS)/c++lib.w
171 182
README+2−2
@@ -3,7 +3,7 @@ · 2 unmodified lines
3% They are distributed WITHOUT ANY WARRANTY, express or implied.3% They are distributed WITHOUT ANY WARRANTY, express or implied.
4% This README file last updated May 2000 by Don Knuth4% This README file last updated May 2000 by Don Knuth
5 5
6% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth6% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
7 7
8% Permission is granted to make and distribute verbatim copies of this8% Permission is granted to make and distribute verbatim copies of this
9% document provided that the copyright notice and this permission notice9% document provided that the copyright notice and this permission notice
@@ -58,7 +58,7 @@ The files common.c and ctangle.c are used for bootstrapping. · 48 unmodified lines
58The file cweb.1 is a manual page.58The file cweb.1 is a manual page.
59The file cweb.el is suggested for GNU-Emacs users.59The file cweb.el is suggested for GNU-Emacs users.
60The file c++lib.w is for C++ users (say `@i c++lib.w' at beginning of program).60The file c++lib.w is for C++ users (say `@i c++lib.w' at beginning of program).
61The files *-man.ch are used if you want to make the full 234-page CWEB manual.61The files *-man.ch are used if you want to make the full 236-page CWEB manual.
62The files *-bs.ch are used instead of *-pc.ch if you are doing BIG programs.62The files *-bs.ch are used instead of *-pc.ch if you are doing BIG programs.
63You can use makefile.bs to make CWEB with *-bs.ch.63You can use makefile.bs to make CWEB with *-bs.ch.
64The files *-ql.ch are for QDOS/SMSQ systems; see readme.ql for further info.64The files *-ql.ch are for QDOS/SMSQ systems; see readme.ql for further info.
comm-man.ch+1−1
@@ -2,7 +2,7 @@ Change file to help make Appendix D of the full CWEB manual · 1 unmodified line
2@x2@x
3\def\botofcontents{\vfill3\def\botofcontents{\vfill
4\noindent4\noindent
5Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth5Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth
6\bigskip\noindent6\bigskip\noindent
7Permission is granted to make and distribute verbatim copies of this7Permission is granted to make and distribute verbatim copies of this
8document provided that the copyright notice and this permission notice8document provided that the copyright notice and this permission notice
comm-ql.ch+4−4
@@ -10,24 +10,24 @@ ex <dev_>cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c' · 9 unmodified lines
10@x10@x
11\def\v{\char'174} % vertical (|) in typewriter font11\def\v{\char'174} % vertical (|) in typewriter font
12 12
13\def\title{Common code for CTANGLE and CWEAVE (Version 3.6)}13\def\title{Common code for CTANGLE and CWEAVE (Version 3.61)}
14\def\topofcontents{\null\vfill14\def\topofcontents{\null\vfill
15 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and15 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
16 {\ttitlefont CWEAVE}}16 {\ttitlefont CWEAVE}}
17 \vskip 15pt17 \vskip 15pt
18 \centerline{(Version 3.6)}18 \centerline{(Version 3.61)}
19 \vfill}19 \vfill}
20\def\botofcontents{\vfill20\def\botofcontents{\vfill
21\noindent21\noindent
22@y22@y
23\def\v{\char'174} % vertical (|) in typewriter font23\def\v{\char'174} % vertical (|) in typewriter font
24 24
25\def\title{Common code for CTANGLE and CWEAVE (QL Version 3.6)}25\def\title{Common code for CTANGLE and CWEAVE (QL Version 3.61)}
26\def\topofcontents{\null\vfill26\def\topofcontents{\null\vfill
27 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and27 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
28 {\ttitlefont CWEAVE}}28 {\ttitlefont CWEAVE}}
29 \vskip 15pt29 \vskip 15pt
30 \centerline{(Version 3.6)}30 \centerline{(Version 3.61)}
31 \vfill}31 \vfill}
32\def\botofcontents{\vfill32\def\botofcontents{\vfill
33\noindent33\noindent
common.w+5−5
@@ -2,9 +2,9 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% It is distributed WITHOUT ANY WARRANTY, express or implied.
5% Version 3.6 --- May 2000 (works with later versions too)5% Version 3.61 --- July 2000 (works with later versions too)
6 6
7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth7% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
8 8
9% Permission is granted to make and distribute verbatim copies of this9% Permission is granted to make and distribute verbatim copies of this
10% document provided that the copyright notice and this permission notice10% document provided that the copyright notice and this permission notice
@@ -17,16 +17,16 @@ · 6 unmodified lines
17 17
18\def\v{\char'174} % vertical (|) in typewriter font18\def\v{\char'174} % vertical (|) in typewriter font
19 19
20\def\title{Common code for CTANGLE and CWEAVE (Version 3.6)}20\def\title{Common code for CTANGLE and CWEAVE (Version 3.61)}
21\def\topofcontents{\null\vfill21\def\topofcontents{\null\vfill
22 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and22 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
23 {\ttitlefont CWEAVE}}23 {\ttitlefont CWEAVE}}
24 \vskip 15pt24 \vskip 15pt
25 \centerline{(Version 3.6)}25 \centerline{(Version 3.61)}
26 \vfill}26 \vfill}
27\def\botofcontents{\vfill27\def\botofcontents{\vfill
28\noindent28\noindent
29Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth29Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth
30\bigskip\noindent30\bigskip\noindent
31Permission is granted to make and distribute verbatim copies of this31Permission is granted to make and distribute verbatim copies of this
32document provided that the copyright notice and this permission notice32document provided that the copyright notice and this permission notice
ctang-bs.ch+2−2
@@ -17,12 +17,12 @@ by using "huge" pointers. · 16 unmodified lines
17The ``banner line'' defined here should be changed whenever \.{CTANGLE}17The ``banner line'' defined here should be changed whenever \.{CTANGLE}
18is modified.18is modified.
19 19
20@d banner "This is CTANGLE (Version 3.6)\n"20@d banner "This is CTANGLE (Version 3.61)\n"
21@y21@y
22The ``banner line'' defined here should be changed whenever \.{CTANGLE}22The ``banner line'' defined here should be changed whenever \.{CTANGLE}
23is modified.23is modified.
24 24
25@d banner "This is CTANGLE (Version 3.6pc/big)\n"25@d banner "This is CTANGLE (Version 3.61pc/big)\n"
26@z26@z
27 27
28 28
ctang-man.ch+1−1
@@ -2,7 +2,7 @@ Change file to help make Appendix E of the full CWEB manual · 1 unmodified line
2@x2@x
3\def\botofcontents{\vfill3\def\botofcontents{\vfill
4\noindent4\noindent
5Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth5Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth
6\bigskip\noindent6\bigskip\noindent
7Permission is granted to make and distribute verbatim copies of this7Permission is granted to make and distribute verbatim copies of this
8document provided that the copyright notice and this permission notice8document provided that the copyright notice and this permission notice
ctang-pc.ch+2−2
@@ -9,9 +9,9 @@ that allows >64K arrays. If you need lots of bytes and toks, try the · 8 unmodified lines
9alternate change files with -bs suffix instead of -pc.9alternate change files with -bs suffix instead of -pc.
10 10
11@x section 111@x section 1
12@d banner "This is CTANGLE (Version 3.6)\n"12@d banner "This is CTANGLE (Version 3.61)\n"
13@y13@y
14@d banner "This is CTANGLE (Version 3.6pc)\n"14@d banner "This is CTANGLE (Version 3.61pc)\n"
15@z15@z
16@x section 416@x section 4
17@d max_bytes 90000 /* the number of bytes in identifiers,17@d max_bytes 90000 /* the number of bytes in identifiers,
ctang-ql.ch+4−4
@@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c -=500000 ctangle_c" · 6 unmodified lines
7 7
8 8
9@x9@x
10\def\title{CTANGLE (Version 3.6)}10\def\title{CTANGLE (Version 3.61)}
11@y11@y
12\def\title{CTANGLE (QL Version 3.6)}12\def\title{CTANGLE (QL Version 3.61)}
13@z13@z
14 14
15@x section 115@x section 1
16@d banner "This is CTANGLE (Version 3.6)\n"16@d banner "This is CTANGLE (Version 3.61)\n"
17@y17@y
18@d banner "This is CTANGLE (QL Version 3.6)\n"18@d banner "This is CTANGLE (QL Version 3.61)\n"
19@z19@z
20 20
21@x21@x
ctang-vms.ch+2−2
@@ -10,9 +10,9 @@ created: · 9 unmodified lines
10(these changes not necessary for initial bootstrapping)10(these changes not necessary for initial bootstrapping)
11 11
12@x section 1 (01-FEB-1992 ST)12@x section 1 (01-FEB-1992 ST)
13@d banner "This is CTANGLE (Version 3.6)\n"13@d banner "This is CTANGLE (Version 3.61)\n"
14@y14@y
15@d banner "This is CTANGLE (VAX/VMS Version 3.6)\n"15@d banner "This is CTANGLE (VAX/VMS Version 3.61)\n"
16@z16@z
17 17
18@x section 6 (from common.h) (01-FEB-1992 ST)18@x section 6 (from common.h) (01-FEB-1992 ST)
ctangle.c+1−1
@@ -15,7 +15,7 @@ · 14 unmodified lines
15/*:62*/15/*:62*/
16#line 64 "ctangle.w"16#line 64 "ctangle.w"
17 17
18#define banner "This is CTANGLE (Version 3.6)\n" \18#define banner "This is CTANGLE (Version 3.61)\n" \
19 19
20#define max_bytes 90000 \20#define max_bytes 90000 \
21 21
ctangle.w+6−6
@@ -2,10 +2,10 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% It is distributed WITHOUT ANY WARRANTY, express or implied.
5% Version 3.6 --- May 20005% Version 3.61 --- July 2000
6% (same as Version 3.5 except for minor typographic/stylistic corrections)6% (same as Version 3.5 except for minor typographic/stylistic corrections)
7 7
8% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth8% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
9 9
10% Permission is granted to make and distribute verbatim copies of this10% Permission is granted to make and distribute verbatim copies of this
11% document provided that the copyright notice and this permission notice11% document provided that the copyright notice and this permission notice
@@ -23,15 +23,15 @@ · 11 unmodified lines
23\mathchardef\RA="3221 % right arrow23\mathchardef\RA="3221 % right arrow
24\mathchardef\BA="3224 % double arrow24\mathchardef\BA="3224 % double arrow
25 25
26\def\title{CTANGLE (Version 3.6)}26\def\title{CTANGLE (Version 3.61)}
27\def\topofcontents{\null\vfill27\def\topofcontents{\null\vfill
28 \centerline{\titlefont The {\ttitlefont CTANGLE} processor}28 \centerline{\titlefont The {\ttitlefont CTANGLE} processor}
29 \vskip 15pt29 \vskip 15pt
30 \centerline{(Version 3.6)}30 \centerline{(Version 3.61)}
31 \vfill}31 \vfill}
32\def\botofcontents{\vfill32\def\botofcontents{\vfill
33\noindent33\noindent
34Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth34Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth
35\bigskip\noindent35\bigskip\noindent
36Permission is granted to make and distribute verbatim copies of this36Permission is granted to make and distribute verbatim copies of this
37document provided that the copyright notice and this permission notice37document provided that the copyright notice and this permission notice
@@ -58,7 +58,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. · 20 unmodified lines
58The ``banner line'' defined here should be changed whenever \.{CTANGLE}58The ``banner line'' defined here should be changed whenever \.{CTANGLE}
59is modified.59is modified.
60 60
61@d banner "This is CTANGLE (Version 3.6)\n"61@d banner "This is CTANGLE (Version 3.61)\n"
62 62
63@c63@c
64@<Include files@>@/64@<Include files@>@/
cweav-bs.ch+2−2
@@ -20,12 +20,12 @@ This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94. · 19 unmodified lines
20The ``banner line'' defined here should be changed whenever \.{CWEAVE}20The ``banner line'' defined here should be changed whenever \.{CWEAVE}
21is modified.21is modified.
22 22
23@d banner "This is CWEAVE (Version 3.6)\n"23@d banner "This is CWEAVE (Version 3.61)\n"
24@y24@y
25The ``banner line'' defined here should be changed whenever \.{CWEAVE}25The ``banner line'' defined here should be changed whenever \.{CWEAVE}
26is modified.26is modified.
27 27
28@d banner "This is CWEAVE (Version 3.6pc/big)\n"28@d banner "This is CWEAVE (Version 3.61pc/big)\n"
29@z29@z
30 30
31 31
cweav-man.ch+1−1
@@ -2,7 +2,7 @@ Change file to help make Appendix F of the full CWEB manual · 1 unmodified line
2@x2@x
3\def\botofcontents{\vfill3\def\botofcontents{\vfill
4\noindent4\noindent
5Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth5Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth
6\bigskip\noindent6\bigskip\noindent
7Permission is granted to make and distribute verbatim copies of this7Permission is granted to make and distribute verbatim copies of this
8document provided that the copyright notice and this permission notice8document provided that the copyright notice and this permission notice
cweav-pc.ch+2−2
@@ -11,9 +11,9 @@ that allows >64K arrays. (If you need lots more bytes, try the alternate · 10 unmodified lines
11change files that have -bs in their name instead of -pc.)11change files that have -bs in their name instead of -pc.)
12 12
13@x section 113@x section 1
14@d banner "This is CWEAVE (Version 3.6)\n"14@d banner "This is CWEAVE (Version 3.61)\n"
15@y15@y
16@d banner "This is CWEAVE (Version 3.6pc)\n"16@d banner "This is CWEAVE (Version 3.61pc)\n"
17@z17@z
18 18
19@x section 419@x section 4
cweav-ql.ch+4−4
@@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c =500000 cweave_c" · 6 unmodified lines
7 7
8 8
9@x9@x
10\def\title{CWEAVE (Version 3.6)}10\def\title{CWEAVE (Version 3.61)}
11@y11@y
12\def\title{CWEAVE (QL Version 3.6)}12\def\title{CWEAVE (QL Version 3.61)}
13@z13@z
14 14
15@x section 115@x section 1
16@d banner "This is CWEAVE (Version 3.6)\n"16@d banner "This is CWEAVE (Version 3.61)\n"
17@y17@y
18@d banner "This is CWEAVE (QL Version 3.6)\n"18@d banner "This is CWEAVE (QL Version 3.61)\n"
19@z19@z
20 20
21@x21@x
cweav-vms.ch+2−2
@@ -13,9 +13,9 @@ modified: · 12 unmodified lines
13(also modified by Don Knuth to keep version numbers uptodate)13(also modified by Don Knuth to keep version numbers uptodate)
14 14
15@x section 1 (01-FEB-1992 ST)15@x section 1 (01-FEB-1992 ST)
16@d banner "This is CWEAVE (Version 3.6)\n"16@d banner "This is CWEAVE (Version 3.61)\n"
17@y17@y
18@d banner "This is CWEAVE (VAX/VMS Version 3.6)\n"18@d banner "This is CWEAVE (VAX/VMS Version 3.61)\n"
19@z19@z
20 20
21@x section 6 (from common.h) (01-FEB-1992 ST)21@x section 6 (from common.h) (01-FEB-1992 ST)
cweave.w+8−7
@@ -2,10 +2,11 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% It is distributed WITHOUT ANY WARRANTY, express or implied.
5% Version 3.6 --- May 20005% Version 3.61 --- July 2000
6% (adds recently introduced features of standard C++ to version 3.4)6% (essentially the same as version 3.6, which added
7% recently introduced features of standard C++ to version 3.4)
7 8
8% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth9% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth
9 10
10% Permission is granted to make and distribute verbatim copies of this11% Permission is granted to make and distribute verbatim copies of this
11% document provided that the copyright notice and this permission notice12% document provided that the copyright notice and this permission notice
@@ -28,15 +29,15 @@ · 16 unmodified lines
28\def\skipxTeX{\\{skip\_\TEX/}}29\def\skipxTeX{\\{skip\_\TEX/}}
29\def\copyxTeX{\\{copy\_\TEX/}}30\def\copyxTeX{\\{copy\_\TEX/}}
30 31
31\def\title{CWEAVE (Version 3.6)}32\def\title{CWEAVE (Version 3.61)}
32\def\topofcontents{\null\vfill33\def\topofcontents{\null\vfill
33 \centerline{\titlefont The {\ttitlefont CWEAVE} processor}34 \centerline{\titlefont The {\ttitlefont CWEAVE} processor}
34 \vskip 15pt35 \vskip 15pt
35 \centerline{(Version 3.6)}36 \centerline{(Version 3.61)}
36 \vfill}37 \vfill}
37\def\botofcontents{\vfill38\def\botofcontents{\vfill
38\noindent39\noindent
39Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth40Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth
40\bigskip\noindent41\bigskip\noindent
41Permission is granted to make and distribute verbatim copies of this42Permission is granted to make and distribute verbatim copies of this
42document provided that the copyright notice and this permission notice43document provided that the copyright notice and this permission notice
@@ -64,7 +65,7 @@ Crusius, and others who have contributed improvements. · 21 unmodified lines
64The ``banner line'' defined here should be changed whenever \.{CWEAVE}65The ``banner line'' defined here should be changed whenever \.{CWEAVE}
65is modified.66is modified.
66 67
67@d banner "This is CWEAVE (Version 3.6)\n"68@d banner "This is CWEAVE (Version 3.61)\n"
68 69
69@c @<Include files@>@/70@c @<Include files@>@/
70@h71@h
cweb.el+1−10
@@ -87,16 +87,7 @@ otherwise do an ordinary Meta-y." · 86 unmodified lines
87 (let ((point-save (point)))87 (let ((point-save (point)))
88 (unwind-protect88 (unwind-protect
89 (progn (goto-char (mark))89 (progn (goto-char (mark))
90; The next two lines of code are controversial ---90 (sit-for 0 300)) ;; wait 300 milliseconds
91; they seem to be the best way to do a short wait and redraw the screen with
92; standard emacs primitives --- but the short wait is a "busy wait".
93; On a faster machine, it would be better to install the function
94; sit-for-millisecs found in sunfns.c (if not already installed)
95; and to say (sit-for-millisecs 100) instead.
96; On a slower machine, do the call-process only once.
97; On a still slower machine, (sit-for 1) is probably best.
98 (call-process "echo" nil nil t)
99 (call-process "echo" nil nil t))
100 (goto-char point-save))))91 (goto-char point-save))))
101 92
102; I prefer to change the standard copy-region command to the following,93; I prefer to change the standard copy-region command to the following,
cwebmac.tex+44−25
@@ -1,12 +1,16 @@
1% standard macros for CWEB listings (in addition to plain.tex)1% standard macros for CWEB listings (in addition to plain.tex)
2% Version 3.6 --- May 20002% Version 3.61 --- July 2000
3\ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros3\ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
4\xdef\fmtversion{\fmtversion+CWEB3.6}4\xdef\fmtversion{\fmtversion+CWEB3.61}
5\newif\ifpdf5\newif\ifpdf
6\ifx\pdf+\pdftrue\fi6\ifx\pdf+\pdftrue\fi
7% Uncomment the following line if you want PDF goodies to be the default7% Uncomment the following line if you want PDF goodies to be the default
8%\ifx\pdf-\else\pdftrue\fi8%\ifx\pdf-\else\pdftrue\fi
9\def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color9\def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color
10\newif\ifpdftex
11\ifx\pdfoutput\undefined \pdftexfalse
12\else \pdftextrue \pdfoutput=1 \pdfcompresslevel=9 \input pdfcolor \fi
13\newif\ifacro \ifpdf\acrotrue\fi \ifpdftex\acrotrue\fi
10 14
11\let\:=\. % preserve a way to get the dot accent15\let\:=\. % preserve a way to get the dot accent
12 % (all other accents will still work as usual)16 % (all other accents will still work as usual)
@@ -115,18 +119,23 @@ · 102 unmodified lines
115\let\yskip=\smallskip119\let\yskip=\smallskip
116\def\?{\mathrel?}120\def\?{\mathrel?}
117\def\note#1#2.{\Y\noindent{\hangindent2em%121\def\note#1#2.{\Y\noindent{\hangindent2em%
118 \baselineskip10pt\eightrm#1~\ifpdf{\pdfnote#2.}\else#2\fi.\par}}122 \baselineskip10pt\eightrm#1~\ifacro{\pdfnote#2.}\else#2\fi.\par}}
119% The following are pdf macros123% The following are pdf macros
120\newtoks\toksA \newtoks\toksB \newtoks\toksC124\newtoks\toksA \newtoks\toksB \newtoks\toksC
121\newtoks\toksD \newcount\countA \countA=0125\newtoks\toksD \newcount\countA \countA=0
122\def\thewidth{\the\wd0\space}126\def\thewidth{\the\wd0\space}
123\def\theheight{\the\ht0\space}127\def\theheight{\the\ht0\space}
124\def\thedepth{\the\dp0\space}128\def\thedepth{\the\dp0\space}
125\def\pdflink#1#2{\setbox0\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%129\ifpdftex\def\pdflink#1#2{\hbox{\pdfannotlink attr{/Border [0 0 0]} goto num #1
126 \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight\space130 \BlueGreen #1\Black\pdfendlink}}
127 depth \thedepth\space << /Type /Annot /Subtype /Link /Border [0 0 0] /A131\else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
128 << /S /GoTo /D (#2) >> >>}\box0\relax}132 \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight
133 \space depth \thedepth\space << /Type /Annot /Subtype /Link
134 /Border [0 0 0] /A << /S /GoTo /D (#2) >> >>}\box0\relax}\fi
129\def\pdfnote#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA}135\def\pdfnote#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA}
136\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}
137 \def\makenote{\addtokens{\toksB}{\the\toksC}\def\makenote{\toksD={}
138 \toksC={}\let\space\empty}\makenote}\maketoks}}
130\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}139\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
131\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}140\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
132\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}141\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
@@ -154,9 +163,11 @@ · 21 unmodified lines
154\def\stsec{\rightskip=0pt % get out of C mode (cf. \B)163\def\stsec{\rightskip=0pt % get out of C mode (cf. \B)
155 \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50164 \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50
156 \noindent{\let\*=\lapstar\bf\secstar.\quad}%165 \noindent{\let\*=\lapstar\bf\secstar.\quad}%
157 \ifpdf{\raise\baselineskip\hbox to0pt{%166 \ifpdftex\smash{\raise\baselineskip\hbox to0pt{%
167 \let\*=\empty\pdfdest num \secstar fith}}
168 \else\ifpdf\smash{\raise\baselineskip\hbox to0pt{%
158 \let\*=\empty\special{%169 \let\*=\empty\special{%
159 pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi}170 pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi\fi}
160\let\startsection=\stsec171\let\startsection=\stsec
161\def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format'172\def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format'
162\def\A{\note{See also section}} % xref for doubly defined section name173\def\A{\note{See also section}} % xref for doubly defined section name
@@ -191,7 +202,9 @@ · 28 unmodified lines
191 \message{*\secno} % progress report202 \message{*\secno} % progress report
192 \edef\next{\write\cont{\ZZ{#3}{#1}{\secno}% write to contents file203 \edef\next{\write\cont{\ZZ{#3}{#1}{\secno}% write to contents file
193 {\noexpand\the\pageno}}}\next % \ZZ{title}{depth}{sec}{page}204 {\noexpand\the\pageno}}}\next % \ZZ{title}{depth}{sec}{page}
194 \ifpdf\special{pdf: outline #1 << /Title (#3) /Dest [ @thispage /FitH @ypos ] >>}\fi205 \ifpdftex\pdfoutline goto num \secno {#3}
206 \else\ifpdf\special{pdf: outline #1 << /Title (#3) /Dest
207 [ @thispage /FitH @ypos ] >>}\fi\fi
195 \ifon\startsection{\bf#3.\quad}\ignorespaces}208 \ifon\startsection{\bf#3.\quad}\ignorespaces}
196\def\MN#1{\par % common code for \M, \N209\def\MN#1{\par % common code for \M, \N
197 {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% remove \* from section name210 {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% remove \* from section name
@@ -214,7 +227,8 @@ · 16 unmodified lines
214\let\V=\lor % logical or227\let\V=\lor % logical or
215\let\W=\land % logical and228\let\W=\land % logical and
216\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name229\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name
217 \XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em\ifpdf{\pdfnote#1.}\else#1\fi}$\,\rangle$\XX}230 \XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em
231 \ifacro{\pdfnote#1.}\else#1\fi}$\,\rangle$\XX}
218\def\Y{\par\yskip}232\def\Y{\par\yskip}
219\let\Z=\le233\let\Z=\le
220\let\ZZ=\let % now you can \write the control sequence \ZZ234\let\ZZ=\let % now you can \write the control sequence \ZZ
@@ -269,8 +283,9 @@ · 48 unmodified lines
269\mark{\noexpand\nullsec0{\the\gtitle}}283\mark{\noexpand\nullsec0{\the\gtitle}}
270\def\title{\expandafter\uppercase\expandafter{\jobname}}284\def\title{\expandafter\uppercase\expandafter{\jobname}}
271\def\topofcontents{\centerline{\titlefont\title}\vskip.7in285\def\topofcontents{\centerline{\titlefont\title}\vskip.7in
272 \ifpdf{\special{pdf: docview << /PageMode /UseOutlines >>}}\fi
273 \vfill} % this material will start the table of contents page286 \vfill} % this material will start the table of contents page
287\def\startpdf{\ifpdftex\pdfcatalog{/PageMode /UseOutlines}\else
288 \ifpdf{\special{pdf: docview << /PageMode /UseOutlines >>}}\fi\fi}
274\def\botofcontents{\vfill289\def\botofcontents{\vfill
275 \centerline{\covernote}} % this material will end the table of contents page290 \centerline{\covernote}} % this material will end the table of contents page
276\def\covernote{}291\def\covernote{}
@@ -320,7 +335,7 @@ · 43 unmodified lines
320 \message{Index:}335 \message{Index:}
321 \parskip 0pt plus .5pt336 \parskip 0pt plus .5pt
322 \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em337 \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em
323 \ifpdf\pdfnote##2.\else##2\fi.} % index entry338 \ifacro\pdfnote##2.\else##2\fi.} % index entry
324 \def\[##1]{$\underline{##1}$} % underlined index item339 \def\[##1]{$\underline{##1}$} % underlined index item
325 \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar340 \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar
326 \hyphenpenalty 10000 \parindent0pt341 \hyphenpenalty 10000 \parindent0pt
@@ -330,19 +345,27 @@ · 3 unmodified lines
330 \if L\lr\else\null\vfill\eject\fi % finish the current page345 \if L\lr\else\null\vfill\eject\fi % finish the current page
331 \parfillskip 0pt plus 1fil346 \parfillskip 0pt plus 1fil
332 \def\grouptitle{NAMES OF THE SECTIONS}347 \def\grouptitle{NAMES OF THE SECTIONS}
333 \ifpdf348 \ifpdftex
349 \def\outsecname{Names of the sections}
350 \pdfdest name {NOS} fitb
351 \pdfoutline goto name {NOS} count -\secno {\outsecname}
352 \let\Xpdf\X
353 \def\X##1:##2\X{\Xpdf##1:##2\X
354 \firstsecno##1.\toks0{##2}\pdfoutline goto num \the\toksA {\the\toks0}}
355 \else\ifpdf
334 \def\outsecname{Names of the sections}356 \def\outsecname{Names of the sections}
335 \special{pdf: outline -1 << /Title (\outsecname)357 \special{pdf: outline -1 << /Title (\outsecname)
336 /Dest [ @thispage /FitH @ypos ] >>}358 /Dest [ @thispage /FitH @ypos ] >>}
337 \let\Xpdf\X359 \let\Xpdf\X
338 \def\X##1:##2\X{\Xpdf##1:##2\X \toks0{##2} \special{pdf: outline 0360 \def\X##1:##2\X{\Xpdf##1:##2\X
339 << /Title (\the\toks0) /A << /S /GoTo /D (\romannumeral##1) >> >>}}361 \firstsecno##1.\toks0{##2} \special{pdf: outline 0 << /Title
340 \fi362 (\the\toks0) /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}}
363 \fi\fi
341 \let\topsecno=\nullsec364 \let\topsecno=\nullsec
342 \message{Section names:}365 \message{Section names:}
343 \output={\normaloutput\page\lheader\rheader}366 \output={\normaloutput\page\lheader\rheader}
344 \setpage367 \setpage
345 \def\note##1##2.{\quad{\eightrm##1~\ifpdf{\pdfnote##2.}\else{##2}\fi.}}368 \def\note##1##2.{\quad{\eightrm##1~\ifacro{\pdfnote##2.}\else{##2}\fi.}}
346 \def\Q{\note{Cited in section}} % crossref for mention of a section369 \def\Q{\note{Cited in section}} % crossref for mention of a section
347 \def\Qs{\note{Cited in sections}} % crossref for mentions of a section370 \def\Qs{\note{Cited in sections}} % crossref for mentions of a section
348 \def\U{\note{Used in section}} % crossref for use of a section371 \def\U{\note{Used in section}} % crossref for use of a section
@@ -357,7 +380,7 @@ · 8 unmodified lines
357 \pageno=\contentspagenumber380 \pageno=\contentspagenumber
358 \def\grouptitle{TABLE OF CONTENTS}381 \def\grouptitle{TABLE OF CONTENTS}
359 \message{Table of contents:}382 \message{Table of contents:}
360 \topofcontents383 \topofcontents \startpdf
361 \line{\hfil Section\hbox to3em{\hss Page}}384 \line{\hfil Section\hbox to3em{\hss Page}}
362 \let\ZZ=\contentsline385 \let\ZZ=\contentsline
363 \readcontents\relax % read the contents info386 \readcontents\relax % read the contents info
@@ -365,14 +388,11 @@ · 1 unmodified line
365\def\contentsline#1#2#3#4{\ifnum#2=0 \smallbreak\fi388\def\contentsline#1#2#3#4{\ifnum#2=0 \smallbreak\fi
366 \line{\consetup{#2}#1389 \line{\consetup{#2}#1
367 \rm\leaders\hbox to .5em{.\hfil}\hfil390 \rm\leaders\hbox to .5em{.\hfil}\hfil
368 \ \ifpdf\pdflink{#3}{\romannumeral#3}\else#3\fi\hbox to3em{\hss#4}}}391 \ \ifacro\pdflink{#3}{\romannumeral#3}\else#3\fi\hbox to3em{\hss#4}}}
369\def\consetup#1{\ifcase#1 \bf % depth -1 (@**)392\def\consetup#1{\ifcase#1 \bf % depth -1 (@**)
370 \or % depth 0 (@*)393 \or % depth 0 (@*)
371 \or \hskip2em % depth 1 (@*1)394 \or \hskip2em % depth 1 (@*1)
372 \or \hskip4em % depth 2 (@*2)395 \or \hskip4em \or \hskip6em \or \hskip8em \or \hskip10em % depth 2,3,4,5
373 \or \hskip6em % depth 3 (@*3)
374 \or \hskip8em % depth 4 (@*4)
375 \or \hskip10em % depth 5 (@*5)
376 \else \hskip12em \fi} % depth 6 or more396 \else \hskip12em \fi} % depth 6 or more
377\def\noinx{\let\inx=\end} % no indexes or table of contents397\def\noinx{\let\inx=\end} % no indexes or table of contents
378\def\nosecs{\let\FIN=\fin \def\fin{\let\parfillskip=\end \FIN}}398\def\nosecs{\let\FIN=\fin \def\fin{\let\parfillskip=\end \FIN}}
@@ -398,4 +418,3 @@ · 19 unmodified lines
398\def\datecontentspage{%418\def\datecontentspage{%
399 \def\topofcontents{\leftline{\sc\today\ at \hours}\bigskip419 \def\topofcontents{\leftline{\sc\today\ at \hours}\bigskip
400 \centerline{\titlefont\title}\vfill}} % timestamps the contents page420 \centerline{\titlefont\title}\vfill}} % timestamps the contents page
401
cwebman.tex+7−4
@@ -34,7 +34,7 @@ · 33 unmodified lines
34 34
35\def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill}35\def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill}
36\def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno}36\def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno}
37\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 3.6)}37\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 3.61)}
38 38
39% This verbatim mode assumes that ! marks are !! in the text being copied.39% This verbatim mode assumes that ! marks are !! in the text being copied.
40\def\verbatim{\begingroup40\def\verbatim{\begingroup
@@ -48,7 +48,7 @@ · 7 unmodified lines
48\null\vfill48\null\vfill
49\centerline{\titlefont The {\ttitlefont CWEB} System of49\centerline{\titlefont The {\ttitlefont CWEB} System of
50 Structured Documentation}50 Structured Documentation}
51\vskip 18pt\centerline{(Version 3.6 --- May 2000)}51\vskip 18pt\centerline{(Version 3.61 --- July 2000)}
52\vskip 24pt52\vskip 24pt
53\centerline{\authorfont Donald E. Knuth and Silvio Levy}53\centerline{\authorfont Donald E. Knuth and Silvio Levy}
54\vfill54\vfill
@@ -60,7 +60,7 @@ · 5 unmodified lines
60The printed form of this manual is copyright \copyright\ 199460The printed form of this manual is copyright \copyright\ 1994
61 by Addison-Wesley Publishing Company, Inc. All rights reserved.61 by Addison-Wesley Publishing Company, Inc. All rights reserved.
62\smallskip\noindent62\smallskip\noindent
63The electronic form is copyright \copyright\ 1987, 1990, 199363The electronic form is copyright \copyright\ 1987, 1990, 1993, 2000
64 by Silvio Levy and Donald E. Knuth.64 by Silvio Levy and Donald E. Knuth.
65 65
66\bigskip\noindent66\bigskip\noindent
@@ -1139,6 +1139,9 @@ dvipdfm cob\cr · 1072 unmodified lines
1139acroread cob.pdf\cr}}$$1139acroread cob.pdf\cr}}$$
1140instead of invoking \TeX\ in the normal way. (Thanks to Hans Hagen and1140instead of invoking \TeX\ in the normal way. (Thanks to Hans Hagen and
1141C\'esar Augusto Rorato Crusius for the macros that make this work.)1141C\'esar Augusto Rorato Crusius for the macros that make this work.)
1142Alternatively, thanks to H\`an Th\^e\kern-.3em\raise.3ex\hbox{\'{}} Th\`anh
1143and Andreas Scherer, you can generate \.{cob.pdf} in one step by simply
1144saying `\.{pdftex}~\.{cob}'.
1142 1145
1143A more elaborate system called \.{CTWILL}, which extends the usual cross1146A more elaborate system called \.{CTWILL}, which extends the usual cross
1144references of \.{CWEAVE} by preparing links from the uses of identifiers1147references of \.{CWEAVE} by preparing links from the uses of identifiers
@@ -1565,7 +1568,7 @@ $$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr · 420 unmodified lines
1565 \.{ { }\\titlefalse \% include headline on the contents page}\cr1568 \.{ { }\\titlefalse \% include headline on the contents page}\cr
1566 \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr1569 \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr
1567 \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont CWEAVE\}{ }processor\}}\cr1570 \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont CWEAVE\}{ }processor\}}\cr
1568 \.{ { }\\vskip 15pt \\centerline\{(Version 3.6)\}{ }\\vfill\}}\cr}$$1571 \.{ { }\\vskip 15pt \\centerline\{(Version 3.61)\}{ }\\vfill\}}\cr}$$
1569Redefining \.{\\rheader}, which is the headline for right-hand pages,1572Redefining \.{\\rheader}, which is the headline for right-hand pages,
1570suffices in this case to put the desired information at the top of the1573suffices in this case to put the desired information at the top of the
1571contents page.1574contents page.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t