Sync with gnulib

This incorporates:
2016-02-10 stdalign: port to older HP and IBM cc
* doc/misc/texinfo.tex, lib/stdalign.in.h: Copy from gnulib.
This commit is contained in:
Paul Eggert 2016-02-21 12:34:00 -08:00
parent aa5a794843
commit db512249dd
2 changed files with 107 additions and 34 deletions

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
% %
\def\texinfoversion{2016-02-09.12} \def\texinfoversion{2016-02-16.15}
% %
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -310,7 +310,7 @@
% Margin to add to right of even pages, to left of odd pages. % Margin to add to right of even pages, to left of odd pages.
\newdimen\bindingoffset \newdimen\bindingoffset
\newdimen\normaloffset \newdimen\normaloffset
\newdimen\pagewidth \newdimen\pageheight \newdimen\txipagewidth \newdimen\txipageheight
% Main output routine. % Main output routine.
% %
@ -334,7 +334,7 @@
% Common context changes for both heading and footing. % Common context changes for both heading and footing.
% Do this outside of the \shipout so @code etc. will be expanded in % Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code). % the headline as they should be, not taken literally (outputting ''code).
\def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
% %
% Retrieve the information for the headings from the marks in the page, % Retrieve the information for the headings from the marks in the page,
% and call Plain TeX's \makeheadline and \makefootline, which use the % and call Plain TeX's \makeheadline and \makefootline, which use the
@ -433,7 +433,7 @@
\newinsert\margin \dimen\margin=\maxdimen \newinsert\margin \dimen\margin=\maxdimen
% Main part of page, including any footnotes % Main part of page, including any footnotes
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} \def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11 {\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
% marginal hacks, juha@viisa.uucp (Juha Takala) % marginal hacks, juha@viisa.uucp (Juha Takala)
@ -724,11 +724,11 @@
% \dimen0 is the vertical size of the group's box. % \dimen0 is the vertical size of the group's box.
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
% \dimen2 is how much space is left on the page (more or less). % \dimen2 is how much space is left on the page (more or less).
\dimen2 = \pageheight \advance\dimen2 by -\pagetotal \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal
% if the group doesn't fit on the current page, and it's a big big % if the group doesn't fit on the current page, and it's a big big
% group, force a page break. % group, force a page break.
\ifdim \dimen0 > \dimen2 \ifdim \dimen0 > \dimen2
\ifdim \pagetotal < \vfilllimit\pageheight \ifdim \pagetotal < \vfilllimit\txipageheight
\page \page
\fi \fi
\fi \fi
@ -1100,6 +1100,64 @@
\newif\ifpdf \newif\ifpdf
\newif\ifpdfmakepagedest \newif\ifpdfmakepagedest
%
% For LuaTeX
%
\ifx\luatexversion\thisisundefined
\else
% Escape PDF strings UTF-8 to UTF-16
\begingroup
\catcode`\%=12
\directlua{
function UTF16oct(str)
tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
for c in string.utfvalues(str) do
if c < 0x10000 then
tex.sprint(
string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o',
(c / 256), (c % 256)))
else
c = c - 0x10000
local c_hi = c / 1024 + 0xd800
local c_lo = c % 1024 + 0xdc00
tex.sprint(
string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o' ..
string.char(0x5c) .. string.char(0x25) .. '03o',
(c_hi / 256), (c_hi % 256),
(c_lo / 256), (c_lo % 256)))
end
end
end
}
\endgroup
\def\pdfescapestring#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
\ifnum\luatexversion>84
% For LuaTeX >= 0.85
\def\pdfdest{\pdfextension dest}
\let\pdfoutput\outputmode
\def\pdfliteral{\pdfextension literal}
\def\pdfcatalog{\pdfextension catalog}
\def\pdftexversion{\numexpr\pdffeedback version\relax}
\let\pdfximage\saveimageresource
\let\pdfrefximage\useimageresource
\let\pdflastximage\lastsavedimageresourceindex
\def\pdfendlink{\pdfextension endlink\relax}
\def\pdfoutline{\pdfextension outline}
\def\pdfstartlink{\pdfextension startlink}
\def\pdffontattr{\pdfextension fontattr}
\def\pdfobj{\pdfextension obj}
\def\pdflastobj{\numexpr\pdffeedback lastobj\relax}
\let\pdfpagewidth\pagewidth
\let\pdfpageheight\pageheight
\edef\pdfhorigin{\pdfvariable horigin}
\edef\pdfvorigin{\pdfvariable vorigin}
\fi
\fi
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
% can be set). So we test for \relax and 0 as well as being undefined. % can be set). So we test for \relax and 0 as well as being undefined.
\ifx\pdfoutput\thisisundefined \ifx\pdfoutput\thisisundefined
@ -1283,18 +1341,23 @@
% page number. We could generate a destination for the section % page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't % text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured. % seem worth the trouble, since most documents are normally structured.
\edef\pdfoutlinedest{#3}% {
\ifx\pdfoutlinedest\empty \ifx\luatexversion\thisisundefined \else
\def\pdfoutlinedest{#4}% \turnoffactive % LuaTeX can use Unicode strings for PDF
\else \fi
\txiescapepdf\pdfoutlinedest \edef\pdfoutlinedest{#3}%
\fi \ifx\pdfoutlinedest\empty
% \def\pdfoutlinedest{#4}%
% Also escape PDF chars in the display string. \else
\edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinedest
\txiescapepdf\pdfoutlinetext \fi
% %
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% % Also escape PDF chars in the display string.
\edef\pdfoutlinetext{#1}%
\txiescapepdf\pdfoutlinetext
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
} }
% %
\def\pdfmakeoutlines{% \def\pdfmakeoutlines{%
@ -1528,7 +1591,16 @@
] ]
\special{pdf:docview << /PageMode /UseOutlines >> } \special{pdf:docview << /PageMode /UseOutlines >> }
\special{pdf:tounicode UTF8-UTF16 } \openin 1 uptex.tex % upTeX has UTF8-UTF16 cmap
\ifeof 1
% upTeX does not exist. To use UTF8-UCS2 cmap.
% In this case, non-BMP characters (over U+FFFF) can not be used.
\special{pdf:tounicode UTF8-UCS2}
\else
% upTeX exists. To use UTF8-UTF16 cmap.
% Non-BMP characters (over U+FFFF) can be used.
\special{pdf:tounicode UTF8-UTF16}
\fi
\fi \fi
% %
@ -3570,7 +3642,7 @@
% %
% Leave some space for the footline. Hopefully ok to assume % Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself. % @evenfooting will not be used by itself.
\global\advance\pageheight by -12pt \global\advance\txipageheight by -12pt
\global\advance\vsize by -12pt \global\advance\vsize by -12pt
} }
@ -3595,9 +3667,9 @@
\def\oddheadingmarks{\headingmarks{odd}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}}
\def\evenfootingmarks{\headingmarks{even}{footing}} \def\evenfootingmarks{\headingmarks{even}{footing}}
\def\oddfootingmarks{\headingmarks{odd}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}}
\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1}
\headingmarks{odd}{heading}{#1} } \headingmarks{odd}{heading}{#1} }
\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1}
\headingmarks{odd}{footing}{#1} } \headingmarks{odd}{footing}{#1} }
% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
\def\headingmarks#1#2#3 {% \def\headingmarks#1#2#3 {%
@ -3618,7 +3690,7 @@
% By default, they are off at the start of a document, % By default, they are off at the start of a document,
% and turned `on' after @end titlepage. % and turned `on' after @end titlepage.
\def\headings #1 {\csname HEADINGS#1\endcsname} \parseargdef\headings{\csname HEADINGS#1\endcsname}
\def\headingsoff{% non-global headings elimination \def\headingsoff{% non-global headings elimination
\evenheadline={\hfil}\evenfootline={\hfil}% \evenheadline={\hfil}\evenfootline={\hfil}%
@ -5642,7 +5714,7 @@
\wd0=\hsize \wd2=\hsize \wd0=\hsize \wd2=\hsize
\vbox{% \vbox{%
\vskip\doublecolumntopgap \vskip\doublecolumntopgap
\hbox to\pagewidth{\box0\hfil\box2}}% \hbox to\txipagewidth{\box0\hfil\box2}}%
} }
@ -5669,7 +5741,7 @@
% goal. When TeX sees \eject from below which follows the final % goal. When TeX sees \eject from below which follows the final
% section, it invokes the new output routine that we've set after % section, it invokes the new output routine that we've set after
% \balancecolumns below; \onepageout will try to fit the two columns % \balancecolumns below; \onepageout will try to fit the two columns
% and the final section into the vbox of \pageheight (see % and the final section into the vbox of \txipageheight (see
% \pagebody), causing an overfull box. % \pagebody), causing an overfull box.
% %
% Note that glue won't work here, because glue does not exercise the % Note that glue won't work here, because glue does not exercise the
@ -6153,7 +6225,7 @@
\fi \fi
} }
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
\def\CHAPPAGoff{% \def\CHAPPAGoff{%
\global\let\contentsalignmacro = \chappager \global\let\contentsalignmacro = \chappager
@ -6302,7 +6374,7 @@
% I don't think this chapter style is supported any more, so I'm not % I don't think this chapter style is supported any more, so I'm not
% updating it with the new noderef stuff. We'll see. --karl, 11aug03. % updating it with the new noderef stuff. We'll see. --karl, 11aug03.
% %
\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} \parseargdef\setchapterstyle{\csname CHAPF#1\endcsname}
% %
\def\unnchfopen #1{% \def\unnchfopen #1{%
\chapoddpage \chapoddpage
@ -9043,7 +9115,7 @@
% We want to typeset this text as a normal paragraph, even if the % We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment. % footnote reference occurs in (for example) a display environment.
% So reset some parameters. % So reset some parameters.
\hsize=\pagewidth \hsize=\txipagewidth
\interlinepenalty\interfootnotelinepenalty \interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes \splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox \splitmaxdepth\dp\strutbox
@ -11007,12 +11079,12 @@
\advance\vsize by \topskip \advance\vsize by \topskip
\outervsize = \vsize \outervsize = \vsize
\advance\outervsize by 2\topandbottommargin \advance\outervsize by 2\topandbottommargin
\pageheight = \vsize \txipageheight = \vsize
% %
\hsize = #2\relax \hsize = #2\relax
\outerhsize = \hsize \outerhsize = \hsize
\advance\outerhsize by 0.5in \advance\outerhsize by 0.5in
\pagewidth = \hsize \txipagewidth = \hsize
% %
\normaloffset = #4\relax \normaloffset = #4\relax
\bindingoffset = #5\relax \bindingoffset = #5\relax
@ -11336,9 +11408,10 @@
@global@let\ = @eatinput% @global@let\ = @eatinput%
@catcode`@^^M=13% @catcode`@^^M=13%
@def@c{@fixbackslash@c}% @def@c{@fixbackslash@c}%
% Definition for the newline at the end of this file.
@def ^^M{@let^^M@secondlinenl}% @def ^^M{@let^^M@secondlinenl}%
@gdef @secondlinenl{@let^^M@thirdlinenl}% % Definition for a newline in the main Texinfo file.
@gdef @thirdlinenl{@fixbackslash}% @gdef @secondlinenl{@fixbackslash}%
}} }}
{@catcode`@^=7 @catcode`@^^M=13% {@catcode`@^=7 @catcode`@^^M=13%

View file

@ -103,8 +103,8 @@
# elif ((defined __APPLE__ && defined __MACH__ \ # elif ((defined __APPLE__ && defined __MACH__ \
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
: __GNUC__) \ : __GNUC__) \
|| __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ || 061200 <= __HP_cc || 061200 <= __HP_aCC \
|| __ICC || 0x590 <= __SUNPRO_C) || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
# define _Alignas(a) __attribute__ ((__aligned__ (a))) # define _Alignas(a) __attribute__ ((__aligned__ (a)))
# elif 1300 <= _MSC_VER # elif 1300 <= _MSC_VER
# define _Alignas(a) __declspec (align (a)) # define _Alignas(a) __declspec (align (a))