2
%% created with UNIX on "Thursday, September 10, 1998 at 22:59."
3
%% COMMAND LINE: "/u/krommes/Fweb/Web/ftangle -# fwebmac"
4
%% RUN TIME: "Friday, September 11, 1998 at 18:55."
5
%% WEB FILE: "fwebmac.web"
13
\ifx\FWEBisloaded\relax\endinput\else\let\FWEBisloaded\relax\fi
16
\newif\ifFWEBstandalone
26
\long\def\comment#1\endcomment{}
29
\def\FWEBversion{$REVISION}
30
\def\FWEBdate{September 23, 1995}
37
\ifx\DeclareRobustCommand\undefined
39
\def\DeclareRobustCommand#1{\@ifnextchar[%
40
{\W@argdef#1}{\W@argdef#1[0]}}
42
\def\W@argdef#1[#2]{\W@tk={}%
47
\edef\next{\W@tk={\the\W@tk########\the\W@count}}\next
49
\edef\next{\def\noexpand#1\the\W@tk}\next}
53
\ifx\@ifnextchar\undefined
55
\def\@ifnextchar#1#2#3{\let\@tempe#1
58
\futurelet\@tempc\@ifnch}
60
\def\@ifnch{\ifx\@tempc\@sptoken
72
{\def\:{\global\let\@sptoken= } \: }
74
\def\@xifnch{\futurelet\@tempc\@ifnch}
79
\let\DRC\DeclareRobustCommand
82
\def\TeX{T\kern-0.1667em\lower0.5ex\hbox{E}\kern-0.125emX\W@t}
85
\def\LaTeX{L\kern-0.36em\raise0.3ex\hbox{\Csc a}\kern-0.15em\TeX}
88
\newif\ifnoLaTeXe% By default, we have \LaTeXe.
92
\def\LaTeXe{\LaTeX 2$_\varepsilon$}
96
\newif\ifLaTeXisloaded
106
\message{Please use LaTeX. Plain TeX is no longer supported. ABORTING!}
116
\newif\ifusedocumentstyle
119
\usedocumentstyletrue
123
\usedocumentstyletrue
128
\DRC\WEB{\Wtypewriter{WEB}}
129
\DRC\FWEB{\Wtypewriter{FWEB}}
130
\DRC\CWEB{\Wtypewriter{CWEB}}
131
\DRC\TANGLE{\Wtypewriter{TANGLE}} \let\Tangle\TANGLE
132
\DRC\WEAVE{\Wtypewriter{WEAVE}} \let\Weave\WEAVE
133
\DRC\FTANGLE{\Wtypewriter{FTANGLE}}
134
\DRC\FWEAVE{\Wtypewriter{FWEAVE}}
139
\DRC\FORTRAN{{\Csc Fortran}} \let\Fortran\FORTRAN
140
\DRC\MAKE{{\tt MAKE}} \let\Make\MAKE
141
\DRC\RATFOR{{\Csc Ratfor}} \let\Ratfor\RATFOR
142
\DRC\UNIX{{\SC UNIX}} \let\Unix\UNIX
173
\dimen0=\normalbaselineskip
174
\parskip=\dimen0 plus 1pt minus 6pt
181
\TeXindent 1em% For paragraphs in the \TeX\ part.
185
\let\pageno\c@page% \WEB\ has its own name for the page number.
199
\let\mainfont\tenrm \let\cmntfont\tenrm
200
\font\eightrm=cmr8 \let\SC\eightrm
202
\font\titlefont=cmssbx10 scaled \magstep2% Sans serif
203
\font\ttitlefont=cmtt10 scaled\magstep2% Typewriter type
205
\font\tentex=cmtex10 % \TeX\ \.{extended char.\ set} (used in strings)
206
\let\extendedtex\tentex
207
\font\Csc=cmcsc10 % Caps/small caps.
208
\font\tenbfit=cmbxti10 % \&{Intrinsic functions}
209
\let\bfit\tenbfit % Doesn't work right in titles.
216
\scriptfont\itfam=\sevenit
218
\scriptscriptfont\itfam=\sevenit
220
\def\mathrm#1{{\rm #1}}
221
\def\mathit#1{{\it #1}}
224
\def\mainfont{\normalsize\usefont{OT1}{\rmdefault}{m}{n}}
225
\let\cmntfont\mainfont
227
\def\eightrm{\footnotesize\usefont{OT1}{\rmdefault}{m}{n}}
230
\def\titlefont{\Large\usefont{OT1}{\sfdefault}{\bfdefault}{n}}
231
\def\ttitlefont{\Large\usefont{OT1}{\ttdefault}{m}{n}}
233
\def\extendedtex{\usefont{OT1}{\ttdefault}{m}{n}}
234
\def\tentex{\normalsize\extendedtex}
236
\def\Csc{\usefont{OT1}{\rmdefault}{m}{\scdefault}}
238
\def\bfit{\usefont{OT1}{\rmdefault}{\bfdefault}{\itdefault}}
239
\def\tenbfit{\normalsize\bfit}
241
\def\seventi{\scriptsize\usefont{OT1}{\rmdefault}{m}{\itdefault}}
242
\def\sevenrm{\scriptsize\usefont{OT1}{\rmdefault}{m}{n}}
243
\def\sevenbf{\scriptsize\usefont{OT1}{\rmdefault}{\bfdefault}{n}}
245
\def\fiveti{\tiny\usefont{OT1}{\rmdefault}{m}{\itdefault}}
246
\def\fiverm{\tiny\usefont{OT1}{\rmdefault}{m}{n}}
247
\def\fivebf{\tiny\usefont{OT1}{\rmdefault}{\bfdefault}{n}}
249
\def\tensy{\normalsize\usefont{OT1}{cmsy}{m}{n}}
254
\DRC\Wshort[1]{\leavevmode\hbox{$#1$}}% One-letter identifiers such
255
% as~\Wshort{x} look better this way.
257
\DRC\Wid[1]{\leavevmode\hbox{\it#1\/\kern.05em}}% Italic type for ordinary
258
% identifiers such as \Wid{test}.
260
\DRC\WID[1]{\leavevmode\hbox{\small\it#1\/\kern.05em}}% For all %
263
\let\WidD\Wid % Outer macro
264
\let\WIDD\WID % Upper-case outer macro
266
\let\WidM\Wid % FWEB macro
267
\let\WIDM\WID % Upper-case FWEB macro
269
\DRC\Wreserved[1]{\leavevmode\hbox{\def\\{\tt\WBS}\bf#1\/}}% Boldface type
270
% for reserved words such as \Wreserved{int}.
272
\DRC\WRESERVED[1]{\leavevmode\hbox{\def\\{\tt\WBS}\small\bf#1\/}}% Boldface
274
% for upper-case reserved words such as \WRESERVED{INTEGER}.
277
\DRC\Wintrinsic[1]{\leavevmode\hbox{\def\\{\tt\WBS}\bfit#1\/\kern.05em}}%
278
% Library/intrinsic function name such as \@{sin}.
281
\def\W@twodef#1#2#3#4{\gdef#1{#3}\gdef#2{#4}}
283
\def\Wequate#1#2#3#4#5#6#7#8#9{%
284
\W@twodef#1\Wreserved\WRESERVED% |\&| by default.
285
\gdef#2{\Wshort}% |\|| by default.
286
\W@twodef#5\WidM\WIDM% |\\| by default.
287
\W@twodef#4\WidD\WIDD% |\\| by default.
288
\W@twodef#3\Wid\WID% |\\| by default.
289
\gdef#6{\Wintrinsic}% |\@| by default.
290
\W@twodef#7\Wkeyword\WKEYWORD% |\.| by default.
291
\gdef#8{\Wtypewriter}% |\.| by default.
292
% \#9 is for future use.
296
\def\W@zero{0}% For the comparison in |\WIN| below.
298
\DRC\WIN[2]{\ifmmode\def\ZZ{}\else\def\ZZ{\null$\null}\fi
299
\ZZ_{\def\W@rg{#2}\ifx\W@rg\W@zero{\bullet}\else\W@IN{#1}{#2}\fi}\ZZ}
304
\underline{\hbox{\sevenrm\Wmodtrans{#2}}}% Generic name (\.{@[}). [0]
305
\or\hbox{\sevenrm\Wmodtrans{#2}}% Function name. [1]
306
\or\underline{\hbox{\seventi\Wmodtrans{#2}}}% WEB macro. [2]
307
\or\hbox{\seventi\Wmodtrans{#2}}% Outer macro. [3]
308
\or\underline{\hbox{\sevenbf\Wmodtrans{#2}}}% \.{@`}. [4]
309
\or\hbox{\sevenbf\Wmodtrans{#2}}% \&{typedef}. [5]
310
\else{\Wmodtrans{#2}}% Error trap.
316
\DRC\Wtypewriter[1]{\relax\ifmmode\gdef\YY{\null$\null}\else\gdef\YY{}\fi
317
\YY{\leavevmode\W@INITSTR#1}\YY}
319
\let\Wkeyword\Wtypewriter
320
\let\WKEYWORD\Wtypewriter
326
\extendedtex % Typewriter type for strings. (We don't say
327
\let\\=\WBS % Backslash in a string: '\.\\'.
328
\let\'=\WRQ % Right quote in a string: '\.\''.
329
\let\`=\WLQ % Left quote in a string: '\.\`'.
330
\let\{=\WLB % Left brace in a string: '\.\WLB'.
331
\let\}=\WRB % Right brace in a string: '\.\WRB'.
332
\let\~=\WTL % Tilde in a string: '\.\~'.
333
\let\ =\WSP % Space in a string: '\.\ '.
334
\let\_=\WUL % Underline in a string: '\.\_'.
335
\let\&=\WAM % Ampersand in a string: '\.\&'.
336
\def\0{\discretionary{\WBS}{}{}}% \FWEB\ inserts this automatically every
337
% so often so very long strings will break. Broken strings will
338
% be marked by a backslash.
339
\def\1{,\0}% \FWEB\ replaces commas in strings by this, so strings
340
% tend to break after commas.
341
\let\2\space % Ordinary space after control sequences in \TeX.
342
\def\3{\space\space}% Translation of a tab in \TeX.
346
\DRC\#{\hbox{\tt\char35}}% Parameter sign: '\#'.
347
\DRC\${\hbox{\tt\char36}}% Dollar sign: '\$'.
348
\DRC\%{\hbox{\tt\char37}}% Percent sign: '\%'.
349
\DRC\^{\ifmmode\raise0.45ex\hbox{$\,\scriptstyle\mathchar"25E\,$}%
350
\else\char`^ \fi}% Pointer or
352
% Circumflex accents can be obtained from |\^^D| instead of |\^|.
353
\let\Caret\^% For proper indexing of |@c++ operator ^|.
354
\def\AT!{@}% Knuth's abbreviation for the at sign for control text: '\AT!'
357
\chardef\asterisk=`\*
360
\chardef\WAM=`\&% Ampersand character in a string: '\.\&'.
361
\chardef\WBS=`\\% Backslash in a string: '\.\\'.
362
\DRC\WttBS{{\tt\WBS}}% Literal backslash: '\WttBS'.
363
\chardef\WLB=`\{% Left brace in a string: '\.\WLB'.
364
\DRC\WLQ{{\tt\char'22}}% Left quote in a string: '\.\`'.
365
\chardef\WRB=`\}% Right brace in a string: '\.\WRB'.
366
\DRC\WRQ{{\tt\char'23}}% Right quote in a string: '\.\''.
367
\DRC\WSP{{\tt\char`\ }}% (Visible) space in a string: '\.\ '.
368
\chardef\WTL=`\~% Tilde in a string: '\.\~'.
369
\chardef\WUL=`\_% Underline character in a string: '\.\_'.
372
\DRC\WLQx{\hbox{\WLQ}}
378
\def\rules#1{\leavevmode
380
\rlap{\vtop to 0pt{\null
381
\def\R{\setbox0=\hbox{\the\ruleno}%
382
\rlap{\vrule height0pt depth#1}%
383
\kern-0.5\wd0\copy0\kern-0.5\wd0
386
\rlap{\R\R\R\R\R\R\R}
393
\newcount\W@globalindent
394
\W@globalindent=3 % Global indentation in notches.
397
\newcount\W@ind % Current indentation in notches.
398
\newcount\W@lastind % Used for preprocessor commands.
399
\def\W@saveind{\global\W@lastind=\W@ind}
405
\def\W@setboxes#1{\notch=#1
406
\setbox\b@k=\hbox to -\notch{}% Backspace one notch.
407
\setbox\b@kk=\hbox to -2\notch{}% Backspace two notches.
411
\newif\ifW@firstbreak
415
\def\WBKo{}% NOT FINISHED YET!
419
\def\WBK@#1{\hfil\break
422
\advance\W@nBK by -#1 % Compensate for glob's outdented by 1 from body.
423
\W@firstbreakfalse % Reset by |\6|.
425
\hangindent\W@nBK\notch
429
\def\1{\global\advance\W@ind by1\hangindent\W@ind\notch}% Indent one more notch
432
\def\2{\global\advance\W@ind by-1{}}% Indent one less notch
435
\def\3#1{\hfil\penalty#10\hfilneg}% Optional break within a statement.
438
\def\4{\copy\b@k \ignorespaces}% Backspace one notch
441
\def\5{\hfil\penalty-1\hfilneg \kern2.5\notch\copy\b@kk
442
\yskipfalse\ignorespaces}
445
\def\6{\ifmmode\else\par
446
\hangindent\W@ind\notch \noindent \kern\W@ind\notch \copy\b@kk \ignorespaces%
450
\def\7{\WY\6}% Forced break and a little extra space.
453
\def\8{\hskip-\W@ind\notch \hskip 2\notch}
460
\def\W@Hspace{\hbox{ }}
463
\DRC\WPR[1]{\copy\b@kk \W@saveind% |\global\advance\W@ind by 2|
464
\1\Wreserved{@#1}\W@Hspace}
466
\DRC\WPs{\global\W@ind=\W@lastind}
471
\def\W@defin#1#2{\4\W@saveind
475
\else\ifx\W@temp\W@point \W@point
476
\else\hbox{$^{\mathrm{#2}}$}%
478
\W@Hspace}% Begin @d, @m, or @f.
481
\def\note#1#2.{\WY\noindent{\hangindent2em\baselineskip10pt\footnotesize
485
\def\W@lapstar{\rlap{*}}
487
\newif\ifW@modchanged
489
\def\W@checkstar{\edef\W@temp{\noexpand\W@isstar\modstar\noexpand\*\relax}%
492
\def\W@isstar#1\*#2\relax{\ifx#2\*\W@modchangedtrue\else\W@modchangedfalse\fi}
497
\def\WIF#1{\gdef\W@includefile{#1}}
499
\def\WIF@name{\ifx\W@includefile\empty
504
\def\W@prninclude{\ifLaTeXisloaded\else\ \fi
505
\WIFfmt{\W@includefile} }
507
\def\WIFfmt#1{[{\tt#1}]}
509
\def\W@startsection{\WQ
518
\WIF@name% Print name of current include file, if there is one.
519
\ifLaTeXisloaded\else\quad\fi
523
\def\W@skipbrace#1{\catcode`\{=1 }
525
\DRC\WC{\W@cmnt{/\ast}{\W@finishcomment}}% Long comment.
526
\DRC\Wc{\W@cmnt{//}{\XX}}% Short comment.
527
\DRC\Wci{\W@cmnt{}{\XX}}% No comment symbol at all; for special effects.
529
\def\W@cmnt#1#2{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi% C-style cmnt
530
\XX\hfil\penalty-1\hfilneg
531
\ifyskip\else\quad\fi$#1\,$%
532
\bgroup\cmntfont % The user can redefine the comment font |\cmntfont|.
534
\catcode`\{=\other\W@skipbrace}
536
\def\W@finishcomment{$\,\ast/$\XX}
538
\def\Wx#1{\kern-0.5\notch\hbox{\tt\%}}
541
\def\WCDIR#1{\WPR?\Wtypewriter{#1}\WPs}
544
\DRC\WCD[1]{\ifmmode\hbox\fi{\ignorespaces#1}}
547
\def\WD#1{\W@defin{@D}{#1}}% Outer macro definition: `\.{@D}'
548
\def\Wd#1{\W@defin{@d}{#1}}% Outer macro definition: `\.{@d}'
549
\def\WUd#1{\W@defin{@u}{#1}}% Undef outer macro: `\.{@u}'.
550
\def\WMD{\W@defin{@M}}% WEB macro definition: `\.{@M}'. Second argument
551
% supplied by \FWEAVE.
552
\def\WMd{\W@defin{@m}}% WEB macro definition: `\.{@m}'. As above.
553
\def\WE#1{\WPR{\##1}}% WEB preprocessor command: `\.{@\#if\dots}'.
555
\def\Wf#1{\W@defin{@f}{#1}}% Format definition: `\.{@f}'.
556
\def\WF#1{\W@defin{@F}{#1}}% Format definition: `\.{@F}'.
558
\def\Wl#1{\W@defin{@l}{#1}}% Limbo text definition: `\.{@l}'.
559
\def\Wv#1{\W@defin{@v}{#1}}% Operator overloading: `\.{@v}'.
560
\def\WWW#1{\W@defin{@W}{#1}}% Identifier overloading: `\.{@W}'.
561
\def\Ww#1{\W@defin{@w}{#1}}% Identifier overloading: `\.{@w}'.
564
\newif\ifpagerefs% Page references or module-number references?
567
\newif\ifnumberTeX% Do we start the \TeX\ part of unnamed sections with
570
\newif\ifnumberdefs% As above, but for the definition part.
573
\newif\ifnumbercode% As above, but for the code part.
576
\newif\ifnumberunnamed% Number unnamed section?
580
\let\Wrefstepcounter\refstepcounter
587
\stripzerostrue % By default, we're bold.
590
\def\W@modequate#1{\def\W@temp{#1}%
591
\ifx\W@temp\empty\else
596
\newcount\W@ssmax% Maximum depth of the \.{@*}$n$ commands.
597
\newcount\W@lsmax% Max. local (per section) depth of the \.{@*}$n$ commands.
599
\def\W@maxdepth#1{{\count0=#1
600
\advance\count0 by\W@ssmin%
601
\xdef\W@depth{\the\count0}}%
602
\ifFWEBstandalone\else
603
\immediate\write\@auxout{\string\@writefile{toc}%
604
{\string\setcounter{tocdepth}{\W@depth}}}%
608
\def\Wunnamed#1#2{\csname ifnumber#1\endcsname
609
\gdef\Wnewoutname{#2}%
610
\ifx\Woutname\Wnewoutname\else
611
\8\Wtypewriter{"#2"} \Wscrap ${}\equiv{}$\6%
612
\global\let\Woutname\Wnewoutname
617
\secpenalty=-500 % Strongly encourage breaks at sections.
637
\def\W@raggedbottom{\def\@textbottom{\vskip\z@ \vfil}%
639
\@secpenalty=\secpenalty
651
\newcounter{subsubsubsection}
653
\gdef\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
655
\gdef\cl@subsubsubsection{\@elt{paragraph}}
656
\gdef\l@subsubsubsection{\@dottedtocline{4}{3.8em}{3.2em}}
657
\gdef\subsubsubsectionmark#1{}
660
\gdef\paragraph{\@startsection{paragraph}{5}{\z@}{3.25ex plus1ex
661
minus.2ex}{-1em}{\reset@font\normalsize\bf}}
664
\gdef\W@setsecdepth{%
665
\@ifundefined{W@depth}{\gdef\W@depth{1}}{}%
666
\setcounter{secnumdepth}{\W@depth}%
667
\setcounter{tocdepth}{\W@depth}%
670
\addtocounter{secnumdepth}{1}%
671
\gdef\WRefstepcounter##1{}%
673
\Wuparindent-\TeXindent
674
\global\let\WRefstepcounter\Wrefstepcounter
676
\ifcase\W@depth % Level 0; should never happen.
678
\def\subsection{\WRefstepcounter{subsection}%
679
\@startsection{subsection}{2}{\z@}{-3.25ex plus-1ex minus-.2ex}{\Wuparindent}
680
{\reset@font \normalsize \bf}}%
681
\let\Wunnamedsect\subsection
682
\def\W@subsect{subsection}%
684
\def\subsubsection{\WRefstepcounter{subsubsection}%
685
\@startsection{subsubsection}{3}{\z@}{-3.25ex plus-1ex minus-.2ex}
686
{\Wuparindent}{\reset@font \normalsize \bf}}%
687
\let\Wunnamedsect\subsubsection
688
\def\W@subsect{subsubsection}%
690
\def\subsubsubsection{%
691
\WRefstepcounter{subsubsubsection}%
692
\@startsection{subsubsubsection}{4}{\z@}{-3.25ex plus-1ex minus-.2ex}
693
{\Wuparindent}{\reset@font \normalsize \bf}}%
694
\let\Wunnamedsect\subsubsubsection
695
\def\W@subsect{subsubsubsection}%
697
\let\Wunnamedsect\paragraph
703
\gdef\Wmodtrans#1{\@ifundefined{r@#1}
704
{\W@split{\##1}{\##1}{0}{0}}
705
{\expandafter\expandafter\expandafter
706
\W@split\csname r@#1\endcsname{#1}}%
710
\gdef\W@split#1#2#3#4{%
712
#2% Just extract the page number.
713
% Add a letter subscript if more than 1 sec. per page.
715
{\setcounter{W@tempcounter}{#4}%
716
\addtocounter{W@tempcounter}{-#3}%
717
\ifnum\value{W@tempcounter}>25 \setcounter{W@tempcounter}{25}\fi
718
\hbox{\alph{W@tempcounter}}}
720
\else % Section-number references (the default).
724
#1% If we gave up and said |\stripzerosfalse|.
731
\def\W@strip#1.#2,{\W@first#1\relax \W@tempc{#1}{#2}}
733
\def\W@first#1#2\relax{%
735
\def\W@tempc##1##2{##1}%
740
\@ifundefined{l@##1}%
742
{\csname l@##1\endcsname}%
749
\def\W@Strip#1#2{\W@STRIP#1\relax{#2}}
752
\def\W@STRIP#1.\relax#2{{%
755
\advance\W@counta by-#2 % How many zeros to strip.
757
\ifnum\W@count<\W@counta
759
\edef\next{\W@tk={\the\W@tk.0}}\next % Build template `\.{.0.0\dots}'.
762
\edef\next{\def\noexpand\reduce####1\the\W@tk####2\eat####3\eat
763
{\noexpand\W@preface{####1}####2}}%
765
\edef\next{\noexpand\reduce#1\eat\the\W@tk\eat\eat\relax}%
769
\global\let\modno\empty
770
\global\let\W@name\empty
772
\def\W@preface#1{#1}% Redefined to |\W@getsection| in fwebinsert.sty.
774
\def\W@getsection#1{%
775
\let\W@Preface\empty% Just in case.
776
\ifcase\W@ssmin\relax
778
\def\W@Preface{\thesection}% Level 0
780
\def\W@Preface{\thesection.#1}% Level 1
782
\def\W@Preface{\thesubsection.#1}% Level 2
784
\def\W@Preface{\thesubsubsection.#1}% Level 3
789
\def\W@xsection#1.#2\relax{\c@section=\Wb@se
790
\advance\c@section by#1}
795
\W@mark{{\oldmodno}{\oldWname}}{{\modno}{\W@name}}%
798
\W@start{\ifnumberTeX\Wmodtrans{\modno}\fi}% ????
799
\advance\W@ss by-10 %
801
\else % No \LaTeX; for \TeX, one just gets module numbers.
804
\outer\def\WM#1.{\WMN#1.\W@mark\ifon\Wskip\W@startsection\ignorespaces}
805
\fi % End of no \LaTeX.
808
\newcount\W@ss % Counter for the dots.
809
\newcount\W@lastsect % Level number of section immediately above.
811
\newif\ifW@dotsafter % Do subsection dots come after or before the section
815
\ifW@dotsafter % ``@* NAME...''
816
\def\W@before/#1.{\W@defname{#1}\W@dot}%
818
\else % ``@*.. NAME.'' or ``@*2 NAME.''
819
\def\W@before/ {\futurelet\next\W@check}%
820
\def\W@fter#1.{\W@defname{#1}\W@Nss}% Done after figuring out level.
821
\def\W@fter@#1#2.{\W@defname{#2}\W@Nss}% |#1| eats the sectionnum.
824
\def\W@check{\ifx\next.\def\next{\W@dot.}% Count arbitrary dots.
825
\else\ifx\next0\W@sectionnum{0}%
826
\else\ifx\next1\W@sectionnum{1}%
827
\else\ifx\next2\W@sectionnum{2}% Highest numerical level (subsubsect.)
828
\else\ifx\next3\W@badlevel{3}%
829
\else\ifx\next4\W@badlevel{4}%
830
\else\ifx\next5\W@badlevel{5}%
831
\else\ifx\next6\W@badlevel{6}%
832
\else\ifx\next7\W@badlevel{7}%
833
\else\ifx\next8\W@badlevel{8}%
834
\else\ifx\next9\W@badlevel{9}%
835
\else\let\next\W@fter
836
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
839
\def\W@badlevel#1{\errhelp=\b@dlevelhelp
840
\errmessage{FWEBMAC WARNING: @*#1 changed to @*2}%
843
\newhelp\b@dlevelhelp{Only the major-section (table-of-contents)
844
commands @* (section), @*1 (subsection), and @*2 (subsubsection) are
847
\def\W@sectionnum#1{\W@ss#1%
848
\advance\W@ss by\W@ssmin
852
\def\W@defname#1{\@ifnextchar[{\W@getname}{\W@getname[#1]}#1.}
854
\def\W@getname[#1]#2.{\gdef\W@name{#1}% Running headline (short name).
855
\gdef\W@longname{#2}}% Remember name of section (used in |\W@start|).
857
\def\W@ssmin{0}% The lowest (top) level.
859
\def\WN#1.{\WMN#1.\W@ss=\W@ssmin \W@before/}% Begin a starred section.
862
\def\W@outlsmax#1{\if@filesw
865
\expandafter\W@major\c@section.\relax
867
\expandafter\W@major\@currentlabel.\relax
869
\advance\W@count by#1
870
\advance\W@count by-1
872
\edef\@tempa{\ifFWEBstandalone
873
\write\@auxout{\string\Lastdepth{\the\W@count}%
883
\def\W@major#1.#2\relax{\W@count=#1}% Get the major section.
886
\edef\@tempc{\gdef\expandafter\noexpand
887
\csname l@#1\endcsname{#2}}%
888
\@tempc% Define something like |\l@1| to be last max depth.
896
\def\W@dot{\futurelet\next\W@Ns}
898
\def\W@Ns{\ifx\next.%
906
\def\W@next#1{\W@dot}
910
\let\Wsectionbreak\relax
912
\def\Wsectionbreak{\ifcase\W@ss\vfil\eject\fi}
915
\def\rhead{\ifcase\W@ss
916
\uppercase{\ignorespaces\W@name}%
918
\ignorespaces\W@name%
919
\fi}% Define running headline.
921
\let\WZ\let % Now one can |\send| the control sequence |\WZ|
922
\let\WIM\let % This macro is made temporarily unexpandable; see |\WZ|.
924
\def\W@Llabel#1{\@bsphack
927
\let\W@botmodno\relax
928
\def\protect{\noexpand\noexpand\noexpand}%
929
\edef\@tempa{\ifFWEBstandalone
930
\write\@auxout{\string\Newlabel{#1}%
931
{{\@currentlabel}{\thepage}}{\W@botmodno}}%
943
\gdef\NoIndex{NoIndex}% Written as arg to |\Wbegin| by \.{-xi}.
946
{\let\protect\noexpand \xdef\Wupn@me{\W@name}}%
949
\onfalse% Don't print section heading.
951
\W@mark{{\oldmodno}{\oldWname}}{{\oldmodno}{\oldWname}}%
953
\else% Emit mark before section break.
954
\W@mark{{\oldmodno}{\oldWname}}{{\modno}{\W@name}}%
956
\message{*\modno}% Progress report to the terminal.
957
\ifon% Start output of named section; explicit |\fi|
959
\global\W@ssmax=\W@ss% Track max depth.
962
\global\W@lsmax=\W@ss% Maximum local depth.
964
\W@start{\W@longname}%
968
\def\steppagemodule{\noexpand\expandafter\expandafter\expandafter
969
{\addtocounter{pagemodule}{1}}\thepagemodule}
975
\ifx\multicols\undefined
985
{\let\protect\noexpand \xdef\Wupn@me{\W@name}}%
986
\ifx\Wupn@me\INDEX\beforeindex\fi
988
\let\Wsect\section % Level 0
991
\let\Wsect\subsection % Level 1
994
\let\Wsect\subsubsection % Level 2
997
\let\Wsect\Wunnamedsect
1002
\Wsect{#1}% Execute LaTeX section heading.
1003
\ifnum\W@ss=0 % Check if major section.
1004
\W@outlsmax{0}% If so, write out |\Lastdepth| command.
1006
\W@mark{{\modno}{\W@name}}{{\modno}{\W@name}}%
1007
\Wlabel{\modno}% Section number to aux file.
1008
\@ifundefined{r@\modno}
1009
{\expandafter\xdef\csname r@\modno\endcsname
1010
{{\@currentlabel}{\thepage}{-1}}}
1011
{}% For present run.
1017
\let\protect\noexpand
1018
\W@mark%Can't put this in |\WMN| since |\rhead| must be defined first.
1019
\Wsectionbreak % Typeset the break between sections.
1020
\message{*\modno}% Progress report to the terminal.
1022
\ifcase\W@ss\else\Wskip\fi
1023
\W@startsection{\bf\ignorespaces\W@name.\quad}%
1025
\edef\next{\write\W@cont{\WZ{\the\W@ss}{\W@name}%
1026
{\modno}{\noexpand\the\pageno}}}\next}%
1027
% To contents file |CONTENTS.tex|.
1034
\def\W@setu#1{\expandafter\def\csname p@\W@subsect\endcsname{#1}
1035
\expandafter\def\csname the\W@subsect\endcsname{\arabic{\W@subsect}}}
1039
\W@setu{\thesection.}%
1041
\W@setu{\thesection\,\thesubsection.}%
1043
\W@setu{\thesection\,\thesubsection\,\thesubsubsection.}%
1051
\def\W@markN{\def\W@mark{{\def\WIN{\WIM}%
1052
\mark{\modno\noexpand\else\rhead}}}}
1054
\ifx\selectfont\undefined
1057
\def\W@mark{{\def\WIN{\WIM}\let\protect\noexpand
1058
\mark{\modno\noexpand\else\rhead}}}
1061
\def\Wmodno{\iftrue\topmark\fi}% Extracts the left-hand part of the mark.
1063
\def\Whead{{\let\WIM\WIN
1064
\expandafter\iffalse\topmark\fi}}% Extracts the right-hand part.
1068
\parskip=\pardimen % Reset to \TeX\ spacing
1069
\parindent=\TeXindent
1071
\global\let\oldmodno\modno
1072
\global\let\oldWname\W@name
1073
\xdef\@currentlabel{\modno}%
1074
\global\let\Woutname\empty
1075
\addtocounter{pagemodule}{1}%
1082
\global\onmaybe% For conditional listing of changed secs.
1084
\global\ontrue% Print this section.
1090
\def\Wscrap{{\footnotesize\Wmodtrans{\modno}%
1091
\ifW@modchanged*\fi}}
1093
{\gdef\@verbatim{\if@minipage \else \vskip \parskip \fi
1095
\@totalleftmargin \rightskip \z@ \parindent \z@ \parfillskip \@flushglue
1096
\parskip \z@ \@@par \@tempswafalse \def \par {\if@tempswa \hbox {}\fi
1098
\@@par \penalty \interlinepenalty }\obeylines \tt \catcode ``=13
1099
\@noligs \let \do \@makeother \dospecials}}
1101
{\catcode`/=0 /catcode`/\=12 /catcode`/^^I=13
1102
/gdef/WBM{%/8/kern/notch
1104
/parindent/W@globalindent/notch /advance/parindent by-1/notch
1105
/def/par{/endgraf/leavevmode}%
1106
/catcode`^^I=13 /def^^I{/leavevmode/penalty10000/ / / / / / / / }%
1107
/catcode``=13 /@noligs /tt
1108
/let/do/@makeother /dospecials
1109
/@vobeyspaces/frenchspacing/obeylines
1111
/gdef/W@M#1\WEM{#1/endgroup}}
1114
\def\WDP#1{\ifx E#1\else{\tt#1}\fi}% Used in the exponent macro below.
1117
{% Make the next definitions local.
1120
\def\\{\let\_\-\let\$\d}%
1122
\let\{\bgroup% Braces are inserted in \Fortran-90 by kind parameter.
1124
\def\###1{\kern0.1em{\tt \ifcase##1F\or L\or U\or UL\else?\fi}}%C~constant.
1125
\def\^##1{\cdot 10^{\aftergroup}\aftergroup\WDP\aftergroup##1}% Power of ten
1126
\def\_{_{\\\rm\aftergroup}}% Fortran-90 kind parameter.
1127
\def\%{{\rm H}\hbox{\aftergroup}\Wtypewriter{\aftergroup}}% Hollerith constant
1128
\def\&{0{\tt b}}% Binary constant.
1129
\def\~{\hbox{\rm\char'23\kern-.2em\it\aftergroup\?\aftergroup}}% Octal
1130
\def\`{\hbox{\rm\char"7D\tt\aftergroup}}% Double quotes for hex constant
1134
\def\WKINDCHAR#1\.#2{%
1135
\hbox{\Wtypewriter{#2}}_{\Wkindids \rm #1}}
1137
\DRC\Wkindids{\def\Wshort##1{##1}%
1142
\def\WPr{\global\W@ind=\W@globalindent \1}
1145
\def\WP{\parskip=0pt \parindent=\notch
1146
\rightskip=0pt plus 100pt minus 10pt
1150
\W@firstbreaktrue % Reset to true by |\6|.
1151
\leavevmode\kern\notch}
1154
\def\WQ{\rightskip=0pt
1155
\sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50 }
1157
\def\Wendd{\par}% End of definition part.
1158
\def\Wendc{\par}% End of code part.
1161
\def\WA{\note{See also}}% Cross-reference for multiply defined section names.
1164
\def\Wauto[#1]{\Wtypewriter{[#1]}\ }
1166
\DRC\WB{\mathopen{\Wtypewriter{@/\ast}}}% Begin controlled comment.
1168
\let\WG\ge % Greater than or equal sign: '$\WG$'.
1170
\DRC\WI{\neq}% Unequal sign: '$\WI$'. (Better reserve |\ne| for the
1171
% electron density~$n_e$.)
1173
\DRC\WJ{\Wtypewriter{@\&}}% TANGLE's join operation: '\WJ'.
1175
\let\WK\gets % Left arrow: '$\WK$'.
1182
\let\WL\le % Less than or equal sign: '$\WL$'.
1184
\let\WLA\langle % Opening of template: '$\WLA$'.
1185
\let\WRA\rangle % Closing of template: '$\WRA$'.
1187
\DRC\WTLD{\Wtypewriter{@\~}}
1189
\def\Wskip{\vfil\penalty-100\vfilneg \vskip12ptminus3pt}% See |\WM|, etc.
1191
\def\Wskipped#1{\8\mathhexbox278.\quad\Wtypewriter{@I "#1"}\ \ {\it Section(s)
1194
\let\WPtr\Rightarrow % Fortran's stupid pointer assignment statement:
1197
\let\WR=\lnot % Logical not: '$\WR$'.
1199
\let\WS=\equiv % Equivalence sign: '$\WS$'.
1200
\let\WSQ=\equiv % This symbol is used when defining a section name.
1202
\DRC\WSl{\ifmmode\mathbin{/}\else/\fi}% Division
1204
\DRC\WT{\mathclose{\Wtypewriter{@\ast/}}}% Terminate controlled comment.
1206
\def\WU{\note{This code is used in}}% Cross-reference for uses of sections.
1209
\let\WV\lor % Logical or: '$\WV$'.
1211
\let\WW=\land % Logical and: '$\WW$'.
1216
\let\footnotesize\eightrm
1219
\def\WX#1#2\X#3\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi
1220
\XX$\langle\,$#2{\footnotesize\kern.5em#1}%
1221
$\,\rangle^{\mathrm{#3}}$\XX}
1232
\DRC\Colon{\ifmmode\colon\else\textcolon\fi}
1234
\DRC\WCC{\mathord{::}}% For C: '$x\WCC y$'.
1235
\DRC\WCF{{}\mathbin{::}{}}% For \Fortran: '$x\WCF y$'.
1239
\DRC\=[1]{\kern2pt\hbox{\vrule\vtop{\vbox{\hrule
1240
\hbox{\strut\kern2pt\Wtypewriter{#1}\kern2pt}}
1241
\hrule}\vrule}\kern2pt}
1246
\let\~=\ignorespaces
1250
\def\WPQ{\mathrel{+\mathord\equiv}}% '$\WPQ$'.
1253
\def\W@LP{(}% Must be |\def|, not |\let|.
1254
\def\W@ISL#1#2]{\def\next{#1}}
1255
\DRC\WEE[1]{\W@ISL#1]\ifx\next\W@LP\WEXP[#1]\else\WEXP[(#1)]\fi}
1256
\def\WEXP[(#1)]{^{#1}}
1260
\DRC\WCMN[2]{\Wtypewriter{/#2/}}
1262
\let\WSlSl\parallel% Concatenation: '$\WSlSl$'.
1264
\DRC\WEQV{\mathrel{?{=}}}% `$x\WEQV y$'.
1265
\DRC\WNEQV{\not\equiv}% `$x\WNEQV y$'.
1268
\DRC\WLS{\mathopen{({/}\,}}
1269
\DRC\WSR{\mathclose{\,{/})}}
1272
\DRC\WFALSE{{\cal F}}% '$\WFALSE$'.
1273
\DRC\WTRUE{{\cal T}}% '$\WTRUE$'.
1276
\def\Wblock#1{\Wc\bgroup\ Block #1\egroup}% `\Wblock{99}'
1279
\def\WNN{\hbox{\#\#}}% '\WNN'.
1280
\def\WNP{\hbox{\#!}}% '\WNP'.
1281
\def\WNC{\hbox{\#:}}% '\WNC'.
1282
\def\WND{\hbox{\#.}}% '\WND'.
1283
\def\WNq{\hbox{\#\tt'}}% '\WNq'.
1284
\def\WNQ{\hbox{\#\tt"}}% '\WNQ'.
1287
\mathchardef\TLD="0218 % '$\TLD$'.
1289
\DRC\WPP{\mathord{++}}% '$\WPP$'.
1290
\DRC\WMM{\mathord{--}}% '$\WMM$'.
1292
\DRC\WMG{\mathord{\to}}% '$\WMG$'.
1294
\DRC\Wcp{\mathrel{+{=}}} \let\PE\Wcp % `$x\PE y$'.
1295
\DRC\Wcm{\mathrel{-{=}}} \let\ME\Wcm % `$x\ME y$'.
1296
\DRC\Wcs{\mathrel{\ast{=}}} \let\TE\Wcs % `$x\Wcs y$'.
1297
\DRC\Wcv{\mathrel{/{=}}} \let\FE\Wcv % `$x\FE y$'.
1298
\DRC\Wcd{\mathrel{\%{=}}} \let\CE\Wcd % `$x\Wcd y$'.
1299
\DRC\Wcx{\mathrel{\^\!{=}}}% `$x\Wcx y$'.
1300
\DRC\Wca{\mathrel{\amp{=}}}% `$x\Wca y$'.
1301
\DRC\Wco{\mathrel{\WOR{=}}}% `$x\Wco y$'.
1302
\DRC\Wcg{\mathrel{\WGG\!{=}}}% `$x\Wcg y$'.
1303
\DRC\Wcl{\mathrel{\WLL\!{=}}}% `$x\Wcl y$'.
1306
\DRC\WMOD{\mathrel{\%}}% `$x\WMOD y$'.
1307
\DRC\WOR{{\,|\,}}% `$x\WOR y$'.
1308
\DRC\WAND{{\,\amp\,}}% `$x\WAND y$.
1310
\DRC\WGG{\mathrel{>\!>}}% `$x\WGG y$'.
1311
\DRC\WLL{\mathrel{<\!<}}% `$x\WLL y$'.
1313
\DRC\WHE{\mathrel{\uparrow=}}% `$x\WHE y$'.
1315
\DRC\Woperator[1]{\Wreserved{operator}~\hbox{$#1$}\ignorespaces}
1316
\DRC\Woperatoro{\Wreserved{operator}~\ignorespaces}
1321
\def\{{\ifmmode\openbraces\else$\openbraces$\fi}
1322
\def\}{\ifmmode\closebraces\else$\closebraces$\fi}
1331
\def\Wunknown#1{\={??#1??}}% For unknown dot constant.
1336
\edef\next{\def\expandafter\noexpand\csname _#1_#2\endcsname}%
1339
\gdef\newbinop#1#2#3{%
1340
\edef\next{\def\expandafter\noexpand\csname _#1_#2\endcsname}%
1341
\next{\mathrel{#3}}}
1343
\gdef\newunop#1#2#3{%
1344
\edef\next{\def\expandafter\noexpand\csname _#1_#2\endcsname}%
1345
\next{\mathbin{#3}}}
1347
\gdef\Wop#1#2{\setbox\dotbox\hbox{\tt .#1.}%
1348
\edef\nxt{\expandafter\noexpand\csname _#1_#2\endcsname}%
1349
\edef\ifnxt{\noexpand\ifx\expandafter\noexpand\csname _#1_#2\endcsname}%
1351
\def\next{\box\dotbox}% Macro not defined; just use \.{.NAME.}.
1353
\def\next{\futurelet\nextchar\W@q}% Be careful about |\WEE|.
1363
\def\W@q{\ifx\nextchar\Lbrace
1364
\let\next\nxt % There's an argument coming up.
1367
\def\next{\nxt{}\equiv\box\dotbox}%
1376
\DRC\WTeX[1]{\ [{\ifmmode\def\XX{}\else\def\XX{\null$\null}\fi
1380
\newtoks\W@ARRAYarga
1381
\newtoks\W@ARRAYargb
1383
\DRC\WXA[1]{\begingroup
1384
\def\Wshort##1{##1}%
1385
\def\Wid##1{\mathit{##1\/\kern.05em}}%
1386
\global\W@ARRAYarga{#1}%
1387
\futurelet\W@next\WARRAYm}
1389
\def\WARRAYm{\ifx\W@next\WXA
1390
\global\let\W@next\WARRAYn% Multiple indices in C: a[i][j][k]
1392
\global\let\W@next\relax
1393
\WARRAY{\the\W@ARRAYarga}% Typeset the accumulated indices.
1398
\def\WARRAYn#1#2{\W@ARRAYargb{#2}%
1399
\edef\W@next{\noexpand\WXA{\the\W@ARRAYarga,\the\W@ARRAYargb}}%Concatenate
1402
\DRC\WARRAY[1]{[#1]}% Default definition.
1403
\DRC\WSUB[1]{_{\scriptstyle#1}}% E.g., subscript indices.
1406
\def\Wouto#1#2{\Wreserved{@#1}\W@Hspace\Wtypewriter{#2}}
1407
\def\Wout#1{\Wouto{o}{#1}}
1408
\def\WOut#1{\Wouto{O}{#1}}
1411
\def\WRCS#1#2{\langle\!\langle\,\Wtypewriter{#2}\,\rangle\!\rangle
1419
\edef\next{\gdef\expandafter\noexpand\csname MOD#1\endcsname{\modno}}%
1423
\def\Wmodule#1{\ifLaTeXisloaded
1426
\csname MOD#1\endcsname
1429
\def\WEBsection#1{section~\Wmodule{#1}}% |\section| is used by \LaTeX.
1430
\def\WEBmodule#1{module~\Wmodule{#1}}
1431
\let\module\WEBmodule% For backward compatibility.
1434
\def\strutdepth{\dp\strutbox}
1436
\def\W@marginal#1{\strut\vadjust{\kern-\strutdepth\W@specialmargin{#1}}}
1438
\def\W@specialmargin#1{\vtop to\strutdepth{
1439
\baselineskip\strutdepth
1440
\vss\llap{#1 }\null}}
1442
\def\LANGUAGE#1{\W@marginal{\smash{\vtop{\hbox{%
1443
\hbox{\tt @L\lowercase{#1}\textcolon\enspace}}\null}}}\ignorespaces}
1449
\def\onmaybe{\let\ifon=\maybe} \let\maybe=\iftrue
1452
\newif\iftitle \newif\ifpagesaved
1454
\newcount\contentspageno
1457
\def\Wmodhd#1{ [#1]}
1460
\W@headerstrue% Stand-alone setting (might be changed in fwebinsert.sty).
1465
\def\Wsecrange##1##2{%
1466
\def\W@tempa{##1}\def\W@tempb{##2}%
1467
\ifx\W@tempa\W@tempb% Equal sec.\ nums; just print one.
1468
\W@S\Wmodtrans{##1}\Wmodhd{\###1}%
1469
\else\ifx\W@tempb\W@seczero
1470
\W@S\Wmodtrans{##1}\Wmodhd{\###1}%
1472
\W@S\Wmodtrans{##1}--\W@S\Wmodtrans{##2}%
1473
\Wmodhd{\###1--\###2}%
1476
\gdef\@leftmark##1##2##3##4{%
1483
\mainfont\Wsecrange{##1}{##3}%
1487
\gdef\@rightmark##1##2##3##4{%
1491
\mainfont\Wsecrange{##1}{##3}\qquad%
1501
\let\protect\@unexpandable@protect
1503
\edef\W@tempb{\expandafter\iftrue\botmark\fi}%
1504
\edef\W@tempa{\expandafter\iffalse\topmark\fi}%
1505
\expandafter\expandafter\expandafter\@leftmark\expandafter\W@tempa\W@tempb{}{}}
1510
\let\protect\@unexpandable@protect
1512
\edef\W@tempb{\expandafter\iftrue\botmark\fi}%
1513
\edef\W@tempa{\expandafter\iffalse\topmark\fi}%
1514
\expandafter\expandafter\expandafter\@rightmark\expandafter\W@tempa%
1517
\gdef\W@markN{\gdef\W@mark####1####2{{\def\WIN{\WIM}%
1518
\mark{####1\noexpand\else####2}}}}
1520
\ifx\selectfont\undefined
1523
\gdef\W@mark##1##2{{%\def\WIN{\WIM}%
1524
\let\protect\@unexpandable@protect
1525
\mark{##1\noexpand\else##2}}}
1531
\def\lheader{\mainfont\the\pageno\eightrm\qquad\Whead\hfill\Wtitle\qquad
1532
\ifnum\pageno=\contentspageno\else
1533
\W@S\mainfont\Wmodno
1536
\def\rheader{\ifnum\pageno=\contentspageno\else
1537
\W@S\mainfont\Wmodno
1539
\eightrm\qquad\Wtitle\hfill\Whead
1540
\qquad\mainfont\the\pageno}
1544
\def\pagewidtho{6.5}% The width of each page
1545
\def\pageheighto{8.7}% The height of each page
1546
\def\fullpageheighto{9}% Page height including headlines
1548
\newdimen\pagewidth \pagewidth\pagewidtho in
1549
\newdimen\pageheight \pageheight\pageheighto in
1550
\newdimen\fullpageheight \fullpageheight\fullpageheighto in
1552
\newdimen\pageshift \pageshift=0in% Shift righthand pages wrt lefthand ones
1554
\def\setpage{\hsize\pagewidth
1560
\setlength{\linewidth}{\pagewidth}
1561
\setlength{\textwidth}{\pagewidth}
1562
\setlength{\textheight}{\pageheight}
1568
\def\magnify#1{\mag=#1
1569
\pagewidth\pagewidtho truein
1570
\pageheight\pageheighto truein
1571
\fullpageheight\fullpageheighto truein
1579
\newif\ifidenticalpageheads
1581
\def\normaloutput#1#2#3{
1582
\ifodd\pageno\hoffset=\pageshift\fi
1585
\vbox to\fullpageheight
1587
\iftitle\global\titlefalse
1588
\else \hbox to\pagewidth
1590
\ifidenticalpageheads#2\else
1592
#3% Pg nos alternate left \& right.
1597
\vfill#1% Parameter |#1| is the page itself.
1600
\global\advance\pageno by1}
1602
\def\W@name{{FWEB} OUTPUT}% This section name is reset by starred sections.
1606
\Woutput\output% Remember \FWEB's definition.
1615
\multiply\hours by 60
1617
\advance\minutes by -\hours
1620
\def\Time{\the\hours\textcolon\ifnum\minutes<10 0\fi\the\minutes}
1622
\def\Date{\ifcase\month\or
1623
January\or February\or March\or April\or May\or June\or
1624
July\or August\or September\or October\or November\or December\fi
1625
\space\number\day, \number\year}
1629
\def\Wtitle{}% Short title for running heads. Can redefine after |\Title|.j
1631
\def\Title{\@ifnextchar[\W@@Title\W@Title}
1632
\def\W@Title#1{\W@@Title[#1]{#1}}
1633
\def\W@@Title[#1]#2{\gdef\Wtitle{{\large\tt#1}}\title{{\ttitlefont#2}}}
1638
\def\topofcontents{}% We use \LaTeX's defaults.
1640
\def\topofcontents{\centerline{\titlefont\Wtitle}
1641
\vfill} % This is the default.
1647
\def\botofcontents{}
1649
\def\botofcontents{\vfill
1656
\pageno=\contentspageno
1658
\contentspageno=0% Default page number for table of contents
1662
\newwrite\W@cont % For the table of contents.
1665
\def\Wfirst#1#2#3#4#5{#1}
1667
\def\W@output{\setcounter{pagemodule}{0}%
1668
\xdef\W@botmodno{\expandafter\Wfirst\botmark}}
1672
\def\Newlabel#1#2#3{%
1674
\@ifundefined{r@#1}{}%
1675
{\@warning {Label `#1' multiply defined}}
1677
\global\@namedef{r@#1}{#2{#3}}% |\@namedef| is from \LaTeX.
1679
\ifnum\W@lpha=\W@ref\global\advance\W@pmcount by1
1682
\edef\next{\gdef\csname W@\the\W@ref\endcsname{}}\next
1698
\outer\def\Wbegin[#1]#2#3#4#5#6#7#8#9{\edef\contentsfile{#5}%
1699
\def\readcontents{\input\contentsfile}%
1704
\def\W@splitprms##1##2[##3;##4]{\def##1{##3}\def##2{##4}}%
1705
\W@splitprms\W@preamble\W@postamble[#8]%
1708
\def\FWEBend{% \LaTeX\ redefines |\end|.
1709
\W@outlsmax{1}% The `1' is because sec. #
1710
% isn't incremented for the module list.
1711
\global\advance\W@ssmax by1
1712
\immediate\write\@auxout{\string\W@maxdepth{\the\W@ssmax}}%
1714
\W@makeatend% Override |\makeatletter|
1718
\else% Insert mode; not stand-alone.
1720
% |\W@ssmin| isn't defined; it's set by |\fweblevel|.
1722
\W@splitprms\W@prma\W@prmb[#1]%
1723
\W@splitprms\W@prmc\W@prmd[#2]%
1725
\edef\W@temp{\noexpand\documentstyle[\W@prma]{\W@prmc}}%
1729
\documentclass[\W@prma]{\W@prmc}%
1730
\usepackage[\W@prmb]{\W@prmd}%
1734
\textwidth\pagewidth
1735
\textheight\pageheight
1740
\date{\today\\[3pt]\Time}%
1741
\pagestyle{myheadings}%
1742
\ifx\c@pagemodule\undefined
1743
\newcounter{pagemodule}%
1744
\newcounter{W@tempcounter}%
1746
\gdef\cl@section{\@elt{subsection}\cl@subsection}
1747
\gdef\cl@subsection{\@elt{subsubsection}\cl@subsubsection}
1748
\gdef\cl@subsubsection{\@elt{subsubsubsection}}
1749
\xdef\normaloutput##1##2##3{\the\output \noexpand\W@output}%
1754
\def\W@mark##1##2{}%
1763
\@input{\jobname.aux}
1764
%|\jobname| is redefined in \.{fwebinsert.sty}.
1769
\immediate\openout\W@cont=\contentsfile
1770
\def\FWEBend{\W@postamble\end}
1774
\W@setboxes{#4}% Set dimensions of backspace boxes.
1777
{\setbox0=\page% The first page is garbage
1778
\global\output{\normaloutput\page\lheader\rheader}%
1786
\def\W@makeatend{\let\W@makeatletter\makeatletter
1787
\def\makeatletter{\def\Newlabel{\W@testdef r}%
1790
\def\W@testdef#1#2#3#4{\def\reserved@a{#3{#4}}%
1791
\expandafter\ifx\csname#1@#2\endcsname
1799
\def\Wch{\note{The following sections were changed by the change file:}
1800
\let\*=\relax}% English!
1803
\newbox\Sbox % Saved box preceding the index
1804
\newbox\Lbox % Lefthand column in the index
1807
\def\startindex{\ifx\multicols\undefined
1810
\begin{multicols}{2}%
1814
\def\startindex{\par\vskip6pt plus 1fil}
1818
\def\Winx{\startindex
1821
\write\W@cont{ }% Ensure that the contents file isn't empty
1822
\closeout\W@cont % The contents information has been fully gathered
1823
\output{\ifpagesaved\normaloutput{\box\Sbox}\lheader\rheader\fi
1824
\global\setbox\Sbox=\page \global\pagesavedtrue}
1825
\pagesavedfalse \eject % Eject the page-so-far and predecessors
1826
\setbox\Sbox\vbox{\unvbox\Sbox}% Take it out of its box
1827
\vsize=\pageheight \advance\vsize by -\ht\Sbox % The remaining height
1828
\hsize=.5\pagewidth \advance\hsize by -10pt
1829
% Column width for the index (20pt between cols)
1830
\parfillskip 0pt plus .6\hsize % Try to avoid almost empty lines
1831
\def\lr{L}% This tells whether the left or right column is next
1832
\output{\if L\lr\global\setbox\Lbox=\page \gdef\lr{R}
1833
\else\normaloutput{\vbox to\pageheight{\box\Sbox\vss
1834
\hbox to\pagewidth{\box\Lbox\hfil\page}}}\lheader\rheader
1835
\global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi}
1837
\outer\def\:##1, {\par\hangindent2em\noindent##1\textcolon\kern1em}% Index
1839
\def\[##1]{$\underline{##1}$}% Underlined index item
1840
\def\(##1){$^{\rm ##1}$}% Language marker
1841
\let\Windexspace\medskip % Spacing between letter groups in index.
1843
{\ifFWEBstandalone\let\glbl\global\else\let\glbl\empty\fi
1844
\glbl\parskip 0pt plus .5pt
1845
\glbl\rightskip0pt plus 2.5em
1846
\glbl\tolerance 10000
1847
\glbl\let\*=\W@lapstar
1848
\glbl\hyphenpenalty 10000
1855
\def\Wfin{\ifx\multicols\undefined\else\end{multicols}\fi}
1862
\ifx\multicols\undefined
1863
\onecolumn% In case of insertions & no module list.
1868
\def\pgfmt#1{\uppercase\expandafter{\romannumeral#1}}
1870
\def\pg#1#2#3{\def\temp{#1}%
1871
\ifx\temp\empty% For the case where \.{idxmerge} hasn't been run.
1885
\def\W@name{Names of the Modules}%
1887
\W@outlsmax{1}% The `1' is because sec. # hasn't been incremented
1888
\edef\next{\noexpand\W@mark{{0}{\INDEX}}
1889
{{0}{\W@name}}}\next
1890
\onecolumn% This also starts a new page.
1891
\edef\next{\noexpand\W@mark{{0}{\W@name}}{{0}{\W@name}}}\next
1892
\parfillskip 0pt plus 1fil
1895
\ifpagesaved\null\vfill\eject\fi % Output a null index column
1896
\if L\lr\else\null\vfill\eject\fi % Finish the current page
1897
\parfillskip 0pt plus 1fil
1898
\edef\rhead{\W@name}%
1899
\output{\normaloutput\page\lheader\rheader}
1902
\def\note##1##2.{\quad{\footnotesize##1 ##2.}}
1903
\def\WU{\note{Used in}}% Cross-reference for uses of sections. English!
1904
\def\:{\par\hangindent 2em}\let\*=*%
1909
\def\Winfo#1#2#3#4{%
1911
\:{{\bf COMMAND LINE\textcolon}\ \ \Wtypewriter{#1}.}\smallskip
1912
\:{{\bf WEB FILE\textcolon}\ \ \Wtypewriter{#2}.}\smallskip
1913
\:{{\bf CHANGE FILE\textcolon}\ \ \Wtypewriter{#3}.}\smallskip
1914
\:{{\bf GLOBAL LANGUAGE\textcolon}\ \ {\rm #4}.}\bigskip
1917
\def\Wkwds{\:{\leavevmode{\bf Global RCS-like keywords\textcolon}}\medskip}
1918
\def\Wkwd#1#2{\:{\leavevmode\quad{\bf \dollar#1\textcolon}\ \ %
1919
\Wtypewriter{"#2"}}}
1925
\def\Wtoc#1{\begingroup
1927
\def\Newlabel##1##2##3{}%
1928
\setcounter{tocdepth}{\W@depth}%
1929
\thispagestyle{empty}%
1930
\def\W@name{Table of Contents}% English!
1931
\edef\next{\noexpand\W@mark{{0}{\W@name}}{{0}{\W@name}}}%
1933
\pagenumbering{roman}%
1938
\edef\next{\noexpand\W@mark{{1}{\W@name}}{{1}{}}}\next
1940
\newpage% Break after TOC.
1942
\pagenumbering{arabic}%
1946
\def\Wcon#1{\newpage
1947
\let\WIM\WIN % Restore the proper definition.
1948
\pageno=\contentspageno
1954
\Wtoc{}% No toc for insertions.
1956
\gdef\Wcon##1{% Redefinition!
1961
\def\Wcon#1{\par\vfill\eject
1962
\rightskip 0pt \hyphenpenalty 50 \tolerance 200
1964
\output{\normaloutput\page\lheader\rheader}
1965
\titletrue % Prepare to output the table of contents
1966
\pageno=\contentspageno
1967
\def\rhead{Table of Contents}% English!
1970
\hbox to\hsize{\hfil Section\hbox to3em{\hss Page}}
1971
\def\WZ##1##2##3##4{\hbox to\hsize{\kern##1em\ignorespaces##2
1972
\leaders\hbox to .5em{.\hfil}\hfil\ ##3\hbox to3em{\hss##4}}}
1973
\let\WIM\WIN % Restore the proper definition.
1974
\readcontents\relax % Read the contents info.
1978
\def\FWEBtoc{\message{! Front Table of Contents is only supported with LaTeX.}}
1985
\ttglue=0.5em plus 0.25em minus 0.15em
1987
\def\ttother{\catcode`\\=\other \catcode`\{=\other \catcode`\}=\other
1988
\catcode`\$=\other \catcode`\&=\other \catcode`\#=\other
1989
\catcode`\%=\other \catcode`\~=\other \catcode`\_=\other
1992
\def\ttverbatim{\begingroup \ttother \obeyspaces \obeylines \tt}
1994
{\obeyspaces\gdef {\ }}
1996
\def\begintt{$$\let\par=\endgraf
1999
\rightskip=-\parindent
2002
\def\Begintt{\bgroup
2006
\rightskip=-\parindent
2012
|gdef|ttfinish#1^^M#2\endtt{#1|vbox{#2}|endgroup$$}%
2013
|gdef|ttFinish#1\Endtt{#1|endgroup|egroup}}
2017
\def\activebar{\catcode`\|=\active}
2020
\gdef\normalbar{\activebar
2025
\gdef\ttbar{\activebar%
2026
{\obeylines\gdef|{\ttverbatim%
2028
\let^^M=\ \let|=\endgroup}}}}