[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r23373 - in /fsf/trunk/libc: ./ include/ locale/ locale/programs/ manual/ ports/ ports/sysdeps/alpha/ ports/sysdeps/alpha/al...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r23373 - in /fsf/trunk/libc: ./ include/ locale/ locale/programs/ manual/ ports/ ports/sysdeps/alpha/ ports/sysdeps/alpha/al...
- From: eglibc@xxxxxxxxxx
- Date: Wed, 26 Jun 2013 00:02:10 -0000
Author: eglibc
Date: Wed Jun 26 00:02:08 2013
New Revision: 23373
Log:
Import glibc-mainline for 2013-06-26
Added:
fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c
fsf/trunk/libc/sysdeps/generic/libc-mmap.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/include/libc-internal.h
fsf/trunk/libc/locale/locarchive.h
fsf/trunk/libc/locale/programs/locarchive.c
fsf/trunk/libc/manual/texinfo.tex
fsf/trunk/libc/ports/ChangeLog.alpha
fsf/trunk/libc/ports/ChangeLog.m68k
fsf/trunk/libc/ports/sysdeps/alpha/Versions
fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrt.c
fsf/trunk/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c
fsf/trunk/libc/ports/sysdeps/m68k/sysdep.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Jun 26 00:02:08 2013
@@ -1,3 +1,40 @@
+2013-06-25 Richard Henderson <rth@xxxxxxxxxx>
+
+ * locale/programs/locarchive.c: Include <libc-internal.h>
+
+2013-06-25 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * manual/texinfo.tex: Update to version 2013-06-21.17, with
+ trailing whitespace removed.
+
+2013-06-24 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ [BZ #10283]
+ * locale/locarchive.h (struct locarhandle): Add mmap_base and mmap_len.
+ * locale/programs/locarchive.c: Include libc-mmap.h.
+ (prepare_address_space): Take two new outputs (the mmap base and len).
+ Align p to MAP_FIXED_ALIGNMENT. Set mmap base and len to the right
+ values.
+ (create_archive): Declare new mmap base and len values for
+ prepare_address_space, and store the result in ah.
+ (file_data_available_p): Replace pagesz with MAP_FIXED_ALIGNMENT.
+ (enlarge_archive): If ah->mmap_base is not NULL, use that and
+ ah->mmap_len to unmap rather than ah->addr and ah->reserved.
+ Declare new mmap base and len values for
+ prepare_address_space, and store the result in new_ah.
+ (open_archive): Declare new mmap base and len values for
+ prepare_address_space, and store the result in ah.
+ (close_archive): If ah->mmap_base is not NULL, use that and
+ ah->mmap_len to unmap rather than ah->addr and ah->reserved.
+ * sysdeps/generic/libc-mmap.h: New file.
+
+2013-06-24 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * include/libc-internal.h (ALIGN_DOWN): New helper macro.
+ (ALIGN_UP): Likewise.
+ (PTR_ALIGN_DOWN): Likewise.
+ (PTR_ALIGN_UP): Likewise.
+
2013-06-24 Ryan S. Arnold <rsa@xxxxxxxxxxxxxxxxxx>
* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platforms): Add "power8"
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Jun 26 00:02:08 2013
@@ -9,19 +9,19 @@
* The following bugs are resolved with this release:
- 2546, 2560, 5159, 6809, 7006, 10060, 10062, 10357, 10686, 11120, 11561,
- 12310, 12387, 12515, 12723, 13550, 13889, 13951, 13988, 14142, 14176,
- 14200, 14256, 14280, 14293, 14317, 14327, 14478, 14496, 14582, 14686,
- 14812, 14888, 14894, 14907, 14908, 14909, 14920, 14952, 14964, 14981,
- 14982, 14985, 14991, 14994, 14996, 15000, 15003, 15006, 15007, 15014,
- 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15084, 15085, 15086,
- 15100, 15160, 15214, 15221, 15232, 15234, 15283, 15285, 15287, 15304,
- 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337, 15339, 15342,
- 15346, 15359, 15361, 15366, 15380, 15381, 15394, 15395, 15405, 15406,
- 15409, 15416, 15418, 15419, 15423, 15424, 15426, 15429, 15431, 15432,
- 15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15492, 15493,
- 15497, 15506, 15529, 15536, 15553, 15577, 15583, 15618, 15627, 15631,
- 15654, 15655, 15667.
+ 2546, 2560, 5159, 6809, 7006, 10060, 10062, 10283, 10357, 10686, 11120,
+ 11561, 12310, 12387, 12515, 12723, 13550, 13889, 13951, 13988, 14142,
+ 14176, 14200, 14256, 14280, 14293, 14317, 14327, 14478, 14496, 14582,
+ 14686, 14812, 14888, 14894, 14907, 14908, 14909, 14920, 14952, 14964,
+ 14981, 14982, 14985, 14991, 14994, 14996, 15000, 15003, 15006, 15007,
+ 15014, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15084, 15085,
+ 15086, 15100, 15160, 15214, 15221, 15232, 15234, 15283, 15285, 15287,
+ 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337, 15339,
+ 15342, 15346, 15359, 15361, 15366, 15380, 15381, 15394, 15395, 15405,
+ 15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426, 15429, 15431,
+ 15432, 15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15492,
+ 15493, 15497, 15506, 15529, 15536, 15553, 15577, 15583, 15618, 15627,
+ 15631, 15654, 15655, 15666, 15667.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
Modified: fsf/trunk/libc/include/libc-internal.h
==============================================================================
--- fsf/trunk/libc/include/libc-internal.h (original)
+++ fsf/trunk/libc/include/libc-internal.h Wed Jun 26 00:02:08 2013
@@ -50,4 +50,24 @@
/* Cast an integer or a pointer VAL to integer with proper type. */
# define cast_to_integer(val) ((__integer_if_pointer_type (val)) (val))
+/* Align a value by rounding down to closest size.
+ e.g. Using size of 4096, we get this behavior:
+ {4095, 4096, 4097} = {0, 4096, 4096}. */
+#define ALIGN_DOWN(base, size) ((base) & -((__typeof__ (base)) (size)))
+
+/* Align a value by rounding up to closest size.
+ e.g. Using size of 4096, we get this behavior:
+ {4095, 4096, 4097} = {4096, 4096, 8192}.
+
+ Note: The size argument has side effects (expanded multiple times). */
+#define ALIGN_UP(base, size) ALIGN_DOWN ((base) + (size) - 1, (size))
+
+/* Same as ALIGN_DOWN(), but automatically casts when base is a pointer. */
+#define PTR_ALIGN_DOWN(base, size) \
+ ((__typeof__ (base)) ALIGN_DOWN ((uintptr_t) (base), (size)))
+
+/* Same as ALIGN_UP(), but automatically casts when base is a pointer. */
+#define PTR_ALIGN_UP(base, size) \
+ ((__typeof__ (base)) ALIGN_UP ((uintptr_t) (base), (size)))
+
#endif /* _LIBC_INTERNAL */
Modified: fsf/trunk/libc/locale/locarchive.h
==============================================================================
--- fsf/trunk/libc/locale/locarchive.h (original)
+++ fsf/trunk/libc/locale/locarchive.h Wed Jun 26 00:02:08 2013
@@ -84,6 +84,13 @@
void *addr;
size_t mmaped;
size_t reserved;
+ /* If this mmap required adjustment (such as re-aligning), then this is the
+ real address that was returned from mmap and thus should be passed to the
+ munmap call. The addr field above is the first usable address. */
+ void *mmap_base;
+ /* Same as above for mmap_base vs addr, but this is the real length of the
+ map rather than the usable (which is what reserved represents). */
+ size_t mmap_len;
};
Modified: fsf/trunk/libc/locale/programs/locarchive.c
==============================================================================
--- fsf/trunk/libc/locale/programs/locarchive.c (original)
+++ fsf/trunk/libc/locale/programs/locarchive.c Wed Jun 26 00:02:08 2013
@@ -37,8 +37,11 @@
#include <stdint.h>
#include <sys/mman.h>
#include <sys/param.h>
+#include <sys/shm.h>
#include <sys/stat.h>
+#include <libc-internal.h>
+#include <libc-mmap.h>
#include "../../crypt/md5.h"
#include "../localeinfo.h"
#include "../locarchive.h"
@@ -79,21 +82,29 @@
mapping affects the address selection. So do this mapping from the
actual file, even though it's only a dummy to reserve address space. */
static void *
-prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags)
+prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags,
+ void **mmap_base, size_t *mmap_len)
{
if (total < RESERVE_MMAP_SIZE)
{
void *p = mmap64 (NULL, RESERVE_MMAP_SIZE, PROT_NONE, MAP_SHARED, fd, 0);
if (p != MAP_FAILED)
- {
- *reserved = RESERVE_MMAP_SIZE;
- *xflags = MAP_FIXED;
- return p;
- }
+ {
+ void *aligned_p = PTR_ALIGN_UP (p, MAP_FIXED_ALIGNMENT);
+ size_t align_adjust = aligned_p - p;
+ *mmap_base = p;
+ *mmap_len = RESERVE_MMAP_SIZE;
+ assert (align_adjust < RESERVE_MMAP_SIZE);
+ *reserved = RESERVE_MMAP_SIZE - align_adjust;
+ *xflags = MAP_FIXED;
+ return aligned_p;
+ }
}
*reserved = total;
*xflags = 0;
+ *mmap_base = NULL;
+ *mmap_len = 0;
return NULL;
}
@@ -151,9 +162,11 @@
error (EXIT_FAILURE, errval, _("cannot resize archive file"));
}
- size_t reserved;
+ size_t reserved, mmap_len;
int xflags;
- void *p = prepare_address_space (fd, total, &reserved, &xflags);
+ void *mmap_base;
+ void *p = prepare_address_space (fd, total, &reserved, &xflags, &mmap_base,
+ &mmap_len);
/* Map the header and all the administration data structures. */
p = mmap64 (p, total, PROT_READ | PROT_WRITE, MAP_SHARED | xflags, fd, 0);
@@ -199,6 +212,8 @@
}
ah->fd = fd;
+ ah->mmap_base = mmap_base;
+ ah->mmap_len = mmap_len;
ah->addr = p;
ah->mmaped = total;
ah->reserved = reserved;
@@ -271,8 +286,7 @@
if (st.st_size > ah->reserved)
return false;
- const size_t pagesz = getpagesize ();
- size_t start = ah->mmaped & ~(pagesz - 1);
+ size_t start = ALIGN_DOWN (ah->mmaped, MAP_FIXED_ALIGNMENT);
void *p = mmap64 (ah->addr + start, st.st_size - start,
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED,
ah->fd, start);
@@ -332,10 +346,15 @@
MAP_SHARED | MAP_FIXED, ah->fd, 0);
else
{
- munmap (ah->addr, ah->reserved);
+ if (ah->mmap_base)
+ munmap (ah->mmap_base, ah->mmap_len);
+ else
+ munmap (ah->addr, ah->reserved);
ah->addr = mmap64 (NULL, st.st_size, PROT_READ | PROT_WRITE,
MAP_SHARED, ah->fd, 0);
ah->reserved = st.st_size;
+ ah->mmap_base = NULL;
+ ah->mmap_len = 0;
head = ah->addr;
}
if (ah->addr == MAP_FAILED)
@@ -401,9 +420,11 @@
error (EXIT_FAILURE, errval, _("cannot resize archive file"));
}
- size_t reserved;
+ size_t reserved, mmap_len;
int xflags;
- void *p = prepare_address_space (fd, total, &reserved, &xflags);
+ void *mmap_base;
+ void *p = prepare_address_space (fd, total, &reserved, &xflags, &mmap_base,
+ &mmap_len);
/* Map the header and all the administration data structures. */
p = mmap64 (p, total, PROT_READ | PROT_WRITE, MAP_SHARED | xflags, fd, 0);
@@ -423,6 +444,8 @@
}
new_ah.mmaped = total;
+ new_ah.mmap_base = mmap_base;
+ new_ah.mmap_len = mmap_len;
new_ah.addr = p;
new_ah.fd = fd;
new_ah.reserved = reserved;
@@ -606,9 +629,11 @@
ah->fd = fd;
ah->mmaped = st.st_size;
- size_t reserved;
+ size_t reserved, mmap_len;
int xflags;
- void *p = prepare_address_space (fd, st.st_size, &reserved, &xflags);
+ void *mmap_base;
+ void *p = prepare_address_space (fd, st.st_size, &reserved, &xflags,
+ &mmap_base, &mmap_len);
/* Map the entire file. We might need to compare the category data
in the file with the newly added data. */
@@ -620,6 +645,8 @@
error (EXIT_FAILURE, errno, _("cannot map archive header"));
}
ah->reserved = reserved;
+ ah->mmap_base = mmap_base;
+ ah->mmap_len = mmap_len;
}
@@ -628,7 +655,10 @@
{
if (ah->fd != -1)
{
- munmap (ah->addr, ah->reserved);
+ if (ah->mmap_base)
+ munmap (ah->mmap_base, ah->mmap_len);
+ else
+ munmap (ah->addr, ah->reserved);
close (ah->fd);
}
}
Modified: fsf/trunk/libc/manual/texinfo.tex
==============================================================================
--- fsf/trunk/libc/manual/texinfo.tex (original)
+++ fsf/trunk/libc/manual/texinfo.tex Wed Jun 26 00:02:08 2013
@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2012-01-19.16}
+\def\texinfoversion{2013-06-21.17}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -24,13 +24,14 @@
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
-% restriction. (This has been our intent since Texinfo was invented.)
+% restriction. This Exception is an additional permission under section 7
+% of the GNU General Public License, version 3 ("GPLv3").
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
-% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-% ftp://tug.org/tex/texinfo.tex
-% (and all CTAN mirrors, see http://www.ctan.org).
+% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page)
% The texinfo.tex in any given distribution could well be out
% of date, so if that's what you're using, please check.
%
@@ -594,7 +595,7 @@
\def\:{\spacefactor=1000 }
% @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
% @/ allows a line break.
\let\/=\allowbreak
@@ -887,7 +888,7 @@
\def\popthisfilestack{\errthisfilestackempty}
\def\errthisfilestackempty{\errmessage{Internal error:
the stack of filenames is empty.}}
-
+%
\def\thisfile{}
% @center line
@@ -895,36 +896,46 @@
%
\parseargdef\center{%
\ifhmode
- \let\next\centerH
+ \let\centersub\centerH
\else
- \let\next\centerV
+ \let\centersub\centerV
\fi
- \next{\hfil \ignorespaces#1\unskip \hfil}%
-}
-\def\centerH#1{%
- {%
- \hfil\break
- \advance\hsize by -\leftskip
- \advance\hsize by -\rightskip
- \line{#1}%
- \break
- }%
-}
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+ \centersub{\hfil \ignorespaces#1\unskip \hfil}%
+ \let\centersub\relax % don't let the definition persist, just in case
+}
+\def\centerH#1{{%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+}}
+%
+\newcount\centerpenalty
+\def\centerV#1{%
+ % The idea here is the same as in \startdefun, \cartouche, etc.: if
+ % @center is the first thing after a section heading, we need to wipe
+ % out the negative parskip inserted by \sectionheading, but still
+ % prevent a page break here.
+ \centerpenalty = \lastpenalty
+ \ifnum\centerpenalty>10000 \vskip\parskip \fi
+ \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
+ \line{\kern\leftskip #1\kern\rightskip}%
+}
% @sp n outputs n lines of vertical space
-
+%
\parseargdef\sp{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
-
+%
\def\comment{\begingroup \catcode`\^^M=\other%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
\commentxxx}
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
+%
\let\c=\comment
% @paragraphindent NCHARS
@@ -1097,7 +1108,7 @@
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
-%
+%
% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
% related messages. The final outcome is that it is up to the TeX user
% to double the backslashes and otherwise make the string valid, so
@@ -1107,7 +1118,7 @@
% #1 is a control sequence in which to do the replacements,
% which we \xdef.
\def\txiescapepdf#1{%
- \ifx\pdfescapestring\relax
+ \ifx\pdfescapestring\thisisundefined
% No primitive available; should we give a warning or log?
% Many times it won't matter.
\else
@@ -1173,8 +1184,8 @@
%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
- \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
- \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
% pdftex (and the PDF format) support .pdf, .png, .jpg (among
% others). Let's try in that order, PDF first since if
@@ -1212,8 +1223,8 @@
\else
\immediate\pdfximage
\fi
- \ifdim \wd0 >0pt width \imagewidth \fi
- \ifdim \wd2 >0pt height \imageheight \fi
+ \ifdim \wd0 >0pt width \pdfimagewidth \fi
+ \ifdim \wd2 >0pt height \pdfimageheight \fi
\ifnum\pdftexversion<13
#1.\pdfimgext
\else
@@ -1357,12 +1368,17 @@
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
- \ifx\p\space\else\addtokens{\filename}{\PP}%
- \advance\filenamelength by 1
- \fi
+ \addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
\fi
\nextsp}
- \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \def\getfilename#1{%
+ \filenamelength=0
+ % If we don't expand the argument now, \skipspaces will get
+ % snagged on things like "@value{foo}".
+ \edef\temp{#1}%
+ \expandafter\skipspaces\temp|\relax
+ }
\ifnum\pdftexversion < 14
\let \startlink \pdfannotlink
\else
@@ -1459,9 +1475,6 @@
\def\ttsl{\setfontstyle{ttsl}}
-% Default leading.
-\newdimen\textleading \textleading = 13.2pt
-
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
@@ -1473,6 +1486,7 @@
% can get a sort of poor man's double spacing by redefining this.
\def\baselinefactor{1}
%
+\newdimen\textleading
\def\setleading#1{%
\dimen0 = #1\relax
\normalbaselineskip = \baselinefactor\dimen0
@@ -1745,18 +1759,24 @@
\fi\fi
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
+% Set the font macro #1 to the font named \fontprefix#2.
% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
+% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
+% Example:
+% #1 = \textrm
+% #2 = \rmshape
+% #3 = 10
+% #4 = \mainmagstep
+% #5 = OT1
+%
\def\setfont#1#2#3#4#5{%
\font#1=\fontprefix#2#3 scaled #4
\csname cmap#5\endcsname#1%
}
% This is what gets called when #5 of \setfont is empty.
\let\cmap\gobble
-% emacs-page end of cmaps
+%
+% (end of cmaps)
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
@@ -1766,7 +1786,7 @@
\fi
% Support font families that don't use the same naming scheme as CM.
\def\rmshape{r}
-\def\rmbshape{bx} %where the normal face is bold
+\def\rmbshape{bx} % where the normal face is bold
\def\bfshape{b}
\def\bxshape{bx}
\def\ttshape{tt}
@@ -1781,8 +1801,7 @@
\def\scshape{csc}
\def\scbshape{csc}
-% Definitions for a main text size of 11pt. This is the default in
-% Texinfo.
+% Definitions for a main text size of 11pt. (The default in Texinfo.)
%
\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
@@ -1907,7 +1926,7 @@
\textleading = 13.2pt % line spacing for 11pt CM
\textfonts % reset the current fonts
\rm
-} % end of 11pt text font size definitions
+} % end of 11pt text font size definitions, \definetextfontsizexi
% Definitions to make the main text be 10pt Computer Modern, with
@@ -2039,7 +2058,7 @@
\textleading = 12pt % line spacing for 10pt CM
\textfonts % reset the current fonts
\rm
-} % end of 10pt text font size definitions
+} % end of 10pt text font size definitions, \definetextfontsizex
% We provide the user-level command
@@ -2254,8 +2273,6 @@
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
\gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
}
\let\markupsetuplqcode \markupsetcodequoteleft
@@ -2264,6 +2281,9 @@
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
%
+\let\markupsetuplqkbd \markupsetcodequoteleft
+\let\markupsetuprqkbd \markupsetcodequoteright
+%
\let\markupsetuplqsamp \markupsetcodequoteleft
\let\markupsetuprqsamp \markupsetcodequoteright
%
@@ -2272,8 +2292,6 @@
%
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
-
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
% Allow an option to not use regular directed right quote/apostrophe
% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
@@ -2364,8 +2382,7 @@
\aftersmartic
}
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic. @var is set to this for defuns.
\def\ttslanted#1{{\ttsl #1}}
% @cite is like \smartslanted except unconditionally use \sl. We never want
@@ -2430,34 +2447,12 @@
% @samp.
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
-% definition of @key that produces a lozenge. Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-% \vbox{\hrule\kern-0.4pt
-% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-% \kern-0.4pt\hrule}%
-% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-
-% definition of @key with no lozenge. If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle. But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
- \nohyphenation
- \ifmonospace\else\tt\fi
- #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
+
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
\def\tclose#1{%
{%
% Change normal interword space to be same as for the current font.
@@ -2480,14 +2475,14 @@
}
% We *must* turn on hyphenation at `-' and `_' in @code.
+% (But see \codedashfinish below.)
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
-
+%
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash.
-% -- rms.
+% and arrange explicitly to hyphenate at a dash. -- rms.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
@@ -2501,17 +2496,36 @@
\let-\codedash
\let_\codeunder
\else
- \let-\realdash
+ \let-\normaldash
\let_\realunder
\fi
+ % Given -foo (with a single dash), we do not want to allow a break
+ % after the hyphen.
+ \global\let\codedashprev=\codedash
+ %
\codex
}
-}
-
+ %
+ \gdef\codedash{\futurelet\next\codedashfinish}
+ \gdef\codedashfinish{%
+ \normaldash % always output the dash character itself.
+ %
+ % Now, output a discretionary to allow a line break, unless
+ % (a) the next character is a -, or
+ % (b) the preceding character is a -.
+ % E.g., given --posix, we do not want to allow a break after either -.
+ % Given --foo-bar, we do want to allow a break between the - and the b.
+ \ifx\next\codedash \else
+ \ifx\codedashprev\codedash
+ \else \discretionary{}{}{}\fi
+ \fi
+ \global\let\codedashprev=\next
+ }
+}
+\def\normaldash{-}
+%
\def\codex #1{\tclose{#1}\endgroup}
-\def\realdash{-}
-\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
@@ -2525,9 +2539,9 @@
}
% An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__. This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general. @allowcodebreaks provides a way to control this.
+% each of the four underscores in __typeof__. This is bad.
+% @allowcodebreaks provides a document-level way to turn breaking at -
+% and _ on and off.
%
\newif\ifallowcodebreaks \allowcodebreakstrue
@@ -2545,6 +2559,13 @@
\errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
\fi\fi
}
+
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
@@ -2692,10 +2713,6 @@
\let\email=\uref
\fi
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
@@ -2719,16 +2736,36 @@
% Default is `distinct'.
\kbdinputstyle distinct
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
-
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+\def\kbdsub#1#2#3\par{%
+ \def\one{#1}\def\three{#3}\def\threex{??}%
+ \ifx\one\xkey\ifx\threex\three \key{#2}%
+ \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+ \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
+
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
% @clicksequence{File @click{} Open ...}
\def\clicksequence#1{\begingroup #1\endgroup}
@@ -2835,6 +2872,9 @@
\let' = \ptexquoteright
}
}
+
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
@@ -3126,12 +3166,17 @@
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
- \ifx\curfontstyle\bfstylename
- % bold:
- \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \ifmonospace
+ % typewriter:
+ \font\thisecfont = ectt\ecsize \space at \nominalsize
\else
- % regular:
- \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
\fi
\thisecfont
}
@@ -3244,6 +3289,20 @@
\finishedtitlepagetrue
}
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right. This should be used
+% inside a \vbox, and fonts need to be set appropriately first. Because
+% it is always used for titles, nothing else, we call \rmisbold. \par
+% should be specified before the end of the \vbox, since a vbox is a group.
+%
+\def\raggedtitlesettings{%
+ \rmisbold
+ \hyphenpenalty=10000
+ \parindent=0pt
+ \tolerance=5000
+ \ptexraggedright
+}
+
% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
@@ -3251,7 +3310,7 @@
\parseargdef\title{%
\checkenv\titlepage
- \leftline{\titlefonts\rmisbold #1}
+ \vbox{\titlefonts \raggedtitlesettings #1\par}%
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -4148,7 +4207,7 @@
% ..., but we might end up with active ones in the argument if
% we're called from @code, as @code{@value{foo-bar_}}, though.
% So \let them to their normal equivalents.
- \let-\realdash \let_\normalunderscore
+ \let-\normaldash \let_\normalunderscore
}
}
@@ -4172,7 +4231,8 @@
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
%
-% To get special treatment of `@end ifset,' call \makeond and the redefine.
+% To get the special treatment we need for `@end ifset,' we call
+% \makecond and then redefine.
%
\makecond{ifset}
\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
@@ -4188,7 +4248,7 @@
}
\def\ifsetfail{\doignore{ifset}}
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
% defined with @set, or has been undefined with @clear.
%
% The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -4198,6 +4258,35 @@
\makecond{ifclear}
\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
\def\ifclearfail{\doignore{ifclear}}
+
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined. We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+%
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname #2\endcsname\relax
+ #1% If not defined, \let\next as above.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+ \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
@@ -4435,6 +4524,7 @@
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
+ \definedummyword\lbracechar
\definedummyword\leq
\definedummyword\minus
\definedummyword\ogonek
@@ -4447,6 +4537,7 @@
\definedummyword\quoteleft
\definedummyword\quoteright
\definedummyword\quotesinglbase
+ \definedummyword\rbracechar
\definedummyword\result
\definedummyword\textdegree
%
@@ -4498,6 +4589,7 @@
\definedummyword\t
%
% Commands that take arguments.
+ \definedummyword\abbr
\definedummyword\acronym
\definedummyword\anchor
\definedummyword\cite
@@ -4509,7 +4601,9 @@
\definedummyword\emph
\definedummyword\env
\definedummyword\file
+ \definedummyword\image
\definedummyword\indicateurl
+ \definedummyword\inforef
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
@@ -4556,7 +4650,10 @@
% content at all. So for index sorting, we map @{ and @} to strings
% starting with |, since that ASCII character is between ASCII { and }.
\def\{{|a}%
+ \def\lbracechar{|a}%
+ %
\def\}{|b}%
+ \def\rbracechar{|b}%
%
% Non-English letters.
\def\AA{AA}%
@@ -4732,10 +4829,9 @@
%
% ..., ready, GO:
%
-\def\safewhatsit#1{%
-\ifhmode
+\def\safewhatsit#1{\ifhmode
#1%
-\else
+ \else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
@@ -4759,7 +4855,6 @@
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
- %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
@@ -4772,8 +4867,7 @@
% (the whatsit from the \write), so we must insert a \nobreak.
\nobreak\vskip\whatsitskip
\fi
-\fi
-}
+\fi}
% The index entry written in the file actually looks like
% \entry {sortstring}{page}{topic}
@@ -5520,14 +5614,6 @@
% Define @majorheading, @heading and @subheading
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-% 1) We use \vbox rather than the earlier \line to permit
-% overlong headings to fold.
-% 2) \hyphenpenalty is set to 10000 because hyphenation in a
-% heading is obnoxious; this forbids it.
-% 3) Likewise, headings look best if no \parindent is used, and
-% if justification is not attempted. Hence \raggedright.
-
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
@@ -5535,10 +5621,8 @@
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
- {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\ptexraggedright
- \rmisbold #1\hfill}}%
- \bigskip \par\penalty 200\relax
+ \vbox{\chapfonts \raggedtitlesettings #1\par}%
+ \nobreak\bigskip \nobreak
\suppressfirstparagraphindent
}
@@ -5697,8 +5781,7 @@
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
- \hangindent=\wd0 \centerparametersmaybe
+ \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
\nobreak\bigskip % no page break after a chapter title
@@ -5720,18 +5803,18 @@
\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
%
\def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\ptexraggedright
- \rmisbold #1\hfill}}\bigskip \par\nobreak
+ \chapoddpage
+ \vbox{\chapfonts \raggedtitlesettings #1\par}%
+ \nobreak\bigskip\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
\par\penalty 5000 %
}
\def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt
- \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+ \chapoddpage
+ \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
+ \nobreak\bigskip \nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
@@ -5876,14 +5959,15 @@
%
% We'll almost certainly start a paragraph next, so don't let that
% glue accumulate. (Not a breakpoint because it's preceded by a
- % discardable item.)
+ % discardable item.) However, when a paragraph is not started next
+ % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
+ % or the negative glue will cause weirdly wrong output, typically
+ % obscuring the section heading with something else.
\vskip-\parskip
%
- % This is purely so the last item on the list is a known \penalty >
- % 10000. This is so \startdefun can avoid allowing breakpoints after
- % section headings. Otherwise, it would insert a valid breakpoint between:
- % @section sec-whatever
- % @deffn def-whatever
+ % This is so the last item on the main vertical list is a known
+ % \penalty > 10000, so \startdefun, etc., can recognize the situation
+ % and do the needful.
\penalty 10001
}
@@ -6303,7 +6387,7 @@
% If this cartouche directly follows a sectioning command, we need the
% \parskip glue (backspaced over by default) or the cartouche can
% collide with the section heading.
- \ifnum\lastpenalty>10000 \vskip\parskip \fi
+ \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
%
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
@@ -6338,7 +6422,7 @@
\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
- \hfuzz = 12pt % Don't be fussy
+ \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
@@ -6496,16 +6580,9 @@
\makedispenvdef{quotation}{\quotationstart}
%
\def\quotationstart{%
- {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
- \parindent=0pt
- %
- % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \indentedblockstart % same as \indentedblock, but increase right margin too.
\ifx\nonarrowing\relax
- \advance\leftskip by \lispnarrowing
\advance\rightskip by \lispnarrowing
- \exdentamount = \lispnarrowing
- \else
- \let\nonarrowing = \relax
\fi
\parsearg\quotationlabel
}
@@ -6530,6 +6607,32 @@
{\bf #1: }%
\fi
}
+
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+%
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+ \par
+ {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
@@ -7009,7 +7112,10 @@
\df \sl \hyphenchar\font=0
%
% On the other hand, if an argument has two dashes (for instance), we
- % want a way to get ttsl. Let's try @var for that.
+ % want a way to get ttsl. We used to recommend @var for that, so
+ % leave the code in, but it's strange for @var to lead to typewriter.
+ % Nowadays we recommend @code, since the difference between a ttsl hyphen
+ % and a tt hyphen is pretty tiny. @code also disables ?` !`.
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
@@ -7793,7 +7899,7 @@
\fi\fi
}
-
+%
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@@ -7803,15 +7909,20 @@
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
%
-\newbox\topbox
+\newbox\toprefbox
\newbox\printedrefnamebox
+\newbox\infofilenamebox
\newbox\printedmanualbox
%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
%
+ % Get args without leading/trailing spaces.
\def\printedrefname{\ignorespaces #3}%
\setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+ %
+ \def\infofilename{\ignorespaces #4}%
+ \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
%
\def\printedmanual{\ignorespaces #5}%
\setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
@@ -7845,12 +7956,20 @@
\ifpdf
{\indexnofonts
\turnoffactive
+ \makevalueexpandable
% This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions.
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #4, including (wrongly) those in the middle of the filename.
\getfilename{#4}%
%
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
\edef\pdfxrefdest{#1}%
- \txiescapepdf\pdfxrefdest
+ \ifx\pdfxrefdest\empty
+ \def\pdfxrefdest{Top}% no empty targets
+ \else
+ \txiescapepdf\pdfxrefdest % escape PDF special chars
+ \fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
@@ -7883,7 +8002,7 @@
\printedrefname
\fi
%
- % if the user also gave the printed manual name (fifth arg), append
+ % If the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
\ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
@@ -7898,32 +8017,20 @@
% this is a loss. Therefore, we give the text of the node name
% again, so it is as if TeX is seeing it for the first time.
%
- % Cross-manual reference. Only include the "Section ``foo'' in" if
- % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual}
- % outputs simply "see The Foo Manual".
\ifdim \wd\printedmanualbox > 0pt
- % What is the 7sp about? The idea is that we also want to omit
- % the Section part if we would be printing "Top", since they are
- % clearly trying to refer to the whole manual. But, this being
- % TeX, we can't easily compare strings while ignoring the possible
- % spaces before and after in the input. By adding the arbitrary
- % 7sp, we make it much less likely that a real node name would
- % happen to have the same width as "Top" (e.g., in a monospaced font).
- % I hope it will never happen in practice.
+ % Cross-manual reference with a printed manual name.
%
- % For the same basic reason, we retypeset the "Top" at every
- % reference, since the current font is indeterminate.
+ \crossmanualxref{\cite{\printedmanual\unskip}}%
+ %
+ \else\ifdim \wd\infofilenamebox > 0pt
+ % Cross-manual reference with only an info filename (arg 4), no
+ % printed manual name (arg 5). This is essentially the same as
+ % the case above; we output the filename, since we have nothing else.
%
- \setbox\topbox = \hbox{Top\kern7sp}%
- \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
- \ifdim \wd2 > 7sp
- \ifdim \wd2 = \wd\topbox \else
- \putwordSection{} ``\printedrefname'' \putwordin{}\space
- \fi
- \fi
- \cite{\printedmanual}%
+ \crossmanualxref{\code{\infofilename\unskip}}%
+ %
\else
- % Reference in this manual.
+ % Reference within this manual.
%
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
@@ -7944,10 +8051,36 @@
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \fi
+ \fi\fi
\fi
\endlink
\endgroup}
+
+% Output a cross-manual xref to #1. Used just above (twice).
+%
+% Only include the text "Section ``foo'' in" if the foo is neither
+% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
+% "see The Foo Manual", the idea being to refer to the whole manual.
+%
+% But, this being TeX, we can't easily compare our node name against the
+% string "Top" while ignoring the possible spaces before and after in
+% the input. By adding the arbitrary 7sp below, we make it much less
+% likely that a real node name would have the same width as "Top" (e.g.,
+% in a monospaced font). Hopefully it will never happen in practice.
+%
+% For the same basic reason, we retypeset the "Top" at every
+% reference, since the current font is indeterminate.
+%
+\def\crossmanualxref#1{%
+ \setbox\toprefbox = \hbox{Top\kern7sp}%
+ \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+ \ifdim \wd2 > 7sp % nonempty?
+ \ifdim \wd2 = \wd\toprefbox \else % same as Top?
+ \putwordSection{} ``\printedrefname'' \putwordin{}\space
+ \fi
+ \fi
+ #1%
+}
% This macro is called from \xrefX for the `[nodename]' part of xref
% output. It's a separate macro only so it can be changed more easily,
@@ -8316,7 +8449,7 @@
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
- \ifx\epsfbox\thisiundefined
+ \ifx\epsfbox\thisisundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
@@ -8340,6 +8473,13 @@
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
+ \else \ifx\centersub\centerV
+ % for @center @image, we need a vbox so we can have our vertical space
+ \imagevmodetrue
+ \vbox\bgroup % vbox has better behavior than vtop herev
+ \fi\fi
+ %
+ \ifimagevmode
\nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
@@ -8349,9 +8489,13 @@
\fi
%
% Leave vertical mode so that indentation from an enclosing
- % environment such as @quotation is respected. On the other hand, if
- % it's at the top level, we don't want the normal paragraph indentation.
- \noindent
+ % environment such as @quotation is respected.
+ % However, if we're at the top level, we don't want the
+ % normal paragraph indentation.
+ % On the other hand, if we are in the case of @center @image, we don't
+ % want to start a paragraph, which will create a hsize-width box and
+ % eradicate the centering.
+ \ifx\centersub\centerV\else \noindent \fi
%
% Output the image.
\ifpdf
@@ -8363,7 +8507,10 @@
\epsfbox{#1.eps}%
\fi
%
- \ifimagevmode \medskip \fi % space after the standalone image
+ \ifimagevmode
+ \medskip % space after a standalone image
+ \fi
+ \ifx\centersub\centerV \egroup \fi
\endgroup}
@@ -9866,22 +10013,26 @@
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
-@def@normalturnoffactive{%
- @let"=@normaldoublequote
- @let$=@normaldollar %$ font-lock fix
- @let+=@normalplus
- @let<=@normalless
- @let>=@normalgreater
- @let\=@normalbackslash
- @let^=@normalcaret
- @let_=@normalunderscore
- @let|=@normalverticalbar
- @let~=@normaltilde
- @markupsetuplqdefault
- @markupsetuprqdefault
- @unsepspaces
+% the literal character `\'. Also revert - to its normal character, in
+% case the active - from code has slipped in.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+ @let-=@normaldash
+ @let"=@normaldoublequote
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let\=@normalbackslash
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let~=@normaltilde
+ @markupsetuplqdefault
+ @markupsetuprqdefault
+ @unsepspaces
+ }
}
% Make _ and + \other characters, temporarily.
Modified: fsf/trunk/libc/ports/ChangeLog.alpha
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.alpha (original)
+++ fsf/trunk/libc/ports/ChangeLog.alpha Wed Jun 26 00:02:08 2013
@@ -1,3 +1,15 @@
+2013-06-24 Richard Henderson <rth@xxxxxxxxxx>
+
+ [BZ #15666]
+ * sysdeps/alpha/Versions (GLIBC_2.18): Add __sqrt_finite,
+ __sqrtf_finite, and __sqrtl_finite.
+ * sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist: Likewise.
+ * sysdeps/alpha/alphaev6/fpu/e_sqrt.S: Add __sqrt_finite.
+ * sysdeps/alpha/alphaev6/fpu/e_sqrtf.S: Add __sqrtf_finite.
+ * sysdeps/alpha/fpu/e_sqrt.c: Add __sqrt_finite compatibility.
+ * sysdeps/alpha/fpu/e_sqrtf.c: New file.
+ * sysdeps/alpha/soft-fp/e_sqrtl.c: Add __sqrtl_finite.
+
2013-06-23 Richard Henderson <rth@xxxxxxxxxx>
* sysdeps/alpha/fpu/libm-test-ulps: Update.
Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Wed Jun 26 00:02:08 2013
@@ -1,3 +1,8 @@
+2013-06-25 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ * sysdeps/m68k/sysdep.h (CALL_MCOUNT) [PROF]: Use %a6 instead of
+ %fp in cfi insns.
+
2013-06-15 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist:
Modified: fsf/trunk/libc/ports/sysdeps/alpha/Versions
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/alpha/Versions (original)
+++ fsf/trunk/libc/ports/sysdeps/alpha/Versions Wed Jun 26 00:02:08 2013
@@ -10,4 +10,8 @@
# used in inline functions.
__atan2;
}
+ GLIBC_2.18 {
+ # forgotten when the symbols were added to glibc 2.15 for other targets
+ __sqrt_finite; __sqrtf_finite; __sqrtl_finite;
+ }
}
Modified: fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S (original)
+++ fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S Wed Jun 26 00:02:08 2013
@@ -16,6 +16,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <shlib-compat.h>
.arch ev6
.set noreorder
@@ -42,3 +43,11 @@
nop
END(__ieee754_sqrt)
+
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+strong_alias(__ieee754_sqrt, __sqrt_finite1)
+compat_symbol(libm, __sqrt_finite1, __sqrt_finite, GLIBC_2_15)
+versioned_symbol(libm, __ieee754_sqrt, __sqrt_finite, GLIBC_2_18)
+#else
+strong_alias(__ieee754_sqrt, __sqrt_finite)
+#endif
Modified: fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S (original)
+++ fsf/trunk/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S Wed Jun 26 00:02:08 2013
@@ -16,6 +16,7 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#include <shlib-compat.h>
.arch ev6
.set noreorder
@@ -42,3 +43,11 @@
nop
END(__ieee754_sqrtf)
+
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+strong_alias(__ieee754_sqrtf, __sqrtf_finite1)
+compat_symbol(libm, __sqrtf_finite1, __sqrtf_finite, GLIBC_2_15)
+versioned_symbol(libm, __ieee754_sqrtf, __sqrtf_finite, GLIBC_2_18)
+#else
+strong_alias(__ieee754_sqrtf, __sqrtf_finite)
+#endif
Modified: fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrt.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrt.c (original)
+++ fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrt.c Wed Jun 26 00:02:08 2013
@@ -18,6 +18,7 @@
#include <math.h>
#include <math_private.h>
+#include <shlib-compat.h>
#if !defined(_IEEE_FP_INEXACT)
@@ -157,9 +158,30 @@
\n\
.end __ieee754_sqrt");
+/* Avoid the __sqrt_finite alias that dbl-64/e_sqrt.c would give... */
+#undef strong_alias
+#define strong_alias(a,b)
+
+/* ... defining our own. */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+asm (".global __sqrt_finite1; __sqrt_finite1 = __ieee754_sqrt");
+#else
+asm (".global __sqrt_finite; __sqrt_finite = __ieee754_sqrt");
+#endif
+
static double __full_ieee754_sqrt(double) __attribute_used__;
#define __ieee754_sqrt __full_ieee754_sqrt
+#elif SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# define __sqrt_finite __sqrt_finite1
#endif /* _IEEE_FP_INEXACT */
#include <sysdeps/ieee754/dbl-64/e_sqrt.c>
+
+/* Work around forgotten symbol in alphaev6 build. */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# undef __sqrt_finite
+# undef __ieee754_sqrt
+compat_symbol (libm, __sqrt_finite1, __sqrt_finite, GLIBC_2_15);
+versioned_symbol (libm, __ieee754_sqrt, __sqrt_finite, GLIBC_2_18);
+#endif
Added: fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c (added)
+++ fsf/trunk/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c Wed Jun 26 00:02:08 2013
@@ -1,0 +1,14 @@
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# define __sqrtf_finite __sqrtf_finite1
+#endif
+
+#include <sysdeps/ieee754/flt-32/e_sqrtf.c>
+
+/* Work around forgotten symbol in alphaev6 build. */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+# undef __sqrtf_finite
+compat_symbol (libm, __sqrtf_finite1, __sqrtf_finite, GLIBC_2_15);
+versioned_symbol (libm, __ieee754_sqrtf, __sqrtf_finite, GLIBC_2_18);
+#endif
Modified: fsf/trunk/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c (original)
+++ fsf/trunk/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c Wed Jun 26 00:02:08 2013
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <soft-fp.h>
#include <quad.h>
+#include <shlib-compat.h>
long double
__ieee754_sqrtl (const long double a)
@@ -37,3 +38,12 @@
FP_HANDLE_EXCEPTIONS;
return c;
}
+
+/* ??? We forgot to add this symbol in 2.15. Getting this into 2.18 isn't as
+ straight-forward as just adding the alias, since a generic Versions file
+ includes the 2.15 version and the linker uses the first one it sees. */
+#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18)
+versioned_symbol (libm, __ieee754_sqrtl, __sqrtl_finite, GLIBC_2_18);
+#else
+strong_alias(__ieee754_sqrtl, __sqrtl_finite)
+#endif
Modified: fsf/trunk/libc/ports/sysdeps/m68k/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/m68k/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/m68k/sysdep.h Wed Jun 26 00:02:08 2013
@@ -45,11 +45,11 @@
to locate our caller, so push one just for its benefit. */
# define CALL_MCOUNT \
move.l %fp, -(%sp); \
- cfi_adjust_cfa_offset (4); cfi_rel_offset (%fp, 0); \
+ cfi_adjust_cfa_offset (4); cfi_rel_offset (%a6, 0); \
move.l %sp, %fp; \
jbsr JUMPTARGET (_mcount); \
move.l (%sp)+, %fp; \
- cfi_adjust_cfa_offset (-4); cfi_restore (%fp);
+ cfi_adjust_cfa_offset (-4); cfi_restore (%a6);
# else
# define CALL_MCOUNT /* Do nothing. */
# endif
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/libm.abilist Wed Jun 26 00:02:08 2013
@@ -382,6 +382,8 @@
__sinh_finite F
__sinhf_finite F
__sinhl_finite F
+ __sqrt_finite F
+ __sqrtf_finite F
__y0_finite F
__y0f_finite F
__y0l_finite F
@@ -396,6 +398,9 @@
__issignaling F
__issignalingf F
__issignalingl F
+ __sqrt_finite F
+ __sqrtf_finite F
+ __sqrtl_finite F
GLIBC_2.2
GLIBC_2.2 A
feclearexcept F
Added: fsf/trunk/libc/sysdeps/generic/libc-mmap.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/libc-mmap.h (added)
+++ fsf/trunk/libc/sysdeps/generic/libc-mmap.h Wed Jun 26 00:02:08 2013
@@ -1,0 +1,26 @@
+/* Internal logic for dealing with mmap quirks.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC_MMAP_H
+#define _LIBC_MMAP_H 1
+
+/* Using MAP_FIXED with mmap sometimes requires larger alignment. */
+#include <sys/shm.h>
+#define MAP_FIXED_ALIGNMENT SHMLBA
+
+#endif
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits