OSDN Git Service

Move language subdirectory Makefile processing into configure.lang.
[pf3gnuchains/gcc-fork.git] / gcc / texinfo.tex
index 23af398..4735701 100644 (file)
@@ -1,5 +1,5 @@
 %% TeX macros to handle Texinfo files.
-%% $Id: texinfo.tex,v 2.197 1997/04/26 23:22:03 karl Exp $
+%% $Id: texinfo.tex,v 2.203 1997/06/05 22:04:25 karl Exp karl $
 
 %  Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
 %                94, 95, 96, 97 Free Software Foundation, Inc.
@@ -36,7 +36,7 @@
 
 % This automatically updates the version number based on RCS.
 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision: 2.197 $
+\deftexinfoversion$Revision: 2.203 $
 \message{Loading texinfo package [Version \texinfoversion]:}
 
 % If in a .fmt file, print the version number
 % \onepageout takes a vbox as an argument.  Note that \pagecontents
 % does insertions, but you have to call it yourself.
 \def\onepageout#1{%
-  \ifcropmarks
-    \hoffset = 0pt
-  \else
-    \hoffset = \normaloffset
-  \fi
+  \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
   %
   \ifodd\pageno  \advance\hoffset by \bindingoffset
   \else \advance\hoffset by -\bindingoffset\fi
     \normalturnoffactive  % \ in index entries must not stay \, e.g., if
                    % the page break happens to be in the middle of an example.
     \shipout\vbox{%
-      \ifcropmarks
-        \vbox to \outervsize\bgroup
-          \hsize = \outerhsize
-          \vbox{\line{\ewtop\hfill\ewtop}}%
-          \nointerlineskip
-          \line{%
-            \vbox{\moveleft\cornerthick\nstop}%
-            \hfill
-            \vbox{\moveright\cornerthick\nstop}%
-          }%
-          \vskip\topandbottommargin
+      \ifcropmarks \vbox to \outervsize\bgroup
+        \hsize = \outerhsize
+        \line{\ewtop\hfil\ewtop}%
+        \nointerlineskip
+        \line{%
+          \vbox{\moveleft\cornerthick\nstop}%
+          \hfill
+          \vbox{\moveright\cornerthick\nstop}%
+        }%
+        \vskip\topandbottommargin
+        \line\bgroup
+          \hfil % center the page within the outer (page) hsize.
+          \ifodd\pageno\hskip\bindingoffset\fi
+          \vbox\bgroup
       \fi
       %
       \unvbox\headlinebox
       \unvbox\footlinebox
       %
       \ifcropmarks
-          \vskip\topandbottommargin plus1fill minus1fill
-          \boxmaxdepth = \cornerthick
-          \line{%
-            \vbox{\moveleft\cornerthick\nsbot}%
-            \hfill
-            \vbox{\moveright\cornerthick\nsbot}%
-          }%
-          \nointerlineskip
-          \vbox{\line{\ewbot\hfill\ewbot}}%
-        \egroup % \vbox from first cropmarks clause
+          \egroup % end of \vbox\bgroup
+        \hfil\egroup % end of (centering) \line\bgroup
+        \vskip\topandbottommargin plus1fill minus1fill
+        \boxmaxdepth = \cornerthick
+        \line{%
+          \vbox{\moveleft\cornerthick\nsbot}%
+          \hfill
+          \vbox{\moveright\cornerthick\nsbot}%
+        }%
+        \nointerlineskip
+        \line{\ewbot\hfil\ewbot}%
+      \egroup % \vbox from first cropmarks clause
       \fi
-    }%
-    }%
+    }% end of \shipout\vbox
+  }% end of group with \turnoffactive
   \advancepageno
   \ifnum\outputpenalty>-20000 \else\dosupereject\fi
 }
 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
 }
 
-%
 % Here are the rules for the cropmarks.  Note that they are
 % offset so that the space between them is truly \outerhsize or \outervsize
 % (P. A. MacKay, 12 November, 1986)
