source: patches/glibc-2.7-branch_update-1.patch@ f658089

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since f658089 was f844709, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Added patch.

  • Property mode set to 100644
File size: 64.2 KB
RevLine 
[f844709]1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
2Date: 10-25-2007
3Initial Package Version: 2.7
4Origin: Upstream
5Upstream Status: Applied
6Description: This is a branch update for Glibc-2.7, and should be
7 rechecked periodically. See the 'Changelog' and 'localedata/ChangeLog'
8 for specific details.
9
10diff -Naur glibc-2.7.orig/ChangeLog glibc-2.7/ChangeLog
11--- glibc-2.7.orig/ChangeLog 2007-10-17 17:09:32.000000000 -0700
12+++ glibc-2.7/ChangeLog 2007-10-21 22:03:58.000000000 -0700
13@@ -1,3 +1,17 @@
14+2007-10-21 Andreas Jaeger <aj@suse.de>
15+
16+ * manual/texinfo.tex: Update to latest version.
17+
18+ * manual/sysinfo.texi (System Parameters): Fix Formatting.
19+
20+ * manual/arith.texi (Status bit operations): Fix formatting.
21+
22+ * manual/errno.texi (Error Messages): Fix formatting.
23+
24+ * manual/sysinfo.texi (System Parameters): Fix formatting.
25+
26+ * manual/libc.texinfo: Update VERSION and UPDATED.
27+
28 2007-10-17 Jakub Jelinek <jakub@redhat.com>
29
30 * sysdeps/x86_64/memset.S (bzero): Renamed to __bzero. Add
31diff -Naur glibc-2.7.orig/manual/arith.texi glibc-2.7/manual/arith.texi
32--- glibc-2.7.orig/manual/arith.texi 2004-10-05 20:02:14.000000000 -0700
33+++ glibc-2.7/manual/arith.texi 2007-10-21 22:03:58.000000000 -0700
34@@ -778,8 +778,7 @@
35
36 @comment fenv.h
37 @comment ISO
38-@deftypefun int fesetexceptflag (const fexcept_t *@var{flagp}, int
39-@var{excepts})
40+@deftypefun int fesetexceptflag (const fexcept_t *@var{flagp}, int @var{excepts})
41 This function restores the flags for the exceptions indicated by
42 @var{excepts} to the values stored in the variable pointed to by
43 @var{flagp}.
44diff -Naur glibc-2.7.orig/manual/errno.texi glibc-2.7/manual/errno.texi
45--- glibc-2.7.orig/manual/errno.texi 2007-07-21 23:53:48.000000000 -0700
46+++ glibc-2.7/manual/errno.texi 2007-10-21 22:03:58.000000000 -0700
47@@ -1494,7 +1494,7 @@
48
49 @comment error.h
50 @comment GNU
51-@deftypevar {void (*} error_print_progname ) (void)
52+@deftypevar {void (*) error_print_progname } (void)
53 If the @code{error_print_progname} variable is defined to a non-zero
54 value the function pointed to is called by @code{error} or
55 @code{error_at_line}. It is expected to print the program name or do
56diff -Naur glibc-2.7.orig/manual/libc.texinfo glibc-2.7/manual/libc.texinfo
57--- glibc-2.7.orig/manual/libc.texinfo 2007-07-30 18:53:58.000000000 -0700
58+++ glibc-2.7/manual/libc.texinfo 2007-10-21 22:03:58.000000000 -0700
59@@ -19,8 +19,8 @@
60
61 @c sold 0.06/1.09, print run out 21may96
62 @set EDITION 0.11
63-@set VERSION 2.6
64-@set UPDATED 2006-12-03
65+@set VERSION 2.7
66+@set UPDATED 2007-09-09
67 @set ISBN 1-882114-55-8
68
69 @copying
70diff -Naur glibc-2.7.orig/manual/sysinfo.texi glibc-2.7/manual/sysinfo.texi
71--- glibc-2.7.orig/manual/sysinfo.texi 2006-11-10 13:10:22.000000000 -0800
72+++ glibc-2.7/manual/sysinfo.texi 2007-10-21 22:03:58.000000000 -0700
73@@ -1066,8 +1066,7 @@
74
75 @comment sysctl.h
76 @comment BSD
77-@deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldval},
78- size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen})
79+@deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldval}, size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen})
80
81 @code{sysctl} gets or sets a specified system parameter. There are so
82 many of these parameters that it is not practical to list them all here,
83diff -Naur glibc-2.7.orig/manual/texinfo.tex glibc-2.7/manual/texinfo.tex
84--- glibc-2.7.orig/manual/texinfo.tex 2005-02-15 20:23:16.000000000 -0800
85+++ glibc-2.7/manual/texinfo.tex 2007-10-21 22:03:58.000000000 -0700
86@@ -3,11 +3,11 @@
87 % Load plain if necessary, i.e., if running under initex.
88 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
89 %
90-\def\texinfoversion{2004-11-25.16}
91+\def\texinfoversion{2006-11-08.17}
92 %
93 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
94-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
95-% Foundation, Inc.
96+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
97+% Software Foundation, Inc.
98 %
99 % This texinfo.tex file is free software; you can redistribute it and/or
100 % modify it under the terms of the GNU General Public License as
101@@ -21,8 +21,8 @@
102 %
103 % You should have received a copy of the GNU General Public License
104 % along with this texinfo.tex file; see the file COPYING. If not, write
105-% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
106-% Boston, MA 02111-1307, USA.
107+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
108+% Boston, MA 02110-1301, USA.
109 %
110 % As a special exception, when this file is read by TeX when processing
111 % a Texinfo source document, you may use the result without
112@@ -153,20 +153,22 @@
113 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
114 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
115
116-% In some macros, we cannot use the `\? notation---the left quote is
117-% in some cases the escape char.
118+% Since the category of space is not known, we have to be careful.
119+\chardef\spacecat = 10
120+\def\spaceisspace{\catcode`\ =\spacecat}
121+
122+% sometimes characters are active, so we need control sequences.
123 \chardef\colonChar = `\:
124 \chardef\commaChar = `\,
125+\chardef\dashChar = `\-
126 \chardef\dotChar = `\.
127 \chardef\exclamChar= `\!
128+\chardef\lquoteChar= `\`
129 \chardef\questChar = `\?
130+\chardef\rquoteChar= `\'
131 \chardef\semiChar = `\;
132 \chardef\underChar = `\_
133
134-\chardef\spaceChar = `\ %
135-\chardef\spacecat = 10
136-\def\spaceisspace{\catcode\spaceChar=\spacecat}
137-
138 % Ignore a token.
139 %
140 \def\gobble#1{}
141@@ -302,10 +304,14 @@
142 % take effect in \write's, yet the group defined by the \vbox ends
143 % before the \shipout runs.
144 %
145- \escapechar = `\\ % use backslash in output files.
146 \indexdummies % don't expand commands in the output.
147 \normalturnoffactive % \ in index entries must not stay \, e.g., if
148- % the page break happens to be in the middle of an example.
149+ % the page break happens to be in the middle of an example.
150+ % We don't want .vr (or whatever) entries like this:
151+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
152+ % "\acronym" won't work when it's read back in;
153+ % it needs to be
154+ % {\code {{\tt \backslashcurfont }acronym}
155 \shipout\vbox{%
156 % Do this early so pdf references go to the beginning of the page.
157 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
158@@ -333,9 +339,9 @@
159 \pagebody{#1}%
160 \ifdim\ht\footlinebox > 0pt
161 % Only leave this space if the footline is nonempty.
162- % (We lessened \vsize for it in \oddfootingxxx.)
163+ % (We lessened \vsize for it in \oddfootingyyy.)
164 % The \baselineskip=24pt in plain's \makefootline has no effect.
165- \vskip 2\baselineskip
166+ \vskip 24pt
167 \unvbox\footlinebox
168 \fi
169 %
170@@ -356,7 +362,7 @@
171 \egroup % \vbox from first cropmarks clause
172 \fi
173 }% end of \shipout\vbox
174- }% end of group with \normalturnoffactive
175+ }% end of group with \indexdummies
176 \advancepageno
177 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
178 }
179@@ -391,7 +397,7 @@
180 %
181 \def\parsearg{\parseargusing{}}
182 \def\parseargusing#1#2{%
183- \def\next{#2}%
184+ \def\argtorun{#2}%
185 \begingroup
186 \obeylines
187 \spaceisspace
188@@ -422,8 +428,7 @@
189 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
190 \def\temp{#3}%
191 \ifx\temp\empty
192- % We cannot use \next here, as it holds the macro to run;
193- % thus we reuse \temp.
194+ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
195 \let\temp\finishparsearg
196 \else
197 \let\temp\argcheckspaces
198@@ -435,14 +440,14 @@
199 % If a _delimited_ argument is enclosed in braces, they get stripped; so
200 % to get _exactly_ the rest of the line, we had to prevent such situation.
201 % We prepended an \empty token at the very beginning and we expand it now,
202-% just before passing the control to \next.
203+% just before passing the control to \argtorun.
204 % (Similarily, we have to think about #3 of \argcheckspacesY above: it is
205 % either the null string, or it ends with \^^M---thus there is no danger
206 % that a pair of braces would be stripped.
207 %
208 % But first, we have to remove the trailing space token.
209 %
210-\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
211+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
212
213 % \parseargdef\foo{...}
214 % is roughly equivalent to
215@@ -566,7 +571,7 @@
216 \let\}=\myrbrace
217 \begingroup
218 % Definitions to produce \{ and \} commands for indices,
219- % and @{ and @} for the aux file.
220+ % and @{ and @} for the aux/toc files.
221 \catcode`\{ = \other \catcode`\} = \other
222 \catcode`\[ = 1 \catcode`\] = 2
223 \catcode`\! = 0 \catcode`\\ = \other
224@@ -647,13 +652,28 @@
225 \let\/=\allowbreak
226
227 % @. is an end-of-sentence period.
228-\def\.{.\spacefactor=3000 }
229+\def\.{.\spacefactor=\endofsentencespacefactor\space}
230
231 % @! is an end-of-sentence bang.
232-\def\!{!\spacefactor=3000 }
233+\def\!{!\spacefactor=\endofsentencespacefactor\space}
234
235 % @? is an end-of-sentence query.
236-\def\?{?\spacefactor=3000 }
237+\def\?{?\spacefactor=\endofsentencespacefactor\space}
238+
239+% @frenchspacing on|off says whether to put extra space after punctuation.
240+%
241+\def\onword{on}
242+\def\offword{off}
243+%
244+\parseargdef\frenchspacing{%
245+ \def\temp{#1}%
246+ \ifx\temp\onword \plainfrenchspacing
247+ \else\ifx\temp\offword \plainnonfrenchspacing
248+ \else
249+ \errhelp = \EMsimple
250+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
251+ \fi\fi
252+}
253
254 % @w prevents a word break. Without the \leavevmode, @w at the
255 % beginning of a paragraph, when TeX is still in vertical mode, would
256@@ -1031,9 +1051,9 @@
257 % _ active, and distinguish by seeing if the current family is \slfam,
258 % which is what @var uses.
259 {
260- \catcode\underChar = \active
261+ \catcode`\_ = \active
262 \gdef\mathunderscore{%
263- \catcode\underChar=\active
264+ \catcode`\_=\active
265 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
266 }
267 }
268@@ -1076,15 +1096,24 @@
269 \def\minus{$-$}
270
271 % @dots{} outputs an ellipsis using the current font.
272-% We do .5em per period so that it has the same spacing in a typewriter
273-% font as three actual period characters.
274+% We do .5em per period so that it has the same spacing in the cm
275+% typewriter fonts as three actual period characters; on the other hand,
276+% in other typewriter fonts three periods are wider than 1.5em. So do
277+% whichever is larger.
278 %
279 \def\dots{%
280 \leavevmode
281- \hbox to 1.5em{%
282- \hskip 0pt plus 0.25fil
283- .\hfil.\hfil.%
284- \hskip 0pt plus 0.5fil
285+ \setbox0=\hbox{...}% get width of three periods
286+ \ifdim\wd0 > 1.5em
287+ \dimen0 = \wd0
288+ \else
289+ \dimen0 = 1.5em
290+ \fi
291+ \hbox to \dimen0{%
292+ \hskip 0pt plus.25fil
293+ .\hskip 0pt plus1fil
294+ .\hskip 0pt plus1fil
295+ .\hskip 0pt plus.5fil
296 }%
297 }
298
299@@ -1092,7 +1121,7 @@
300 %
301 \def\enddots{%
302 \dots
303- \spacefactor=3000
304+ \spacefactor=\endofsentencespacefactor
305 }
306
307 % @comma{} is so commas can be inserted into text without messing up
308@@ -1176,13 +1205,98 @@
309 \fi
310 \fi
311 \fi
312-%
313+
314+% PDF uses PostScript string constants for the names of xref targets,
315+% for display in the outlines, and in other places. Thus, we have to
316+% double any backslashes. Otherwise, a name like "\node" will be
317+% interpreted as a newline (\n), followed by o, d, e. Not good.
318+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
319+% (and related messages, the final outcome is that it is up to the TeX
320+% user to double the backslashes and otherwise make the string valid, so
321+% that's what we do).
322+
323+% double active backslashes.
324+%
325+{\catcode`\@=0 \catcode`\\=\active
326+ @gdef@activebackslashdouble{%
327+ @catcode`@\=@active
328+ @let\=@doublebackslash}
329+}
330+
331+% To handle parens, we must adopt a different approach, since parens are
332+% not active characters. hyperref.dtx (which has the same problem as
333+% us) handles it with this amazing macro to replace tokens. I've
334+% tinkered with it a little for texinfo, but it's definitely from there.
335+%
336+% #1 is the tokens to replace.
337+% #2 is the replacement.
338+% #3 is the control sequence with the string.
339+%
340+\def\HyPsdSubst#1#2#3{%
341+ \def\HyPsdReplace##1#1##2\END{%
342+ ##1%
343+ \ifx\\##2\\%
344+ \else
345+ #2%
346+ \HyReturnAfterFi{%
347+ \HyPsdReplace##2\END
348+ }%
349+ \fi
350+ }%
351+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
352+}
353+\long\def\HyReturnAfterFi#1\fi{\fi#1}
354+
355+% #1 is a control sequence in which to do the replacements.
356+\def\backslashparens#1{%
357+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
358+ % \lastnode when called from \setref -> \pdfmkdest.
359+ \HyPsdSubst{(}{\realbackslash(}{#1}%
360+ \HyPsdSubst{)}{\realbackslash)}{#1}%
361+}
362+
363+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
364+with PDF output, and none of those formats could be found. (.eps cannot
365+be supported due to the design of the PDF format; use regular TeX (DVI
366+output) for that.)}
367+
368 \ifpdf
369 \input pdfcolor
370 \pdfcatalog{/PageMode /UseOutlines}%
371+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
372 \def\dopdfimage#1#2#3{%
373- \def\imagewidth{#2}%
374- \def\imageheight{#3}%
375+ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
376+ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
377+ %
378+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among
379+ % others). Let's try in that order.
380+ \let\pdfimgext=\empty
381+ \begingroup
382+ \openin 1 #1.png \ifeof 1
383+ \openin 1 #1.jpg \ifeof 1
384+ \openin 1 #1.jpeg \ifeof 1
385+ \openin 1 #1.JPG \ifeof 1
386+ \openin 1 #1.pdf \ifeof 1
387+ \errhelp = \nopdfimagehelp
388+ \errmessage{Could not find image file #1 for pdf}%
389+ \else
390+ \gdef\pdfimgext{pdf}%
391+ \fi
392+ \else
393+ \gdef\pdfimgext{JPG}%
394+ \fi
395+ \else
396+ \gdef\pdfimgext{jpeg}%
397+ \fi
398+ \else
399+ \gdef\pdfimgext{jpg}%
400+ \fi
401+ \else
402+ \gdef\pdfimgext{png}%
403+ \fi
404+ \closein 1
405+ \endgroup
406+ %
407 % without \immediate, pdftex seg faults when the same image is
408 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
409 \ifnum\pdftexversion < 14
410@@ -1190,24 +1304,29 @@
411 \else
412 \immediate\pdfximage
413 \fi
414- \ifx\empty\imagewidth\else width \imagewidth \fi
415- \ifx\empty\imageheight\else height \imageheight \fi
416+ \ifdim \wd0 >0pt width \imagewidth \fi
417+ \ifdim \wd2 >0pt height \imageheight \fi
418 \ifnum\pdftexversion<13
419- #1.pdf%
420+ #1.\pdfimgext
421 \else
422- {#1.pdf}%
423+ {#1.\pdfimgext}%
424 \fi
425 \ifnum\pdftexversion < 14 \else
426 \pdfrefximage \pdflastximage
427 \fi}
428 \def\pdfmkdest#1{{%
429- % We have to set dummies so commands such as @code in a section title
430- % aren't expanded.
431+ % We have to set dummies so commands such as @code, and characters
432+ % such as \, aren't expanded when present in a section title.
433 \atdummies
434- \normalturnoffactive
435- \pdfdest name{#1} xyz%
436- }}
437- \def\pdfmkpgn#1{#1}
438+ \activebackslashdouble
439+ \def\pdfdestname{#1}%
440+ \backslashparens\pdfdestname
441+ \pdfdest name{\pdfdestname} xyz%
442+ }}%
443+ %
444+ % used to mark target names; must be expandable.
445+ \def\pdfmkpgn#1{#1}%
446+ %
447 \let\linkcolor = \Blue % was Cyan, but that seems light?
448 \def\endlink{\Black\pdfendlink}
449 % Adding outlines to PDF; macros for calculating structure of outlines
450@@ -1218,20 +1337,31 @@
451 \advance\tempnum by 1
452 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
453 %
454- % #1 is the section text. #2 is the pdf expression for the number
455- % of subentries (or empty, for subsubsections). #3 is the node
456- % text, which might be empty if this toc entry had no
457- % corresponding node. #4 is the page number.
458+ % #1 is the section text, which is what will be displayed in the
459+ % outline by the pdf viewer. #2 is the pdf expression for the number
460+ % of subentries (or empty, for subsubsections). #3 is the node text,
461+ % which might be empty if this toc entry had no corresponding node.
462+ % #4 is the page number
463 %
464 \def\dopdfoutline#1#2#3#4{%
465 % Generate a link to the node text if that exists; else, use the
466 % page number. We could generate a destination for the section
467 % text in the case where a section has no node, but it doesn't
468- % seem worthwhile, since most documents are normally structured.
469+ % seem worth the trouble, since most documents are normally structured.
470 \def\pdfoutlinedest{#3}%
471- \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi
472+ \ifx\pdfoutlinedest\empty
473+ \def\pdfoutlinedest{#4}%
474+ \else
475+ % Doubled backslashes in the name.
476+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
477+ \backslashparens\pdfoutlinedest}%
478+ \fi
479 %
480- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}%
481+ % Also double the backslashes in the display string.
482+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
483+ \backslashparens\pdfoutlinetext}%
484+ %
485+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
486 }
487 %
488 \def\pdfmakeoutlines{%
489@@ -1272,7 +1402,7 @@
490 \def\unnsecentry{\numsecentry}%
491 \def\unnsubsecentry{\numsubsecentry}%
492 \def\unnsubsubsecentry{\numsubsubsecentry}%
493- \input \jobname.toc
494+ \readdatafile{toc}%
495 %
496 % Read toc second time, this time actually producing the outlines.
497 % The `-' means take the \expnumber as the absolute number of
498@@ -1298,41 +1428,12 @@
499 % their "best" equivalent, based on the @documentencoding. Right
500 % now, I guess we'll just let the pdf reader have its way.
501 \indexnofonts
502- \turnoffactive
503+ \setupdatafile
504+ \catcode`\\=\active \otherbackslash
505 \input \jobname.toc
506 \endgroup
507 }
508 %
509- \def\makelinks #1,{%
510- \def\params{#1}\def\E{END}%
511- \ifx\params\E
512- \let\nextmakelinks=\relax
513- \else
514- \let\nextmakelinks=\makelinks
515- \ifnum\lnkcount>0,\fi
516- \picknum{#1}%
517- \startlink attr{/Border [0 0 0]}
518- goto name{\pdfmkpgn{\the\pgn}}%
519- \linkcolor #1%
520- \advance\lnkcount by 1%
521- \endlink
522- \fi
523- \nextmakelinks
524- }
525- \def\picknum#1{\expandafter\pn#1}
526- \def\pn#1{%
527- \def\p{#1}%
528- \ifx\p\lbrace
529- \let\nextpn=\ppn
530- \else
531- \let\nextpn=\ppnn
532- \def\first{#1}
533- \fi
534- \nextpn
535- }
536- \def\ppn#1{\pgn=#1\gobble}
537- \def\ppnn{\pgn=\first}
538- \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
539 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
540 \ifx\PP\D\let\nextsp\relax
541 \else\let\nextsp\skipspaces
542@@ -1347,9 +1448,17 @@
543 \else
544 \let \startlink \pdfstartlink
545 \fi
546+ % make a live url in pdf output.
547 \def\pdfurl#1{%
548 \begingroup
549- \normalturnoffactive\def\@{@}%
550+ % it seems we really need yet another set of dummies; have not
551+ % tried to figure out what each command should do in the context
552+ % of @url. for now, just make @/ a no-op, that's the only one
553+ % people have actually reported a problem with.
554+ %
555+ \normalturnoffactive
556+ \def\@{@}%
557+ \let\/=\empty
558 \makevalueexpandable
559 \leavevmode\Red
560 \startlink attr{/Border [0 0 0]}%
561@@ -1419,6 +1528,7 @@
562 % We don't need math for this font style.
563 \def\ttsl{\setfontstyle{ttsl}}
564
565+
566 % Default leading.
567 \newdimen\textleading \textleading = 13.2pt
568
569@@ -1440,11 +1550,13 @@
570 }%
571 }
572
573+
574 % Set the font macro #1 to the font named #2, adding on the
575 % specified font prefix (normally `cm').
576 % #3 is the font's design size, #4 is a scale factor
577 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
578
579+
580 % Use cm as the default font prefix.
581 % To specify the font prefix, you must define \fontprefix
582 % before you read in texinfo.tex.
583@@ -1468,6 +1580,10 @@
584 \def\scshape{csc}
585 \def\scbshape{csc}
586
587+% Definitions for a main text size of 11pt. This is the default in
588+% Texinfo.
589+%
590+\def\definetextfontsizexi{
591 % Text fonts (11.2pt, magstep1).
592 \def\textnominalsize{11pt}
593 \edef\mainmagstep{\magstephalf}
594@@ -1581,6 +1697,165 @@
595 \font\reducedi=cmmi10
596 \font\reducedsy=cmsy10
597
598+% reset the current fonts
599+\textfonts
600+\rm
601+} % end of 11pt text font size definitions
602+
603+
604+% Definitions to make the main text be 10pt Computer Modern, with
605+% section, chapter, etc., sizes following suit. This is for the GNU
606+% Press printing of the Emacs 22 manual. Maybe other manuals in the
607+% future. Used with @smallbook, which sets the leading to 12pt.
608+%
609+\def\definetextfontsizex{%
610+% Text fonts (10pt).
611+\def\textnominalsize{10pt}
612+\edef\mainmagstep{1000}
613+\setfont\textrm\rmshape{10}{\mainmagstep}
614+\setfont\texttt\ttshape{10}{\mainmagstep}
615+\setfont\textbf\bfshape{10}{\mainmagstep}
616+\setfont\textit\itshape{10}{\mainmagstep}
617+\setfont\textsl\slshape{10}{\mainmagstep}
618+\setfont\textsf\sfshape{10}{\mainmagstep}
619+\setfont\textsc\scshape{10}{\mainmagstep}
620+\setfont\textttsl\ttslshape{10}{\mainmagstep}
621+\font\texti=cmmi10 scaled \mainmagstep
622+\font\textsy=cmsy10 scaled \mainmagstep
623+
624+% A few fonts for @defun names and args.
625+\setfont\defbf\bfshape{10}{\magstephalf}
626+\setfont\deftt\ttshape{10}{\magstephalf}
627+\setfont\defttsl\ttslshape{10}{\magstephalf}
628+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
629+
630+% Fonts for indices, footnotes, small examples (9pt).
631+\def\smallnominalsize{9pt}
632+\setfont\smallrm\rmshape{9}{1000}
633+\setfont\smalltt\ttshape{9}{1000}
634+\setfont\smallbf\bfshape{10}{900}
635+\setfont\smallit\itshape{9}{1000}
636+\setfont\smallsl\slshape{9}{1000}
637+\setfont\smallsf\sfshape{9}{1000}
638+\setfont\smallsc\scshape{10}{900}
639+\setfont\smallttsl\ttslshape{10}{900}
640+\font\smalli=cmmi9
641+\font\smallsy=cmsy9
642+
643+% Fonts for small examples (8pt).
644+\def\smallernominalsize{8pt}
645+\setfont\smallerrm\rmshape{8}{1000}
646+\setfont\smallertt\ttshape{8}{1000}
647+\setfont\smallerbf\bfshape{10}{800}
648+\setfont\smallerit\itshape{8}{1000}
649+\setfont\smallersl\slshape{8}{1000}
650+\setfont\smallersf\sfshape{8}{1000}
651+\setfont\smallersc\scshape{10}{800}
652+\setfont\smallerttsl\ttslshape{10}{800}
653+\font\smalleri=cmmi8
654+\font\smallersy=cmsy8
655+
656+% Fonts for title page (20.4pt):
657+\def\titlenominalsize{20pt}
658+\setfont\titlerm\rmbshape{12}{\magstep3}
659+\setfont\titleit\itbshape{10}{\magstep4}
660+\setfont\titlesl\slbshape{10}{\magstep4}
661+\setfont\titlett\ttbshape{12}{\magstep3}
662+\setfont\titlettsl\ttslshape{10}{\magstep4}
663+\setfont\titlesf\sfbshape{17}{\magstep1}
664+\let\titlebf=\titlerm
665+\setfont\titlesc\scbshape{10}{\magstep4}
666+\font\titlei=cmmi12 scaled \magstep3
667+\font\titlesy=cmsy10 scaled \magstep4
668+\def\authorrm{\secrm}
669+\def\authortt{\sectt}
670+
671+% Chapter fonts (14.4pt).
672+\def\chapnominalsize{14pt}
673+\setfont\chaprm\rmbshape{12}{\magstep1}
674+\setfont\chapit\itbshape{10}{\magstep2}
675+\setfont\chapsl\slbshape{10}{\magstep2}
676+\setfont\chaptt\ttbshape{12}{\magstep1}
677+\setfont\chapttsl\ttslshape{10}{\magstep2}
678+\setfont\chapsf\sfbshape{12}{\magstep1}
679+\let\chapbf\chaprm
680+\setfont\chapsc\scbshape{10}{\magstep2}
681+\font\chapi=cmmi12 scaled \magstep1
682+\font\chapsy=cmsy10 scaled \magstep2
683+
684+% Section fonts (12pt).
685+\def\secnominalsize{12pt}
686+\setfont\secrm\rmbshape{12}{1000}
687+\setfont\secit\itbshape{10}{\magstep1}
688+\setfont\secsl\slbshape{10}{\magstep1}
689+\setfont\sectt\ttbshape{12}{1000}
690+\setfont\secttsl\ttslshape{10}{\magstep1}
691+\setfont\secsf\sfbshape{12}{1000}
692+\let\secbf\secrm
693+\setfont\secsc\scbshape{10}{\magstep1}
694+\font\seci=cmmi12
695+\font\secsy=cmsy10 scaled \magstep1
696+
697+% Subsection fonts (10pt).
698+\def\ssecnominalsize{10pt}
699+\setfont\ssecrm\rmbshape{10}{1000}
700+\setfont\ssecit\itbshape{10}{1000}
701+\setfont\ssecsl\slbshape{10}{1000}
702+\setfont\ssectt\ttbshape{10}{1000}
703+\setfont\ssecttsl\ttslshape{10}{1000}
704+\setfont\ssecsf\sfbshape{10}{1000}
705+\let\ssecbf\ssecrm
706+\setfont\ssecsc\scbshape{10}{1000}
707+\font\sseci=cmmi10
708+\font\ssecsy=cmsy10
709+
710+% Reduced fonts for @acro in text (9pt).
711+\def\reducednominalsize{9pt}
712+\setfont\reducedrm\rmshape{9}{1000}
713+\setfont\reducedtt\ttshape{9}{1000}
714+\setfont\reducedbf\bfshape{10}{900}
715+\setfont\reducedit\itshape{9}{1000}
716+\setfont\reducedsl\slshape{9}{1000}
717+\setfont\reducedsf\sfshape{9}{1000}
718+\setfont\reducedsc\scshape{10}{900}
719+\setfont\reducedttsl\ttslshape{10}{900}
720+\font\reducedi=cmmi9
721+\font\reducedsy=cmsy9
722+
723+% reduce space between paragraphs
724+\divide\parskip by 2
725+
726+% reset the current fonts
727+\textfonts
728+\rm
729+} % end of 10pt text font size definitions
730+
731+
732+% We provide the user-level command
733+% @fonttextsize 10
734+% (or 11) to redefine the text font size. pt is assumed.
735+%
736+\def\xword{10}
737+\def\xiword{11}
738+%
739+\parseargdef\fonttextsize{%
740+ \def\textsizearg{#1}%
741+ \wlog{doing @fonttextsize \textsizearg}%
742+ %
743+ % Set \globaldefs so that documents can use this inside @tex, since
744+ % makeinfo 4.8 does not support it, but we need it nonetheless.
745+ %
746+ \begingroup \globaldefs=1
747+ \ifx\textsizearg\xword \definetextfontsizex
748+ \else \ifx\textsizearg\xiword \definetextfontsizexi
749+ \else
750+ \errhelp=\EMsimple
751+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
752+ \fi\fi
753+ \endgroup
754+}
755+
756+
757 % In order for the font changes to affect most math symbols and letters,
758 % we have to define the \textfont of the standard families. Since
759 % texinfo doesn't allow for producing subscripts and superscripts except
760@@ -1691,7 +1966,7 @@
761
762 % Set up the default fonts, so we can use them for creating boxes.
763 %
764-\textfonts \rm
765+\definetextfontsizexi
766
767 % Define these so they can be easily changed for other fonts.
768 \def\angleleft{$\langle$}
769@@ -1749,14 +2024,21 @@
770 % sometimes \x has an active definition that messes things up.
771 %
772 \catcode`@=11
773- \def\frenchspacing{%
774+ \def\plainfrenchspacing{%
775 \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
776 \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
777+ \def\endofsentencespacefactor{1000}% for @. and friends
778+ }
779+ \def\plainnonfrenchspacing{%
780+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
781+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
782+ \def\endofsentencespacefactor{3000}% for @. and friends
783 }
784 \catcode`@=\other
785+\def\endofsentencespacefactor{3000}% default
786
787 \def\t#1{%
788- {\tt \rawbackslash \frenchspacing #1}%
789+ {\tt \rawbackslash \plainfrenchspacing #1}%
790 \null
791 }
792 \def\samp#1{`\tclose{#1}'\null}
793@@ -1768,6 +2050,7 @@
794 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
795 \kern-0.4pt\hrule}%
796 \kern-.06em\raise0.4pt\hbox{\angleright}}}}
797+\def\key #1{{\nohyphenation \uppercase{#1}}\null}
798 % The old definition, with no lozenge:
799 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
800 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
801@@ -1793,7 +2076,7 @@
802 \nohyphenation
803 %
804 \rawbackslash
805- \frenchspacing
806+ \plainfrenchspacing
807 #1%
808 }%
809 \null
810@@ -1809,12 +2092,21 @@
811 % and arrange explicitly to hyphenate at a dash.
812 % -- rms.
813 {
814- \catcode`\-=\active
815- \catcode`\_=\active
816+ \catcode`\-=\active \catcode`\_=\active
817+ \catcode`\'=\active \catcode`\`=\active
818 %
819 \global\def\code{\begingroup
820- \catcode`\-=\active \let-\codedash
821- \catcode`\_=\active \let_\codeunder
822+ \catcode\rquoteChar=\active \catcode\lquoteChar=\active
823+ \let'\codequoteright \let`\codequoteleft
824+ %
825+ \catcode\dashChar=\active \catcode\underChar=\active
826+ \ifallowcodebreaks
827+ \let-\codedash
828+ \let_\codeunder
829+ \else
830+ \let-\realdash
831+ \let_\realunder
832+ \fi
833 \codex
834 }
835 }
836@@ -1834,6 +2126,28 @@
837 }
838 \def\codex #1{\tclose{#1}\endgroup}
839
840+% An additional complication: the above will allow breaks after, e.g.,
841+% each of the four underscores in __typeof__. This is undesirable in
842+% some manuals, especially if they don't have long identifiers in
843+% general. @allowcodebreaks provides a way to control this.
844+%
845+\newif\ifallowcodebreaks \allowcodebreakstrue
846+
847+\def\keywordtrue{true}
848+\def\keywordfalse{false}
849+
850+\parseargdef\allowcodebreaks{%
851+ \def\txiarg{#1}%
852+ \ifx\txiarg\keywordtrue
853+ \allowcodebreakstrue
854+ \else\ifx\txiarg\keywordfalse
855+ \allowcodebreaksfalse
856+ \else
857+ \errhelp = \EMsimple
858+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
859+ \fi\fi
860+}
861+
862 % @kbd is like @code, except that if the argument is just one @key command,
863 % then @kbd has no effect.
864
865@@ -1841,16 +2155,16 @@
866 % `example' (@kbd uses ttsl only inside of @example and friends),
867 % or `code' (@kbd uses normal tty font always).
868 \parseargdef\kbdinputstyle{%
869- \def\arg{#1}%
870- \ifx\arg\worddistinct
871+ \def\txiarg{#1}%
872+ \ifx\txiarg\worddistinct
873 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
874- \else\ifx\arg\wordexample
875+ \else\ifx\txiarg\wordexample
876 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
877- \else\ifx\arg\wordcode
878+ \else\ifx\txiarg\wordcode
879 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
880 \else
881 \errhelp = \EMsimple
882- \errmessage{Unknown @kbdinputstyle option `\arg'}%
883+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
884 \fi\fi\fi
885 }
886 \def\worddistinct{distinct}
887@@ -1962,7 +2276,7 @@
888 %
889 \def\abbr#1{\doabbr #1,,\finish}
890 \def\doabbr#1,#2,#3\finish{%
891- {\frenchspacing #1}%
892+ {\plainfrenchspacing #1}%
893 \def\temp{#2}%
894 \ifx\temp\empty \else
895 \space ({\unsepspaces \ignorespaces \temp \unskip})%
896@@ -2000,7 +2314,7 @@
897 \def\eurofont{%
898 % We set the font at each command, rather than predefining it in
899 % \textfonts and the other font-switching commands, so that
900- % installations which never need the symbold don't have to have the
901+ % installations which never need the symbol don't have to have the
902 % font installed.
903 %
904 % There is only one designed size (nominal 10pt), so we always scale
905@@ -2031,6 +2345,10 @@
906 }$%
907 }
908
909+% @textdegree - the normal degrees sign.
910+%
911+\def\textdegree{$^\circ$}
912+
913 % Laurent Siebenmann reports \Orb undefined with:
914 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
915 % so we'll define it if necessary.
916@@ -2202,8 +2520,8 @@
917 %
918 % Leave some space for the footline. Hopefully ok to assume
919 % @evenfooting will not be used by itself.
920- \global\advance\pageheight by -\baselineskip
921- \global\advance\vsize by -\baselineskip
922+ \global\advance\pageheight by -12pt
923+ \global\advance\vsize by -12pt
924 }
925
926 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
927@@ -2862,6 +3180,7 @@
928
929 \def\doignore#1{\begingroup
930 % Scan in ``verbatim'' mode:
931+ \obeylines
932 \catcode`\@ = \other
933 \catcode`\{ = \other
934 \catcode`\} = \other
935@@ -2882,16 +3201,16 @@
936 \gdef\dodoignore#1{%
937 % #1 contains the command name as a string, e.g., `ifinfo'.
938 %
939- % Define a command to find the next `@end #1', which must be on a line
940- % by itself.
941- \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}%
942+ % Define a command to find the next `@end #1'.
943+ \long\def\doignoretext##1^^M@end #1{%
944+ \doignoretextyyy##1^^M@#1\_STOP_}%
945+ %
946 % And this command to find another #1 command, at the beginning of a
947 % line. (Otherwise, we would consider a line `@c @ifset', for
948 % example, to count as an @ifset for nesting.)
949 \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
950 %
951 % And now expand that command.
952- \obeylines %
953 \doignoretext ^^M%
954 }%
955 }
956@@ -2921,7 +3240,12 @@
957 }
958
959 % Finish off ignored text.
960-\def\enddoignore{\endgroup\ignorespaces}
961+{ \obeylines%
962+ % Ignore anything after the last `@end #1'; this matters in verbatim
963+ % environments, where otherwise the newline after an ignored conditional
964+ % would result in a blank line in the output.
965+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
966+}
967
968
969 % @set VAR sets the variable VAR to an empty value.
970@@ -3121,42 +3445,50 @@
971 % we have to laboriously prevent expansion for those that we don't.
972 %
973 \def\indexdummies{%
974+ \escapechar = `\\ % use backslash in output files.
975 \def\@{@}% change to @@ when we switch to @ as escape char in index files.
976 \def\ {\realbackslash\space }%
977+ %
978 % Need these in case \tex is in effect and \{ is a \delimiter again.
979 % But can't use \lbracecmd and \rbracecmd because texindex assumes
980 % braces and backslashes are used only as delimiters.
981 \let\{ = \mylbrace
982 \let\} = \myrbrace
983 %
984- % \definedummyword defines \#1 as \realbackslash #1\space, thus
985- % effectively preventing its expansion. This is used only for control
986- % words, not control letters, because the \space would be incorrect
987- % for control characters, but is needed to separate the control word
988- % from whatever follows.
989- %
990- % For control letters, we have \definedummyletter, which omits the
991- % space.
992- %
993- % These can be used both for control words that take an argument and
994- % those that do not. If it is followed by {arg} in the input, then
995- % that will dutifully get written to the index (or wherever).
996- %
997- \def\definedummyword##1{%
998- \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
999- }%
1000- \def\definedummyletter##1{%
1001- \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
1002- }%
1003- \let\definedummyaccent\definedummyletter
1004+ % I don't entirely understand this, but when an index entry is
1005+ % generated from a macro call, the \endinput which \scanmacro inserts
1006+ % causes processing to be prematurely terminated. This is,
1007+ % apparently, because \indexsorttmp is fully expanded, and \endinput
1008+ % is an expandable command. The redefinition below makes \endinput
1009+ % disappear altogether for that purpose -- although logging shows that
1010+ % processing continues to some further point. On the other hand, it
1011+ % seems \endinput does not hurt in the printed index arg, since that
1012+ % is still getting written without apparent harm.
1013+ %
1014+ % Sample source (mac-idx3.tex, reported by Graham Percival to
1015+ % help-texinfo, 22may06):
1016+ % @macro funindex {WORD}
1017+ % @findex xyz
1018+ % @end macro
1019+ % ...
1020+ % @funindex commtest
1021+ %
1022+ % The above is not enough to reproduce the bug, but it gives the flavor.
1023+ %
1024+ % Sample whatsit resulting:
1025+ % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
1026+ %
1027+ % So:
1028+ \let\endinput = \empty
1029 %
1030 % Do the redefinitions.
1031 \commondummies
1032 }
1033
1034-% For the aux file, @ is the escape character. So we want to redefine
1035-% everything using @ instead of \realbackslash. When everything uses
1036-% @, this will be simpler.
1037+% For the aux and toc files, @ is the escape character. So we want to
1038+% redefine everything using @ as the escape character (instead of
1039+% \realbackslash, still used for index files). When everything uses @,
1040+% this will be simpler.
1041 %
1042 \def\atdummies{%
1043 \def\@{@@}%
1044@@ -3164,147 +3496,152 @@
1045 \let\{ = \lbraceatcmd
1046 \let\} = \rbraceatcmd
1047 %
1048- % (See comments in \indexdummies.)
1049- \def\definedummyword##1{%
1050- \expandafter\def\csname ##1\endcsname{@##1\space}%
1051- }%
1052- \def\definedummyletter##1{%
1053- \expandafter\def\csname ##1\endcsname{@##1}%
1054- }%
1055- \let\definedummyaccent\definedummyletter
1056- %
1057 % Do the redefinitions.
1058 \commondummies
1059+ \otherbackslash
1060 }
1061
1062-% Called from \indexdummies and \atdummies. \definedummyword and
1063-% \definedummyletter must be defined first.
1064+% Called from \indexdummies and \atdummies.
1065 %
1066 \def\commondummies{%
1067 %
1068- \normalturnoffactive
1069+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
1070+ % preventing its expansion. This is used only for control% words,
1071+ % not control letters, because the \space would be incorrect for
1072+ % control characters, but is needed to separate the control word
1073+ % from whatever follows.
1074+ %
1075+ % For control letters, we have \definedummyletter, which omits the
1076+ % space.
1077+ %
1078+ % These can be used both for control words that take an argument and
1079+ % those that do not. If it is followed by {arg} in the input, then
1080+ % that will dutifully get written to the index (or wherever).
1081+ %
1082+ \def\definedummyword ##1{\def##1{\string##1\space}}%
1083+ \def\definedummyletter##1{\def##1{\string##1}}%
1084+ \let\definedummyaccent\definedummyletter
1085 %
1086 \commondummiesnofonts
1087 %
1088- \definedummyletter{_}%
1089+ \definedummyletter\_%
1090 %
1091 % Non-English letters.
1092- \definedummyword{AA}%
1093- \definedummyword{AE}%
1094- \definedummyword{L}%
1095- \definedummyword{OE}%
1096- \definedummyword{O}%
1097- \definedummyword{aa}%
1098- \definedummyword{ae}%
1099- \definedummyword{l}%
1100- \definedummyword{oe}%
1101- \definedummyword{o}%
1102- \definedummyword{ss}%
1103- \definedummyword{exclamdown}%
1104- \definedummyword{questiondown}%
1105- \definedummyword{ordf}%
1106- \definedummyword{ordm}%
1107+ \definedummyword\AA
1108+ \definedummyword\AE
1109+ \definedummyword\L
1110+ \definedummyword\OE
1111+ \definedummyword\O
1112+ \definedummyword\aa
1113+ \definedummyword\ae
1114+ \definedummyword\l
1115+ \definedummyword\oe
1116+ \definedummyword\o
1117+ \definedummyword\ss
1118+ \definedummyword\exclamdown
1119+ \definedummyword\questiondown
1120+ \definedummyword\ordf
1121+ \definedummyword\ordm
1122 %
1123 % Although these internal commands shouldn't show up, sometimes they do.
1124- \definedummyword{bf}%
1125- \definedummyword{gtr}%
1126- \definedummyword{hat}%
1127- \definedummyword{less}%
1128- \definedummyword{sf}%
1129- \definedummyword{sl}%
1130- \definedummyword{tclose}%
1131- \definedummyword{tt}%
1132+ \definedummyword\bf
1133+ \definedummyword\gtr
1134+ \definedummyword\hat
1135+ \definedummyword\less
1136+ \definedummyword\sf
1137+ \definedummyword\sl
1138+ \definedummyword\tclose
1139+ \definedummyword\tt
1140 %
1141- \definedummyword{LaTeX}%
1142- \definedummyword{TeX}%
1143+ \definedummyword\LaTeX
1144+ \definedummyword\TeX
1145 %
1146 % Assorted special characters.
1147- \definedummyword{bullet}%
1148- \definedummyword{comma}%
1149- \definedummyword{copyright}%
1150- \definedummyword{registeredsymbol}%
1151- \definedummyword{dots}%
1152- \definedummyword{enddots}%
1153- \definedummyword{equiv}%
1154- \definedummyword{error}%
1155- \definedummyword{euro}%
1156- \definedummyword{expansion}%
1157- \definedummyword{minus}%
1158- \definedummyword{pounds}%
1159- \definedummyword{point}%
1160- \definedummyword{print}%
1161- \definedummyword{result}%
1162+ \definedummyword\bullet
1163+ \definedummyword\comma
1164+ \definedummyword\copyright
1165+ \definedummyword\registeredsymbol
1166+ \definedummyword\dots
1167+ \definedummyword\enddots
1168+ \definedummyword\equiv
1169+ \definedummyword\error
1170+ \definedummyword\euro
1171+ \definedummyword\expansion
1172+ \definedummyword\minus
1173+ \definedummyword\pounds
1174+ \definedummyword\point
1175+ \definedummyword\print
1176+ \definedummyword\result
1177+ \definedummyword\textdegree
1178+ %
1179+ % We want to disable all macros so that they are not expanded by \write.
1180+ \macrolist
1181+ %
1182+ \normalturnoffactive
1183 %
1184 % Handle some cases of @value -- where it does not contain any
1185 % (non-fully-expandable) commands.
1186 \makevalueexpandable
1187- %
1188- % Normal spaces, not active ones.
1189- \unsepspaces
1190- %
1191- % No macro expansion.
1192- \turnoffmacros
1193 }
1194
1195 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
1196 %
1197-% Better have this without active chars.
1198-{
1199- \catcode`\~=\other
1200- \gdef\commondummiesnofonts{%
1201- % Control letters and accents.
1202- \definedummyletter{!}%
1203- \definedummyaccent{"}%
1204- \definedummyaccent{'}%
1205- \definedummyletter{*}%
1206- \definedummyaccent{,}%
1207- \definedummyletter{.}%
1208- \definedummyletter{/}%
1209- \definedummyletter{:}%
1210- \definedummyaccent{=}%
1211- \definedummyletter{?}%
1212- \definedummyaccent{^}%
1213- \definedummyaccent{`}%
1214- \definedummyaccent{~}%
1215- \definedummyword{u}%
1216- \definedummyword{v}%
1217- \definedummyword{H}%
1218- \definedummyword{dotaccent}%
1219- \definedummyword{ringaccent}%
1220- \definedummyword{tieaccent}%
1221- \definedummyword{ubaraccent}%
1222- \definedummyword{udotaccent}%
1223- \definedummyword{dotless}%
1224- %
1225- % Texinfo font commands.
1226- \definedummyword{b}%
1227- \definedummyword{i}%
1228- \definedummyword{r}%
1229- \definedummyword{sc}%
1230- \definedummyword{t}%
1231- %
1232- % Commands that take arguments.
1233- \definedummyword{acronym}%
1234- \definedummyword{cite}%
1235- \definedummyword{code}%
1236- \definedummyword{command}%
1237- \definedummyword{dfn}%
1238- \definedummyword{emph}%
1239- \definedummyword{env}%
1240- \definedummyword{file}%
1241- \definedummyword{kbd}%
1242- \definedummyword{key}%
1243- \definedummyword{math}%
1244- \definedummyword{option}%
1245- \definedummyword{samp}%
1246- \definedummyword{strong}%
1247- \definedummyword{tie}%
1248- \definedummyword{uref}%
1249- \definedummyword{url}%
1250- \definedummyword{var}%
1251- \definedummyword{verb}%
1252- \definedummyword{w}%
1253- }
1254+\def\commondummiesnofonts{%
1255+ % Control letters and accents.
1256+ \definedummyletter\!%
1257+ \definedummyaccent\"%
1258+ \definedummyaccent\'%
1259+ \definedummyletter\*%
1260+ \definedummyaccent\,%
1261+ \definedummyletter\.%
1262+ \definedummyletter\/%
1263+ \definedummyletter\:%
1264+ \definedummyaccent\=%
1265+ \definedummyletter\?%
1266+ \definedummyaccent\^%
1267+ \definedummyaccent\`%
1268+ \definedummyaccent\~%
1269+ \definedummyword\u
1270+ \definedummyword\v
1271+ \definedummyword\H
1272+ \definedummyword\dotaccent
1273+ \definedummyword\ringaccent
1274+ \definedummyword\tieaccent
1275+ \definedummyword\ubaraccent
1276+ \definedummyword\udotaccent
1277+ \definedummyword\dotless
1278+ %
1279+ % Texinfo font commands.
1280+ \definedummyword\b
1281+ \definedummyword\i
1282+ \definedummyword\r
1283+ \definedummyword\sc
1284+ \definedummyword\t
1285+ %
1286+ % Commands that take arguments.
1287+ \definedummyword\acronym
1288+ \definedummyword\cite
1289+ \definedummyword\code
1290+ \definedummyword\command
1291+ \definedummyword\dfn
1292+ \definedummyword\emph
1293+ \definedummyword\env
1294+ \definedummyword\file
1295+ \definedummyword\kbd
1296+ \definedummyword\key
1297+ \definedummyword\math
1298+ \definedummyword\option
1299+ \definedummyword\pxref
1300+ \definedummyword\ref
1301+ \definedummyword\samp
1302+ \definedummyword\strong
1303+ \definedummyword\tie
1304+ \definedummyword\uref
1305+ \definedummyword\url
1306+ \definedummyword\var
1307+ \definedummyword\verb
1308+ \definedummyword\w
1309+ \definedummyword\xref
1310 }
1311
1312 % \indexnofonts is used when outputting the strings to sort the index
1313@@ -3314,13 +3651,9 @@
1314 %
1315 \def\indexnofonts{%
1316 % Accent commands should become @asis.
1317- \def\definedummyaccent##1{%
1318- \expandafter\let\csname ##1\endcsname\asis
1319- }%
1320+ \def\definedummyaccent##1{\let##1\asis}%
1321 % We can just ignore other control letters.
1322- \def\definedummyletter##1{%
1323- \expandafter\def\csname ##1\endcsname{}%
1324- }%
1325+ \def\definedummyletter##1{\let##1\empty}%
1326 % Hopefully, all control words can become @asis.
1327 \let\definedummyword\definedummyaccent
1328 %
1329@@ -3373,9 +3706,19 @@
1330 \def\point{.}%
1331 \def\print{-|}%
1332 \def\result{=>}%
1333+ \def\textdegree{degrees}%
1334 %
1335- % Don't write macro names.
1336- \emptyusermacros
1337+ % We need to get rid of all macros, leaving only the arguments (if present).
1338+ % Of course this is not nearly correct, but it is the best we can do for now.
1339+ % makeinfo does not expand macros in the argument to @deffn, which ends up
1340+ % writing an index entry, and texindex isn't prepared for an index sort entry
1341+ % that starts with \.
1342+ %
1343+ % Since macro invocations are followed by braces, we can just redefine them
1344+ % to take a single TeX argument. The case of a macro invocation that
1345+ % goes to end-of-line is not handled.
1346+ %
1347+ \macrolist
1348 }
1349
1350 \let\indexbackslash=0 %overridden during \printindex.
1351@@ -3422,7 +3765,6 @@
1352 %
1353 % Remember, we are within a group.
1354 \indexdummies % Must do this here, since \bf, etc expand at this stage
1355- \escapechar=`\\
1356 \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
1357 % so it will be output as is; and it will print as backslash.
1358 %
1359@@ -3713,9 +4055,9 @@
1360 \endgroup
1361 }
1362
1363-% Like \dotfill except takes at least 1 em.
1364+% Like plain.tex's \dotfill, except uses up at least 1 em.
1365 \def\indexdotfill{\cleaders
1366- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
1367+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
1368
1369 \def\primary #1{\line{#1\hfil}}
1370
1371@@ -4289,14 +4631,17 @@
1372 \ifx\temptype\Ynothingkeyword
1373 \setbox0 = \hbox{}%
1374 \def\toctype{unnchap}%
1375- \def\thischapter{#1}%
1376+ \gdef\thischapternum{}%
1377+ \gdef\thischapter{#1}%
1378 \else\ifx\temptype\Yomitfromtockeyword
1379 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
1380 \def\toctype{omit}%
1381- \xdef\thischapter{}%
1382+ \gdef\thischapternum{}%
1383+ \gdef\thischapter{}%
1384 \else\ifx\temptype\Yappendixkeyword
1385 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
1386 \def\toctype{app}%
1387+ \xdef\thischapternum{\appendixletter}%
1388 % We don't substitute the actual chapter name into \thischapter
1389 % because we don't want its macros evaluated now. And we don't
1390 % use \thissection because that changes with each section.
1391@@ -4306,6 +4651,7 @@
1392 \else
1393 \setbox0 = \hbox{#3\enspace}%
1394 \def\toctype{numchap}%
1395+ \xdef\thischapternum{\the\chapno}%
1396 \xdef\thischapter{\putwordChapter{} \the\chapno:
1397 \noexpand\thischaptername}%
1398 \fi\fi\fi
1399@@ -4417,13 +4763,21 @@
1400 \gdef\thissection{#1}%
1401 \fi\fi\fi
1402 %
1403- % Write the toc entry (before \donoderef). See comments in \chfplain.
1404+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
1405 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
1406 %
1407 % Write the node reference (= pdf destination for pdftex).
1408- % Again, see comments in \chfplain.
1409+ % Again, see comments in \chapmacro.
1410 \donoderef{#3}%
1411 %
1412+ % Interline glue will be inserted when the vbox is completed.
1413+ % That glue will be a valid breakpoint for the page, since it'll be
1414+ % preceded by a whatsit (usually from the \donoderef, or from the
1415+ % \writetocentry if there was no node). We don't want to allow that
1416+ % break, since then the whatsits could end up on page n while the
1417+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
1418+ \nobreak
1419+ %
1420 % Output the actual section heading.
1421 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
1422 \hangindent=\wd0 % zero if no section number
1423@@ -4482,11 +4836,11 @@
1424 \fi
1425 %
1426 \iflinks
1427- \toks0 = {#2}%
1428- \toks2 = \expandafter{\lastnode}%
1429- \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}%
1430- {\the\toks2}{\noexpand\folio}}}%
1431- \temp
1432+ {\atdummies
1433+ \edef\temp{%
1434+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
1435+ \temp
1436+ }%
1437 \fi
1438 \fi
1439 %
1440@@ -4499,6 +4853,31 @@
1441 \ifpdf \global\pdfmakepagedesttrue \fi
1442 }
1443
1444+
1445+% These characters do not print properly in the Computer Modern roman
1446+% fonts, so we must take special care. This is more or less redundant
1447+% with the Texinfo input format setup at the end of this file.
1448+%
1449+\def\activecatcodes{%
1450+ \catcode`\"=\active
1451+ \catcode`\$=\active
1452+ \catcode`\<=\active
1453+ \catcode`\>=\active
1454+ \catcode`\\=\active
1455+ \catcode`\^=\active
1456+ \catcode`\_=\active
1457+ \catcode`\|=\active
1458+ \catcode`\~=\active
1459+}
1460+
1461+
1462+% Read the toc file, which is essentially Texinfo input.
1463+\def\readtocfile{%
1464+ \setupdatafile
1465+ \activecatcodes
1466+ \input \jobname.toc
1467+}
1468+
1469 \newskip\contentsrightmargin \contentsrightmargin=1in
1470 \newcount\savepageno
1471 \newcount\lastnegativepageno \lastnegativepageno = -1
1472@@ -4520,11 +4899,7 @@
1473 %
1474 \savepageno = \pageno
1475 \begingroup % Set up to handle contents files properly.
1476- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
1477- % We can't do this, because then an actual ^ in a section
1478- % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
1479- %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
1480- \raggedbottom % Worry more about breakpoints than the bottom.
1481+ \raggedbottom % Worry more about breakpoints than the bottom.
1482 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
1483 %
1484 % Roman numerals for page numbers.
1485@@ -4537,7 +4912,7 @@
1486 \startcontents{\putwordTOC}%
1487 \openin 1 \jobname.toc
1488 \ifeof 1 \else
1489- \input \jobname.toc
1490+ \readtocfile
1491 \fi
1492 \vfill \eject
1493 \contentsalignmacro % in case @setchapternewpage odd is in effect
1494@@ -4575,7 +4950,7 @@
1495 \let\unnsubsubsecentry = \numsecentry
1496 \openin 1 \jobname.toc
1497 \ifeof 1 \else
1498- \input \jobname.toc
1499+ \readtocfile
1500 \fi
1501 \closein 1
1502 \vfill \eject
1503@@ -4717,7 +5092,7 @@
1504 {\tentt \global\dimen0 = 3em}% Width of the box.
1505 \dimen2 = .55pt % Thickness of rules
1506 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
1507-\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
1508+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
1509 %
1510 \setbox\errorbox=\hbox to \dimen0{\hfil
1511 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
1512@@ -4765,6 +5140,7 @@
1513 \let\/=\ptexslash
1514 \let\*=\ptexstar
1515 \let\t=\ptext
1516+ \let\frenchspacing=\plainfrenchspacing
1517 %
1518 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
1519 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
1520@@ -4810,7 +5186,8 @@
1521
1522 \let\afterenvbreak = \aboveenvbreak
1523
1524-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
1525+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
1526+% also clear it, so that its embedded environments do the narrowing again.
1527 \let\nonarrowing=\relax
1528
1529 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
1530@@ -4847,7 +5224,7 @@
1531 % each corner char, and rule thickness
1532 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
1533 % Flag to tell @lisp, etc., not to narrow margin.
1534- \let\nonarrowing=\comment
1535+ \let\nonarrowing = t%
1536 \vbox\bgroup
1537 \baselineskip=0pt\parskip=0pt\lineskip=0pt
1538 \carttop
1539@@ -4887,11 +5264,11 @@
1540 \parskip = 0pt
1541 \parindent = 0pt
1542 \emergencystretch = 0pt % don't try to avoid overfull boxes
1543- % @cartouche defines \nonarrowing to inhibit narrowing
1544- % at next level down.
1545 \ifx\nonarrowing\relax
1546 \advance \leftskip by \lispnarrowing
1547 \exdentamount=\lispnarrowing
1548+ \else
1549+ \let\nonarrowing = \relax
1550 \fi
1551 \let\exdent=\nofillexdent
1552 }
1553@@ -4938,11 +5315,10 @@
1554 %
1555 \maketwodispenvs {lisp}{example}{%
1556 \nonfillstart
1557- \tt
1558+ \tt\quoteexpand
1559 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
1560 \gobble % eat return
1561 }
1562-
1563 % @display/@smalldisplay: same as @lisp except keep current font.
1564 %
1565 \makedispenv {display}{%
1566@@ -4991,6 +5367,7 @@
1567 \advance\leftskip by \lispnarrowing
1568 \advance\rightskip by \lispnarrowing
1569 \exdentamount = \lispnarrowing
1570+ \else
1571 \let\nonarrowing = \relax
1572 \fi
1573 \parsearg\quotationlabel
1574@@ -5069,6 +5446,34 @@
1575 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
1576 %
1577 \def\starttabbox{\setbox0=\hbox\bgroup}
1578+
1579+% Allow an option to not replace quotes with a regular directed right
1580+% quote/apostrophe (char 0x27), but instead use the undirected quote
1581+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
1582+% the default, but it works for pasting with more pdf viewers (at least
1583+% evince), the lilypond developers report. xpdf does work with the
1584+% regular 0x27.
1585+%
1586+\def\codequoteright{%
1587+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
1588+ '%
1589+ \else
1590+ \char'15
1591+ \fi
1592+}
1593+%
1594+% and a similar option for the left quote char vs. a grave accent.
1595+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
1596+% the code environments to do likewise.
1597+%
1598+\def\codequoteleft{%
1599+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
1600+ `%
1601+ \else
1602+ \char'22
1603+ \fi
1604+}
1605+%
1606 \begingroup
1607 \catcode`\^^I=\active
1608 \gdef\tabexpand{%
1609@@ -5081,15 +5486,25 @@
1610 \wd0=\dimen0 \box0 \starttabbox
1611 }%
1612 }
1613+ \catcode`\'=\active
1614+ \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
1615+ %
1616+ \catcode`\`=\active
1617+ \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
1618+ %
1619+ \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
1620 \endgroup
1621+
1622+% start the verbatim environment.
1623 \def\setupverbatim{%
1624+ \let\nonarrowing = t%
1625 \nonfillstart
1626- \advance\leftskip by -\defbodyindent
1627 % Easiest (and conventionally used) font for verbatim
1628 \tt
1629 \def\par{\leavevmode\egroup\box0\endgraf}%
1630 \catcode`\`=\active
1631 \tabexpand
1632+ \quoteexpand
1633 % Respect line breaks,
1634 % print special symbols as themselves, and
1635 % make each space count
1636@@ -5539,7 +5954,6 @@
1637 \spaceisspace
1638 %
1639 % Append \endinput to make sure that TeX does not see the ending newline.
1640- %
1641 % I've verified that it is necessary both for e-TeX and for ordinary TeX
1642 % --kasal, 29nov03
1643 \scantokens{#1\endinput}%
1644@@ -5554,8 +5968,19 @@
1645 \newcount\paramno % Count of parameters
1646 \newtoks\macname % Macro name
1647 \newif\ifrecursive % Is it recursive?
1648-\def\macrolist{} % List of all defined macros in the form
1649- % \do\macro1\do\macro2...
1650+
1651+% List of all defined macros in the form
1652+% \definedummyword\macro1\definedummyword\macro2...
1653+% Currently is also contains all @aliases; the list can be split
1654+% if there is a need.
1655+\def\macrolist{}
1656+
1657+% Add the macro to \macrolist
1658+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
1659+\def\addtomacrolistxxx#1{%
1660+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
1661+ \xdef\macrolist{\the\toks0}%
1662+}
1663
1664 % Utility routines.
1665 % This does \let #1 = #2, with \csnames; that is,
1666@@ -5653,10 +6078,7 @@
1667 \else \errmessage{Macro name \the\macname\space already defined}\fi
1668 \global\cslet{macsave.\the\macname}{\the\macname}%
1669 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
1670- % Add the macroname to \macrolist
1671- \toks0 = \expandafter{\macrolist\do}%
1672- \xdef\macrolist{\the\toks0
1673- \expandafter\noexpand\csname\the\macname\endcsname}%
1674+ \addtomacrolist{\the\macname}%
1675 \fi
1676 \begingroup \macrobodyctxt
1677 \ifrecursive \expandafter\parsermacbody
1678@@ -5670,7 +6092,7 @@
1679 % Remove the macro name from \macrolist:
1680 \begingroup
1681 \expandafter\let\csname#1\endcsname \relax
1682- \let\do\unmacrodo
1683+ \let\definedummyword\unmacrodo
1684 \xdef\macrolist{\macrolist}%
1685 \endgroup
1686 \else
1687@@ -5682,10 +6104,10 @@
1688 % macro definitions that have been changed to \relax.
1689 %
1690 \def\unmacrodo#1{%
1691- \ifx#1\relax
1692+ \ifx #1\relax
1693 % remove this
1694 \else
1695- \noexpand\do \noexpand #1%
1696+ \noexpand\definedummyword \noexpand#1%
1697 \fi
1698 }
1699
1700@@ -5798,30 +6220,11 @@
1701 % {. If so it reads up to the closing }, if not, it reads the whole
1702 % line. Whatever was read is then fed to the next control sequence
1703 % as an argument (by \parsebrace or \parsearg)
1704-\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
1705+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
1706 \def\braceorlinexxx{%
1707 \ifx\nchar\bgroup\else
1708 \expandafter\parsearg
1709- \fi \next}
1710-
1711-% We want to disable all macros during \shipout so that they are not
1712-% expanded by \write.
1713-\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
1714- \edef\next{\macrolist}\expandafter\endgroup\next}
1715-
1716-% For \indexnofonts, we need to get rid of all macros, leaving only the
1717-% arguments (if present). Of course this is not nearly correct, but it
1718-% is the best we can do for now. makeinfo does not expand macros in the
1719-% argument to @deffn, which ends up writing an index entry, and texindex
1720-% isn't prepared for an index sort entry that starts with \.
1721-%
1722-% Since macro invocations are followed by braces, we can just redefine them
1723-% to take a single TeX argument. The case of a macro invocation that
1724-% goes to end-of-line is not handled.
1725-%
1726-\def\emptyusermacros{\begingroup
1727- \def\do##1{\let\noexpand##1=\noexpand\asis}%
1728- \edef\next{\macrolist}\expandafter\endgroup\next}
1729+ \fi \macnamexxx}
1730
1731
1732 % @alias.
1733@@ -5832,6 +6235,7 @@
1734 \def\aliasyyy #1=#2\relax{%
1735 {%
1736 \expandafter\let\obeyedspace=\empty
1737+ \addtomacrolist{#1}%
1738 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
1739 }%
1740 \next
1741@@ -5901,8 +6305,6 @@
1742 \iflinks
1743 {%
1744 \atdummies % preserve commands, but don't expand them
1745- \turnoffactive
1746- \otherbackslash
1747 \edef\writexrdef##1##2{%
1748 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
1749 ##1}{##2}}% these are parameters of \writexrdef
1750@@ -5956,13 +6358,17 @@
1751 \ifpdf
1752 \leavevmode
1753 \getfilename{#4}%
1754- {\turnoffactive \otherbackslash
1755+ {\turnoffactive
1756+ % See comments at \activebackslashdouble.
1757+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
1758+ \backslashparens\pdfxrefdest}%
1759+ %
1760 \ifnum\filenamelength>0
1761 \startlink attr{/Border [0 0 0]}%
1762- goto file{\the\filename.pdf} name{#1}%
1763+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
1764 \else
1765 \startlink attr{/Border [0 0 0]}%
1766- goto name{\pdfmkpgn{#1}}%
1767+ goto name{\pdfmkpgn{\pdfxrefdest}}%
1768 \fi
1769 }%
1770 \linkcolor
1771@@ -5976,7 +6382,6 @@
1772 % include an _ in the xref name, etc.
1773 \indexnofonts
1774 \turnoffactive
1775- \otherbackslash
1776 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
1777 \csname XR#1-title\endcsname
1778 }%
1779@@ -5984,7 +6389,7 @@
1780 % If the user specified the print name (third arg) to the ref,
1781 % print it instead of our usual "Figure 1.2".
1782 \ifdim\wd0 = 0pt
1783- \refx{#1-snt}%
1784+ \refx{#1-snt}{}%
1785 \else
1786 \printedrefname
1787 \fi
1788@@ -6011,7 +6416,7 @@
1789 % into the usual \leavevmode...\vrule stuff for purposes of
1790 % printing. So we \turnoffactive for the \refx-snt, back on for the
1791 % printing, back off for the \refx-pg.
1792- {\turnoffactive \otherbackslash
1793+ {\turnoffactive
1794 % Only output a following space if the -snt ref is nonempty; for
1795 % @unnumbered and @anchor, it won't be.
1796 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
1797@@ -6024,7 +6429,7 @@
1798 ,\space
1799 %
1800 % output the `page 3'.
1801- \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
1802+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
1803 \fi
1804 \fi
1805 \endlink
1806@@ -6127,13 +6532,13 @@
1807 \def\tryauxfile{%
1808 \openin 1 \jobname.aux
1809 \ifeof 1 \else
1810- \readauxfile
1811+ \readdatafile{aux}%
1812 \global\havexrefstrue
1813 \fi
1814 \closein 1
1815 }
1816
1817-\def\readauxfile{\begingroup
1818+\def\setupdatafile{%
1819 \catcode`\^^@=\other
1820 \catcode`\^^A=\other
1821 \catcode`\^^B=\other
1822@@ -6202,11 +6607,11 @@
1823 %
1824 % Make the characters 128-255 be printing characters.
1825 {%
1826- \count 1=128
1827+ \count1=128
1828 \def\loop{%
1829- \catcode\count 1=\other
1830- \advance\count 1 by 1
1831- \ifnum \count 1<256 \loop \fi
1832+ \catcode\count1=\other
1833+ \advance\count1 by 1
1834+ \ifnum \count1<256 \loop \fi
1835 }%
1836 }%
1837 %
1838@@ -6214,10 +6619,13 @@
1839 \catcode`\{=1
1840 \catcode`\}=2
1841 \catcode`\@=0
1842- %
1843- \input \jobname.aux
1844-\endgroup}
1845+}
1846
1847+\def\readdatafile#1{%
1848+\begingroup
1849+ \setupdatafile
1850+ \input\jobname.#1
1851+\endgroup}
1852
1853 \message{insertions,}
1854 % including footnotes.
1855@@ -6411,7 +6819,7 @@
1856 % above and below.
1857 \nobreak\vskip\parskip
1858 \nobreak
1859- \line\bgroup\hss
1860+ \line\bgroup
1861 \fi
1862 %
1863 % Output the image.
1864@@ -6424,7 +6832,7 @@
1865 \epsfbox{#1.eps}%
1866 \fi
1867 %
1868- \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
1869+ \ifimagevmode \egroup \bigbreak \fi % space after the image
1870 \endgroup}
1871
1872
1873@@ -6564,7 +6972,8 @@
1874 % \floatlabel-lof. Besides \floatident, we include the short
1875 % caption if specified, else the full caption if specified, else nothing.
1876 {%
1877- \atdummies \turnoffactive \otherbackslash
1878+ \atdummies
1879+ %
1880 % since we read the caption text in the macro world, where ^^M
1881 % is turned into a normal character, we have to scan it back, so
1882 % we don't write the literal three characters "^^M" into the aux file.
1883@@ -6585,8 +6994,9 @@
1884 %
1885 % place the captured inserts
1886 %
1887- % BEWARE: when the floats start float, we have to issue warning whenever an
1888- % insert appears inside a float which could possibly float. --kasal, 26may04
1889+ % BEWARE: when the floats start floating, we have to issue warning
1890+ % whenever an insert appears inside a float which could possibly
1891+ % float. --kasal, 26may04
1892 %
1893 \checkinserts
1894 }
1895@@ -6754,9 +7164,9 @@
1896 \fi
1897 }
1898
1899-% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
1900-% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
1901-% physical page width.
1902+% Parameters in order: 1) textheight; 2) textwidth;
1903+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
1904+% 7) physical page height; 8) physical page width.
1905 %
1906 % We also call \setleading{\textleading}, so the caller should define
1907 % \textleading. The caller should also set \parskip.
1908@@ -6803,7 +7213,7 @@
1909 {11in}{8.5in}%
1910 }}
1911
1912-% Use @smallbook to reset parameters for 7x9.5 (or so) format.
1913+% Use @smallbook to reset parameters for 7x9.25 trim size.
1914 \def\smallbook{{\globaldefs = 1
1915 \parskip = 2pt plus 1pt
1916 \textleading = 12pt
1917@@ -6820,6 +7230,24 @@
1918 \defbodyindent = .5cm
1919 }}
1920
1921+% Use @smallerbook to reset parameters for 6x9 trim size.
1922+% (Just testing, parameters still in flux.)
1923+\def\smallerbook{{\globaldefs = 1
1924+ \parskip = 1.5pt plus 1pt
1925+ \textleading = 12pt
1926+ %
1927+ \internalpagesizes{7.4in}{4.8in}%
1928+ {-.2in}{-.4in}%
1929+ {0pt}{14pt}%
1930+ {9in}{6in}%
1931+ %
1932+ \lispnarrowing = 0.25in
1933+ \tolerance = 700
1934+ \hfuzz = 1pt
1935+ \contentsrightmargin = 0pt
1936+ \defbodyindent = .4cm
1937+}}
1938+
1939 % Use @afourpaper to print on European A4 paper.
1940 \def\afourpaper{{\globaldefs = 1
1941 \parskip = 3pt plus 2pt minus 1pt
1942@@ -6972,6 +7400,7 @@
1943
1944 \catcode`\_=\active
1945 \def_{\ifusingtt\normalunderscore\_}
1946+\let\realunder=_
1947 % Subroutine for the previous macro.
1948 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
1949
1950@@ -6994,6 +7423,13 @@
1951 % \otherifyactive is called near the end of this file.
1952 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
1953
1954+% Used sometimes to turn off (effectively) the active characters even after
1955+% parsing them.
1956+\def\turnoffactive{%
1957+ \normalturnoffactive
1958+ \otherbackslash
1959+}
1960+
1961 \catcode`\@=0
1962
1963 % \backslashcurfont outputs one backslash character in current font,
1964@@ -7001,27 +7437,29 @@
1965 \global\chardef\backslashcurfont=`\\
1966 \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
1967
1968+% \realbackslash is an actual character `\' with catcode other, and
1969+% \doublebackslash is two of them (for the pdf outlines).
1970+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
1971+
1972+% In texinfo, backslash is an active character; it prints the backslash
1973+% in fixed width font.
1974+\catcode`\\=\active
1975+@def@normalbackslash{{@tt@backslashcurfont}}
1976+% On startup, @fixbackslash assigns:
1977+% @let \ = @normalbackslash
1978+
1979 % \rawbackslash defines an active \ to do \backslashcurfont.
1980 % \otherbackslash defines an active \ to be a literal `\' character with
1981 % catcode other.
1982-{\catcode`\\=\active
1983- @gdef@rawbackslash{@let\=@backslashcurfont}
1984- @gdef@otherbackslash{@let\=@realbackslash}
1985-}
1986-
1987-% \realbackslash is an actual character `\' with catcode other.
1988-{\catcode`\\=\other @gdef@realbackslash{\}}
1989+@gdef@rawbackslash{@let\=@backslashcurfont}
1990+@gdef@otherbackslash{@let\=@realbackslash}
1991
1992-% \normalbackslash outputs one backslash in fixed width font.
1993-\def\normalbackslash{{\tt\backslashcurfont}}
1994-
1995-\catcode`\\=\active
1996-
1997-% Used sometimes to turn off (effectively) the active characters
1998-% even after parsing them.
1999-@def@turnoffactive{%
2000+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
2001+% the literal character `\'.
2002+%
2003+@def@normalturnoffactive{%
2004+ @let\=@normalbackslash
2005 @let"=@normaldoublequote
2006- @let\=@realbackslash
2007 @let~=@normaltilde
2008 @let^=@normalcaret
2009 @let_=@normalunderscore
2010@@ -7033,12 +7471,6 @@
2011 @unsepspaces
2012 }
2013
2014-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
2015-% the literal character `\'. (Thus, \ is not expandable when this is in
2016-% effect.)
2017-%
2018-@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
2019-
2020 % Make _ and + \other characters, temporarily.
2021 % This is canceled by @fixbackslash.
2022 @otherifyactive
2023@@ -7051,9 +7483,9 @@
2024 @global@let\ = @eatinput
2025
2026 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
2027-% the first `\{ in the file would cause an error. This macro tries to fix
2028+% the first `\' in the file would cause an error. This macro tries to fix
2029 % that, assuming it is called before the first `\' could plausibly occur.
2030-% Also back turn on active characters that might appear in the input
2031+% Also turn back on active characters that might appear in the input
2032 % file name, in case not using a pre-dumped format.
2033 %
2034 @gdef@fixbackslash{%
2035diff -Naur glibc-2.7.orig/nptl/sysdeps/powerpc/tcb-offsets.sym glibc-2.7/nptl/sysdeps/powerpc/tcb-offsets.sym
2036--- glibc-2.7.orig/nptl/sysdeps/powerpc/tcb-offsets.sym 2007-05-26 13:13:18.000000000 -0700
2037+++ glibc-2.7/nptl/sysdeps/powerpc/tcb-offsets.sym 2007-10-25 20:52:42.000000000 -0700
2038@@ -15,4 +15,7 @@
2039 PID thread_offsetof (pid)
2040 TID thread_offsetof (tid)
2041 POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
2042-PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
2043+#ifndef __ASSUME_PRIVATE_FUTEX
2044+PRIVATE_FUTEX_OFFSET offsetof (tcbhead_t, private_futex)
2045+#endif
2046+
Note: See TracBrowser for help on using the repository browser.