Unified · Split
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | # This file is part of CWEB. |
| 2 | 2 | # It is distributed WITHOUT ANY WARRANTY, express or implied. |
| 3 | −# Version 3.0 --- June 1993 | |
| 3 | +# Version 3.61 --- July 2000 | |
| 4 | 4 | |
| 5 | −# Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth | |
| 5 | +# Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth | |
| 6 | 6 | |
| 7 | 7 | # Permission is granted to make and distribute verbatim copies of this |
| 8 | 8 | # document provided that the copyright notice and this permission notice |
| @@ -62,6 +62,10 @@ CC = cc · 53 unmodified lines | ||
| 62 | 62 | RM= /bin/rm |
| 63 | 63 | CP= /bin/cp |
| 64 | 64 | |
| 65 | +# uncomment the second line if you use pdftex to bypass .dvi files | |
| 66 | +PDFTEX = dvipdfm | |
| 67 | +#PDFTEX = pdftex | |
| 68 | + | |
| 65 | 69 | ########## You shouldn't have to change anything after this point ####### |
| 66 | 70 | |
| 67 | 71 | CWEAVE = ./cweave |
| @@ -97,8 +101,10 @@ ALL = common.w ctangle.w cweave.w prod.w \ · 29 unmodified lines | ||
| 97 | 101 | |
| 98 | 102 | .w.pdf: |
| 99 | 103 | make $*.tex |
| 100 | − tex "\let\pdf+ \input $*" | |
| 101 | − dvipdfm $* | |
| 104 | + case "$(PDFTEX)" in \ | |
| 105 | + dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \ | |
| 106 | + pdftex ) pdftex $* ;; \ | |
| 107 | + esac | |
| 102 | 108 | |
| 103 | 109 | all: ctangle cweave |
| 104 | 110 | |
| @@ -153,19 +159,24 @@ fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch · 48 unmodified lines | ||
| 153 | 159 | # be sure to leave ctangle.c and common.c for bootstrapping |
| 154 | 160 | clean: |
| 155 | 161 | $(RM) -f -r *~ *.o common.tex cweave.tex cweave.c ctangle.tex \ |
| 156 | − *.log *.dvi *.toc *.idx *.scn core cweave.w.[12] cweave ctangle | |
| 162 | + *.log *.dvi *.toc *.idx *.scn *.pdf core cweave ctangle | |
| 157 | 163 | |
| 158 | 164 | install: all |
| 165 | + - mkdir $(DESTDIR) | |
| 159 | 166 | $(CP) cweave $(DESTDIR)$(DESTPREF)weave |
| 160 | 167 | chmod 755 $(DESTDIR)$(DESTPREF)weave |
| 161 | 168 | $(CP) ctangle $(DESTDIR)$(DESTPREF)tangle |
| 162 | 169 | chmod 755 $(DESTDIR)$(DESTPREF)tangle |
| 170 | + - mkdir $(MANDIR) | |
| 163 | 171 | $(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT) |
| 164 | 172 | chmod 644 $(MANDIR)/cweb.$(MANEXT) |
| 173 | + - mkdir $(MACROSDIR) | |
| 165 | 174 | $(CP) cwebmac.tex $(MACROSDIR) |
| 166 | 175 | chmod 644 $(MACROSDIR)/cwebmac.tex |
| 176 | + - mkdir $(EMACSDIR) | |
| 167 | 177 | $(CP) cweb.el $(EMACSDIR) |
| 168 | 178 | chmod 644 $(EMACSDIR)/cweb.el |
| 179 | + - mkdir $(CWEBINPUTS) | |
| 169 | 180 | $(CP) c++lib.w $(CWEBINPUTS) |
| 170 | 181 | chmod 644 $(CWEBINPUTS)/c++lib.w |
| 171 | 182 | |
| @@ -3,7 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | % They are distributed WITHOUT ANY WARRANTY, express or implied. |
| 4 | 4 | % This README file last updated May 2000 by Don Knuth |
| 5 | 5 | |
| 6 | −% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth | |
| 6 | +% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth | |
| 7 | 7 | |
| 8 | 8 | % Permission is granted to make and distribute verbatim copies of this |
| 9 | 9 | % 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 | ||
| 58 | 58 | The file cweb.1 is a manual page. |
| 59 | 59 | The file cweb.el is suggested for GNU-Emacs users. |
| 60 | 60 | The file c++lib.w is for C++ users (say `@i c++lib.w' at beginning of program). |
| 61 | −The files *-man.ch are used if you want to make the full 234-page CWEB manual. | |
| 61 | +The files *-man.ch are used if you want to make the full 236-page CWEB manual. | |
| 62 | 62 | The files *-bs.ch are used instead of *-pc.ch if you are doing BIG programs. |
| 63 | 63 | You can use makefile.bs to make CWEB with *-bs.ch. |
| 64 | 64 | The files *-ql.ch are for QDOS/SMSQ systems; see readme.ql for further info. |
| @@ -2,7 +2,7 @@ Change file to help make Appendix D of the full CWEB manual · 1 unmodified line | ||
| 2 | 2 | @x |
| 3 | 3 | \def\botofcontents{\vfill |
| 4 | 4 | \noindent |
| 5 | −Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth | |
| 5 | +Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth | |
| 6 | 6 | \bigskip\noindent |
| 7 | 7 | Permission is granted to make and distribute verbatim copies of this |
| 8 | 8 | document provided that the copyright notice and this permission notice |
| @@ -10,24 +10,24 @@ ex <dev_>cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c' · 9 unmodified lines | ||
| 10 | 10 | @x |
| 11 | 11 | \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 | 14 | \def\topofcontents{\null\vfill |
| 15 | 15 | \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and |
| 16 | 16 | {\ttitlefont CWEAVE}} |
| 17 | 17 | \vskip 15pt |
| 18 | − \centerline{(Version 3.6)} | |
| 18 | + \centerline{(Version 3.61)} | |
| 19 | 19 | \vfill} |
| 20 | 20 | \def\botofcontents{\vfill |
| 21 | 21 | \noindent |
| 22 | 22 | @y |
| 23 | 23 | \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 | 26 | \def\topofcontents{\null\vfill |
| 27 | 27 | \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and |
| 28 | 28 | {\ttitlefont CWEAVE}} |
| 29 | 29 | \vskip 15pt |
| 30 | − \centerline{(Version 3.6)} | |
| 30 | + \centerline{(Version 3.61)} | |
| 31 | 31 | \vfill} |
| 32 | 32 | \def\botofcontents{\vfill |
| 33 | 33 | \noindent |
| @@ -2,9 +2,9 @@ · 1 unmodified line | ||
| 2 | 2 | % This program by Silvio Levy and Donald E. Knuth |
| 3 | 3 | % is based on a program by Knuth. |
| 4 | 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. Knuth | |
| 7 | +% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth | |
| 8 | 8 | |
| 9 | 9 | % Permission is granted to make and distribute verbatim copies of this |
| 10 | 10 | % document provided that the copyright notice and this permission notice |
| @@ -17,16 +17,16 @@ · 6 unmodified lines | ||
| 17 | 17 | |
| 18 | 18 | \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 | 21 | \def\topofcontents{\null\vfill |
| 22 | 22 | \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and |
| 23 | 23 | {\ttitlefont CWEAVE}} |
| 24 | 24 | \vskip 15pt |
| 25 | − \centerline{(Version 3.6)} | |
| 25 | + \centerline{(Version 3.61)} | |
| 26 | 26 | \vfill} |
| 27 | 27 | \def\botofcontents{\vfill |
| 28 | 28 | \noindent |
| 29 | −Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth | |
| 29 | +Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth | |
| 30 | 30 | \bigskip\noindent |
| 31 | 31 | Permission is granted to make and distribute verbatim copies of this |
| 32 | 32 | document provided that the copyright notice and this permission notice |
| @@ -17,12 +17,12 @@ by using "huge" pointers. · 16 unmodified lines | ||
| 17 | 17 | The ``banner line'' defined here should be changed whenever \.{CTANGLE} |
| 18 | 18 | is modified. |
| 19 | 19 | |
| 20 | −@d banner "This is CTANGLE (Version 3.6)\n" | |
| 20 | +@d banner "This is CTANGLE (Version 3.61)\n" | |
| 21 | 21 | @y |
| 22 | 22 | The ``banner line'' defined here should be changed whenever \.{CTANGLE} |
| 23 | 23 | is 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 | 26 | @z |
| 27 | 27 | |
| 28 | 28 | |
| @@ -2,7 +2,7 @@ Change file to help make Appendix E of the full CWEB manual · 1 unmodified line | ||
| 2 | 2 | @x |
| 3 | 3 | \def\botofcontents{\vfill |
| 4 | 4 | \noindent |
| 5 | −Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth | |
| 5 | +Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth | |
| 6 | 6 | \bigskip\noindent |
| 7 | 7 | Permission is granted to make and distribute verbatim copies of this |
| 8 | 8 | document provided that the copyright notice and this permission notice |
| @@ -9,9 +9,9 @@ that allows >64K arrays. If you need lots of bytes and toks, try the · 8 unmodified lines | ||
| 9 | 9 | alternate change files with -bs suffix instead of -pc. |
| 10 | 10 | |
| 11 | 11 | @x section 1 |
| 12 | −@d banner "This is CTANGLE (Version 3.6)\n" | |
| 12 | +@d banner "This is CTANGLE (Version 3.61)\n" | |
| 13 | 13 | @y |
| 14 | −@d banner "This is CTANGLE (Version 3.6pc)\n" | |
| 14 | +@d banner "This is CTANGLE (Version 3.61pc)\n" | |
| 15 | 15 | @z |
| 16 | 16 | @x section 4 |
| 17 | 17 | @d max_bytes 90000 /* the number of bytes in identifiers, |
| @@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c -=500000 ctangle_c" · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | @x |
| 10 | −\def\title{CTANGLE (Version 3.6)} | |
| 10 | +\def\title{CTANGLE (Version 3.61)} | |
| 11 | 11 | @y |
| 12 | −\def\title{CTANGLE (QL Version 3.6)} | |
| 12 | +\def\title{CTANGLE (QL Version 3.61)} | |
| 13 | 13 | @z |
| 14 | 14 | |
| 15 | 15 | @x section 1 |
| 16 | −@d banner "This is CTANGLE (Version 3.6)\n" | |
| 16 | +@d banner "This is CTANGLE (Version 3.61)\n" | |
| 17 | 17 | @y |
| 18 | −@d banner "This is CTANGLE (QL Version 3.6)\n" | |
| 18 | +@d banner "This is CTANGLE (QL Version 3.61)\n" | |
| 19 | 19 | @z |
| 20 | 20 | |
| 21 | 21 | @x |
| @@ -10,9 +10,9 @@ created: · 9 unmodified lines | ||
| 10 | 10 | (these changes not necessary for initial bootstrapping) |
| 11 | 11 | |
| 12 | 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 | 14 | @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 | 16 | @z |
| 17 | 17 | |
| 18 | 18 | @x section 6 (from common.h) (01-FEB-1992 ST) |
| @@ -15,7 +15,7 @@ · 14 unmodified lines | ||
| 15 | 15 | /*:62*/ |
| 16 | 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 | 20 | #define max_bytes 90000 \ |
| 21 | 21 | |
| @@ -2,10 +2,10 @@ · 1 unmodified line | ||
| 2 | 2 | % This program by Silvio Levy and Donald E. Knuth |
| 3 | 3 | % is based on a program by Knuth. |
| 4 | 4 | % It is distributed WITHOUT ANY WARRANTY, express or implied. |
| 5 | −% Version 3.6 --- May 2000 | |
| 5 | +% Version 3.61 --- July 2000 | |
| 6 | 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. Knuth | |
| 8 | +% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth | |
| 9 | 9 | |
| 10 | 10 | % Permission is granted to make and distribute verbatim copies of this |
| 11 | 11 | % document provided that the copyright notice and this permission notice |
| @@ -23,15 +23,15 @@ · 11 unmodified lines | ||
| 23 | 23 | \mathchardef\RA="3221 % right arrow |
| 24 | 24 | \mathchardef\BA="3224 % double arrow |
| 25 | 25 | |
| 26 | −\def\title{CTANGLE (Version 3.6)} | |
| 26 | +\def\title{CTANGLE (Version 3.61)} | |
| 27 | 27 | \def\topofcontents{\null\vfill |
| 28 | 28 | \centerline{\titlefont The {\ttitlefont CTANGLE} processor} |
| 29 | 29 | \vskip 15pt |
| 30 | − \centerline{(Version 3.6)} | |
| 30 | + \centerline{(Version 3.61)} | |
| 31 | 31 | \vfill} |
| 32 | 32 | \def\botofcontents{\vfill |
| 33 | 33 | \noindent |
| 34 | −Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth | |
| 34 | +Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth | |
| 35 | 35 | \bigskip\noindent |
| 36 | 36 | Permission is granted to make and distribute verbatim copies of this |
| 37 | 37 | document 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 | ||
| 58 | 58 | The ``banner line'' defined here should be changed whenever \.{CTANGLE} |
| 59 | 59 | is 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 | 63 | @c |
| 64 | 64 | @<Include files@>@/ |
| @@ -20,12 +20,12 @@ This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94. · 19 unmodified lines | ||
| 20 | 20 | The ``banner line'' defined here should be changed whenever \.{CWEAVE} |
| 21 | 21 | is modified. |
| 22 | 22 | |
| 23 | −@d banner "This is CWEAVE (Version 3.6)\n" | |
| 23 | +@d banner "This is CWEAVE (Version 3.61)\n" | |
| 24 | 24 | @y |
| 25 | 25 | The ``banner line'' defined here should be changed whenever \.{CWEAVE} |
| 26 | 26 | is 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 | 29 | @z |
| 30 | 30 | |
| 31 | 31 | |
| @@ -2,7 +2,7 @@ Change file to help make Appendix F of the full CWEB manual · 1 unmodified line | ||
| 2 | 2 | @x |
| 3 | 3 | \def\botofcontents{\vfill |
| 4 | 4 | \noindent |
| 5 | −Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth | |
| 5 | +Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth | |
| 6 | 6 | \bigskip\noindent |
| 7 | 7 | Permission is granted to make and distribute verbatim copies of this |
| 8 | 8 | document provided that the copyright notice and this permission notice |
| @@ -11,9 +11,9 @@ that allows >64K arrays. (If you need lots more bytes, try the alternate · 10 unmodified lines | ||
| 11 | 11 | change files that have -bs in their name instead of -pc.) |
| 12 | 12 | |
| 13 | 13 | @x section 1 |
| 14 | −@d banner "This is CWEAVE (Version 3.6)\n" | |
| 14 | +@d banner "This is CWEAVE (Version 3.61)\n" | |
| 15 | 15 | @y |
| 16 | −@d banner "This is CWEAVE (Version 3.6pc)\n" | |
| 16 | +@d banner "This is CWEAVE (Version 3.61pc)\n" | |
| 17 | 17 | @z |
| 18 | 18 | |
| 19 | 19 | @x section 4 |
| @@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c =500000 cweave_c" · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | @x |
| 10 | −\def\title{CWEAVE (Version 3.6)} | |
| 10 | +\def\title{CWEAVE (Version 3.61)} | |
| 11 | 11 | @y |
| 12 | −\def\title{CWEAVE (QL Version 3.6)} | |
| 12 | +\def\title{CWEAVE (QL Version 3.61)} | |
| 13 | 13 | @z |
| 14 | 14 | |
| 15 | 15 | @x section 1 |
| 16 | −@d banner "This is CWEAVE (Version 3.6)\n" | |
| 16 | +@d banner "This is CWEAVE (Version 3.61)\n" | |
| 17 | 17 | @y |
| 18 | −@d banner "This is CWEAVE (QL Version 3.6)\n" | |
| 18 | +@d banner "This is CWEAVE (QL Version 3.61)\n" | |
| 19 | 19 | @z |
| 20 | 20 | |
| 21 | 21 | @x |
| @@ -13,9 +13,9 @@ modified: · 12 unmodified lines | ||
| 13 | 13 | (also modified by Don Knuth to keep version numbers uptodate) |
| 14 | 14 | |
| 15 | 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 | 17 | @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 | 19 | @z |
| 20 | 20 | |
| 21 | 21 | @x section 6 (from common.h) (01-FEB-1992 ST) |
| @@ -2,10 +2,11 @@ · 1 unmodified line | ||
| 2 | 2 | % This program by Silvio Levy and Donald E. Knuth |
| 3 | 3 | % is based on a program by Knuth. |
| 4 | 4 | % It is distributed WITHOUT ANY WARRANTY, express or implied. |
| 5 | −% Version 3.6 --- May 2000 | |
| 6 | −% (adds recently introduced features of standard C++ to version 3.4) | |
| 5 | +% Version 3.61 --- July 2000 | |
| 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. Knuth | |
| 9 | +% Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth | |
| 9 | 10 | |
| 10 | 11 | % Permission is granted to make and distribute verbatim copies of this |
| 11 | 12 | % document provided that the copyright notice and this permission notice |
| @@ -28,15 +29,15 @@ · 16 unmodified lines | ||
| 28 | 29 | \def\skipxTeX{\\{skip\_\TEX/}} |
| 29 | 30 | \def\copyxTeX{\\{copy\_\TEX/}} |
| 30 | 31 | |
| 31 | −\def\title{CWEAVE (Version 3.6)} | |
| 32 | +\def\title{CWEAVE (Version 3.61)} | |
| 32 | 33 | \def\topofcontents{\null\vfill |
| 33 | 34 | \centerline{\titlefont The {\ttitlefont CWEAVE} processor} |
| 34 | 35 | \vskip 15pt |
| 35 | − \centerline{(Version 3.6)} | |
| 36 | + \centerline{(Version 3.61)} | |
| 36 | 37 | \vfill} |
| 37 | 38 | \def\botofcontents{\vfill |
| 38 | 39 | \noindent |
| 39 | −Copyright \copyright\ 1987, 1990, 1993 Silvio Levy and Donald E. Knuth | |
| 40 | +Copyright \copyright\ 1987, 1990, 1993, 2000 Silvio Levy and Donald E. Knuth | |
| 40 | 41 | \bigskip\noindent |
| 41 | 42 | Permission is granted to make and distribute verbatim copies of this |
| 42 | 43 | document provided that the copyright notice and this permission notice |
| @@ -64,7 +65,7 @@ Crusius, and others who have contributed improvements. · 21 unmodified lines | ||
| 64 | 65 | The ``banner line'' defined here should be changed whenever \.{CWEAVE} |
| 65 | 66 | is 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 | 70 | @c @<Include files@>@/ |
| 70 | 71 | @h |
| @@ -87,16 +87,7 @@ otherwise do an ordinary Meta-y." · 86 unmodified lines | ||
| 87 | 87 | (let ((point-save (point))) |
| 88 | 88 | (unwind-protect |
| 89 | 89 | (progn (goto-char (mark)) |
| 90 | −; The next two lines of code are controversial --- | |
| 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)) | |
| 90 | + (sit-for 0 300)) ;; wait 300 milliseconds | |
| 100 | 91 | (goto-char point-save)))) |
| 101 | 92 | |
| 102 | 93 | ; I prefer to change the standard copy-region command to the following, |
| @@ -1,12 +1,16 @@ | ||
| 1 | 1 | % standard macros for CWEB listings (in addition to plain.tex) |
| 2 | −% Version 3.6 --- May 2000 | |
| 2 | +% Version 3.61 --- July 2000 | |
| 3 | 3 | \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros |
| 4 | −\xdef\fmtversion{\fmtversion+CWEB3.6} | |
| 4 | +\xdef\fmtversion{\fmtversion+CWEB3.61} | |
| 5 | 5 | \newif\ifpdf |
| 6 | 6 | \ifx\pdf+\pdftrue\fi |
| 7 | 7 | % Uncomment the following line if you want PDF goodies to be the default |
| 8 | 8 | %\ifx\pdf-\else\pdftrue\fi |
| 9 | 9 | \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 | 15 | \let\:=\. % preserve a way to get the dot accent |
| 12 | 16 | % (all other accents will still work as usual) |
| @@ -115,18 +119,23 @@ · 102 unmodified lines | ||
| 115 | 119 | \let\yskip=\smallskip |
| 116 | 120 | \def\?{\mathrel?} |
| 117 | 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 | 123 | % The following are pdf macros |
| 120 | 124 | \newtoks\toksA \newtoks\toksB \newtoks\toksC |
| 121 | 125 | \newtoks\toksD \newcount\countA \countA=0 |
| 122 | 126 | \def\thewidth{\the\wd0\space} |
| 123 | 127 | \def\theheight{\the\ht0\space} |
| 124 | 128 | \def\thedepth{\the\dp0\space} |
| 125 | −\def\pdflink#1#2{\setbox0\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% | |
| 126 | − \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight\space | |
| 127 | − depth \thedepth\space << /Type /Annot /Subtype /Link /Border [0 0 0] /A | |
| 128 | − << /S /GoTo /D (#2) >> >>}\box0\relax} | |
| 129 | +\ifpdftex\def\pdflink#1#2{\hbox{\pdfannotlink attr{/Border [0 0 0]} goto num #1 | |
| 130 | + \BlueGreen #1\Black\pdfendlink}} | |
| 131 | +\else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% | |
| 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 | 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 | 139 | \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} |
| 131 | 140 | \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} |
| 132 | 141 | \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} |
| @@ -154,9 +163,11 @@ · 21 unmodified lines | ||
| 154 | 163 | \def\stsec{\rightskip=0pt % get out of C mode (cf. \B) |
| 155 | 164 | \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 |
| 156 | 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 | 169 | \let\*=\empty\special{% |
| 159 | − pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi} | |
| 170 | + pdf: dest (\romannumeral\secstar) [ @thispage /FitH @ypos ]}}}\fi\fi} | |
| 160 | 171 | \let\startsection=\stsec |
| 161 | 172 | \def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format' |
| 162 | 173 | \def\A{\note{See also section}} % xref for doubly defined section name |
| @@ -191,7 +202,9 @@ · 28 unmodified lines | ||
| 191 | 202 | \message{*\secno} % progress report |
| 192 | 203 | \edef\next{\write\cont{\ZZ{#3}{#1}{\secno}% write to contents file |
| 193 | 204 | {\noexpand\the\pageno}}}\next % \ZZ{title}{depth}{sec}{page} |
| 194 | − \ifpdf\special{pdf: outline #1 << /Title (#3) /Dest [ @thispage /FitH @ypos ] >>}\fi | |
| 205 | + \ifpdftex\pdfoutline goto num \secno {#3} | |
| 206 | + \else\ifpdf\special{pdf: outline #1 << /Title (#3) /Dest | |
| 207 | + [ @thispage /FitH @ypos ] >>}\fi\fi | |
| 195 | 208 | \ifon\startsection{\bf#3.\quad}\ignorespaces} |
| 196 | 209 | \def\MN#1{\par % common code for \M, \N |
| 197 | 210 | {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% remove \* from section name |
| @@ -214,7 +227,8 @@ · 16 unmodified lines | ||
| 214 | 227 | \let\V=\lor % logical or |
| 215 | 228 | \let\W=\land % logical and |
| 216 | 229 | \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 | 232 | \def\Y{\par\yskip} |
| 219 | 233 | \let\Z=\le |
| 220 | 234 | \let\ZZ=\let % now you can \write the control sequence \ZZ |
| @@ -269,8 +283,9 @@ · 48 unmodified lines | ||
| 269 | 283 | \mark{\noexpand\nullsec0{\the\gtitle}} |
| 270 | 284 | \def\title{\expandafter\uppercase\expandafter{\jobname}} |
| 271 | 285 | \def\topofcontents{\centerline{\titlefont\title}\vskip.7in |
| 272 | − \ifpdf{\special{pdf: docview << /PageMode /UseOutlines >>}}\fi | |
| 273 | 286 | \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 | 289 | \def\botofcontents{\vfill |
| 275 | 290 | \centerline{\covernote}} % this material will end the table of contents page |
| 276 | 291 | \def\covernote{} |
| @@ -320,7 +335,7 @@ · 43 unmodified lines | ||
| 320 | 335 | \message{Index:} |
| 321 | 336 | \parskip 0pt plus .5pt |
| 322 | 337 | \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em |
| 323 | − \ifpdf\pdfnote##2.\else##2\fi.} % index entry | |
| 338 | + \ifacro\pdfnote##2.\else##2\fi.} % index entry | |
| 324 | 339 | \def\[##1]{$\underline{##1}$} % underlined index item |
| 325 | 340 | \rm \rightskip0pt plus 2.5em \tolerance 10000 \let\*=\lapstar |
| 326 | 341 | \hyphenpenalty 10000 \parindent0pt |
| @@ -330,19 +345,27 @@ · 3 unmodified lines | ||
| 330 | 345 | \if L\lr\else\null\vfill\eject\fi % finish the current page |
| 331 | 346 | \parfillskip 0pt plus 1fil |
| 332 | 347 | \def\grouptitle{NAMES OF THE SECTIONS} |
| 333 | − \ifpdf | |
| 348 | + \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 | 356 | \def\outsecname{Names of the sections} |
| 335 | 357 | \special{pdf: outline -1 << /Title (\outsecname) |
| 336 | 358 | /Dest [ @thispage /FitH @ypos ] >>} |
| 337 | 359 | \let\Xpdf\X |
| 338 | − \def\X##1:##2\X{\Xpdf##1:##2\X \toks0{##2} \special{pdf: outline 0 | |
| 339 | − << /Title (\the\toks0) /A << /S /GoTo /D (\romannumeral##1) >> >>}} | |
| 340 | − \fi | |
| 360 | + \def\X##1:##2\X{\Xpdf##1:##2\X | |
| 361 | + \firstsecno##1.\toks0{##2} \special{pdf: outline 0 << /Title | |
| 362 | + (\the\toks0) /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}} | |
| 363 | + \fi\fi | |
| 341 | 364 | \let\topsecno=\nullsec |
| 342 | 365 | \message{Section names:} |
| 343 | 366 | \output={\normaloutput\page\lheader\rheader} |
| 344 | 367 | \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 | 369 | \def\Q{\note{Cited in section}} % crossref for mention of a section |
| 347 | 370 | \def\Qs{\note{Cited in sections}} % crossref for mentions of a section |
| 348 | 371 | \def\U{\note{Used in section}} % crossref for use of a section |
| @@ -357,7 +380,7 @@ · 8 unmodified lines | ||
| 357 | 380 | \pageno=\contentspagenumber |
| 358 | 381 | \def\grouptitle{TABLE OF CONTENTS} |
| 359 | 382 | \message{Table of contents:} |
| 360 | − \topofcontents | |
| 383 | + \topofcontents \startpdf | |
| 361 | 384 | \line{\hfil Section\hbox to3em{\hss Page}} |
| 362 | 385 | \let\ZZ=\contentsline |
| 363 | 386 | \readcontents\relax % read the contents info |
| @@ -365,14 +388,11 @@ · 1 unmodified line | ||
| 365 | 388 | \def\contentsline#1#2#3#4{\ifnum#2=0 \smallbreak\fi |
| 366 | 389 | \line{\consetup{#2}#1 |
| 367 | 390 | \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 | 392 | \def\consetup#1{\ifcase#1 \bf % depth -1 (@**) |
| 370 | 393 | \or % depth 0 (@*) |
| 371 | 394 | \or \hskip2em % depth 1 (@*1) |
| 372 | − \or \hskip4em % depth 2 (@*2) | |
| 373 | − \or \hskip6em % depth 3 (@*3) | |
| 374 | − \or \hskip8em % depth 4 (@*4) | |
| 375 | − \or \hskip10em % depth 5 (@*5) | |
| 395 | + \or \hskip4em \or \hskip6em \or \hskip8em \or \hskip10em % depth 2,3,4,5 | |
| 376 | 396 | \else \hskip12em \fi} % depth 6 or more |
| 377 | 397 | \def\noinx{\let\inx=\end} % no indexes or table of contents |
| 378 | 398 | \def\nosecs{\let\FIN=\fin \def\fin{\let\parfillskip=\end \FIN}} |
| @@ -398,4 +418,3 @@ · 19 unmodified lines | ||
| 398 | 418 | \def\datecontentspage{% |
| 399 | 419 | \def\topofcontents{\leftline{\sc\today\ at \hours}\bigskip |
| 400 | 420 | \centerline{\titlefont\title}\vfill}} % timestamps the contents page |
| 401 | − | |
| @@ -34,7 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill} |
| 36 | 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 | 39 | % This verbatim mode assumes that ! marks are !! in the text being copied. |
| 40 | 40 | \def\verbatim{\begingroup |
| @@ -48,7 +48,7 @@ · 7 unmodified lines | ||
| 48 | 48 | \null\vfill |
| 49 | 49 | \centerline{\titlefont The {\ttitlefont CWEB} System of |
| 50 | 50 | Structured Documentation} |
| 51 | −\vskip 18pt\centerline{(Version 3.6 --- May 2000)} | |
| 51 | +\vskip 18pt\centerline{(Version 3.61 --- July 2000)} | |
| 52 | 52 | \vskip 24pt |
| 53 | 53 | \centerline{\authorfont Donald E. Knuth and Silvio Levy} |
| 54 | 54 | \vfill |
| @@ -60,7 +60,7 @@ · 5 unmodified lines | ||
| 60 | 60 | The printed form of this manual is copyright \copyright\ 1994 |
| 61 | 61 | by Addison-Wesley Publishing Company, Inc. All rights reserved. |
| 62 | 62 | \smallskip\noindent |
| 63 | −The electronic form is copyright \copyright\ 1987, 1990, 1993 | |
| 63 | +The electronic form is copyright \copyright\ 1987, 1990, 1993, 2000 | |
| 64 | 64 | by Silvio Levy and Donald E. Knuth. |
| 65 | 65 | |
| 66 | 66 | \bigskip\noindent |
| @@ -1139,6 +1139,9 @@ dvipdfm cob\cr · 1072 unmodified lines | ||
| 1139 | 1139 | acroread cob.pdf\cr}}$$ |
| 1140 | 1140 | instead of invoking \TeX\ in the normal way. (Thanks to Hans Hagen and |
| 1141 | 1141 | C\'esar Augusto Rorato Crusius for the macros that make this work.) |
| 1142 | +Alternatively, thanks to H\`an Th\^e\kern-.3em\raise.3ex\hbox{\'{}} Th\`anh | |
| 1143 | +and Andreas Scherer, you can generate \.{cob.pdf} in one step by simply | |
| 1144 | +saying `\.{pdftex}~\.{cob}'. | |
| 1142 | 1145 | |
| 1143 | 1146 | A more elaborate system called \.{CTWILL}, which extends the usual cross |
| 1144 | 1147 | references of \.{CWEAVE} by preparing links from the uses of identifiers |
| @@ -1565,7 +1568,7 @@ $$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr · 420 unmodified lines | ||
| 1565 | 1568 | \.{ { }\\titlefalse \% include headline on the contents page}\cr |
| 1566 | 1569 | \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr |
| 1567 | 1570 | \.{ { }\\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}$$ | |
| 1569 | 1572 | Redefining \.{\\rheader}, which is the headline for right-hand pages, |
| 1570 | 1573 | suffices in this case to put the desired information at the top of the |
| 1571 | 1574 | contents page. |