diff options
| author | Paul Eggert | 2015-12-18 15:41:45 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-12-18 15:42:12 -0800 |
| commit | 73b3beb56dd573a77fd7b103014f2d74674f2e23 (patch) | |
| tree | 27a552222062dbf966f4442ed5e1eec77ba53d4f | |
| parent | 81e523fc4d3dcb0cf59a69f45786d2691f982695 (diff) | |
| download | emacs-73b3beb56dd573a77fd7b103014f2d74674f2e23.tar.gz emacs-73b3beb56dd573a77fd7b103014f2d74674f2e23.zip | |
Merge from gnulib
This mostly commentary fixes.
* doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.
* lib/gnulib.mk: Regenerate with new gnulib-tool.
| -rw-r--r-- | doc/misc/texinfo.tex | 400 | ||||
| -rw-r--r-- | lib/gnulib.mk | 2 | ||||
| -rw-r--r-- | lib/intprops.h | 7 |
3 files changed, 231 insertions, 178 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index f555ce3f659..34fd353a9dc 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
| 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
| 5 | % | 5 | % |
| 6 | \def\texinfoversion{2015-10-29.16} | 6 | \def\texinfoversion{2015-12-17.20} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
| 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| @@ -158,22 +158,10 @@ | |||
| 158 | \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi | 158 | \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi |
| 159 | \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi | 159 | \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi |
| 160 | 160 | ||
| 161 | % Since the category of space is not known, we have to be careful. | 161 | % Give the space character the catcode for a space. |
| 162 | \chardef\spacecat = 10 | 162 | \def\spaceisspace{\catcode`\ =10\relax} |
| 163 | \def\spaceisspace{\catcode`\ =\spacecat} | ||
| 164 | 163 | ||
| 165 | % sometimes characters are active, so we need control sequences. | ||
| 166 | \chardef\ampChar = `\& | ||
| 167 | \chardef\colonChar = `\: | ||
| 168 | \chardef\commaChar = `\, | ||
| 169 | \chardef\dashChar = `\- | 164 | \chardef\dashChar = `\- |
| 170 | \chardef\dotChar = `\. | ||
| 171 | \chardef\exclamChar= `\! | ||
| 172 | \chardef\hashChar = `\# | ||
| 173 | \chardef\lquoteChar= `\` | ||
| 174 | \chardef\questChar = `\? | ||
| 175 | \chardef\rquoteChar= `\' | ||
| 176 | \chardef\semiChar = `\; | ||
| 177 | \chardef\slashChar = `\/ | 165 | \chardef\slashChar = `\/ |
| 178 | \chardef\underChar = `\_ | 166 | \chardef\underChar = `\_ |
| 179 | 167 | ||
| @@ -271,11 +259,18 @@ | |||
| 271 | % | 259 | % |
| 272 | % Another complication is to let the user choose whether \thischapter | 260 | % Another complication is to let the user choose whether \thischapter |
| 273 | % (\thissection) refers to the chapter (section) in effect at the top | 261 | % (\thissection) refers to the chapter (section) in effect at the top |
| 274 | % of a page, or that at the bottom of a page. The solution is | 262 | % of a page, or that at the bottom of a page. |
| 275 | % described on page 260 of The TeXbook. It involves outputting two | 263 | |
| 276 | % marks for the sectioning macros, one before the section break, and | 264 | % \domark is called twice inside \chapmacro, to add one |
| 277 | % one after. I won't pretend I can describe this better than DEK... | 265 | % mark before the section break, and one after. |
| 278 | % | 266 | % In the second call \prevchapterdefs is the same as \lastchapterdefs, |
| 267 | % and \prevsectiondefs is the same as \lastsectiondefs. | ||
| 268 | % Then if the page is not broken at the mark, some of the previous | ||
| 269 | % section appears on the page, and we can get the name of this section | ||
| 270 | % from \firstmark for @everyheadingmarks top. | ||
| 271 | % @everyheadingmarks bottom uses \botmark. | ||
| 272 | % | ||
| 273 | % See page 260 of The TeXbook. | ||
| 279 | \def\domark{% | 274 | \def\domark{% |
| 280 | \toks0=\expandafter{\lastchapterdefs}% | 275 | \toks0=\expandafter{\lastchapterdefs}% |
| 281 | \toks2=\expandafter{\lastsectiondefs}% | 276 | \toks2=\expandafter{\lastsectiondefs}% |
| @@ -283,13 +278,14 @@ | |||
| 283 | \toks6=\expandafter{\prevsectiondefs}% | 278 | \toks6=\expandafter{\prevsectiondefs}% |
| 284 | \toks8=\expandafter{\lastcolordefs}% | 279 | \toks8=\expandafter{\lastcolordefs}% |
| 285 | \mark{% | 280 | \mark{% |
| 286 | \the\toks0 \the\toks2 % 0: top marks (\last...) | 281 | \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top |
| 287 | \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) | 282 | \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom |
| 288 | \noexpand\else \the\toks8 % 2: color marks | 283 | \noexpand\else \the\toks8 % 2: color marks |
| 289 | }% | 284 | }% |
| 290 | } | 285 | } |
| 291 | 286 | ||
| 292 | % \gettopheadingmarks, \getbottomheadingmarks - extract needed part of mark. | 287 | % \gettopheadingmarks, \getbottomheadingmarks, |
| 288 | % \getcolormarks - extract needed part of mark. | ||
| 293 | % | 289 | % |
| 294 | % \topmark doesn't work for the very first chapter (after the title | 290 | % \topmark doesn't work for the very first chapter (after the title |
| 295 | % page or the contents), so we use \firstmark there -- this gets us | 291 | % page or the contents), so we use \firstmark there -- this gets us |
| @@ -345,28 +341,21 @@ | |||
| 345 | % values in \headline and \footline. | 341 | % values in \headline and \footline. |
| 346 | % | 342 | % |
| 347 | % This is used to check if we are on the first page of a chapter. | 343 | % This is used to check if we are on the first page of a chapter. |
| 348 | \ifcase0\topmark\fi | 344 | \ifcase1\topmark\fi |
| 349 | \ifx\thischapter\empty | 345 | \let\prevchaptername\thischaptername |
| 350 | % See comment for \gettopheadingmarks | 346 | \ifcase0\firstmark\fi |
| 351 | \ifcase0\firstmark\fi | 347 | \let\curchaptername\thischaptername |
| 352 | \let\curchaptername\thischaptername | ||
| 353 | \ifcase1\firstmark\fi | ||
| 354 | \let\prevchaptername\thischaptername | ||
| 355 | \else | ||
| 356 | \let\curchaptername\thischaptername | ||
| 357 | \ifcase1\topmark\fi | ||
| 358 | \let\prevchaptername\thischaptername | ||
| 359 | \fi | ||
| 360 | % | 348 | % |
| 361 | \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi | 349 | \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi |
| 362 | \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi | 350 | \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi |
| 363 | % | 351 | % |
| 364 | \ifx\curchaptername\prevchaptername | 352 | \ifx\curchaptername\prevchaptername |
| 353 | \let\thischapterheading\thischapter | ||
| 365 | \else | 354 | \else |
| 366 | % If on the first page of a chapter, clear @thischapter so it | 355 | % \thischapterheading is the same as \thischapter except it is blank |
| 367 | % doesn't appear in the headline, because the chapter is already | 356 | % for the first page of a chapter. This is to prevent the chapter name |
| 368 | % shown in the chapter heading. | 357 | % being shown twice. |
| 369 | \def\thischapter{}% | 358 | \def\thischapterheading{}% |
| 370 | \fi | 359 | \fi |
| 371 | % | 360 | % |
| 372 | \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% | 361 | \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% |
| @@ -1164,8 +1153,8 @@ output) for that.)} | |||
| 1164 | \def\rgbDarkRed{0.50 0.09 0.12} | 1153 | \def\rgbDarkRed{0.50 0.09 0.12} |
| 1165 | \def\rgbBlack{0 0 0} | 1154 | \def\rgbBlack{0 0 0} |
| 1166 | % | 1155 | % |
| 1167 | % k sets the color for filling (usual text, etc.); | 1156 | % rg sets the color for filling (usual text, etc.); |
| 1168 | % K sets the color for stroking (thin rules, e.g., normal _'s). | 1157 | % RG sets the color for stroking (thin rules, e.g., normal _'s). |
| 1169 | \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} | 1158 | \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} |
| 1170 | % | 1159 | % |
| 1171 | % Set color, and create a mark which defines \thiscolor accordingly, | 1160 | % Set color, and create a mark which defines \thiscolor accordingly, |
| @@ -1416,7 +1405,6 @@ output) for that.)} | |||
| 1416 | \normalturnoffactive | 1405 | \normalturnoffactive |
| 1417 | \def\@{@}% | 1406 | \def\@{@}% |
| 1418 | \let\/=\empty | 1407 | \let\/=\empty |
| 1419 | \let\xprocessmacroarg=\eatspaces % in case we are in a macro expansion | ||
| 1420 | \makevalueexpandable | 1408 | \makevalueexpandable |
| 1421 | % do we want to go so far as to use \indexnofonts instead of just | 1409 | % do we want to go so far as to use \indexnofonts instead of just |
| 1422 | % special-casing \var here? | 1410 | % special-casing \var here? |
| @@ -2452,8 +2440,8 @@ end | |||
| 2452 | % | 2440 | % |
| 2453 | \catcode`@=11 | 2441 | \catcode`@=11 |
| 2454 | \def\plainfrenchspacing{% | 2442 | \def\plainfrenchspacing{% |
| 2455 | \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m | 2443 | \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m |
| 2456 | \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m | 2444 | \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m |
| 2457 | \def\endofsentencespacefactor{1000}% for @. and friends | 2445 | \def\endofsentencespacefactor{1000}% for @. and friends |
| 2458 | } | 2446 | } |
| 2459 | \def\plainnonfrenchspacing{% | 2447 | \def\plainnonfrenchspacing{% |
| @@ -2641,9 +2629,9 @@ end | |||
| 2641 | 2629 | ||
| 2642 | % Allow line breaks around only a few characters (only). | 2630 | % Allow line breaks around only a few characters (only). |
| 2643 | \def\urefcatcodes{% | 2631 | \def\urefcatcodes{% |
| 2644 | \catcode\ampChar=\active \catcode\dotChar=\active | 2632 | \catcode`\&=\active \catcode`\.=\active |
| 2645 | \catcode\hashChar=\active \catcode\questChar=\active | 2633 | \catcode`\#=\active \catcode`\?=\active |
| 2646 | \catcode\slashChar=\active | 2634 | \catcode`\/=\active |
| 2647 | } | 2635 | } |
| 2648 | { | 2636 | { |
| 2649 | \urefcatcodes | 2637 | \urefcatcodes |
| @@ -2852,23 +2840,24 @@ end | |||
| 2852 | \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} | 2840 | \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} |
| 2853 | % | 2841 | % |
| 2854 | \def\math{% | 2842 | \def\math{% |
| 2855 | \tex | 2843 | \ifmmode\else % only go into math if not in math mode already |
| 2856 | \mathunderscore | 2844 | \tex |
| 2857 | \let\\ = \mathbackslash | 2845 | \mathunderscore |
| 2858 | \mathactive | 2846 | \let\\ = \mathbackslash |
| 2859 | % make the texinfo accent commands work in math mode | 2847 | \mathactive |
| 2860 | \let\"=\ddot | 2848 | % make the texinfo accent commands work in math mode |
| 2861 | \let\'=\acute | 2849 | \let\"=\ddot |
| 2862 | \let\==\bar | 2850 | \let\'=\acute |
| 2863 | \let\^=\hat | 2851 | \let\==\bar |
| 2864 | \let\`=\grave | 2852 | \let\^=\hat |
| 2865 | \let\u=\breve | 2853 | \let\`=\grave |
| 2866 | \let\v=\check | 2854 | \let\u=\breve |
| 2867 | \let\~=\tilde | 2855 | \let\v=\check |
| 2868 | \let\dotaccent=\dot | 2856 | \let\~=\tilde |
| 2869 | % have to provide another name for sup operator | 2857 | \let\dotaccent=\dot |
| 2870 | \let\mathopsup=\sup | 2858 | % have to provide another name for sup operator |
| 2871 | $\finishmath | 2859 | \let\mathopsup=\sup |
| 2860 | $\expandafter\finishmath\fi | ||
| 2872 | } | 2861 | } |
| 2873 | \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. | 2862 | \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. |
| 2874 | 2863 | ||
| @@ -3517,7 +3506,7 @@ end | |||
| 3517 | \global\evenfootline={\hfil} | 3506 | \global\evenfootline={\hfil} |
| 3518 | \global\oddfootline={\hfil} | 3507 | \global\oddfootline={\hfil} |
| 3519 | \global\evenheadline={\line{\folio\hfil\thistitle}} | 3508 | \global\evenheadline={\line{\folio\hfil\thistitle}} |
| 3520 | \global\oddheadline={\line{\thischapter\hfil\folio}} | 3509 | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
| 3521 | \global\let\contentsalignmacro = \chapoddpage | 3510 | \global\let\contentsalignmacro = \chapoddpage |
| 3522 | } | 3511 | } |
| 3523 | \let\contentsalignmacro = \chappager | 3512 | \let\contentsalignmacro = \chappager |
| @@ -3528,8 +3517,8 @@ end | |||
| 3528 | \global\pageno=1 | 3517 | \global\pageno=1 |
| 3529 | \global\evenfootline={\hfil} | 3518 | \global\evenfootline={\hfil} |
| 3530 | \global\oddfootline={\hfil} | 3519 | \global\oddfootline={\hfil} |
| 3531 | \global\evenheadline={\line{\thischapter\hfil\folio}} | 3520 | \global\evenheadline={\line{\thischapterheading\hfil\folio}} |
| 3532 | \global\oddheadline={\line{\thischapter\hfil\folio}} | 3521 | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
| 3533 | \global\let\contentsalignmacro = \chappager | 3522 | \global\let\contentsalignmacro = \chappager |
| 3534 | } | 3523 | } |
| 3535 | \def\HEADINGSon{\HEADINGSdouble} | 3524 | \def\HEADINGSon{\HEADINGSdouble} |
| @@ -3540,7 +3529,7 @@ end | |||
| 3540 | \global\evenfootline={\hfil} | 3529 | \global\evenfootline={\hfil} |
| 3541 | \global\oddfootline={\hfil} | 3530 | \global\oddfootline={\hfil} |
| 3542 | \global\evenheadline={\line{\folio\hfil\thistitle}} | 3531 | \global\evenheadline={\line{\folio\hfil\thistitle}} |
| 3543 | \global\oddheadline={\line{\thischapter\hfil\folio}} | 3532 | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
| 3544 | \global\let\contentsalignmacro = \chapoddpage | 3533 | \global\let\contentsalignmacro = \chapoddpage |
| 3545 | } | 3534 | } |
| 3546 | 3535 | ||
| @@ -3548,8 +3537,8 @@ end | |||
| 3548 | \def\HEADINGSsinglex{% | 3537 | \def\HEADINGSsinglex{% |
| 3549 | \global\evenfootline={\hfil} | 3538 | \global\evenfootline={\hfil} |
| 3550 | \global\oddfootline={\hfil} | 3539 | \global\oddfootline={\hfil} |
| 3551 | \global\evenheadline={\line{\thischapter\hfil\folio}} | 3540 | \global\evenheadline={\line{\thischapterheading\hfil\folio}} |
| 3552 | \global\oddheadline={\line{\thischapter\hfil\folio}} | 3541 | \global\oddheadline={\line{\thischapterheading\hfil\folio}} |
| 3553 | \global\let\contentsalignmacro = \chappager | 3542 | \global\let\contentsalignmacro = \chappager |
| 3554 | } | 3543 | } |
| 3555 | 3544 | ||
| @@ -4676,16 +4665,6 @@ end | |||
| 4676 | \definedummyword\verb | 4665 | \definedummyword\verb |
| 4677 | \definedummyword\w | 4666 | \definedummyword\w |
| 4678 | \definedummyword\xref | 4667 | \definedummyword\xref |
| 4679 | % | ||
| 4680 | % Consider: | ||
| 4681 | % @macro mkind{arg1,arg2} | ||
| 4682 | % @cindex \arg2\ | ||
| 4683 | % @end macro | ||
| 4684 | % @mkind{foo, bar} | ||
| 4685 | % The space after the comma will end up in the temporary definition | ||
| 4686 | % that we make for arg2 (see \parsemargdef ff.). We want all this to be | ||
| 4687 | % expanded for the sake of the index, so we end up just seeing "bar". | ||
| 4688 | \let\xprocessmacroarg\eatspaces | ||
| 4689 | } | 4668 | } |
| 4690 | 4669 | ||
| 4691 | % For testing: output @{ and @} in index sort strings as \{ and \}. | 4670 | % For testing: output @{ and @} in index sort strings as \{ and \}. |
| @@ -5212,16 +5191,12 @@ end | |||
| 5212 | % from @* into spaces. The user might give these in long section | 5191 | % from @* into spaces. The user might give these in long section |
| 5213 | % titles, for instance. | 5192 | % titles, for instance. |
| 5214 | \def\*{\unskip\space\ignorespaces}% | 5193 | \def\*{\unskip\space\ignorespaces}% |
| 5215 | \def\entrybreak{\hfil\break}% | 5194 | \def\entrybreak{\hfil\break}% An undocumented command |
| 5216 | % | 5195 | % |
| 5217 | % A bit of stretch before each entry for the benefit of balancing | 5196 | % A bit of stretch before each entry for the benefit of balancing |
| 5218 | % columns. | 5197 | % columns. |
| 5219 | \vskip 0pt plus0.5pt | 5198 | \vskip 0pt plus0.5pt |
| 5220 | % | 5199 | % |
| 5221 | % Badness calculation for paragraph affected by - | ||
| 5222 | % How much \indexdotfill is stretched, or how much \parfillskip is shrunk | ||
| 5223 | % Number of lines (\linepenalty) | ||
| 5224 | % | ||
| 5225 | % Swallow the left brace of the text (first parameter): | 5200 | % Swallow the left brace of the text (first parameter): |
| 5226 | \afterassignment\doentry | 5201 | \afterassignment\doentry |
| 5227 | \let\temp = | 5202 | \let\temp = |
| @@ -5255,16 +5230,23 @@ end | |||
| 5255 | % | 5230 | % |
| 5256 | \ifpdf | 5231 | \ifpdf |
| 5257 | \pdfgettoks#1.% | 5232 | \pdfgettoks#1.% |
| 5258 | \hskip\skip\thinshrinkable\the\toksA | 5233 | \bgroup\let\domark\relax |
| 5234 | \hskip\skip\thinshrinkable\the\toksA | ||
| 5235 | \egroup | ||
| 5236 | % The redefinion of \domark stops marks being added in \pdflink to | ||
| 5237 | % preserve coloured links across page boundaries. Otherwise the marks | ||
| 5238 | % would get in the way of \lastbox in \insertindexentrybox. | ||
| 5259 | \else | 5239 | \else |
| 5260 | \hskip\skip\thinshrinkable #1% | 5240 | \hskip\skip\thinshrinkable #1% |
| 5261 | \fi | 5241 | \fi |
| 5262 | \fi | 5242 | \fi |
| 5263 | \egroup % end \boxA | 5243 | \egroup % end \boxA |
| 5264 | \ifdim\wd\boxB = 0pt | 5244 | \ifdim\wd\boxB = 0pt |
| 5265 | \global\setbox\entryindexbox=\box\boxA | 5245 | \global\setbox\entryindexbox=\vbox{\unhbox\boxA}% |
| 5266 | \else | 5246 | \else |
| 5267 | \global\setbox\entryindexbox=\vbox\bgroup\noindent | 5247 | \global\setbox\entryindexbox=\vbox\bgroup |
| 5248 | \prevdepth=\entrylinedepth | ||
| 5249 | \noindent | ||
| 5268 | % We want the text of the entries to be aligned to the left, and the | 5250 | % We want the text of the entries to be aligned to the left, and the |
| 5269 | % page numbers to be aligned to the right. | 5251 | % page numbers to be aligned to the right. |
| 5270 | % | 5252 | % |
| @@ -5333,10 +5315,21 @@ end | |||
| 5333 | 5315 | ||
| 5334 | \newbox\entryindexbox | 5316 | \newbox\entryindexbox |
| 5335 | \def\insertindexentrybox{% | 5317 | \def\insertindexentrybox{% |
| 5336 | \lineskip=.7ex plus .5ex % This comes into effect when the \vbox has a large | 5318 | \copy\entryindexbox |
| 5337 | % height due to the paragraph in it having several | 5319 | % The following gets the depth of the last box. This is for even |
| 5338 | % lines. | 5320 | % line spacing when entries span several lines. |
| 5339 | \box\entryindexbox} | 5321 | \setbox\dummybox\vbox{% |
| 5322 | \unvbox\entryindexbox | ||
| 5323 | \nointerlineskip | ||
| 5324 | \lastbox | ||
| 5325 | \global\entrylinedepth=\prevdepth | ||
| 5326 | }% | ||
| 5327 | % Note that we couldn't simply \unvbox\entryindexbox followed by | ||
| 5328 | % \nointerlineskip\lastbox to remove the last box and then reinstate it, | ||
| 5329 | % because this resets how far the box has been \moveleft'ed to 0. \unvbox | ||
| 5330 | % doesn't affect \prevdepth either. | ||
| 5331 | } | ||
| 5332 | \newdimen\entrylinedepth | ||
| 5340 | 5333 | ||
| 5341 | % Default is no penalty | 5334 | % Default is no penalty |
| 5342 | \let\entryorphanpenalty\egroup | 5335 | \let\entryorphanpenalty\egroup |
| @@ -5387,16 +5380,35 @@ end | |||
| 5387 | % Define two-column mode, which we use to typeset indexes. | 5380 | % Define two-column mode, which we use to typeset indexes. |
| 5388 | % Adapted from the TeXbook, page 416, which is to say, | 5381 | % Adapted from the TeXbook, page 416, which is to say, |
| 5389 | % the manmac.tex format used to print the TeXbook itself. | 5382 | % the manmac.tex format used to print the TeXbook itself. |
| 5390 | \catcode`\@=11 | 5383 | \catcode`\@=11 % private names |
| 5391 | 5384 | ||
| 5392 | \newbox\partialpage | 5385 | \newbox\partialpage |
| 5393 | \newdimen\doublecolumnhsize | 5386 | \newdimen\doublecolumnhsize |
| 5394 | \newdimen\doublecolumntopgap | 5387 | \newdimen\doublecolumntopgap |
| 5395 | \doublecolumntopgap = 0pt | 5388 | \doublecolumntopgap = 0pt |
| 5396 | 5389 | ||
| 5397 | \newtoks\savedtopmark % Used in \begindoublecolumns | 5390 | % Use inside an output routine to save \topmark and \firstmark |
| 5391 | \def\savemarks{% | ||
| 5392 | \global\savedtopmark=\expandafter{\topmark }% | ||
| 5393 | \global\savedfirstmark=\expandafter{\firstmark }% | ||
| 5394 | } | ||
| 5395 | \newtoks\savedtopmark | ||
| 5398 | \newtoks\savedfirstmark | 5396 | \newtoks\savedfirstmark |
| 5399 | 5397 | ||
| 5398 | % Set \topmark and \firstmark for next time \output runs. | ||
| 5399 | % Can't be run from withinside \output (because any material | ||
| 5400 | % added while an output routine is active, including | ||
| 5401 | % penalties, is saved for after it finishes). The page so far | ||
| 5402 | % should be empty, otherwise what's on it will be thrown away. | ||
| 5403 | \def\restoremarks{% | ||
| 5404 | \mark{\the\savedtopmark}% | ||
| 5405 | \bgroup\output = {% | ||
| 5406 | \setbox\dummybox=\box\PAGE | ||
| 5407 | }abc\eject\egroup | ||
| 5408 | % "abc" because output routine doesn't fire for a completely empty page. | ||
| 5409 | \mark{\the\savedfirstmark}% | ||
| 5410 | } | ||
| 5411 | |||
| 5400 | \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns | 5412 | \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns |
| 5401 | % Grab any single-column material above us. | 5413 | % Grab any single-column material above us. |
| 5402 | \output = {% | 5414 | \output = {% |
| @@ -5417,22 +5429,15 @@ end | |||
| 5417 | \unvbox\PAGE | 5429 | \unvbox\PAGE |
| 5418 | \kern-\topskip \kern\baselineskip | 5430 | \kern-\topskip \kern\baselineskip |
| 5419 | }% | 5431 | }% |
| 5420 | % Save \topmark and \firstmark | 5432 | \savemarks |
| 5421 | \global\savedtopmark=\expandafter{\topmark}% | ||
| 5422 | \global\savedfirstmark=\expandafter{\firstmark}% | ||
| 5423 | }% | 5433 | }% |
| 5424 | \eject % run that output routine to set \partialpage | 5434 | \eject % run that output routine to set \partialpage |
| 5435 | \restoremarks | ||
| 5425 | % | 5436 | % |
| 5426 | % We recover the two marks that the last output routine saved in order | 5437 | % We recover the two marks that the last output routine saved in order |
| 5427 | % to propagate the information in marks added around a chapter heading, | 5438 | % to propagate the information in marks added around a chapter heading, |
| 5428 | % which could be otherwise be lost by the time the final page is output. | 5439 | % which could be otherwise be lost by the time the final page is output. |
| 5429 | % | 5440 | % |
| 5430 | \mark{\the\savedtopmark}% Only mark in page passed to following \output. | ||
| 5431 | \output = {% | ||
| 5432 | \setbox0=\box\PAGE % clear box 255 | ||
| 5433 | }abc\eject | ||
| 5434 | % | ||
| 5435 | \mark{\the\savedfirstmark}% | ||
| 5436 | % | 5441 | % |
| 5437 | % Use the double-column output routine for subsequent pages. | 5442 | % Use the double-column output routine for subsequent pages. |
| 5438 | \output = {\doublecolumnout}% | 5443 | \output = {\doublecolumnout}% |
| @@ -5465,12 +5470,14 @@ end | |||
| 5465 | \global\advance\vsize by -1\doublecolumntopgap | 5470 | \global\advance\vsize by -1\doublecolumntopgap |
| 5466 | \vsize = 2\vsize | 5471 | \vsize = 2\vsize |
| 5467 | \topskip=0pt | 5472 | \topskip=0pt |
| 5473 | \global\entrylinedepth=0pt\relax | ||
| 5468 | } | 5474 | } |
| 5469 | 5475 | ||
| 5470 | % The double-column output routine for all double-column pages except | 5476 | % The double-column output routine for all double-column pages except |
| 5471 | % the last, which is done by \balancecolumns. | 5477 | % the last, which is done by \balancecolumns. |
| 5472 | % | 5478 | % |
| 5473 | \def\doublecolumnout{% | 5479 | \def\doublecolumnout{% |
| 5480 | % | ||
| 5474 | \splittopskip=\topskip \splitmaxdepth=\maxdepth | 5481 | \splittopskip=\topskip \splitmaxdepth=\maxdepth |
| 5475 | % Get the available space for the double columns -- the normal | 5482 | % Get the available space for the double columns -- the normal |
| 5476 | % (undoubled) page height minus any material left over from the | 5483 | % (undoubled) page height minus any material left over from the |
| @@ -5532,6 +5539,7 @@ end | |||
| 5532 | \output = {% | 5539 | \output = {% |
| 5533 | % Split the last of the double-column material. Leave it on the | 5540 | % Split the last of the double-column material. Leave it on the |
| 5534 | % current page, no automatic page break. | 5541 | % current page, no automatic page break. |
| 5542 | \savemarks | ||
| 5535 | \balancecolumns | 5543 | \balancecolumns |
| 5536 | % | 5544 | % |
| 5537 | % If we end up splitting too much material for the current page, | 5545 | % If we end up splitting too much material for the current page, |
| @@ -5545,6 +5553,8 @@ end | |||
| 5545 | }% | 5553 | }% |
| 5546 | \eject | 5554 | \eject |
| 5547 | \endgroup % started in \begindoublecolumns | 5555 | \endgroup % started in \begindoublecolumns |
| 5556 | \restoremarks | ||
| 5557 | \box\balancedcolumns | ||
| 5548 | % | 5558 | % |
| 5549 | % \pagegoal was set to the doubled \vsize above, since we restarted | 5559 | % \pagegoal was set to the doubled \vsize above, since we restarted |
| 5550 | % the current page. We're now back to normal single-column | 5560 | % the current page. We're now back to normal single-column |
| @@ -5552,6 +5562,8 @@ end | |||
| 5552 | % \endgroup where \vsize got restored). | 5562 | % \endgroup where \vsize got restored). |
| 5553 | \pagegoal = \vsize | 5563 | \pagegoal = \vsize |
| 5554 | } | 5564 | } |
| 5565 | \newbox\balancedcolumns | ||
| 5566 | \setbox\balancedcolumns=\vbox{shouldnt see this}% | ||
| 5555 | % | 5567 | % |
| 5556 | % Only called for the last of the double column material. \doublecolumnout | 5568 | % Only called for the last of the double column material. \doublecolumnout |
| 5557 | % does the others. | 5569 | % does the others. |
| @@ -5595,7 +5607,7 @@ end | |||
| 5595 | \fi | 5607 | \fi |
| 5596 | \fi | 5608 | \fi |
| 5597 | % | 5609 | % |
| 5598 | \pagesofar | 5610 | \global\setbox\balancedcolumns=\vbox{\pagesofar}% |
| 5599 | } | 5611 | } |
| 5600 | \catcode`\@ = \other | 5612 | \catcode`\@ = \other |
| 5601 | 5613 | ||
| @@ -7612,8 +7624,7 @@ end | |||
| 7612 | % Argument is macro body with arguments substituted | 7624 | % Argument is macro body with arguments substituted |
| 7613 | \def\scanmacro#1{% | 7625 | \def\scanmacro#1{% |
| 7614 | \newlinechar`\^^M | 7626 | \newlinechar`\^^M |
| 7615 | % Reduce doubled backslashes to one | 7627 | \def\xprocessmacroarg{\eatspaces}% |
| 7616 | \def\xprocessmacroarg{\passargtomacro\eatspaces}% | ||
| 7617 | % | 7628 | % |
| 7618 | % Process the macro body under the current catcode regime. | 7629 | % Process the macro body under the current catcode regime. |
| 7619 | \scantokens{#1\texinfoc}\aftermacro% | 7630 | \scantokens{#1\texinfoc}\aftermacro% |
| @@ -7629,6 +7640,7 @@ end | |||
| 7629 | % to allow macros to open or close groups themselves. | 7640 | % to allow macros to open or close groups themselves. |
| 7630 | } | 7641 | } |
| 7631 | 7642 | ||
| 7643 | % Used for copying and captions | ||
| 7632 | \def\scanexp#1{% | 7644 | \def\scanexp#1{% |
| 7633 | \bgroup | 7645 | \bgroup |
| 7634 | % Undo catcode changes of \startcontents and \printindex | 7646 | % Undo catcode changes of \startcontents and \printindex |
| @@ -7733,6 +7745,7 @@ end | |||
| 7733 | % an argument to another Texinfo command. | 7745 | % an argument to another Texinfo command. |
| 7734 | \def\macroargctxt{% | 7746 | \def\macroargctxt{% |
| 7735 | \scanctxt | 7747 | \scanctxt |
| 7748 | \catcode`\ =\active | ||
| 7736 | \catcode`\^^M=\other | 7749 | \catcode`\^^M=\other |
| 7737 | \catcode`\\=\active | 7750 | \catcode`\\=\active |
| 7738 | } | 7751 | } |
| @@ -8127,16 +8140,23 @@ end | |||
| 8127 | \egroup\noexpand\scanmacro{\macrobody}}% | 8140 | \egroup\noexpand\scanmacro{\macrobody}}% |
| 8128 | \else | 8141 | \else |
| 8129 | \ifnum\paramno<10\relax % at most 9 | 8142 | \ifnum\paramno<10\relax % at most 9 |
| 8143 | % See non-recursive section below for comments | ||
| 8130 | \expandafter\xdef\csname\the\macname\endcsname{% | 8144 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 8131 | \bgroup\noexpand\macroargctxt | 8145 | \bgroup |
| 8132 | \noexpand\csname\the\macname @@\endcsname}% | 8146 | \noexpand\expandafter |
| 8147 | \noexpand\macroargctxt | ||
| 8148 | \noexpand\expandafter | ||
| 8149 | \expandafter\noexpand\csname\the\macname @@\endcsname}% | ||
| 8133 | \expandafter\xdef\csname\the\macname @@\endcsname##1{% | 8150 | \expandafter\xdef\csname\the\macname @@\endcsname##1{% |
| 8134 | \expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}% | 8151 | \noexpand\passargtomacro |
| 8152 | \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% | ||
| 8153 | \expandafter\xdef\csname\the\macname @@@\endcsname##1{% | ||
| 8154 | \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% | ||
| 8135 | \expandafter\expandafter | 8155 | \expandafter\expandafter |
| 8136 | \expandafter\xdef | 8156 | \expandafter\xdef |
| 8137 | \expandafter\expandafter | 8157 | \expandafter\expandafter |
| 8138 | \csname\the\macname @@@\endcsname | 8158 | \csname\the\macname @@@@\endcsname\paramlist{% |
| 8139 | \paramlist{\egroup\noexpand\scanmacro{\macrobody}}% | 8159 | \egroup\noexpand\scanmacro{\macrobody}}% |
| 8140 | \else % 10 or more | 8160 | \else % 10 or more |
| 8141 | \expandafter\xdef\csname\the\macname\endcsname{% | 8161 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 8142 | \noexpand\getargvals@{\the\macname}{\argl}% | 8162 | \noexpand\getargvals@{\the\macname}{\argl}% |
| @@ -8166,19 +8186,27 @@ end | |||
| 8166 | }% | 8186 | }% |
| 8167 | \else % at most 9 | 8187 | \else % at most 9 |
| 8168 | \ifnum\paramno<10\relax | 8188 | \ifnum\paramno<10\relax |
| 8189 | % @MACNAME sets the context for reading the macro argument | ||
| 8190 | % @MACNAME@@ gets the argument, processes backslashes and appends a | ||
| 8191 | % comma. | ||
| 8192 | % @MACNAME@@@ removes braces surrounding the argument list. | ||
| 8193 | % @MACNAME@@@@ scans the macro body with arguments substituted. | ||
| 8169 | \expandafter\xdef\csname\the\macname\endcsname{% | 8194 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 8170 | \bgroup\noexpand\macroargctxt | 8195 | \bgroup |
| 8171 | \expandafter\noexpand\csname\the\macname @@\endcsname}% | 8196 | \noexpand\expandafter % This \expandafter skip any spaces after the |
| 8197 | \noexpand\macroargctxt % macro before we change the catcode of space. | ||
| 8198 | \noexpand\expandafter | ||
| 8199 | \expandafter\noexpand\csname\the\macname @@\endcsname}% | ||
| 8172 | \expandafter\xdef\csname\the\macname @@\endcsname##1{% | 8200 | \expandafter\xdef\csname\the\macname @@\endcsname##1{% |
| 8173 | \expandafter\noexpand\csname\the\macname @@@\endcsname ##1,}% | 8201 | \noexpand\passargtomacro |
| 8202 | \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% | ||
| 8203 | \expandafter\xdef\csname\the\macname @@@\endcsname##1{% | ||
| 8204 | \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% | ||
| 8174 | \expandafter\expandafter | 8205 | \expandafter\expandafter |
| 8175 | \expandafter\xdef | 8206 | \expandafter\xdef |
| 8176 | \expandafter\expandafter | 8207 | \expandafter\expandafter |
| 8177 | \csname\the\macname @@@\endcsname | 8208 | \csname\the\macname @@@@\endcsname\paramlist{% |
| 8178 | \paramlist{% | 8209 | \egroup\noexpand\scanmacro{\macrobody}}% |
| 8179 | \egroup | ||
| 8180 | \noexpand\scanmacro{\macrobody}% | ||
| 8181 | }% | ||
| 8182 | \else % 10 or more: | 8210 | \else % 10 or more: |
| 8183 | \expandafter\xdef\csname\the\macname\endcsname{% | 8211 | \expandafter\xdef\csname\the\macname\endcsname{% |
| 8184 | \noexpand\getargvals@{\the\macname}{\argl}% | 8212 | \noexpand\getargvals@{\the\macname}{\argl}% |
| @@ -8194,71 +8222,96 @@ end | |||
| 8194 | \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} | 8222 | \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} |
| 8195 | 8223 | ||
| 8196 | 8224 | ||
| 8197 | {\catcode`\@=0 \catcode`\\=13 | 8225 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 8198 | @catcode`@_=11 | 8226 | % |
| 8227 | {\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape | ||
| 8228 | @catcode`@_=11 % private names | ||
| 8229 | @catcode`@!=11 % used as argument separator | ||
| 8199 | 8230 | ||
| 8231 | % \passargtomacro#1#2 - | ||
| 8200 | % Call #1 with a list of tokens #2, with any doubled backslashes in #2 | 8232 | % Call #1 with a list of tokens #2, with any doubled backslashes in #2 |
| 8201 | % compressed to one. | 8233 | % compressed to one. |
| 8234 | % | ||
| 8235 | % This implementation works by expansion, and not execution (so we cannot use | ||
| 8236 | % \def or similar). This reduces the risk of this failing in contexts where | ||
| 8237 | % complete expansion is done with no execution (for example, in writing out to | ||
| 8238 | % an auxiliary file for an index entry). | ||
| 8239 | % | ||
| 8240 | % State is kept in the input stream: the argument passed to | ||
| 8241 | % @look_ahead, @gobble_and_check_finish and @add_segment is | ||
| 8242 | % | ||
| 8243 | % THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) | ||
| 8244 | % | ||
| 8245 | % where: | ||
| 8246 | % THE_MACRO - name of the macro we want to call | ||
| 8247 | % ARG_RESULT - argument list we build to pass to that macro | ||
| 8248 | % PENDING_BS - either a backslash or nothing | ||
| 8249 | % NEXT_TOKEN - used to look ahead in the input stream to see what's coming next | ||
| 8250 | |||
| 8202 | @gdef@passargtomacro#1#2{% | 8251 | @gdef@passargtomacro#1#2{% |
| 8203 | @def@the_macro{#1}% | 8252 | @add_segment #1!{}@relax#2\@_finish\% |
| 8204 | @def@pending_backslash{}% | ||
| 8205 | @def@finish{@finish}% | ||
| 8206 | @def@arg_result{}% | ||
| 8207 | @let@next_token=@relax | ||
| 8208 | @add_segment#2\@finish\% | ||
| 8209 | } | ||
| 8210 | |||
| 8211 | % Input stream is just after a backslash. If the next token is not a | ||
| 8212 | % backslash, process the rest of the argument; otherwise, remove the next | ||
| 8213 | % token. | ||
| 8214 | @gdef@look_ahead{% | ||
| 8215 | @futurelet@next_token@look_aheadzzz} | ||
| 8216 | @gdef@look_aheadzzz{% | ||
| 8217 | @ifx@next_token\% | ||
| 8218 | @let@next=@gobble_and_check_finish | ||
| 8219 | @else | ||
| 8220 | @let@next=@add_segment | ||
| 8221 | @fi@next | ||
| 8222 | } | 8253 | } |
| 8254 | @gdef@_finish{@_finishx} @global@let@_finishx@relax | ||
| 8223 | 8255 | ||
| 8224 | % Double backslash found. Add a single backslash here. | 8256 | % #1 - THE_MACRO ARG_RESULT |
| 8225 | @gdef@gobble_and_check_finish#1{% | 8257 | % #2 - PENDING_BS |
| 8226 | @add_the_backslash | 8258 | % #3 - NEXT_TOKEN |
| 8227 | @def@pending_backslash{}% | 8259 | % #4 used to look ahead |
| 8228 | @futurelet@next_token@add_segment | 8260 | % |
| 8261 | % If the next token is not a backslash, process the rest of the argument; | ||
| 8262 | % otherwise, remove the next token. | ||
| 8263 | @gdef@look_ahead#1!#2#3#4{% | ||
| 8264 | @ifx#4\% | ||
| 8265 | @expandafter@gobble_and_check_finish | ||
| 8266 | @else | ||
| 8267 | @expandafter@add_segment | ||
| 8268 | @fi#1!{#2}#4#4% | ||
| 8229 | } | 8269 | } |
| 8230 | 8270 | ||
| 8231 | % append a backslash to \arg_result | 8271 | % #1 - THE_MACRO ARG_RESULT |
| 8232 | @gdef@add_the_backslash{% | 8272 | % #2 - PENDING_BS |
| 8233 | @expandafter@gdef@expandafter@arg_result@expandafter{@arg_result\}% | 8273 | % #3 - NEXT_TOKEN |
| 8274 | % #4 should be a backslash, which is gobbled. | ||
| 8275 | % #5 looks ahead | ||
| 8276 | % | ||
| 8277 | % Double backslash found. Add a single backslash, and look ahead. | ||
| 8278 | @gdef@gobble_and_check_finish#1!#2#3#4#5{% | ||
| 8279 | @add_segment#1\!{}#5#5% | ||
| 8234 | } | 8280 | } |
| 8235 | 8281 | ||
| 8282 | @gdef@is_fi{@fi} | ||
| 8283 | |||
| 8284 | % #1 - THE_MACRO ARG_RESULT | ||
| 8285 | % #2 - PENDING_BS | ||
| 8286 | % #3 - NEXT_TOKEN | ||
| 8287 | % #4 is input stream until next backslash | ||
| 8288 | % | ||
| 8236 | % Input stream is either at the start of the argument, or just after a | 8289 | % Input stream is either at the start of the argument, or just after a |
| 8237 | % backslash sequence, either a lone backslash, or a doubled backslash. | 8290 | % backslash sequence, either a lone backslash, or a doubled backslash. |
| 8238 | % \next_token contains the first token in the input stream: if it is \finish, | 8291 | % NEXT_TOKEN contains the first token in the input stream: if it is \finish, |
| 8239 | % finish; otherwise, append to \arg_result the segment of the argument up until | 8292 | % finish; otherwise, append to ARG_RESULT the segment of the argument up until |
| 8240 | % the next backslash. \pending_backslash contains a backslash to represent | 8293 | % the next backslash. PENDING_BACKSLASH contains a backslash to represent |
| 8241 | % a backslash just before the start of the input stream that has not been | 8294 | % a backslash just before the start of the input stream that has not been |
| 8242 | % added to \arg_result. | 8295 | % added to ARG_RESULT. |
| 8243 | @gdef@add_segment#1\{% | 8296 | @gdef@add_segment#1!#2#3#4\{% |
| 8244 | @ifx@next_token@finish | 8297 | @ifx#3@_finish |
| 8245 | @let@next=@call_the_macro% | 8298 | @call_the_macro#1!% |
| 8246 | @else | 8299 | @else |
| 8247 | @let@next=@look_ahead | 8300 | % append the pending backslash to the result, followed by the next segment |
| 8248 | % | 8301 | @expandafter@is_fi@look_ahead#1#2#4!{\}@fi |
| 8249 | % append to @arg_result | 8302 | % this @fi is discarded by @look_ahead. |
| 8250 | % token list registers might be better | 8303 | % we can't get rid of it with \expandafter because we don't know how |
| 8251 | @expandafter@expandafter@expandafter@gdef | 8304 | % long #4 is. |
| 8252 | @expandafter@expandafter@expandafter@arg_result | 8305 | } |
| 8253 | @expandafter@expandafter@expandafter{% | ||
| 8254 | @expandafter@arg_result | ||
| 8255 | @pending_backslash#1}% | ||
| 8256 | @def@pending_backslash{\}% | ||
| 8257 | @fi@next} | ||
| 8258 | 8306 | ||
| 8259 | @gdef@call_the_macro{@expandafter@the_macro@expandafter{@arg_result}} | 8307 | % #1 - THE_MACRO |
| 8308 | % #2 - ARG_RESULT | ||
| 8309 | % #3 discards the res of the conditional in @add_segment, and @is_fi ends the | ||
| 8310 | % conditional. | ||
| 8311 | @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} | ||
| 8260 | 8312 | ||
| 8261 | } | 8313 | } |
| 8314 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
| 8262 | 8315 | ||
| 8263 | % \braceorline MAC is used for a one-argument macro MAC. It checks | 8316 | % \braceorline MAC is used for a one-argument macro MAC. It checks |
| 8264 | % whether the next non-whitespace character is a {. It sets the context | 8317 | % whether the next non-whitespace character is a {. It sets the context |
| @@ -10818,11 +10871,12 @@ directory should work if nowhere else does.} | |||
| 10818 | % this is not a problem. | 10871 | % this is not a problem. |
| 10819 | \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} | 10872 | \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} |
| 10820 | 10873 | ||
| 10821 | % Turn off all special characters except @ | 10874 | % Set catcodes for Texinfo file |
| 10822 | % (and those which the user can use as if they were ordinary). | 10875 | |
| 10876 | % Active characters for printing the wanted glyph. | ||
| 10823 | % Most of these we simply print from the \tt font, but for some, we can | 10877 | % Most of these we simply print from the \tt font, but for some, we can |
| 10824 | % use math or other variants that look better in normal text. | 10878 | % use math or other variants that look better in normal text. |
| 10825 | 10879 | % | |
| 10826 | \catcode`\"=\active | 10880 | \catcode`\"=\active |
| 10827 | \def\activedoublequote{{\tt\char34}} | 10881 | \def\activedoublequote{{\tt\char34}} |
| 10828 | \let"=\activedoublequote | 10882 | \let"=\activedoublequote |
| @@ -10832,12 +10886,10 @@ directory should work if nowhere else does.} | |||
| 10832 | 10886 | ||
| 10833 | \catcode`\_=\active | 10887 | \catcode`\_=\active |
| 10834 | \def_{\ifusingtt\normalunderscore\_} | 10888 | \def_{\ifusingtt\normalunderscore\_} |
| 10835 | \let\realunder=_ | ||
| 10836 | % Subroutine for the previous macro. | ||
| 10837 | \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } | 10889 | \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } |
| 10890 | \let\realunder=_ | ||
| 10838 | 10891 | ||
| 10839 | \catcode`\|=\active | 10892 | \catcode`\|=\active \def|{{\tt\char124}} |
| 10840 | \def|{{\tt\char124}} | ||
| 10841 | 10893 | ||
| 10842 | \chardef \less=`\< | 10894 | \chardef \less=`\< |
| 10843 | \catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless | 10895 | \catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 67c7e184016..17a01af0adb 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | # the same distribution terms as the rest of that program. | 21 | # the same distribution terms as the rest of that program. |
| 22 | # | 22 | # |
| 23 | # Generated by gnulib-tool. | 23 | # Generated by gnulib-tool. |
| 24 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings | 24 | # Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=flexmember --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | MOSTLYCLEANFILES += core *.stackdump | 27 | MOSTLYCLEANFILES += core *.stackdump |
diff --git a/lib/intprops.h b/lib/intprops.h index 8fff86d4371..ecafaf70e15 100644 --- a/lib/intprops.h +++ b/lib/intprops.h | |||
| @@ -272,9 +272,10 @@ | |||
| 272 | 272 | ||
| 273 | Example usage, assuming A and B are long int: | 273 | Example usage, assuming A and B are long int: |
| 274 | 274 | ||
| 275 | long int result = INT_MULTIPLY_WRAPV (a, b); | 275 | if (INT_MULTIPLY_OVERFLOW (a, b)) |
| 276 | printf ("result is %ld (%s)\n", result, | 276 | printf ("result would overflow\n"); |
| 277 | INT_MULTIPLY_OVERFLOW (a, b) ? "after overflow" : "no overflow"); | 277 | else |
| 278 | printf ("result is %ld (no overflow)\n", a * b); | ||
| 278 | 279 | ||
| 279 | Example usage with WRAPV flavor: | 280 | Example usage with WRAPV flavor: |
| 280 | 281 | ||