[comp.sources.x] v07i023: AWL -- layout language for widget hierarchies, Part09/17

vixie@wrl.dec.com (Paul Vixie) (05/04/90)

Submitted-by: vixie@wrl.dec.com (Paul Vixie)
Posting-number: Volume 7, Issue 23
Archive-name: awl/part09

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 9 (of 17)."
# Contents:  texinfo.tex.02
# Wrapped by vixie@jove.pa.dec.com on Mon Apr 30 01:25:24 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'texinfo.tex.02' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'texinfo.tex.02'\"
else
echo shar: Extracting \"'texinfo.tex.02'\" \(31296 characters\)
sed "s/^X//" >'texinfo.tex.02' <<'END_OF_FILE'
X\def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}%
X\plainsecheading {#1}\gdef\thissection{#1}%
X\let\rawbackslash=\relax%
X\let\frenchspacing=\relax%
X\edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}%
X\escapechar=`\\%
X\write \contentsfile \temp %
X\unnumbnoderef %
X\penalty 10000 %
X}
X
X\outer\def\subsubsection{\parsearg\subsubsectionzzz}
X\def\subsubsectionzzz #1{\seccheck{subsubsection}%
X\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
X\subsubsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
X\let\rawbackslash=\relax%
X\let\frenchspacing=\relax%
X\edef\temp{{\realbackslash subsubsecentry %
X{#1}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
X\escapechar=`\\%
X\write \contentsfile \temp %
X\donoderef %
X\penalty 10000 %
X}
X
X\outer\def\appendixsubsubsec{\parsearg\appendixsubsubseczzz}
X\def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}%
X\gdef\thissection{#1}\global\advance \subsubsecno by 1 %
X\subsubsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
X\let\rawbackslash=\relax%
X\let\frenchspacing=\relax%
X\edef\temp{{\realbackslash subsubsecentry{#1}%
X{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}%\
X\escapechar=`\\%
X\write \contentsfile \temp %
X\unnumbnoderef %
X\penalty 10000 %
X}
X
X\outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
X\def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}%
X\plainsecheading {#1}\gdef\thissection{#1}%
X\let\rawbackslash=\relax%
X\let\frenchspacing=\relax%
X\edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}%
X\escapechar=`\\%
X\write \contentsfile \temp %
X\unnumbnoderef %
X\penalty 10000 %
X}
X
X% These are variants which are not "outer", so they can appear in @ifinfo.
X\def\infounnumbered{\parsearg\unnumberedzzz}
X\def\infounnumberedsec{\parsearg\unnumberedseczzz}
X\def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
X\def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
X
X\def\infoappendix{\parsearg\appendixzzz}
X\def\infoappendixsec{\parsearg\appendixseczzz}
X\def\infoappendixsubsec{\parsearg\appendixsubseczzz}
X\def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
X
X\def\infochapter{\parsearg\chapterzzz}
X\def\infosection{\parsearg\sectionzzz}
X\def\infosubsection{\parsearg\subsectionzzz}
X\def\infosubsubsection{\parsearg\subsubsectionzzz}
X
X% Define @majorheading, @heading and @subheading
X
X\def\majorheading #1{%
X{\advance\chapheadingskip by 10pt \chapbreak }%
X{\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 200}
X
X\def\chapheading #1{\chapbreak %
X{\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 200}
X
X\def\heading{\parsearg\secheadingi}
X
X% These macros generate a chapter, section, etc. heading only
X% (including whitespace, linebreaking, etc. around it),
X% given all the information in convenient, parsed form.
X
X%%% Args are the skip and penalty (usually negative)
X\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
X
X\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
X
X%%% Define plain chapter starts, and page on/off switching for it
X% Parameter controlling skip before chapter headings (if needed)
X
X\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt
X
X\def\chapbreak{\dobreak \chapheadingskip {-4000}}
X\def\chappager{\par\vfill\supereject}
X\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
X
X\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
X
X\def\CHAPPAGoff{
X\global\let\pchapsepmacro=\chapbreak
X\global\let\pagealignmacro=\chappager}
X
X\def\CHAPPAGon{
X\global\let\pchapsepmacro=\chappager
X\global\let\pagealignmacro=\chappager
X\global\def\HEADINGSon{\HEADINGSsingle}}
X
X\def\CHAPPAGodd{
X\global\let\pchapsepmacro=\chapoddpage
X\global\let\pagealignmacro=\chapoddpage
X\global\def\HEADINGSon{\HEADINGSdouble}}
X
X\CHAPPAGon
X
X\def\CHAPFplain{
X\global\let\chapmacro=\chfplain
X\global\let\unnumbchapmacro=\unnchfplain}
X
X\def\chfplain #1#2{%
X\pchapsepmacro %
X{\chapfonts \line{\rm #2.\enspace #1\hfill}}\bigskip \par\penalty 5000 %
X}
X
X\def\unnchfplain #1{%
X\pchapsepmacro %
X{\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 10000 %
X}
X\CHAPFplain % The default
X
X\def\unnchfopen #1{%
X\chapoddpage {\chapfonts \line{\rm #1\hfill}}\bigskip \par\penalty 10000 %
X}
X
X\def\chfopen #1#2{\chapoddpage {\chapfonts
X\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
X\par\penalty 5000 %
X}
X
X\def\CHAPFopen{
X\global\let\chapmacro=\chfopen
X\global\let\unnumbchapmacro=\unnchfopen}
X
X% Parameter controlling skip before section headings.
X
X\newskip \subsecheadingskip  \subsecheadingskip = 17pt plus 8pt minus 4pt
X\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
X
X\newskip \secheadingskip  \secheadingskip = 21pt plus 8pt minus 4pt
X\def\secheadingbreak{\dobreak \secheadingskip {-1000}}
X
X
X% Section fonts are the base font at magstep2, which produces
X% a size a bit more than 14 points in the default situation.	
X
X\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}}
X\def\plainsecheading #1{\secheadingi {#1}}
X\def\secheadingi #1{{\advance \secheadingskip by \parskip %
X\secheadingbreak}%
X{\secfonts \line{\rm #1\hfill}}%
X\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
X
X
X% Subsection fonts are the base font at magstep1, 
X% which produces a size of 12 points.
X
X\def\subsecheading #1#2#3#4{{\advance \subsecheadingskip by \parskip %
X\subsecheadingbreak}%
X{\subsecfonts \line{\rm#2.#3.#4\enspace #1\hfill}}%
X\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 }
X
X\def\subsubsecfonts{\subsecfonts} % Maybe this should change:
X				  % Perhaps make sssec fonts scaled
X				  % magstep half
X\def\subsubsecheading #1#2#3#4#5{{\advance \subsecheadingskip by \parskip %
X\subsecheadingbreak}%
X{\subsubsecfonts \line{\rm#2.#3.#4.#5\enspace #1\hfill}}%
X\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000}
X
X
X\message{toc printing,}
X
X\def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
X
X\def\finishcontents{%
X\ifnum\pageno>0 %
X\pagealignmacro %
X\immediate\closeout \contentsfile%
X\pageno=-1		% Request roman numbered pages
X\fi}
X
X\outer\def\contents{%
X\finishcontents %
X\unnumbchapmacro{Table of Contents}
X\def\thischapter{Table of Contents}
X{\catcode`\\=0
X\catcode`\{=1		% Set up to handle contents files properly
X\catcode`\}=2
X\catcode`\@=11
X\input \jobname.toc
X}
X\vfill \eject}
X
X\outer\def\summarycontents{%
X\finishcontents %
X\unnumbchapmacro{Summary Table of Contents}
X\def\thischapter{Summary Table of Contents}
X{\catcode`\\=0
X\catcode`\{=1		% Set up to handle contents files properly
X\catcode`\}=2
X\catcode`\@=11
X\def\smallbreak{}
X\def\secentry ##1##2##3##4{}
X\def\subsecentry ##1##2##3##4##5{}
X\def\subsubsecentry ##1##2##3##4##5##6{}
X\def\unnumbsecentry ##1##2{}
X\def\unnumbsubsecentry ##1##2{}
X\def\unnumbsubsubsecentry ##1##2{}
X\let\medbreak=\smallbreak
X\input \jobname.toc
X}
X\vfill \eject}
X
X\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
X
X% These macros generate individual entries in the table of contents
X% The first argument is the chapter or section name.
X% The last argument is the page number.
X% The arguments in between are the chapter number, section number, ...
X
X\def\chapentry #1#2#3{%
X\medbreak
X\line{#2.\space#1\leaders\hbox to 1em{\hss.\hss}\hfill #3}
X}
X
X\def\unnumbchapentry #1#2{%
X\medbreak
X\line{#1\leaders\Dotsbox\hfill #2}
X}
X
X\def\secentry #1#2#3#4{%
X\line{\enspace\enspace#2.#3\space#1\leaders\Dotsbox\hfill#4}
X}
X
X\def\unnumbsecentry #1#2{%
X\line{\enspace\enspace#1\leaders\Dotsbox\hfill #2}
X}
X
X\def\subsecentry #1#2#3#4#5{%
X\line{\enspace\enspace\enspace\enspace
X#2.#3.#4\space#1\leaders\Dotsbox\hfill #5}
X}
X
X\def\unnumbsubsecentry #1#2{%
X\line{\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
X}
X
X\def\subsubsecentry #1#2#3#4#5#6{%
X\line{\enspace\enspace\enspace\enspace\enspace\enspace
X#2.#3.#4.#5\space#1\leaders\Dotsbox\hfill #6}
X}
X
X\def\unnumbsubsubsecentry #1#2{%
X\line{\enspace\enspace\enspace\enspace\enspace\enspace#1\leaders\Dotsbox\hfill #2}
X}
X
X\message{environments,}
X
X% Since these characters are used in examples, it should be an even number of 
X% \tt widths. Each \tt character is 1en, so two makes it 1em.
X% Furthermore, these definitions must come after we define our fonts.
X\newbox\dblarrowbox    \newbox\longdblarrowbox
X\newbox\pushcharbox    \newbox\bullbox
X\newbox\equivbox       \newbox\errorbox
X
X\let\ptexequiv = \equiv
X
X{\tentt
X\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
X\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
X\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
X\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
X% Adapted from the manmac format (p.420 of TeXbook)
X\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
X                                      depth .1ex\hfil}
X}
X
X\def\point{$\star$}
X
X\def\result{\leavevmode\raise.15ex\copy\dblarrowbox}
X\def\expansion{\leavevmode\raise.1ex\copy\longdblarrowbox}
X\def\print{\leavevmode\lower.1ex\copy\pushcharbox}
X
X\def\equiv{\leavevmode\lower.1ex\copy\equivbox}
X
X\def\bull{\leavevmode\copy\bullbox}
X
X% Adapted from the TeXbook's \boxit.
X\dimen0 = 3em % Width of the box.
X\dimen2 = .55pt % Thickness of rules
X% The text. (`r' is open on the right, `e' somewhat less so on the left.)
X\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
X
X\global\setbox\errorbox=\hbox to \dimen0{\hfil
X   \vbox{\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
X      \advance\hsize by -2\dimen2 % Rules.
X      \hrule height\dimen2
X      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
X         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
X         \kern3pt\vrule width\dimen2}% Space to right.
X      \hrule height\dimen2}
X    \hfil}
X
X% The @error{} command.
X\def\error{\leavevmode\lower.7ex\copy\errorbox}
X
X% Temporary aliases for old input.
X\let\dblarrow=\result
X\let\longdblarrow=\expandsto
X
X% @tex ... @end tex    escapes into raw Tex temporarily.
X% One exception: @ is still an escape character, so that @end tex works.
X% But \@ or @@ will get a plain tex @ character.
X
X\def\tex{\begingroup
X\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
X\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
X\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
X\catcode `\%=14
X\catcode`\"=12
X\catcode`\==12
X\catcode`\|=12
X\catcode`\<=12
X\catcode`\>=12
X\escapechar=`\\
X%
X\let\{=\ptexlbrace
X\let\}=\ptexrbrace
X\let\.=\ptexdot
X\let\*=\ptexstar
X\def\@={@}%
X\let\bullet=\ptexbullet
X\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
X\let\L=\ptexL
X%
X\let\Etex=\endgroup}
X
X% Define @lisp ... @endlisp.
X% @lisp does a \begingroup so it can rebind things,
X% including the definition of @endlisp (which normally is erroneous).
X
X% Amount to narrow the margins by for @lisp.
X\newskip\lispnarrowing \lispnarrowing=0.4in
X
X% This is the definition that ^M gets inside @lisp
X% phr: changed space to \null, to avoid overfull hbox problems.
X{\obeyspaces%
X\gdef\lisppar{\null\endgraf}}
X
X% Cause \obeyspaces to make each Space cause a word-separation
X% rather than the default which is that it acts punctuation.
X% This is because space in tt font looks funny.
X{\obeyspaces %
X\gdef\sepspaces{\def {\ }}}
X
X\newskip\aboveenvskipamount \aboveenvskipamount= 0pt
X\def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip
X\endgraf \ifdim\lastskip<\aboveenvskipamount
X\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}}
X
X\def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount
X\removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}
X
X\def\lisp{\aboveenvbreak\begingroup\inENV %This group ends at the end of the @lisp body
X\hfuzz=12truept % Don't be fussy
X% Make spaces be word-separators rather than space tokens.
X\sepspaces %
X% Single space lines
X\singlespace %
X% The following causes blank lines not to be ignored
X% by adding a space to the end of each line.
X\let\par=\lisppar
X\def\Elisp{\endgroup\afterenvbreak}%
X\parskip=0pt
X\advance \leftskip by \lispnarrowing
X\parindent=0pt
X\let\exdent=\internalexdent
X\obeyspaces \obeylines \tt \rawbackslash
X\def\next##1{}\next}
X
X
X\let\example=\lisp
X\def\Eexample{\Elisp}
X
X\let\smallexample=\lisp
X\def\Esmallexample{\Elisp}
X
X% Macro for 9 pt. examples, necessary to print with 5" lines.
X% From Pavel@xerox.  This is not really used unless the
X% @smallbook command is given.
X
X\def\smalllispx{\aboveenvbreak\begingroup\inENV
X%			This group ends at the end of the @lisp body
X\hfuzz=12truept % Don't be fussy
X% Make spaces be word-separators rather than space tokens.
X\sepspaces %
X% Single space lines
X\singlespace %
X% The following causes blank lines not to be ignored
X% by adding a space to the end of each line.
X\let\par=\lisppar
X\def\Esmalllisp{\endgroup\afterenvbreak}%
X\parskip=0pt
X\advance \leftskip by \lispnarrowing
X\parindent=0pt
X\let\exdent=\internalexdent
X\obeyspaces \obeylines \ninett \rawbackslash
X\def\next##1{}\next}
X
X% This is @display; same as @lisp except use roman font.
X
X\def\display{\begingroup\inENV %This group ends at the end of the @display body
X\aboveenvbreak
X% Make spaces be word-separators rather than space tokens.
X\sepspaces %
X% Single space lines
X\singlespace %
X% The following causes blank lines not to be ignored
X% by adding a space to the end of each line.
X\let\par=\lisppar
X\def\Edisplay{\endgroup\afterenvbreak}%
X\parskip=0pt
X\advance \leftskip by \lispnarrowing
X\parindent=0pt
X\let\exdent=\internalexdent
X\obeyspaces \obeylines
X\def\next##1{}\next}
X
X% This is @format; same as @lisp except use roman font and don't narrow margins
X
X\def\format{\begingroup\inENV %This group ends at the end of the @format body
X\aboveenvbreak
X% Make spaces be word-separators rather than space tokens.
X\sepspaces %
X\singlespace %
X% The following causes blank lines not to be ignored
X% by adding a space to the end of each line.
X\let\par=\lisppar
X\def\Eformat{\endgroup\afterenvbreak}
X\parskip=0pt \parindent=0pt
X\obeyspaces \obeylines
X\def\next##1{}\next}
X
X% @flushleft and @flushright
X
X\def\flushleft{\begingroup\inENV %This group ends at the end of the @format body
X\aboveenvbreak
X% Make spaces be word-separators rather than space tokens.
X\sepspaces %
X% The following causes blank lines not to be ignored
X% by adding a space to the end of each line.
X% This also causes @ to work when the directive name
X% is terminated by end of line.
X\let\par=\lisppar
X\def\Eflushleft{\endgroup\afterenvbreak}%
X\parskip=0pt \parindent=0pt
X\obeyspaces \obeylines
X\def\next##1{}\next}
X
X\def\flushright{\begingroup\inENV %This group ends at the end of the @format body
X\aboveenvbreak
X% Make spaces be word-separators rather than space tokens.
X\sepspaces %
X% The following causes blank lines not to be ignored
X% by adding a space to the end of each line.
X% This also causes @ to work when the directive name
X% is terminated by end of line.
X\let\par=\lisppar
X\def\Eflushright{\endgroup\afterenvbreak}%
X\parskip=0pt \parindent=0pt
X\advance \leftskip by 0pt plus 1fill
X\obeyspaces \obeylines
X\def\next##1{}\next}
X
X% @quotation - narrow the margins.
X
X\def\quotation{\begingroup\inENV %This group ends at the end of the @quotation body
X{\parskip=0pt  % because we will skip by \parskip too, later
X\aboveenvbreak}%
X\singlespace
X\parindent=0pt
X\def\Equotation{\par\endgroup\afterenvbreak}%
X\advance \rightskip by \lispnarrowing 
X\advance \leftskip by \lispnarrowing}
X
X\message{defuns,}
X% Define formatter for defuns
X% First, allow user to change definition object font (\df) internally
X\def\setdeffont #1 {\csname DEF#1\endcsname}
X
X\newskip\defbodyindent \defbodyindent=.4in
X\newskip\defargsindent \defargsindent=50pt
X\newskip\deftypemargin \deftypemargin=12pt
X\newskip\deflastargmargin \deflastargmargin=18pt
X
X\newcount\parencount
X% define \functionparens, which makes ( and ) and & do special things.
X% \functionparens affects the group it is contained in.
X\def\activeparens{%
X\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
X\catcode`\[=\active \catcode`\]=\active}
X{\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
X\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
X\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
X
X% Definitions of (, ) and & used in args for functions.
X% This is the definition of ( outside of all parentheses.
X\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
X\global\advance\parencount by 1 }
X%
X% This is the definition of ( when already inside a level of parens.
X\gdef\opnested{\char`\(\global\advance\parencount by 1 }
X%
X\gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
X% also in that case restore the outer-level definition of (.
X\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
X\global\advance \parencount by -1 }
X% If we encounter &foo, then turn on ()-hacking afterwards
X\gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
X%
X\gdef\normalparens{\boldbrax\let&=\ampnr}
X} % End of definition inside \activeparens
X%% These parens (in \boldbrax) actually are a little bolder than the
X%% contained text.  This is especially needed for [ and ]
X\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
X\def\lbrb{{\tt\char`\[}} \def\rbrb{{\tt\char`\]}}
X
X% First, defname, which formats the header line itself.
X% #1 should be the function name.
X% #2 should be the type of definition, such as "Function".
X
X\def\defname #1#2{%
X\leftskip = 0in  %
X\noindent        %
X\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
X\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
X\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
X\parshape 2 0in \dimen0 \defargsindent \dimen1     %
X% Now output arg 2 ("Function" or some such)
X% ending at \deftypemargin from the right margin,
X% but stuck inside a box of width 0 so it does not interfere with linebreaking
X\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}%
X\tolerance=10000 \hbadness=10000    % Make all lines underfull and no complaints
X{\df #1}\enskip        % Generate function name
X}
X
X% Actually process the body of a definition
X% #1 should be the terminating control sequence, such as \Edefun.
X% #2 should be the "another name" control sequence, such as \defunx.
X% #3 should be the control sequence that actually processes the header,
X%    such as \defunheader.
X
X\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
X\medbreak %
X% Define the end token that this defining construct specifies
X% so that it will exit this group.
X\def#1{\endgraf\endgroup\medbreak}%
X\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
X\parindent=0in \leftskip=\defbodyindent \rightskip=\defbodyindent %
X\begingroup\obeylines\activeparens\spacesplit#3}
X
X\def\defmethparsebody #1#2#3#4 {\begingroup\inENV %
X\medbreak %
X% Define the end token that this defining construct specifies
X% so that it will exit this group.
X\def#1{\endgraf\endgroup\medbreak}%
X\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
X\parindent=0in \leftskip=\defbodyindent \rightskip=\defbodyindent %
X\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
X
X% Split up #2 at the first space token.
X% call #1 with two arguments:
X%  the first is all of #2 before the space token,
X%  the second is all of #2 after that space token.
X% If #2 contains no space token, all of it is passed as the first arg
X% and the second is passed as empty.
X
X{\obeylines
X\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
X\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
X\ifx\relax #3%
X#1{#2}{}\else #1{#2}{#3#4}\fi}}
X
X% So much for the things common to all kinds of definitions.
X
X% Define @defun.
X
X% First, define the processing that is wanted for arguments of \defun
X% Use this to expand the args and terminate the paragraph they make up
X
X\def\defunargs #1{\functionparens \sl
X% Expand, preventing hyphenation at `-' chars.
X% Note that groups don't affect changes in \hyphenchar.
X\hyphenchar\sl=0
X#1%
X\hyphenchar\sl=45
X\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
X\interlinepenalty=10000
X\endgraf\vskip -\parskip \penalty 10000}
X
X% Do complete processing of one @defun or @defunx line already parsed.
X
X% @deffn Command forward-char nchars
X
X\def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
X
X\def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
X\begingroup\defname {#2}{#1}\defunargs{#3}\endgroup}
X
X% @defun == @deffn Function
X
X\def\defun{\defparsebody\Edefun\defunx\defunheader}
X
X\def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
X\begingroup\defname {#1}{Function}%
X\defunargs {#2}\endgroup %
X}
X
X% @defmac == @deffn Macro
X
X\def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
X
X\def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
X\begingroup\defname {#1}{Macro}%
X\defunargs {#2}\endgroup %
X}
X
X% @defspec == @deffn Special Form
X
X\def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
X
X\def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
X\begingroup\defname {#1}{Special form}%
X\defunargs {#2}\endgroup %
X}
X
X% This definition is run if you use @defunx
X% anywhere other than immediately after a @defun or @defunx.
X
X\def\deffnx #1 {\errmessage{@deffnx in invalid context}}
X\def\defunx #1 {\errmessage{@defunx in invalid context}}
X\def\defmacx #1 {\errmessage{@defmacx in invalid context}}
X\def\defspecx #1 {\errmessage{@defspecx in invalid context}}
X
X% @defmethod, and so on
X
X% @defop {Funny Method} foo-class frobnicate argument
X
X\def\defop #1 {\def\defoptype{#1}%
X\defmethparsebody\Edefop\defopx\defopheader}
X
X\def\defopheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% Make entry in function index
X\begingroup\defname {#2}{\defoptype{} on #1}%
X\defunargs {#3}\endgroup %
X}
X
X% @defmethod == @defop Method
X
X\def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
X
X\def\defmethodheader #1#2#3{\dosubind {fn}{\code{#2}}{on #1}% entry in function index
X\begingroup\defname {#2}{Operation on #1}%
X\defunargs {#3}\endgroup %
X}
X
X% @defcv {Class Option} foo-class foo-flag
X
X\def\defcv #1 {\def\defcvtype{#1}%
X\defmethparsebody\Edefcv\defcvx\defcvheader}
X
X\def\defcvarheader #1#2#3{%
X\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
X\begingroup\defname {#2}{\defcvtype of #1}%
X\defvarargs {#3}\endgroup %
X}
X
X% @defivar == @defcv {Instance Variable}
X
X\def\defivar{\defmethparsebody\Edefivar\defivarx\defivarheader}
X
X\def\defivarheader #1#2#3{%
X\dosubind {vr}{\code{#2}}{of #1}% Make entry in var index
X\begingroup\defname {#2}{Instance variable of #1}%
X\defvarargs {#3}\endgroup %
X}
X
X% These definitions are run if you use @defmethodx, etc.,
X% anywhere other than immediately after a @defmethod, etc.
X
X\def\defopx #1 {\errmessage{@defopx in invalid context}}
X\def\defmethodx #1 {\errmessage{@defmethodx in invalid context}}
X\def\defcvx #1 {\errmessage{@defcvx in invalid context}}
X\def\defivarx #1 {\errmessage{@defivarx in invalid context}}
X
X% Now @defvar
X
X% First, define the processing that is wanted for arguments of @defvar.
X% This is actually simple: just print them in roman.
X% This must expand the args and terminate the paragraph they make up
X\def\defvarargs #1{\normalparens #1%
X\interlinepenalty=10000
X\endgraf\vskip -\parskip \penalty 10000}
X
X% @defvr Counter foo-count
X
X\def\defvr{\defmethparsebody\Edefvr\defvrx\defvrheader}
X
X\def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
X\begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
X
X% @defvar == @defvr Variable
X
X\def\defvar{\defparsebody\Edefvar\defvarx\defvarheader}
X
X\def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
X\begingroup\defname {#1}{Variable}%
X\defvarargs {#2}\endgroup %
X}
X
X% @defopt == @defvr {User Option}
X
X\def\defopt{\defparsebody\Edefopt\defoptx\defoptheader}
X
X\def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
X\begingroup\defname {#1}{User Option}%
X\defvarargs {#2}\endgroup %
X}
X
X% This definition is run if you use @defvarx
X% anywhere other than immediately after a @defvar or @defvarx.
X
X\def\defvrx #1 {\errmessage{@defvrx in invalid context}}
X\def\defvarx #1 {\errmessage{@defvarx in invalid context}}
X\def\defoptx #1 {\errmessage{@defoptx in invalid context}}
X
X% Now define @deftp
X% Args are printed in bold, a slight difference from @defvar.
X
X\def\deftpargs #1{\bf \defvarargs{#1}}
X
X% @deftp Class window height width ...
X
X\def\deftp{\defmethparsebody\Edeftp\deftpx\deftpheader}
X
X\def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
X\begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
X
X% This definition is run if you use @deftpx, etc
X% anywhere other than immediately after a @deftp, etc.
X
X\def\deftpx #1 {\errmessage{@deftpx in invalid context}}
X
X\message{cross reference,}
X% Define cross-reference macros
X\newwrite \auxfile
X
X% \setref{foo} defines a cross-reference point named foo.
X
X\def\setref#1{%
X\dosetq{#1-pg}{Ypagenumber}%
X\dosetq{#1-snt}{Ysectionnumberandtype}}
X
X\def\unnumbsetref#1{%
X\dosetq{#1-pg}{Ypagenumber}%
X\dosetq{#1-snt}{Ynothing}}
X
X% \xref and \pxref generate cross references to specified points.
X
X\def\pxref #1{see \xrefX [#1,,,,,,,]}
X\def\xref #1{See \xrefX [#1,,,,,,,]}
X\def\ref #1{\xrefX [#1,,,,,,,]}
X\def\xrefX [#1,#2,#3,#4,#5,#6]{%
X\setbox1=\hbox{\i{\losespace#5{}}}%
X\setbox0=\hbox{\losespace#3{}}%
X\ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
X\ifdim \wd1 >0pt%
section `\unhbox0' in \unhbox1%
X\else%
X\refx{#1-snt}, `\unhbox0', page\tie \refx{#1-pg}%
X\fi }
X
X% \dosetq is the interface for calls from other macros
X
X\def\dosetq #1#2{{\let\folio=0%
X\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
X\next}}
X
X% \internalsetq {foo}{page} expands into CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
X% When the aux file is read, ' is the escape character
X
X\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
X
X% Things to be expanded by \internalsetq
X
X\def\Ypagenumber{\folio}
X
X\def\Ynothing{}
X
X\def\Ysectionnumberandtype{%
X\ifnum\secno=0 chapter\xreftie\the\chapno %
X\else \ifnum \subsecno=0 section\xreftie\the\chapno.\the\secno %
X\else \ifnum \subsubsecno=0 %
section\xreftie\the\chapno.\the\secno.\the\subsecno %
X\else %
section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
X\fi \fi \fi }
X
X\gdef\xreftie{'tie}
X
X% Define @refx to reference a specific cross-reference string.
X
X\def\refx#1{%
X{%
X\expandafter\ifx\csname X#1\endcsname\relax
X% If not defined, say something at least.
X\expandafter\gdef\csname X#1\endcsname {$\langle$un\-def\-in\-ed$\rangle$}%
X\message {WARNING: Cross-reference "#1" used but not yet defined}%
X\message {}%
X\fi %
X\csname X#1\endcsname %It's defined, so just use it.
X}}
X
X% Read the last existing aux file, if any.  No error if none exists.
X
X% This is the macro invoked by entries in the aux file.
X\def\xrdef #1#2{
X{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}}
X
X{
X\catcode `\^^@=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\^^C=\other
X\catcode `\^^D=\other
X\catcode `\^^E=\other
X\catcode `\^^F=\other
X\catcode `\^^G=\other
X\catcode `\^^H=\other
X\catcode `\=\other
X\catcode `\^^L=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\=\other
X\catcode `\^^[=\other
X\catcode `\^^\=\other
X\catcode `\^^]=\other
X\catcode `\^^^=\other
X\catcode `\^^_=\other
X\catcode `\@=\other
X\catcode `\^=\other
X\catcode `\~=\other
X\catcode `\[=\other
X\catcode `\]=\other
X\catcode`\"=\other
X\catcode`\_=\other
X\catcode`\|=\other
X\catcode`\<=\other
X\catcode`\>=\other
X\catcode `\$=\other
X\catcode `\#=\other
X\catcode `\&=\other
X
X% the aux file uses ' as the escape.
X% Turn off \ as an escape so we do not lose on
X% entries which were dumped with control sequences in their names.
X% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
X% Reference to such entries still does not work the way one would wish,
X% but at least they do not bomb out when the aux file is read in.
X
X\catcode `\{=1 \catcode `\}=2
X\catcode `\%=\other
X\catcode `\'=0
X\catcode `\\=\other
X
X'openin 1 'jobname.aux
X'ifeof 1 'else 'closein 1 'input 'jobname.aux
X'fi
X}
X
X% Open the new aux file.  Tex will close it automatically at exit.
X
X\openout \auxfile=\jobname.aux
X
X% Footnotes.
X
X\newcount \footnoteno
X
X\def\supereject{\par\penalty -20000\footnoteno =0 }
X
X\let\ptexfootnote=\footnote
X
X{\catcode `\@=11
X\gdef\footnote{\global\advance \footnoteno by \@ne
X\edef\thisfootno{$^{\the\footnoteno}$}%
X\let\@sf\empty
X\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
X\thisfootno\@sf\parsearg\footnotezzz}
X
X\gdef\footnotezzz #1{\insert\footins{
X\interlinepenalty\interfootnotelinepenalty
X\splittopskip\ht\strutbox % top baseline for broken footnotes
X\splitmaxdepth\dp\strutbox \floatingpenalty\@MM
X\leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip
X\footstrut\hang\textindent{\thisfootno}#1\strut}}
X
X}%end \catcode `\@=11
X
X% End of control word definitions.
X
X\message{and turning on texinfo input format.}
X
X\newindex{cp}
X\newcodeindex{fn}
X\newcodeindex{vr}
X\newcodeindex{tp}
X\newcodeindex{ky}
X\newcodeindex{pg}
X
X% Set some numeric style parameters, for 8.5 x 11 format.
X
X\hsize = 6.5in
X\parindent 15pt
X\parskip 18pt plus 1pt
X\baselineskip 15pt
X\advance\topskip by 1.2cm
X
X% Prevent underfull vbox error messages.
X\vbadness=10000
X
X% Use @smallbook to reset parameters for 7x9.5 format
X\def\smallbook{
X\global\lispnarrowing = 0.3in
X\global\baselineskip 12pt
X\global\parskip 3pt plus 1pt
X\global\hsize = 5in
X\global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
X\global\vsize=7.5in
X\global\tolerance=700
X\global\hfuzz=1pt
X
X\global\pagewidth=\hsize
X\global\pageheight=\vsize
X\global\font\ninett=cmtt9
X
X\global\let\smalllisp=\smalllispx
X\global\let\smallexample=\smalllispx
X\global\def\Esmallexample{\Esmalllisp}
X}
X
X%% For a final copy, take out the rectangles
X%% that mark overfull boxes (in case you have decided
X%% that the text looks ok even though it passes the margin).
X\def\finalout{\overfullrule=0pt}
X
X% Turn off all special characters except @
X% (and those which the user can use as if they were ordinary)
X% Define certain chars to be always in tt font.
X
X\catcode`\"=\active
X\def\activedoublequote{{\tt \char '042}}
X\let"=\activedoublequote
X\catcode`\~=\active
X\def~{{\tt \char '176}}
X\chardef\hat=`\^
X\catcode`\^=\active
X\def^{{\tt \hat}}
X\catcode`\_=\active
X\def_{{\tt \char '137}}
X\catcode`\|=\active
X\def|{{\tt \char '174}}
X\chardef \less=`\<
X\catcode`\<=\active
X\def<{{\tt \less}}
X\chardef \gtr=`\>
X\catcode`\>=\active
X\def>{{\tt \gtr}}
X\catcode`\+=\active
X\def+{{\tt \char 43}}
X
X\catcode`\@=0
X
X% \rawbackslashxx output one backslash character in current font
X{\catcode`\\=\other
X@gdef@rawbackslashxx{\}}
X
X% \rawbackslash redefines \ as input to do \rawbackslashxx.
X{\catcode`\\=\active
X@gdef@rawbackslash{@let\=@rawbackslashxx }}
X
X% \normalbackslash outputs one backslash in fixed width font.
X\def\normalbackslash{{\tt\rawbackslashxx}}
X
X% Say @foo, not \foo, in error messages.
X\escapechar=`\@
X
X%% These look ok in all fonts, so just make them not special.  The @rm below
X%% makes sure that the current font starts out as the newly loaded cmr10
X\catcode`\$=\other \catcode`\%=\other \catcode`\&=\other \catcode`\#=\other
X
X\catcode`\\=\active
X@let\=@normalbackslash
X@catcode`@==@active
X@def={{@tt @char 61}}
X
X@textfonts
X@rm
END_OF_FILE
echo shar: 15 control characters may be missing from \"'texinfo.tex.02'\"
if test 31296 -ne `wc -c <'texinfo.tex.02'`; then
    echo shar: \"'texinfo.tex.02'\" unpacked with wrong size!
fi
# end of 'texinfo.tex.02'
fi
echo shar: End of archive 9 \(of 17\).
cp /dev/null ark9isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 17 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.