@@ -1041,8 +1041,9 @@ where each line of input produces a line of output.}
 % We don't need math for this one.
 \def\ttsl{\tenttsl}
 
-%% Try out Computer Modern fonts at \magstephalf
-\let\mainmagstep=\magstephalf
+% Use Computer Modern fonts at \magstephalf (11pt).
+\newcount\mainmagstep
+\mainmagstep=\magstephalf
 
 % Set the font macro #1 to the font named #2, adding on the
 % specified font prefix (normally `cm').
@@ -1271,8 +1272,6 @@ where each line of input produces a line of output.}
 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
 
 \let\file=\samp
-\let\url=\samp % perhaps include a hypertex \special eventually
-\def\email#1{$\langle${\tt #1}$\rangle$}
 
 % @code is a modification of @t,
 % which makes spaces the same size as normal in the surrounding text.
@@ -1325,7 +1324,7 @@ where each line of input produces a line of output.}
 
 \def\realdash{-}
 \def\codedash{-\discretionary{}{}{}}
-\def\codeunder{\normalunderscore\discretionary{}{}{}}
+\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
 \def\codex #1{\tclose{#1}\endgroup}
 
 %\let\exp=\tclose  %Was temporary
@@ -1339,6 +1338,25 @@ where each line of input produces a line of output.}
 \else{\tclose{\ttsl\look}}\fi
 \else{\tclose{\ttsl\look}}\fi}
 
+% @url, @email.  Quotes do not seem necessary.
+\let\url=\code % perhaps include a hypertex \special eventually
+% rms does not like the angle brackets --karl, 17may97.
+%\def\email#1{$\langle${\tt #1}$\rangle$}
+\let\email=\code
+
+% @uref (abbreviation for `urlref') takes an optional second argument
+% specifying the text to display.  First (mandatory) arg is the url.
+% 
+\def\uref#1{\urefxxx #1,,\finish}
+\def\urefxxx#1,#2,#3\finish{%
+  \setbox0 = \hbox{\ignorespaces #2}%
+  \ifdim\wd0 > 0pt
+    \unhbox0\ (\code{#1})%
+  \else
+    \code{#1}%
+  \fi
+}
+
 % Check if we are currently using a typewriter font.  Since all the
 % Computer Modern typewriter fonts have zero interword stretch (and
 % shrink), and it is reasonable to expect all typewriter fonts to have
@@ -1886,7 +1904,7 @@ July\or August\or September\or October\or November\or December\fi
 \def\itemizeitem{%
 \advance\itemno by 1
 {\let\par=\endgraf \smallbreak}%
-\ifhmode \errmessage{\in hmode at itemizeitem}\fi
+\ifhmode \errmessage{In hmode at itemizeitem}\fi
 {\parskip=0in \hskip 0pt
 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
 \vadjust{\penalty 1200}}%
@@ -2408,27 +2426,16 @@ width0pt\relax} \fi
 
 % Define the macros used in formatting output of the sorted index material.
 
-% This is what you call to cause a particular index to get printed.
-% Write
-% @unnumbered Function Index
-% @printindex fn
-
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
 \def\printindex{\parsearg\doprintindex}
-
 \def\doprintindex#1{\begingroup
   \dobreak \chapheadingskip{10000}%
   %
   \indexfonts \rm
   \tolerance = 9500
   \indexbreaks
-  \def\indexbackslash{\rawbackslashxx}%
-  % Index files are almost Texinfo source, but we use \ as the escape
-  % character.  It would be better to use @, but that's too big a change
-  % to make right now.
-  \catcode`\\ = 0
-  \catcode`\@ = 11
-  \escapechar = `\\
-  \begindoublecolumns
   %
   % See if the index file exists and is nonempty.
   \openin 1 \jobname.#1s
@@ -2447,11 +2454,19 @@ width0pt\relax} \fi
     \ifeof 1
       (Index is empty)
     \else
+      % Index files are almost Texinfo source, but we use \ as the escape
+      % character.  It would be better to use @, but that's too big a change
+      % to make right now.
+      \def\indexbackslash{\rawbackslashxx}%
+      \catcode`\\ = 0
+      \catcode`\@ = 11
+      \escapechar = `\\
+      \begindoublecolumns
       \input \jobname.#1s
+      \enddoublecolumns
     \fi
   \fi
   \closein 1
-  \enddoublecolumns
 \endgroup}
 
 % These macros are used by the sorted index file itself.
@@ -2553,24 +2568,39 @@ width0pt\relax} \fi
 
 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
   % Grab any single-column material above us.
-  \output = {\global\setbox\partialpage
-    =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}%
+  \output = {\global\setbox\partialpage = \vbox{%
+    % 
+    % Here is a possibility not foreseen in manmac: if we accumulate a
+    % whole lot of material, we might end up calling this \output
+    % routine twice in a row (see the doublecol-lose test, which is
+    % essentially a couple of indexes with @setchapternewpage off).  In
+    % that case, we must prevent the second \partialpage from
+    % simply overwriting the first, causing us to lose the page.
+    % This will preserve it until a real output routine can ship it
+    % out.  Generally, \partialpage will be empty when this runs and
+    % this will be a no-op.
+    \unvbox\partialpage
+    %
+    % Unvbox the main output page.
+    \unvbox255
+    \kern-\topskip \kern\baselineskip
+  }}%
   \eject
   %
-  % Now switch to the double-column output routine.
-  \output={\doublecolumnout}%
+  % Use the double-column output routine for subsequent pages.
+  \output = {\doublecolumnout}%
   %
   % Change the page size parameters.  We could do this once outside this
   % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
   % format, but then we repeat the same computation.  Repeating a couple
   % of assignments once per index is clearly meaningless for the
-  % execution time, so we may as well do it once.
+  % execution time, so we may as well do it in one place.
   %
   % First we halve the line length, less a little for the gutter between
   % the columns.  We compute the gutter based on the line length, so it
   % changes automatically with the paper format.  The magic constant
-  % below is chosen so that the gutter has the same value (well, +- <
-  % 1pt) as it did when we hard-coded it.
+  % below is chosen so that the gutter has the same value (well, +-<1pt)
+  % as it did when we hard-coded it.
   %
   % We put the result in a separate register, \doublecolumhsize, so we
   % can restore it in \pagesofar, after \hsize itself has (potentially)
@@ -2591,100 +2621,103 @@ width0pt\relax} \fi
   % (undoubled) page height minus any material left over from the
   % previous page.
   \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage
-  % box0 will be the left-hand column, box1 the right.
+  % box0 will be the left-hand column, box2 the right.
   \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
   \onepageout\pagesofar
-  \unvbox255 \penalty\outputpenalty
+  \unvbox255
+  \penalty\outputpenalty
 }
 \def\pagesofar{%
-  % The contents of the output page -- any previous material,
+  % Re-output the contents of the output page -- any previous material,
   % followed by the two boxes we just split.
   \unvbox\partialpage
   \hsize = \doublecolumnhsize
   \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}%
 }
 \def\enddoublecolumns{%
-  \output={\balancecolumns}\eject % split what we have
-  \endgroup
+  \output = {\balancecolumns}\eject % split what we have
+  \endgroup % started in \begindoublecolumns
+  %
   % Back to normal single-column typesetting, but take account of the
   % fact that we just accumulated some stuff on the output page.
-  \pagegoal=\vsize
+  \pagegoal = \vsize
 }
 \def\balancecolumns{%
-  % Called on the last page of the double column material.
-  \setbox0=\vbox{\unvbox255}%
+  % Called at the end of the double column material.
+  \setbox0 = \vbox{\unvbox255}%
   \dimen@ = \ht0
   \advance\dimen@ by \topskip
   \advance\dimen@ by-\baselineskip
   \divide\dimen@ by 2
   \splittopskip = \topskip
   % Loop until we get a decent breakpoint.
-  {\vbadness=10000 \loop \global\setbox3=\copy0
+  {\vbadness=10000 \loop
+    \global\setbox3=\copy0
     \global\setbox1=\vsplit3 to\dimen@
-    \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}%
+    \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt
+   \repeat}%
   \setbox0=\vbox to\dimen@{\unvbox1}%
   \setbox2=\vbox to\dimen@{\unvbox3}%
   \pagesofar
 }
