Debian Codegraph @

texmf-dist/tex/plain/cweb/cwebmac.tex

raw
1 % standard macros for CWEB listings (in addition to plain.tex)
2 % Version 4.12.2 --- July 2025
3 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
4 \xdef\fmtversion{\fmtversion+CWEB4.12.2}
5 \chardef\cwebversion=4 \chardef\cwebrevision=12
6
7 \parskip 0pt % no stretch between paragraphs
8 \parindent 1em % for paragraphs and for the first line of C text
9
10 \font\ninerm=cmr9
11 \let\mc=\ninerm % medium caps
12 \font\eightrm=cmr8
13 \let\sc=\eightrm % for smallish caps (NOT a caps-and-small-caps font)
14 \let\mainfont=\tenrm
15 \let\cmntfont\tenrm
16 %\font\tenss=cmss10 \let\cmntfont\tenss % alternative comment font
17 \font\titlefont=cmr7 scaled\magstep4 % title on the contents page
18 \font\ttitlefont=cmtt10 scaled\magstep2 % typewriter type in title
19 \font\tentex=cmtex10 % TeX extended character set (used in strings)
20 \fontdimen7\tentex=0pt % no double space after sentences
21
22 \def\CEE/{{\mc C\spacefactor1000}}
23 \def\UNIX/{{\mc U\kern-.05emNIX\spacefactor1000}}
24 \def\TEX/{\TeX}
25 \def\CPLUSPLUS/{{\mc C\PP\spacefactor1000}}
26 \def\Cee{\CEE/} % for backward compatibility
27 \def\Cpp{\CPLUSPLUS/} % for backward compatibility
28 \def\9#1{} % with this definition of \9 you can say @:sort key}{TeX code@>
29 % to alphabetize an index entry by the sort key but format with the TeX code
30 \let\:=\. % preserve a way to get the dot accent
31 % (all other accents will still work as usual)
32
33 \def\\#1{\leavevmode\hbox{\it#1\/\kern.05em}} % italic type for identifiers
34 \def\|#1{\leavevmode\hbox{$#1$}} % one-letter identifiers look better this way
35 \def\&#1{\leavevmode\hbox{\bf
36 \def\_{\kern.04em\vbox{\hrule width.3em height .6pt}\kern.08em}%
37 #1\/\kern.05em}} % boldface type for reserved words
38 \def\.#1{\leavevmode\hbox{\tentex % typewriter type for strings
39 \let\\=\BS % backslash in a string
40 \let\{=\LB % left brace in a string
41 \let\}=\RB % right brace in a string
42 \let\~=\TL % tilde in a string
43 \let\ =\SP % space in a string
44 \let\_=\UL % underline in a string
45 \let\&=\AM % ampersand in a string
46 \let\^=\CF % circumflex in a string
47 #1\kern.05em}}
48 \def\){{\tentex\kern-.05em}\discretionary{\hbox{\tentex\BS}}{}{}}
49 \def\AT{@} % at sign for control text (not needed in versions >= 2.9)
50 \def\ATL{\par\noindent\bgroup\catcode`\_=12 \postATL} % print @l in limbo
51 \def\postATL#1 #2 {\bf letter \\{\uppercase{\char"#1}}
52 tangles as \tentex "#2"\egroup\par}
53 \def\noATL#1 #2 {}
54 \def\noatl{\let\ATL=\noATL} % suppress output from @l
55 \def\ATH{{\acrohintfalse\X\kern-.5em:Preprocessor definitions\X}}
56 \let\PB=\relax % hook for program brackets |...| in TeX part or section name
57
58 \chardef\AM=`\& % ampersand character in a string
59 \chardef\BS=`\\ % backslash in a string
60 \chardef\LB=`\{ % left brace in a string
61 \chardef\RB=`\} % right brace in a string
62 \def\SP{{\tt\char`\ }} % (visible) space in a string
63 \chardef\TL=`\~ % tilde in a string
64 \chardef\UL=`\_ % underline character in a string
65 \chardef\CF=`\^ % circumflex character in a string
66
67 \newbox\PPbox % symbol for ++
68 \setbox\PPbox=\hbox{\kern.5pt\raise1pt\hbox{\sevenrm+\kern-1pt+}\kern.5pt}
69 \def\PP{\copy\PPbox}
70 \newbox\MMbox \setbox\MMbox=\hbox{\kern.5pt\raise1pt\hbox{\sevensy\char0
71 \kern-1pt\char0}\kern.5pt}
72 \def\MM{\copy\MMbox}
73 \newbox\MGbox % symbol for ->
74 \setbox\MGbox=\hbox{\kern-2pt\lower3pt\hbox{\teni\char'176}\kern1pt}
75 \def\MG{\copy\MGbox}
76 \def\MRL#1{\mathrel{\let\K==#1}}
77 %\def\MRL#1{\KK#1}\def\KK#1#2{\buildrel\;#1\over{#2}}
78 \let\GG=\gg
79 \let\LL=\ll
80 \let\NULL=\Lambda
81 \mathchardef\AND="2026 % bitwise and; also \& (unary operator)
82 \let\OR=\mid % bitwise or
83 \let\XOR=\oplus % bitwise exclusive or
84 \def\CM{{\sim}} % bitwise complement
85 \newbox\MODbox \setbox\MODbox=\hbox{\eightrm\%}
86 \def\MOD{\mathbin{\copy\MODbox}}
87 \def\DC{\kern.1em{::}\kern.1em} % symbol for ::
88 \def\PA{\mathbin{.*}} % symbol for .*
89 \def\MGA{\mathbin{\MG*}} % symbol for ->*
90 \def\this{\&{this}}
91
92 \newbox\bak \setbox\bak=\hbox to -1em{} % backspace one em
93 \newbox\bakk\setbox\bakk=\hbox to -2em{} % backspace two ems
94
95 \newcount\ind % current indentation in ems
96 \def\1{\global\advance\ind by1\hangindent\ind em} % indent one more notch
97 \def\2{\global\advance\ind by-1} % indent one less notch
98 \def\3#1{\hfil\penalty#10\hfilneg} % optional break within a statement
99 \def\4{\copy\bak} % backspace one notch
100 \def\5{\hfil\penalty-1\hfilneg\kern2.4em\copy\bakk\ignorespaces}% optional break
101 \def\6{\ifmmode\else\par % forced break
102 \hangindent\ind em\noindent\kern\ind em\copy\bakk\ignorespaces\fi}
103 \def\7{\Y\6} % forced break and a little extra space
104 \def\8{\hskip-\ind em\hskip 2em} % no indentation
105
106 \newcount\gdepth % depth of current major group, plus one
107 \newcount\secpagedepth
108 \secpagedepth=3 % page breaks will occur for depths -1, 0, and 1
109 \newtoks\gtitle % title of current major group
110 \newskip\intersecskip \intersecskip=12pt minus 3pt % space between sections
111 \let\yskip=\smallskip
112 \def\?{\mathrel?}
113 \def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
114
115 \newtoks\toksA \newtoks\toksE
116 \newcount\countA \countA=0 \newcount\countB \countB=0
117 \newcount\countNOS \countNOS=0
118 {\def\\{\global\let\spacechar= }\\ }
119
120 % Here we decide the output format, depending on the TeX engine in use:
121 \input iftex.sty % TeX engine tests
122 \ifx\pdf+\pdftrue\fi % for plain TeX in combination with dvipdfm
123 % Uncomment the following line if you want PDF goodies to be the default
124 %\ifx\pdf-\else\pdftrue\fi
125 \ifxetex\pdftrue\fi % XeTeX produces PDF output
126 \ifpdf \def\pdflinkcolor{0 0 1} \fi % the RGB values for hyperlink color
127 \let\ifacro=\ifpdf
128 \newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
129 \newif\ifpdflua \ifluatex\pdfluatrue\fi \ifpdftex\pdfluatrue\fi
130 \ifpdflua % luaTeX and pdfTeX produce PDF output if \pdfoutput>0 (default)
131 \def\Black{\pdfliteral{0 g 0 G}} % use rgb colors for direct PDF output too
132 \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
133 \fi
134 \input cwebacromac % load hypertext macros
135
136 \def\lapstar{\rlap{*}}
137 \def\stsec{\rightskip=0pt % get out of C mode (cf. \B)
138 \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50
139 \ifhint\HINTlabel\fi% Start page before section
140 \noindent{\let\*=\lapstar\bf\secstar.\quad}%
141 \ifacro \smash{\raise\baselineskip\hbox to0pt{\let\*=\empty
142 \ifpdflua \pdfdest num \secstar fith%
143 \else \special{pdf: dest (\romannumeral\secstar)
144 [ @thispage /FitH @ypos ]}\fi}}\fi}
145 \let\startsection=\stsec
146 \def\defin#1{\global\advance\ind by 2 \1\&{#1 }} % begin `define' or `format'
147 \def\note#1#2.{\Y\noindent{\hangindent2em\baselineskip10pt%
148 \eightrm#1~\ifacrohint{\pdfnote#2.}\else#2\fi.\par}}
149 \def\A{\note{See also section}} % xref for doubly defined section name
150 \def\As{\note{See also sections}} % xref for multiply defined section name
151 \def\B{\rightskip=0pt plus 100pt minus 10pt % go into C mode
152 \sfcode`;=3000
153 \pretolerance 10000
154 \hyphenpenalty 1000 % so strings can be broken (discretionary \ is inserted)
155 \exhyphenpenalty 10000
156 \global\ind=2 \1\ \unskip}
157 \def\C#1{\5\5\quad$/\ast\,${\cmntfont #1}$\,\ast/$}
158 \let\SHC\C % "// short comments" treated like "/* ordinary comments */"
159 %\def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$}
160 %\def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}}
161 \def\D{\defin{{\rm\#}define}} % macro definition
162 \let\E=\equiv % equivalence sign
163 \def\ET{ and~} % conjunction between two section numbers
164 \def\ETs{, and~} % conjunction between the last two of several section numbers
165 \def\F{\defin{format}} % format definition
166 \let\G=\ge % greater than or equal sign
167 % \H is long Hungarian umlaut accent
168 \let\I=\ne % unequal sign
169 \def\J{\.{@\&}} % CTANGLE's join operation
170 \let\K== % assignment operator
171 %\let\K=\leftarrow % "honest" alternative to standard assignment operator
172 % \L is Polish letter suppressed-L
173 \outer\def\M#1{\MN{#1}\ifon\vfil\penalty-100\vfilneg % beginning of section
174 \vskip\intersecskip\startsection\ignorespaces}
175 \outer\def\N#1#2#3.{% beginning of starred section
176 \ifacro{\makeoutlinetoks#3\outlinedone}\fi
177 \gdepth=#1\gtitle={#3}\MN{#2}%
178 \ifon\ifnum#1<\secpagedepth \vfil\eject % force page break if depth is small
179 \else\vfil\penalty-100\vfilneg\vskip\intersecskip\fi\fi
180 \message{*\secno} % progress report
181 \def\stripprefix##1>{}\def\gtitletoks{#3}%
182 \edef\gtitletoks{\expandafter\stripprefix\meaning\gtitletoks}%
183 \edef\next{\write\cont{\ZZ{\gtitletoks}{#1}{\secno}% write to contents file
184 {\noexpand\the\pageno}{\the\toksE}}}\next % \ZZ{title}{depth}{sec}{page}{ss}
185 \ifpdf \ifpdflua\expandafter\xdef\csname curr#1\endcsname{\secno}
186 \ifnum#1>0\countB=#1 \advance\countB by-1
187 \advancenumber{chunk\the\countB.\expnumber{curr\the\countB}}\fi
188 \else \special{pdf: outline #1 << /Title (\the\toksE)
189 /Dest [ @thispage /FitH @ypos ] >>}\fi \fi
190 \ifon\startsection{\bf#3.\quad}\ignorespaces}
191 \def\MN#1{\par % common code for \M, \N
192 {\xdef\secstar{#1}\let\*=\empty\xdef\secno{#1}}% remove \* from section name
193 \ifx\secno\secstar \onmaybe \else\ontrue \fi
194 \mark{{{\tensy x}\secno}{\the\gdepth}{\the\gtitle}}}
195 % each \mark is {section reference or null}{depth plus 1}{group title}
196 % \O is Scandinavian letter O-with-slash
197 % \P is paragraph sign
198 \def\Q{\note{This code is cited in section}} % xref for mention of a section
199 \def\Qs{\note{This code is cited in sections}} % xref for mentions of a section
200 \let\R=\lnot % logical not
201 % \S is section sign
202 \def\T#1{\leavevmode % octal, hex or decimal constant
203 \hbox{$\def\?{\kern.2em}%$%
204 \let\ \, % C++ digit separator becomes a little white space
205 % \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant %$% versions < 3.67
206 \def\$##1{\egroup_{\rm##1}\bgroup}% suffix to constant %$% in version 3.67
207 \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick)
208 \let\~=\oct \let\^=\hex \let\\=\bin {#1}$}}%$%
209 \def\U{\note{This code is used in section}} % xref for use of a section
210 \def\Us{\note{This code is used in sections}} % xref for uses of a section
211 \let\V=\lor % logical or
212 \let\W=\land % logical and
213 \def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name
214 \XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em
215 \ifacrohint{\pdfnote#1.}\else#1\fi}$\,\rangle$\XX}
216 \def\Y{\par\yskip}
217 \let\Z=\le
218 \let\ZZ=\let % now you can \write the control sequence \ZZ
219 \let\*=*
220
221 \def\Xand{\W} \def\Xandxeq{\MRL{{\AND}{\K}}} \def\Xbitand{\AND}
222 \def\Xbitor{\OR} \def\Xcompl{\CM} \def\Xnot{\R} \def\Xnotxeq{\I} \def\Xor{\V}
223 \def\Xorxeq{\MRL{{\OR}{\K}}} \def\Xxor{\XOR} \def\Xxorxeq{\MRL{{\XOR}{\K}}}
224
225 %\def\oct{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}} % WEB style
226 %\def\hex{\hbox{\rm\char"7D\tt\aftergroup}} % WEB style
227 \def\oct{\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}} % CWEB style
228 \def\hex{\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} % CWEB style
229 \def\bin{\hbox{$^{\scriptscriptstyle b}$\tt\aftergroup}} % new in CWEB 4.3
230 \def\vb#1{\leavevmode\hbox{\kern2pt\vrule\vtop{\vbox{\hrule\hbox{\strut
231 \kern2pt\.{#1}\kern2pt}}\hrule}\vrule\kern2pt}} % verbatim string
232 \def\p#1{\cdot 2^{#1}} % power of two (hex exponent)
233
234 \def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue
235 \newif\ifon \newif\iftitle \newif\ifpagesaved \newif\ifheader
236
237 \def\lheader{\headertrue\mainfont\the\pageno\eightrm\qquad\grouptitle
238 \hfill\title\qquad\mainfont\topsecno} % top line on left-hand pages
239 \def\rheader{\headertrue\mainfont\topsecno\eightrm\qquad\title\hfill
240 \grouptitle\qquad\mainfont\the\pageno} % top line on right-hand pages
241 \def\grouptitle{\let\i=I\let\j=J\uppercase\expandafter{\expandafter
242 \takethree\topmark}}
243 \def\topsecno{\expandafter\takeone\topmark}
244 \def\takeone#1#2#3{#1}
245 \def\taketwo#1#2#3{#2}
246 \def\takethree#1#2#3{#3}
247 \def\nullsec{\eightrm\kern-2em} % the \kern-2em cancels \qquad in headers
248
249 \let\page=\pagebody \raggedbottom
250 % \def\page{\box255 }\normalbottom % faster, but loses plain TeX footnotes
251 \def\normaloutput#1#2#3{\ifodd\pageno\hoffset=\pageshift\fi
252 \shipout\vbox{
253 \vbox to\fullpageheight{
254 \iftitle\global\titlefalse
255 \else\hbox to\pagewidth{\vbox to10pt{}\ifodd\pageno #3\else#2\fi}\fi
256 \vfill#1}} % parameter #1 is the page itself
257 \global\advance\pageno by1}
258
259 \gtitle={{\tentex CWEB} output} % this running head is reset by starred sections
260 \mark{\noexpand\nullsec0{\the\gtitle}}
261 \def\title{\expandafter\uppercase\expandafter{\jobname}}
262 \def\topofcontents{\centerline{\titlefont\title}\vskip.7in
263 \vfill} % this material will start the table of contents page
264 \def\botofcontents{\vfill
265 \centerline{\covernote}} % this material will end the table of contents page
266 \def\covernote{}
267 \def\contentspagenumber{0} % default page number for table of contents
268 \newdimen\pagewidth \pagewidth=6.5in % the width of each page
269 \newdimen\pageheight \pageheight=8.7in % the height of each page
270 \newdimen\fullpageheight \fullpageheight=9in % page height including headlines
271 \newdimen\pageshift \pageshift=\hoffset
272 % shift righthand pages wrt lefthand ones (changed in version 3.70)
273 \def\magnify#1{\mag=#1\pagewidth=6.5truein\pageheight=8.7truein
274 \fullpageheight=9truein\setpage}
275 \def\setpage{\hsize\pagewidth\vsize\pageheight} % use after changing page size
276 \def\contentsfile{\jobname.toc} % file that gets table of contents info
277 \def\readcontents{\input \contentsfile}
278 \def\readindex{\input \jobname.idx}
279 \def\readsections{\input \jobname.scn}
280
281 \newwrite\cont
282 \output{\setbox0=\page % the first page is garbage
283 \openout\cont=\contentsfile
284 \write\cont{\catcode `\noexpand\@=11\relax} % \makeatletter
285 \global\output{\normaloutput\page\lheader\rheader}}
286 \setpage
287 \vbox to \vsize{} % the first \topmark won't be null
288
289 \def\ch{\note{The following sections were changed by the change file:}
290 \let\*=\relax}
291 \newbox\sbox % saved box preceding the index
292 \newbox\lbox % lefthand column in the index
293 \def\inx{\par\vskip6pt plus 1fil % we are beginning the index
294 \def\page{\box255 } \normalbottom
295 \write\cont{} % ensure that the contents file isn't empty
296 \write\cont{\catcode `\noexpand\@=12\relax} % \makeatother
297 \closeout\cont % the contents information has been fully gathered
298 \output{\ifpagesaved\normaloutput{\box\sbox}\lheader\rheader\fi
299 \global\setbox\sbox=\page \global\pagesavedtrue \mark{\topmark}}
300 \pagesavedfalse \eject % eject the page-so-far and predecessors
301 \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box
302 \vsize=\pageheight \advance\vsize by -\ht\sbox % the remaining height
303 \hsize=.5\pagewidth \advance\hsize by -10pt
304 % column width for the index (20pt between cols)
305 \ifhint\else\parfillskip 0pt plus .6\hsize\fi % avoid almost empty lines
306 \def\lr{L} % this tells whether the left or right column is next
307 \output{\if L\lr\global\setbox\lbox=\page \gdef\lr{R}
308 \else\normaloutput{\vbox to\pageheight{\box\sbox\vss
309 \hbox to\pagewidth{\box\lbox\hfil\page}}}\lheader\rheader
310 \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
311 \message{Index:}
312 \parskip 0pt plus .5pt
313 \outer\def\I##1, ##2.{\par\hangindent2em\noindent##1:\kern1em
314 \scan##2!.} % index entry
315 \def\[##1]{$\underline{\scan##1!}$\scan} % underlined index item
316 \rm \rightskip0pt plus 2.5em \tolerance 10000
317 \hyphenpenalty 10000 \parindent0pt
318 \readindex}
319 \def\fin{\par\vfill\eject % this is done when we are ending the index
320 \ifpagesaved\null\vfill\eject\fi % output a null index column
321 \if L\lr\else\null\vfill\eject\fi % finish the current page
322 \ifpdf \ifpdflua \makebookmarks % added in Version 3.68
323 \countsections \fi\fi % and in Version 4.9
324 \parfillskip 0pt plus 1fil
325 \def\grouptitle{NAMES OF THE SECTIONS}
326 \let\topsecno=\nullsec
327 \message{Section names:}
328 \output={\normaloutput\page\lheader\rheader}
329 \setpage
330 \def\note##1##2.{\quad{\eightrm##1~\ifacrohint{\pdfnote##2.}\else{##2}\fi.}}
331 \def\Q{\note{Cited in section}} % crossref for mention of a section
332 \def\Qs{\note{Cited in sections}} % crossref for mentions of a section
333 \def\U{\note{Used in section}} % crossref for use of a section
334 \def\Us{\note{Used in sections}} % crossref for uses of a section
335 \def\I{\par\hangindent 2em}\let\*=*
336 \ifacro \def\outsecname{Names of the sections} \let\Xpdf\X
337 % \ifpdflua \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68
338 \ifpdflua \pdfdest name {NOS} fith % changed in version 3.69
339 \pdfoutline goto name {NOS} count -\the\countNOS {\outsecname}
340 \else \special{pdf: outline -1 << /Title (\outsecname)
341 /Dest [ @thispage /FitH @ypos ] >>}\fi
342 \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.%
343 {\makeoutlinetoks##2\outlinedone}%
344 \ifpdflua \pdfoutline goto num \the\toksA \expandafter{\the\toksE}
345 \else \special{pdf: outline 0 << /Title (\the\toksE)
346 /A << /S /GoTo /D (\romannumeral\the\toksA) >> >>}\fi}
347 \fi % \ifacro
348 \readsections}
349 \def\makebookmarks{\let\ZZ=\writebookmarkline \readcontents\relax}
350 \def\countsections{\message{Number of named sections:}
351 {\def\I{\global\advance\countNOS by 1}\def\X##1\X{\relax}
352 \def\Q##1.{\relax}\def\Qs##1.{\relax}\def\U##1.{\relax}\def\Us##1.{\relax}
353 \readsections\relax}\message{\the\countNOS}}
354 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
355 \else \csname#1\endcsname \fi} % Petr Olsak's macros from texinfo.tex
356 \def\advancenumber#1{\countA=\expnumber{#1}\relax \advance\countA by1
357 \expandafter\xdef\csname#1\endcsname{\the\countA}}
358 \def\writebookmarkline#1#2#3#4#5{{%
359 \let\(=\let \let\)=\let \let\[=\let \let\]=\let \let\/=\let
360 \pdfoutline goto num #3 count -\expnumber{chunk#2.#3} {#5}}}
361 \def\con{\par\vfill\eject % finish the section names
362 % \ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers
363 \rightskip 0pt \hyphenpenalty 50 \tolerance 200
364 \setpage \output={\normaloutput\page\lheader\rheader}
365 \ifpdf\startpdf\fi \titletrue % prepare to output the table of contents
366 \pageno=\contentspagenumber
367 \def\grouptitle{TABLE OF CONTENTS}
368 \message{Table of contents:}
369 \ifhint\HINThome\fi% Mark the Table of contents as home page
370 \topofcontents
371 \line{\hfil Section\ifhint\else\hbox to3em{\hss Page}\fi}% No Page in HINT
372 \let\ZZ=\contentsline
373 \readcontents\relax % read the contents info
374 \botofcontents \end} % print the contents page(s) and terminate
375 \def\contentsline#1#2#3#4#5{\ifnum#2=0 \smallbreak\fi
376 \line{\consetup{#2}#1
377 \rm\leaders\hbox to .5em{.\hfil}\hfil
378 \ \ifhint
379 \HINTlink{#3}% No page numbers in HINT
380 \HINTcontents{#1}{#2}{#3}%
381 \else\ifacro\pdflink{#3}\else#3\fi
382 \hbox to3em{\hss#4}\fi}}
383 \def\consetup#1{\ifcase#1 \bf % depth -1 (@**)
384 \or % depth 0 (@*)
385 \or \hskip2em % depth 1 (@*1)
386 \or \hskip4em \or \hskip6em \or \hskip8em \or \hskip10em % depth 2,3,4,5
387 \else \hskip12em \fi} % depth 6 or more
388 \def\noinx{\let\inx=\end} % no indexes or table of contents
389 \def\nosecs{\let\FIN=\fin \def\fin{\let\parfillskip=\end \FIN}}
390 % no index of section names or table of contents
391 \def\nocon{\let\con=\end} % no table of contents
392 \def\today{\ifcase\month\or
393 January\or February\or March\or April\or May\or June\or
394 July\or August\or September\or October\or November\or December\fi
395 \space\number\day, \number\year}
396 \newcount\twodigits
397 \def\hours{\twodigits=\time \divide\twodigits by 60 \printtwodigits
398 \multiply\twodigits by-60 \advance\twodigits by\time :\printtwodigits}
399 \def\gobbleone1{}
400 \def\printtwodigits{\advance\twodigits100
401 \expandafter\gobbleone\number\twodigits
402 \advance\twodigits-100 }
403 \def\datethis{\def\startsection{\leftline{\sc\today\ at \hours}\bigskip
404 \let\startsection=\stsec\stsec}}
405 % say `\datethis' in limbo, to get your listing timestamped before section 1
406 %\def\datecontentspage{% versions up to 3.65
407 % \def\topofcontents{\leftline{\sc\today\ at \hours}\bigskip
408 % \centerline{\titlefont\title}\vfill}} % timestamps the contents page
409 \def\datecontentspage{% changed in version 3.66
410 \def\botofcontents{\vfill
411 \centerline{\covernote}
412 \bigskip
413 \leftline{\sc\today\ at \hours}}} % timestamps the contents page