-\catcode `\@=\other
+\catcode`\@ = \other
 
 
 \message{sectioning,}
 % Define chapters, sections, etc.
 
-\newcount \chapno
-\newcount \secno        \secno=0
-\newcount \subsecno     \subsecno=0
-\newcount \subsubsecno  \subsubsecno=0
+\newcount\chapno
+\newcount\secno        \secno=0
+\newcount\subsecno     \subsecno=0
+\newcount\subsubsecno  \subsubsecno=0
 
 % This counter is funny since it counts through charcodes of letters A, B, ...
-\newcount \appendixno  \appendixno = `\@
+\newcount\appendixno  \appendixno = `\@
 \def\appendixletter{\char\the\appendixno}
 
-\newwrite \contentsfile
+\newwrite\contentsfile
 % This is called from \setfilename.
-\def\opencontents{\openout \contentsfile = \jobname.toc}
+\def\opencontents{\openout\contentsfile = \jobname.toc }
 
 % Each @chapter defines this as the name of the chapter.
 % page headings and footings can use it.  @section does likewise
 
 \def\thischapter{} \def\thissection{}
-\def\seccheck#1{\if \pageno<0 %
-\errmessage{@#1 not allowed after generating table of contents}\fi
-%
-}
+\def\seccheck#1{\ifnum \pageno<0
+  \errmessage{@#1 not allowed after generating table of contents}%
+\fi}
 
 \def\chapternofonts{%
-\let\rawbackslash=\relax%
-\let\frenchspacing=\relax%
-\def\result{\realbackslash result}
-\def\equiv{\realbackslash equiv}
-\def\expansion{\realbackslash expansion}
-\def\print{\realbackslash print}
-\def\TeX{\realbackslash TeX}
-\def\dots{\realbackslash dots}
-\def\copyright{\realbackslash copyright}
-\def\tt{\realbackslash tt}
-\def\bf{\realbackslash bf }
-\def\w{\realbackslash w}
-\def\less{\realbackslash less}
-\def\gtr{\realbackslash gtr}
-\def\hat{\realbackslash hat}
-\def\char{\realbackslash char}
-\def\tclose##1{\realbackslash tclose {##1}}
-\def\code##1{\realbackslash code {##1}}
-\def\samp##1{\realbackslash samp {##1}}
-\def\r##1{\realbackslash r {##1}}
-\def\b##1{\realbackslash b {##1}}
-\def\key##1{\realbackslash key {##1}}
-\def\file##1{\realbackslash file {##1}}
-\def\kbd##1{\realbackslash kbd {##1}}
-% These are redefined because @smartitalic wouldn't work inside xdef.
-\def\i##1{\realbackslash i {##1}}
-\def\cite##1{\realbackslash cite {##1}}
-\def\var##1{\realbackslash var {##1}}
-\def\emph##1{\realbackslash emph {##1}}
-\def\dfn##1{\realbackslash dfn {##1}}
+  \let\rawbackslash=\relax
+  \let\frenchspacing=\relax
+  \def\result{\realbackslash result}%
+  \def\equiv{\realbackslash equiv}%
+  \def\expansion{\realbackslash expansion}%
+  \def\print{\realbackslash print}%
+  \def\TeX{\realbackslash TeX}%
+  \def\dots{\realbackslash dots}%
+  \def\copyright{\realbackslash copyright}%
+  \def\tt{\realbackslash tt}%
+  \def\bf{\realbackslash bf}%
+  \def\w{\realbackslash w}%
+  \def\less{\realbackslash less}%
+  \def\gtr{\realbackslash gtr}%
+  \def\hat{\realbackslash hat}%
+  \def\char{\realbackslash char}%
+  \def\tclose##1{\realbackslash tclose{##1}}%
+  \def\code##1{\realbackslash code{##1}}%
+  \def\samp##1{\realbackslash samp{##1}}%
+  \def\r##1{\realbackslash r{##1}}%
+  \def\b##1{\realbackslash b{##1}}%
+  \def\key##1{\realbackslash key{##1}}%
+  \def\file##1{\realbackslash file{##1}}%
+  \def\kbd##1{\realbackslash kbd{##1}}%
+  % These are redefined because @smartitalic wouldn't work inside xdef.
+  \def\i##1{\realbackslash i{##1}}%
+  \def\cite##1{\realbackslash cite{##1}}%
+  \def\var##1{\realbackslash var{##1}}%
+  \def\emph##1{\realbackslash emph{##1}}%
+  \def\dfn##1{\realbackslash dfn{##1}}%
 }
 
 \newcount\absseclevel % used to calculate proper heading level
@@ -3402,8 +3435,8 @@ width0pt\relax} \fi
 \let\.=\ptexdot
 \let\*=\ptexstar
 \let\dots=\ptexdots
-\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}
-\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}
+\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
 \def\@{@}%
 \let\bullet=\ptexbullet
 \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
@@ -3666,16 +3699,17 @@ width0pt\relax} \fi
 
 % Definitions of (, ) and & used in args for functions.
 % This is the definition of ( outside of all parentheses.
-\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested %
-\global\advance\parencount by 1 }
+\gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested
+  \global\advance\parencount by 1
+}
 %
 % This is the definition of ( when already inside a level of parens.
 \gdef\opnested{\char`\(\global\advance\parencount by 1 }
 %
 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
-% also in that case restore the outer-level definition of (.
-\ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
-\global\advance \parencount by -1 }
+  % also in that case restore the outer-level definition of (.
+  \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
+  \global\advance \parencount by -1 }
 % If we encounter &foo, then turn on ()-hacking afterwards
 \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
 %
@@ -3683,8 +3717,11 @@ width0pt\relax} \fi
 } % End of definition inside \activeparens
 %% These parens (in \boldbrax) actually are a little bolder than the
 %% contained text.  This is especially needed for [ and ]
-\def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&}
-\def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}}
+\def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
+\def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
+\def\ampnr{\&}
+\def\lbrb{{\bf\char`\[}}
+\def\rbrb{{\bf\char`\]}}
 
 % First, defname, which formats the header line itself.
 % #1 should be the function name.
@@ -3861,7 +3898,7 @@ width0pt\relax} \fi
 \hyphenchar\tensl=0
 #1%
 \hyphenchar\tensl=45
-\ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi%
+\ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
 \interlinepenalty=10000
 \advance\rightskip by 0pt plus 1fil
 \endgraf\penalty 10000\vskip -\parskip\penalty 10000%
@@ -3962,6 +3999,7 @@ width0pt\relax} \fi
 \def\defmacx #1 {\errmessage{@defmacx in invalid context}}
 \def\defspecx #1 {\errmessage{@defspecx in invalid context}}
 \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}}
+\def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}}
 \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}}
 
 % @defmethod, and so on
@@ -3977,6 +4015,16 @@ width0pt\relax} \fi
 \defunargs {#3}\endgroup %
 }
 
+% @deftypemethod foo-class return-type foo-method args
+%
+\def\deftypemethod{%
+  \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
+%
+% #1 is the class name, #2 the data type, #3 the method name, #4 the args.
+\def\deftypemethodheader#1#2#3#4{%
+  \deftypefnheaderx{Method on #1}{#2}#3 #4\relax
+}
+
 % @defmethod == @defop Method
 
 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}