]> git.eshelyaron.com Git - emacs.git/commitdiff
Update from Gnulib by running admin/merge-gnulib
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Feb 2025 21:02:02 +0000 (13:02 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:44:28 +0000 (09:44 +0100)
(cherry picked from commit 0e4883f18eecea59e537e2368a0f5674888a1af7)

doc/misc/texinfo.tex
lib/attribute.h
lib/flexmember.h
lib/gnulib.mk.in
lib/intprops.h
m4/acl.m4
m4/gnulib-common.m4
m4/gnulib-comp.m4

index 456696f4c9e7913b06a314a91f81d0170ac7bf00..faad184e345b058eda6fd880c4070a7950e419c5 100644 (file)
@@ -3,9 +3,9 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2024-11-04.20}
+\def\texinfoversion{2025-01-31.21}
 %
-% Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990-2025 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
 % Give the space character the catcode for a space.
 \def\spaceisspace{\catcode`\ =10\relax}
 
-% Likewise for ^^M, the end of line character.
-\def\endlineisspace{\catcode13=10\relax}
+% Used to ignore an active newline that may appear immediately after
+% a macro name.
+{\catcode13=\active \gdef\ignoreactivenewline{\let^^M\empty}}
 
 \chardef\dashChar  = `\-
 \chardef\slashChar = `\/
@@ -957,6 +958,10 @@ where each line of input produces a line of output.}
   \ifx\byeerror\relax\else\errmessage{\byeerror}\fi
   \tracingstats=1\ptexend}
 
+% set in \donoderef below, but we need to define this here so that
+% conditionals balance inside the large \ifpdf ... \fi blocks below.
+\newif\ifnodeseen
+\nodeseenfalse
 
 \message{pdf,}
 % adobe `portable' document format
@@ -975,6 +980,11 @@ where each line of input produces a line of output.}
 \newif\ifpdf
 \newif\ifpdfmakepagedest
 
+\newif\ifluatex
+\ifx\luatexversion\thisisundefined\else
+  \luatextrue
+\fi
+
 %
 % For LuaTeX
 %
@@ -982,8 +992,7 @@ where each line of input produces a line of output.}
 \newif\iftxiuseunicodedestname
 \txiuseunicodedestnamefalse % For pdfTeX etc.
 
-\ifx\luatexversion\thisisundefined
-\else
+\ifluatex
   % Use Unicode destination names
   \txiuseunicodedestnametrue
   % Escape PDF strings with converting UTF-16 from UTF-8
@@ -1072,12 +1081,17 @@ where each line of input produces a line of output.}
   \fi
 \fi
 
+\newif\ifxetex
+\ifx\XeTeXrevision\thisisundefined\else
+  \xetextrue
+\fi
+
 \newif\ifpdforxetex
 \pdforxetexfalse
 \ifpdf
   \pdforxetextrue
 \fi
-\ifx\XeTeXrevision\thisisundefined\else
+\ifxetex
   \pdforxetextrue
 \fi
 
@@ -1167,58 +1181,90 @@ with PDF output, and none of those formats could be found.  (.eps cannot
 be supported due to the design of the PDF format; use regular TeX (DVI
 output) for that.)}
 
+% definitions for pdftex or luatex with pdf output
 \ifpdf
+  % Strings in PDF outlines can either be ASCII, or encoded in UTF-16BE
+  % with BOM.  Unfortunately there is no simple way with pdftex to output
+  % UTF-16, so we have to do some quite convoluted expansion games if we
+  % find the string contains a non-ASCII codepoint if we want these to
+  % display correctly.  We generated the UTF-16 sequences in
+  % \DeclareUnicodeCharacter and we access them here.
+  %
+  \def\defpdfoutlinetextunicode#1{%
+    \def\pdfoutlinetext{#1}%
+    %
+    % Make UTF-8 sequences expand to UTF-16 definitions.
+    \passthroughcharsfalse \utfbytespdftrue
+    \utfviiidefinedwarningfalse
+    %
+    % Completely expand, eliminating any control sequences such as \code,
+    % leaving only possibly \utfbytes.
+    \let\utfbytes\relax
+    \pdfaccentliterals
+    \xdef\pdfoutlinetextchecked{#1}%
+    \checkutfbytes
+  }%
+  % Check if \utfbytes occurs in expansion.
+  \def\checkutfbytes{%
+    \expandafter\checkutfbytesz\pdfoutlinetextchecked\utfbytes\finish
+  }%
+  \def\checkutfbytesz#1\utfbytes#2\finish{%
+    \def\after{#2}%
+    \ifx\after\empty
+      % No further action needed.  Output ASCII string as-is, as converting
+      % to UTF-16 is somewhat slow (and uses more space).
+      \global\let\pdfoutlinetext\pdfoutlinetextchecked
+    \else
+      \passthroughcharstrue % pass UTF-8 sequences unaltered
+      \xdef\pdfoutlinetext{\pdfoutlinetext}%
+      \expandafter\expandutfsixteen\expandafter{\pdfoutlinetext}\pdfoutlinetext
+    \fi
+  }%
   %
-  % Color manipulation macros using ideas from pdfcolor.tex,
-  % except using rgb instead of cmyk; the latter is said to render as a
-  % very dark gray on-screen and a very dark halftone in print, instead
-  % of actual black. The dark red here is dark enough to print on paper as
-  % nearly black, but still distinguishable for online viewing.  We use
-  % black by default, though.
-  \def\rgbDarkRed{0.50 0.09 0.12}
-  \def\rgbBlack{0 0 0}
-  %
-  % rg sets the color for filling (usual text, etc.);
-  % RG sets the color for stroking (thin rules, e.g., normal _'s).
-  \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
+  \catcode2=1 % begin-group character
+  \catcode3=2 % end-group character
   %
-  % Set color, and create a mark which defines \thiscolor accordingly,
-  % so that \makeheadline knows which color to restore.
-  \def\curcolor{0 0 0}%
-  \def\setcolor#1{%
-    \ifx#1\curcolor\else
-      \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
-      \domark
-      \pdfsetcolor{#1}%
-      \xdef\curcolor{#1}%
-    \fi
-  }
+  % argument should be pure UTF-8 with no control sequences.  convert to
+  % UTF-16BE by inserting null bytes before bytes < 128 and expanding
+  % UTF-8 multibyte sequences to saved UTF-16BE sequences.
+  \def\expandutfsixteen#1#2{%
+    \bgroup \asciitounicode
+    \passthroughcharsfalse
+    \let\utfbytes\asis
+    %
+    % for Byte Order Mark (BOM)
+    \catcode"FE=12
+    \catcode"FF=12
+    %
+    % we want to treat { and } in #1 as any other ASCII bytes.  however,
+    % we need grouping characters for \scantokens and definitions/assignments,
+    % so define alternative grouping characters using control characters
+    % that are unlikely to occur.
+    % this does not affect 0x02 or 0x03 bytes arising from expansion as
+    % these are tokens with different catcodes.
+    \catcode"02=1 % begin-group character
+    \catcode"03=2 % end-group character
+    %
+    \expandafter\xdef\expandafter#2\scantokens{%
+      ^^02^^fe^^ff#1^^03}%
+    % NB we need \scantokens to provide both the open and close group tokens
+    % for \xdef otherwise there is an e-TeX error "File ended while
+    % scanning definition of..."
+    % NB \scantokens is a e-TeX command which is assumed to be provided by
+    % pdfTeX.
+    %
+    \egroup
+  }%
   %
-  \let\maincolor\rgbBlack
-  \pdfsetcolor{\maincolor}
-  \edef\thiscolor{\maincolor}
-  \def\currentcolordefs{}
+  \catcode2=12 \catcode3=12 % defaults
   %
-  \def\makefootline{%
-    \baselineskip24pt
-    \line{\pdfsetcolor{\maincolor}\the\footline}%
-  }
+  % Color support
   %
-  \def\makeheadline{%
-    \vbox to 0pt{%
-      \vskip-22.5pt
-      \line{%
-        \vbox to8.5pt{}%
-        % Extract \thiscolor definition from the marks.
-        \getcolormarks
-        % Typeset the headline with \maincolor, then restore the color.
-        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
-      }%
-      \vss
-    }%
-    \nointerlineskip
-  }
+  % rg sets the color for filling (usual text, etc.);
+  % RG sets the color for stroking (thin rules, e.g., normal _'s).
+  \def\pdfsetcolor#1{\pdfliteral{#1 rg  #1 RG}}
   %
+  % PDF outline support
   %
   \pdfcatalog{/PageMode /UseOutlines}
   %
@@ -1315,18 +1361,15 @@ output) for that.)}
       \def\pdfoutlinetext{#1}%
     \else
       \ifx \declaredencoding \utfeight
-        \ifx\luatexversion\thisisundefined
-          % For pdfTeX  with UTF-8.
-          % TODO: the PDF format can use UTF-16 in bookmark strings,
-          % but the code for this isn't done yet.
-          % Use ASCII approximations.
-          \passthroughcharsfalse
-          \def\pdfoutlinetext{#1}%
-        \else
+        \ifluatex
           % For LuaTeX with UTF-8.
           % Pass through Unicode characters for title texts.
           \passthroughcharstrue
-          \def\pdfoutlinetext{#1}%
+          \pdfaccentliterals
+          \xdef\pdfoutlinetext{#1}%
+        \else
+          % For pdfTeX with UTF-8.
+          \defpdfoutlinetextunicode{#1}%
         \fi
       \else
         % For non-Latin-1 or non-UTF-8 encodings.
@@ -1348,11 +1391,6 @@ output) for that.)}
   % used to mark target names; must be expandable.
   \def\pdfmkpgn#1{#1}
   %
-  % by default, use black for everything.
-  \def\urlcolor{\rgbBlack}
-  \let\linkcolor\rgbBlack
-  \def\endlink{\setcolor{\maincolor}\pdfendlink}
-  %
   % Adding outlines to PDF; macros for calculating structure of outlines
   % come from Petr Olsak
   \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -1416,6 +1454,10 @@ output) for that.)}
       \def\unnsecentry{\numsecentry}%
       \def\unnsubsecentry{\numsubsecentry}%
       \def\unnsubsubsecentry{\numsubsubsecentry}%
+      %
+      % Treat index initials like @section.  Note that this is the wrong
+      % level if the index is not at the level of @appendix or @chapter.
+      \def\idxinitialentry{\numsecentry}%
       \readdatafile{toc}%
       %
       % Read toc second time, this time actually producing the outlines.
@@ -1437,6 +1479,8 @@ output) for that.)}
         \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
       \def\numsubsubsecentry##1##2##3##4{% count is always zero
         \dopdfoutline{##1}{}{##3}{##4}}%
+      \def\idxinitialentry##1##2##3##4{%
+        \dopdfoutline{##1}{}{idx.##1.##2}{##4}}%
       %
       % PDF outlines are displayed using system fonts, instead of
       % document fonts.  Therefore we cannot use special characters,
@@ -1450,6 +1494,7 @@ output) for that.)}
       % we use for the index sort strings.
       %
       \indexnofonts
+      \ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
       \setupdatafile
       % We can have normal brace characters in the PDF outlines, unlike
       % Texinfo index files.  So set that up.
@@ -1458,6 +1503,10 @@ output) for that.)}
       \catcode`\\=\active \otherbackslash
       \input \tocreadfilename
     \endgroup
+    \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
+  }
+  \def\dopdfoutlinecontents{%
+    \expandafter\dopdfoutline\expandafter{\putwordTOC}{}{txi.CONTENTS}{}%
   }
   {\catcode`[=1 \catcode`]=2
    \catcode`{=\other \catcode`}=\other
@@ -1484,55 +1533,16 @@ output) for that.)}
   \else
     \let \startlink \pdfstartlink
   \fi
-  % make a live url in pdf output.
-  \def\pdfurl#1{%
-    \begingroup
-      % it seems we really need yet another set of dummies; have not
-      % tried to figure out what each command should do in the context
-      % of @url.  for now, just make @/ a no-op, that's the only one
-      % people have actually reported a problem with.
-      %
-      \normalturnoffactive
-      \def\@{@}%
-      \let\/=\empty
-      \makevalueexpandable
-      % do we want to go so far as to use \indexnofonts instead of just
-      % special-casing \var here?
-      \def\var##1{##1}%
-      %
-      \leavevmode\setcolor{\urlcolor}%
-      \startlink attr{/Border [0 0 0]}%
-        user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
-    \endgroup}
-  % \pdfgettoks - Surround page numbers in #1 with @pdflink.  #1 may
-  % be a simple number, or a list of numbers in the case of an index
-  % entry.
-  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
-  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
-  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
-  \def\maketoks{%
-    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
-    \ifx\first0\adn0
-    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
-    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
-    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
-    \else
-      \ifnum0=\countA\else\makelink\fi
-      \ifx\first.\let\next=\done\else
-        \let\next=\maketoks
-        \addtokens{\toksB}{\the\toksD}
-        \ifx\first,\addtokens{\toksB}{\space}\fi
-      \fi
-    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-    \next}
-  \def\makelink{\addtokens{\toksB}%
-    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+  \def\pdfmakeurl#1{%
+    \startlink attr{/Border [0 0 0]}%
+      user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+  }%
+  \def\endlink{\setcolor{\maincolor}\pdfendlink}
+  %
   \def\pdflink#1{\pdflinkpage{#1}{#1}}%
   \def\pdflinkpage#1#2{%
     \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
     \setcolor{\linkcolor}#2\endlink}
-  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 \else
   % non-pdf mode
   \let\pdfmkdest = \gobble
@@ -1541,13 +1551,12 @@ output) for that.)}
   \let\setcolor = \gobble
   \let\pdfsetcolor = \gobble
   \let\pdfmakeoutlines = \relax
-\fi  % \ifx\pdfoutput
+\fi
 
 %
 % For XeTeX
 %
-\ifx\XeTeXrevision\thisisundefined
-\else
+\ifxetex
   %
   % XeTeX version check
   %
@@ -1573,45 +1582,8 @@ output) for that.)}
   \fi
   %
   % Color support
-  %
-  \def\rgbDarkRed{0.50 0.09 0.12}
-  \def\rgbBlack{0 0 0}
-  %
   \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
   %
-  % Set color, and create a mark which defines \thiscolor accordingly,
-  % so that \makeheadline knows which color to restore.
-  \def\setcolor#1{%
-    \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
-    \domark
-    \pdfsetcolor{#1}%
-  }
-  %
-  \def\maincolor{\rgbBlack}
-  \pdfsetcolor{\maincolor}
-  \edef\thiscolor{\maincolor}
-  \def\currentcolordefs{}
-  %
-  \def\makefootline{%
-    \baselineskip24pt
-    \line{\pdfsetcolor{\maincolor}\the\footline}%
-  }
-  %
-  \def\makeheadline{%
-    \vbox to 0pt{%
-      \vskip-22.5pt
-      \line{%
-        \vbox to8.5pt{}%
-        % Extract \thiscolor definition from the marks.
-        \getcolormarks
-        % Typeset the headline with \maincolor, then restore the color.
-        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
-      }%
-      \vss
-    }%
-    \nointerlineskip
-  }
-  %
   % PDF outline support
   %
   % Emulate pdfTeX primitive
@@ -1649,11 +1621,6 @@ output) for that.)}
     \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
   }
   %
-  % by default, use black for everything.
-  \def\urlcolor{\rgbBlack}
-  \def\linkcolor{\rgbBlack}
-  \def\endlink{\setcolor{\maincolor}\pdfendlink}
-  %
   \def\dopdfoutline#1#2#3#4{%
     \setpdfoutlinetext{#1}
     \setpdfdestname{#3}
@@ -1667,7 +1634,6 @@ output) for that.)}
   %
   \def\pdfmakeoutlines{%
     \begingroup
-      %
       % For XeTeX, counts of subentries are not necessary.
       % Therefore, we read toc only once.
       %
@@ -1686,6 +1652,11 @@ output) for that.)}
       \def\numsubsubsecentry##1##2##3##4{%
         \dopdfoutline{##1}{4}{##3}{##4}}%
       %
+      % Note this is at the wrong level unless the index is in an @appendix
+      % or @chapter.
+      \def\idxinitialentry##1##2##3##4{%
+         \dopdfoutline{##1}{2}{idx.##1.##2}{##4}}%
+      %
       \let\appentry\numchapentry%
       \let\appsecentry\numsecentry%
       \let\appsubsecentry\numsubsecentry%
@@ -1700,15 +1671,23 @@ output) for that.)}
       % Therefore, the encoding and the language may not be considered.
       %
       \indexnofonts
+      \pdfaccentliterals
+      \ifnodeseen\else \dopdfoutlinecontents \fi % for @contents at beginning
+      %
       \setupdatafile
       % We can have normal brace characters in the PDF outlines, unlike
       % Texinfo index files.  So set that up.
       \def\{{\lbracecharliteral}%
       \def\}{\rbracecharliteral}%
       \catcode`\\=\active \otherbackslash
-      \input \tocreadfilename
+      \input \tocreadfilename\relax
+      \ifnodeseen \dopdfoutlinecontents \fi % for @contents at end
     \endgroup
   }
+  \def\dopdfoutlinecontents{%
+    \expandafter\dopdfoutline\expandafter
+      {\putwordTOC}{1}{txi.CONTENTS}{txi.CONTENTS}%
+  }
   {\catcode`[=1 \catcode`]=2
    \catcode`{=\other \catcode`}=\other
    \gdef\lbracecharliteral[{]%
@@ -1721,7 +1700,7 @@ output) for that.)}
   % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
   % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
   % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
-%
+  %
   \def\skipspaces#1{\def\PP{#1}\def\D{|}%
     \ifx\PP\D\let\nextsp\relax
     \else\let\nextsp\skipspaces
@@ -1736,55 +1715,17 @@ output) for that.)}
     \edef\temp{#1}%
     \expandafter\skipspaces\temp|\relax
   }
-  % make a live url in pdf output.
-  \def\pdfurl#1{%
-    \begingroup
-      % it seems we really need yet another set of dummies; have not
-      % tried to figure out what each command should do in the context
-      % of @url.  for now, just make @/ a no-op, that's the only one
-      % people have actually reported a problem with.
-      %
-      \normalturnoffactive
-      \def\@{@}%
-      \let\/=\empty
-      \makevalueexpandable
-      % do we want to go so far as to use \indexnofonts instead of just
-      % special-casing \var here?
-      \def\var##1{##1}%
-      %
-      \leavevmode\setcolor{\urlcolor}%
-      \special{pdf:bann << /Border [0 0 0]
-        /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
-    \endgroup}
+  \def\pdfmakeurl#1{%
+    \special{pdf:bann << /Border [0 0 0]
+      /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
+  }
   \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
-  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
-  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
-  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
-  \def\maketoks{%
-    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
-    \ifx\first0\adn0
-    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
-    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
-    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
-    \else
-      \ifnum0=\countA\else\makelink\fi
-      \ifx\first.\let\next=\done\else
-        \let\next=\maketoks
-        \addtokens{\toksB}{\the\toksD}
-        \ifx\first,\addtokens{\toksB}{\space}\fi
-      \fi
-    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-    \next}
-  \def\makelink{\addtokens{\toksB}%
-    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
   \def\pdflink#1{\pdflinkpage{#1}{#1}}%
   \def\pdflinkpage#1#2{%
     \special{pdf:bann << /Border [0 0 0]
       /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
     \setcolor{\linkcolor}#2\endlink}
-  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-%
+  %
   %
   % @image support
   %
@@ -1841,6 +1782,164 @@ output) for that.)}
   }
 \fi
 
+% common definitions and code for pdftex, luatex and xetex
+\ifpdforxetex
+  % The dark red here is dark enough to print on paper as
+  % nearly black, but still distinguishable for online viewing.  We use
+  % black by default, though.
+  \def\rgbDarkRed{0.50 0.09 0.12}
+  \def\rgbBlack{0 0 0}
+  %
+  % Set color, and create a mark which defines \thiscolor accordingly,
+  % so that \makeheadline knows which color to restore.
+  \def\curcolor{0 0 0}%
+  \def\setcolor#1{%
+    \ifx#1\curcolor\else
+      \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
+      \domark
+      \pdfsetcolor{#1}%
+      \xdef\curcolor{#1}%
+    \fi
+  }
+  %
+  \let\maincolor\rgbBlack
+  \pdfsetcolor{\maincolor}
+  \edef\thiscolor{\maincolor}
+  \def\currentcolordefs{}
+  %
+  \def\makefootline{%
+    \baselineskip24pt
+    \line{\pdfsetcolor{\maincolor}\the\footline}%
+  }
+  %
+  \def\makeheadline{%
+    \vbox to 0pt{%
+      \vskip-22.5pt
+      \line{%
+        \vbox to8.5pt{}%
+        % Extract \thiscolor definition from the marks.
+        \getcolormarks
+        % Typeset the headline with \maincolor, then restore the color.
+        \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+      }%
+      \vss
+    }%
+    \nointerlineskip
+  }
+  %
+  % by default, use black for everything.
+  \def\urlcolor{\rgbBlack}
+  \let\linkcolor\rgbBlack
+  %
+  % make a live url in pdf output.
+  \def\pdfurl#1{%
+    \begingroup
+      % it seems we really need yet another set of dummies; have not
+      % tried to figure out what each command should do in the context
+      % of @url.  for now, just make @/ a no-op, that's the only one
+      % people have actually reported a problem with.
+      %
+      \normalturnoffactive
+      \def\@{@}%
+      \let\/=\empty
+      \makevalueexpandable
+      % do we want to go so far as to use \indexnofonts instead of just
+      % special-casing \var here?
+      \def\var##1{##1}%
+      %
+      \leavevmode\setcolor{\urlcolor}%
+      \pdfmakeurl{#1}%
+    \endgroup}
+  %
+  % \pdfgettoks - Surround page numbers in #1 with @pdflink.  #1 may
+  % be a simple number, or a list of numbers in the case of an index
+  % entry.
+  \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+  \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+  \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+  \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+  \def\maketoks{%
+    \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+    \ifx\first0\adn0
+    \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+    \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+    \else
+      \ifnum0=\countA\else\makelink\fi
+      \ifx\first.\let\next=\done\else
+        \let\next=\maketoks
+        \addtokens{\toksB}{\the\toksD}
+        \ifx\first,\addtokens{\toksB}{\space}\fi
+      \fi
+    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+    \next}
+  \def\makelink{\addtokens{\toksB}%
+    {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+  \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\fi
+
+\ifpdforxetex
+  % for pdftex.
+  {\catcode`^^cc=13
+  \gdef\pdfaccentliteralsutfviii{%
+    % For PDF outline only.  Unicode combining accents follow the
+    % character they modify.  Note we need at least the first byte
+    % of the UTF-8 sequences to have an active catcode to allow the
+    % definitions to do their magic.
+    \def\"##1{##1^^cc^^88}%           U+0308
+    \def\'##1{##1^^cc^^81}%           U+0301
+    \def\,##1{##1^^cc^^a7}%           U+0327
+    \def\=##1{##1^^cc^^85}%           U+0305
+    \def\^##1{##1^^cc^^82}%           U+0302
+    \def\`##1{##1^^cc^^80}%           U+0300
+    \def\~##1{##1^^cc^^83}%           U+0303
+    \def\dotaccent##1{##1^^cc^^87}%   U+0307
+    \def\H##1{##1^^cc^^8b}%           U+030B
+    \def\ogonek##1{##1^^cc^^a8}%      U+0328
+    \def\ringaccent##1{##1^^cc^^8a}%  U+030A
+    \def\u##1{##1^^cc^^8c}%           U+0306
+    \def\ubaraccent##1{##1^^cc^^b1}%  U+0331
+    \def\udotaccent##1{##1^^cc^^a3}%  U+0323
+    \def\v##1{##1^^cc^^8c}%           U+030C
+    % this definition of @tieaccent will only work with exactly two characters
+    % in argument as we need to insert the combining character between them.
+    \def\tieaccent##1{\tieaccentz##1}%
+    \def\tieaccentz##1##2{##1^^cd^^a1##2} % U+0361
+  }}%
+  %
+  % for xetex and luatex, which both support extended ^^^^ escapes and
+  % process the Unicode codepoint as a single token.
+  \gdef\pdfaccentliteralsnative{%
+    \def\"##1{##1^^^^0308}%
+    \def\'##1{##1^^^^0301}%
+    \def\,##1{##1^^^^0327}%
+    \def\=##1{##1^^^^0305}%
+    \def\^##1{##1^^^^0302}%
+    \def\`##1{##1^^^^0300}%
+    \def\~##1{##1^^^^0303}%
+    \def\dotaccent##1{##1^^^^0307}%
+    \def\H##1{##1^^^^030b}%
+    \def\ogonek##1{##1^^^^0328}%
+    \def\ringaccent##1{##1^^^^030a}%
+    \def\u##1{##1^^^^0306}%
+    \def\ubaraccent##1{##1^^^^0331}%
+    \def\udotaccent##1{##1^^^^0323}%
+    \def\v##1{##1^^^^030c}%
+    \def\tieaccent##1{\tieaccentz##1}%
+    \def\tieaccentz##1##2{##1^^^^0361##2} % U+0361
+  }%
+  %
+  % use the appropriate definition
+  \ifluatex
+    \let\pdfaccentliterals\pdfaccentliteralsnative
+  \else
+    \ifxetex
+      \let\pdfaccentliterals\pdfaccentliteralsnative
+    \else
+      \let\pdfaccentliterals\pdfaccentliteralsutfviii
+    \fi
+  \fi
+\fi
 
 %
 \message{fonts,}
@@ -2772,15 +2871,15 @@ end
 % @cite unconditionally uses \sl with \smartitaliccorrection.
 \def\cite#1{{\sl #1}\smartitaliccorrection}
 
-% @var unconditionally uses \sl.  This gives consistency for
-% parameter names whether they are in @def, @table @code or a
-% regular paragraph.
-%  To get ttsl font for @var when used in code context, @set txicodevaristt.
-% The \null is to reset \spacefactor.
+% By default, use ttsl font for @var when used in code context.
+% To unconditionally use \sl for @var, @clear txicodevaristt.  This
+% gives consistency for parameter names whether they are in @def,
+% @table @code or a regular paragraph.
 \def\aftersmartic{}
 \def\var#1{%
   \let\saveaftersmartic = \aftersmartic
   \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+  % The \null is to reset \spacefactor.
   %
   \ifflagclear{txicodevaristt}%
     {\def\varnext{{{\sl #1}}\smartitaliccorrection}}%
@@ -2788,7 +2887,6 @@ end
   \varnext
 }
 
-% To be removed after next release
 \def\SETtxicodevaristt{}% @set txicodevaristt
 
 \let\i=\smartitalic
@@ -2808,7 +2906,7 @@ end
 \def\ii#1{{\it #1}}             % italic font
 
 % @b, explicit bold.  Also @strong.
-\def\b#1{{\bf #1}}
+\def\b#1{{\bf \defcharsdefault #1}}
 \let\strong=\b
 
 % @sansserif, explicit sans.
@@ -3039,9 +3137,7 @@ end
           \unhbox0\ (\urefcode{#1})%
         \fi
       \else
-        \ifx\XeTeXrevision\thisisundefined
-          \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
-        \else
+        \ifxetex
           % For XeTeX
           \ifurefurlonlylink
             % PDF plus option to not display url, show just arg
@@ -3051,6 +3147,8 @@ end
             % visibility, if the pdf is eventually used to print, etc.
             \unhbox0\ (\urefcode{#1})%
           \fi
+        \else
+          \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
         \fi
       \fi
     \else
@@ -3670,15 +3768,24 @@ $$%
      {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
   % else
      {\ifx\curfontstyle\bfstylename
-        % bold:
-        \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+        \etcfontbold{#1}%
       \else
-        % regular:
-        \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+        \ifrmisbold
+          \etcfontbold{#1}%
+        \else
+          % regular:
+          \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space
+            at \nominalsize
+        \fi
       \fi}%
   \thisecfont
 }
 
+\def\etcfontbold#1{%
+  % bold:
+  \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+}
+
 % @registeredsymbol - R in a circle.  The font for the R should really
 % be smaller yet, but lllsize is the best we can do for now.
 % Adapted from the plain.tex definition of \copyright.
@@ -5528,7 +5635,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 \def\initial{%
   \bgroup
-  \initialglyphs
   \initialx
 }
 
@@ -5551,7 +5657,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   %
   % No shrink because it confuses \balancecolumns.
   \vskip 1.67\baselineskip plus 1\baselineskip
-  \leftline{\secfonts \kern-0.05em \secbf #1}%
+  \doindexinitialentry{#1}%
+  \initialglyphs
+  \leftline{%
+    \secfonts \kern-0.05em \secbf #1}%
   % \secfonts is inside the argument of \leftline so that the change of
   % \baselineskip will not affect any glue inserted before the vbox that
   % \leftline creates.
@@ -5561,6 +5670,32 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \egroup % \initialglyphs
 }
 
+\def\doindexinitialentry#1{%
+  \ifpdforxetex
+    \global\advance\idxinitialno by 1
+    \def\indexlbrace{\{}
+    \def\indexrbrace{\}}
+    \def\indexbackslash{\realbackslash}
+    \def\indexatchar{\@}
+    \writetocentry{idxinitial}{\asis #1}{IDX\the\idxinitialno}%
+    % The @asis removes a pair of braces around e.g. {@indexatchar} that
+    % are output by texindex.
+    %
+    \vbox to 0pt{}%
+    % This vbox fixes the \pdfdest location for double column formatting.
+    % Without it, the \pdfdest is output above topskip glue at the top
+    % of a column as this glue is not added until the first box.
+    \pdfmkdest{idx.\asis #1.IDX\the\idxinitialno}%
+  \fi
+}
+
+% No listing in TOC
+\def\idxinitialentry#1#2#3#4{}
+
+% For index initials.
+\newcount\idxinitialno \idxinitialno=1
+
+
 \newdimen\entryrightmargin
 \entryrightmargin=0pt
 
@@ -6782,12 +6917,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % Prepare to read what we've written to \tocfile.
 %
-\def\startcontents#1{%
+\def\startcontents#1#2{%
   % If @setchapternewpage on, and @headings double, the contents should
   % start on an odd page, unlike chapters.
   \contentsalignmacro
   \immediate\closeout\tocfile
   %
+  #2%
   % Don't need to put `Contents' or `Short Contents' in the headline.
   % It is abundantly clear what they are.
   \chapmacro{#1}{Yomitfromtoc}{}%
@@ -6818,7 +6954,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Normal (long) toc.
 %
 \def\contents{%
-  \startcontents{\putwordTOC}%
+  \startcontents{\putwordTOC}{\contentsmkdest}%
     \openin 1 \tocreadfilename\space
     \ifeof 1 \else
       \findsecnowidths
@@ -6834,9 +6970,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \contentsendroman
 }
 
+\def\contentsmkdest{%
+  \pdfmkdest{txi.CONTENTS}%
+}
+
 % And just the chapters.
 \def\summarycontents{%
-  \startcontents{\putwordShortTOC}%
+  \startcontents{\putwordShortTOC}{}%
     %
     \let\partentry = \shortpartentry
     \let\numchapentry = \shortchapentry
@@ -7925,7 +8065,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     {\rm\enskip}% hskip 0.5 em of \rmfont
   }{}%
   %
-  \boldbrax
+  \parenbrackglyphs
   % arguments will be output next, if any.
 }
 
@@ -7935,7 +8075,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \def\^^M{}% for line continuation
     \df \ifdoingtypefn \tt \else \sl \fi
     \ifflagclear{txicodevaristt}{}%
-       {\def\var##1{{\setregularquotes \ttsl ##1}}}%
+       % use \ttsl for @var in both @def* and @deftype*.
+       % the kern prevents an italic correction at end, which appears
+       % too much for ttsl.
+       {\def\var##1{{\setregularquotes \ttsl ##1\kern 0pt }}}%
     #1%
   \egroup
 }
@@ -7952,8 +8095,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \let\lparen = ( \let\rparen = )
 
 % Be sure that we always have a definition for `(', etc.  For example,
-% if the fn name has parens in it, \boldbrax will not be in effect yet,
-% so TeX would otherwise complain about undefined control sequence.
+% if the fn name has parens in it, \parenbrackglyphs will not be in
+% effect yet, so TeX would otherwise complain about undefined control
+% sequence.
 {
   \activeparens
   \gdef\defcharsdefault{%
@@ -7963,49 +8107,28 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   }
   \globaldefs=1 \defcharsdefault
 
-  \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+  \gdef\parenbrackglyphs{\let(=\opnr\let)=\cpnr\let[=\lbrb\let]=\rbrb}
   \gdef\magicamp{\let&=\amprm}
 }
 \let\ampchar\&
 
-\newcount\parencount
-
-% If we encounter &foo, then turn on ()-hacking afterwards
-\newif\ifampseen
-\def\amprm#1 {\ampseentrue{\rm\&#1 }}
-
-\def\parenfont{%
-  \ifampseen
-    % At the first level, print parens in roman,
-    % otherwise use the default font.
-    \ifnum \parencount=1 \rm \fi
-  \else
-    % The \sf parens (in \boldbrax) actually are a little bolder than
-    % the contained text.  This is especially needed for [ and ] .
-    \sf
-  \fi
-}
-\def\infirstlevel#1{%
-  \ifampseen
-    \ifnum\parencount=1
-      #1%
-    \fi
-  \fi
-}
-\def\bfafterword#1 {#1 \bf}
+\def\amprm#1 {{\rm\&#1 }}
 
+\newcount\parencount
+% opening and closing parentheses in roman font
 \def\opnr{%
+  \ptexslash % italic correction
   \global\advance\parencount by 1
-  {\parenfont(}%
-  \infirstlevel \bfafterword
+  {\sf(}%
 }
-\def\clnr{%
-  {\parenfont)}%
-  \infirstlevel \sl
+\def\cpnr{%
+  \ptexslash % italic correction
+  {\sf)}%
   \global\advance\parencount by -1
 }
 
 \newcount\brackcount
+% left and right square brackets in bold font
 \def\lbrb{%
   \global\advance\brackcount by 1
   {\bf[}%
@@ -8535,7 +8658,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \expandafter\xdef\csname\the\macname\endcsname{%
       \begingroup
         \noexpand\spaceisspace
-        \noexpand\endlineisspace
+        \noexpand\ignoreactivenewline
         \noexpand\expandafter % skip any whitespace after the macro name.
         \expandafter\noexpand\csname\the\macname @@@\endcsname}%
     \expandafter\xdef\csname\the\macname @@@\endcsname{%
@@ -8836,8 +8959,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \ifx\lastnode\empty\else
     \setref{\lastnode}{#1}%
     \global\let\lastnode=\empty
+    \setnodeseenonce
   \fi
 }
+\def\setnodeseenonce{
+  \global\nodeseentrue
+  \let\setnodeseenonce\relax
+}
 
 % @nodedescription, @nodedescriptionblock - do nothing for TeX
 \parseargdef\nodedescription{}
@@ -9575,7 +9703,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     % For pdfTeX and LuaTeX <= 0.80
     \dopdfimage{#1}{#2}{#3}%
   \else
-    \ifx\XeTeXrevision\thisisundefined
+    \ifxetex
+      \doxeteximage{#1}{#2}{#3}%
+    \else
       % For epsf.tex
       % \epsfbox itself resets \epsf?size at each figure.
       \setbox0 = \hbox{\ignorespaces #2}%
@@ -9583,9 +9713,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
       \setbox0 = \hbox{\ignorespaces #3}%
         \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
       \epsfbox{#1.eps}%
-    \else
-      % For XeTeX
-      \doxeteximage{#1}{#2}{#3}%
     \fi
   \fi
   %
@@ -9931,25 +10058,24 @@ directory should work if nowhere else does.}
 \newif\iftxinativeunicodecapable
 \newif\iftxiusebytewiseio
 
-\ifx\XeTeXrevision\thisisundefined
-  \ifx\luatexversion\thisisundefined
-    \txinativeunicodecapablefalse
-    \txiusebytewiseiotrue
-  \else
+\ifxetex
+  \txinativeunicodecapabletrue
+  \txiusebytewiseiofalse
+\else
+  \ifluatex
     \txinativeunicodecapabletrue
     \txiusebytewiseiofalse
+  \else
+    \txinativeunicodecapablefalse
+    \txiusebytewiseiotrue
   \fi
-\else
-  \txinativeunicodecapabletrue
-  \txiusebytewiseiofalse
 \fi
 
 % Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
 % for non-UTF-8 (byte-wise) encodings.
 %
 \def\setbytewiseio{%
-  \ifx\XeTeXrevision\thisisundefined
-  \else
+  \ifxetex
     \XeTeXdefaultencoding "bytes"  % For subsequent files to be read
     \XeTeXinputencoding "bytes"  % For document root file
     % Unfortunately, there seems to be no corresponding XeTeX command for
@@ -9958,8 +10084,7 @@ directory should work if nowhere else does.}
     % place of non-ASCII characters.
   \fi
 
-  \ifx\luatexversion\thisisundefined
-  \else
+  \ifluatex
     \directlua{
     local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
     local function convert_char (char)
@@ -10068,8 +10193,7 @@ directory should work if nowhere else does.}
   \fi % lattwo
   \fi % ascii
   %
-  \ifx\XeTeXrevision\thisisundefined
-  \else
+  \ifxetex
     \ifx \declaredencoding \utfeight
     \else
       \ifx \declaredencoding \ascii
@@ -10352,11 +10476,15 @@ directory should work if nowhere else does.}
 
 \gdef\UTFviiiDefined#1{%
   \ifx #1\relax
-    \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+    \ifutfviiidefinedwarning
+      \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+    \fi
   \else
     \expandafter #1%
   \fi
 }
+\newif\ifutfviiidefinedwarning
+\utfviiidefinedwarningtrue
 
 % Give non-ASCII bytes the active definitions for processing UTF-8 sequences
 \begingroup
@@ -10366,8 +10494,8 @@ directory should work if nowhere else does.}
 
   % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
   % substituting ~ and $ with a character token of that value.
-  \def\UTFviiiLoop{%
-    \global\catcode\countUTFx\active
+  \gdef\UTFviiiLoop{%
+    \catcode\countUTFx\active
     \uccode`\~\countUTFx
     \uccode`\$\countUTFx
     \uppercase\expandafter{\UTFviiiTmp}%
@@ -10375,7 +10503,7 @@ directory should work if nowhere else does.}
     \ifnum\countUTFx < \countUTFy
       \expandafter\UTFviiiLoop
     \fi}
-
+  %
   % For bytes other than the first in a UTF-8 sequence.  Not expected to
   % be expanded except when writing to auxiliary files.
   \countUTFx = "80
@@ -10409,6 +10537,16 @@ directory should work if nowhere else does.}
         \else\expandafter\UTFviiiFourOctets\expandafter$\fi
         }}%
   \UTFviiiLoop
+  %
+  % for pdftex only, used to expand ASCII to UTF-16BE.
+  \gdef\asciitounicode{%
+    \countUTFx = "20
+    \countUTFy = "80
+    \def\UTFviiiTmp{%
+      \def~{\nullbyte $}}%
+    \UTFviiiLoop
+  }
+  {\catcode0=11 \gdef\nullbyte{^^00}}%
 \endgroup
 
 \def\globallet{\global\let} % save some \expandafter's below
@@ -10433,8 +10571,8 @@ directory should work if nowhere else does.}
   \fi
 }
 
-% These macros are used here to construct the name of a control
-% sequence to be defined.
+% These macros are used here to construct the names of macros
+% that expand to the definitions for UTF-8 sequences.
 \def\UTFviiiTwoOctetsName#1#2{%
   \csname u8:#1\string #2\endcsname}%
 \def\UTFviiiThreeOctetsName#1#2#3{%
@@ -10442,6 +10580,35 @@ directory should work if nowhere else does.}
 \def\UTFviiiFourOctetsName#1#2#3#4{%
   \csname u8:#1\string #2\string #3\string #4\endcsname}%
 
+% generate UTF-16 from codepoint
+\def\utfsixteentotoks#1#2{%
+  \countUTFz = "#2\relax
+  \ifnum \countUTFz > 65535
+    % doesn't work for codepoints > U+FFFF
+    % we don't define glyphs for any of these anyway, so it doesn't matter
+    #1={U+#2}%
+  \else
+    \countUTFx = \countUTFz
+    \divide\countUTFx by 256
+    \countUTFy = \countUTFx
+    \multiply\countUTFx by 256
+    \advance\countUTFz by -\countUTFx
+    \uccode`,=\countUTFy
+    \uccode`;=\countUTFz
+    \ifnum\countUTFy = 0
+      \uppercase{#1={\nullbyte\string;}}%
+    \else\ifnum\countUTFz = 0
+      \uppercase{#1={\string,\nullbyte}}%
+    \else
+      \uppercase{#1={\string,\string;}}%
+    \fi\fi
+    % NB \uppercase cannot insert a null byte
+  \fi
+}
+
+\newif\ifutfbytespdf
+\utfbytespdffalse
+
 % For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
 % provide a definition macro to replace a Unicode character;
 % this gets used by the @U command
@@ -10458,18 +10625,22 @@ directory should work if nowhere else does.}
     \countUTFz = "#1\relax
     \begingroup
       \parseXMLCharref
-
-      % Give \u8:... its definition.  The sequence of seven \expandafter's
-      % expands after the \gdef three times, e.g.
       %
+      % Completely expand \UTFviiiTmp, which looks like:
       % 1.  \UTFviiTwoOctetsName B1 B2
       % 2.  \csname u8:B1 \string B2 \endcsname
       % 3.  \u8: B1 B2  (a single control sequence token)
+      \xdef\UTFviiiTmp{\UTFviiiTmp}%
       %
-      \expandafter\expandafter
-      \expandafter\expandafter
-      \expandafter\expandafter
-      \expandafter\gdef       \UTFviiiTmp{#2}%
+      \ifpdf
+        \toksA={#2}%
+        \utfsixteentotoks\toksB{#1}%
+        \expandafter\xdef\UTFviiiTmp{%
+          \noexpand\ifutfbytespdf\noexpand\utfbytes{\the\toksB}%
+          \noexpand\else\the\toksA\noexpand\fi}%
+      \else
+        \expandafter\gdef\UTFviiiTmp{#2}%
+      \fi
       %
       \expandafter\ifx\csname uni:#1\endcsname \relax \else
        \message{Internal error, already defined: #1}%
@@ -10479,8 +10650,9 @@ directory should work if nowhere else does.}
       \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
     \endgroup}
   %
-  % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
-  % to the corresponding UTF-8 sequence.
+  % Given the value in \countUTFz as a Unicode code point, set
+  % \UTFviiiTmp to one of the \UTVviii*OctetsName macros followed by
+  % the corresponding UTF-8 sequence.
   \gdef\parseXMLCharref{%
     \ifnum\countUTFz < "20\relax
       \errhelp = \EMsimple
@@ -10540,7 +10712,7 @@ directory should work if nowhere else does.}
 }
 
 % Suppress ligature creation from adjacent characters.
-\ifx\luatexversion\thisisundefined
+\ifluatex
   \def\nolig{{}}
 \else
   % Braces do not suppress ligature creation in LuaTeX, e.g. in of{}fice
@@ -11325,6 +11497,25 @@ directory should work if nowhere else does.}
   %
   \global\mathchardef\checkmark="1370% actually the square root sign
   \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
+  %
+  % These are all the combining accents.  We need these empty definitions
+  % at present for the sake of PDF outlines.
+  \DeclareUnicodeCharacter{0300}{}%
+  \DeclareUnicodeCharacter{0301}{}%
+  \DeclareUnicodeCharacter{0302}{}%
+  \DeclareUnicodeCharacter{0303}{}%
+  \DeclareUnicodeCharacter{0305}{}%
+  \DeclareUnicodeCharacter{0306}{}%
+  \DeclareUnicodeCharacter{0307}{}%
+  \DeclareUnicodeCharacter{0308}{}%
+  \DeclareUnicodeCharacter{030A}{}%
+  \DeclareUnicodeCharacter{030B}{}%
+  \DeclareUnicodeCharacter{030C}{}%
+  \DeclareUnicodeCharacter{0323}{}%
+  \DeclareUnicodeCharacter{0327}{}%
+  \DeclareUnicodeCharacter{0328}{}%
+  \DeclareUnicodeCharacter{0331}{}%
+  \DeclareUnicodeCharacter{0361}{}%
 }% end of \unicodechardefs
 
 % UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
@@ -11463,12 +11654,12 @@ directory should work if nowhere else does.}
     \pdfhorigin = 1 true in
     \pdfvorigin = 1 true in
   \else
-    \ifx\XeTeXrevision\thisisundefined
-      \special{papersize=#8,#7}%
-    \else
+    \ifxetex
       \pdfpageheight #7\relax
       \pdfpagewidth #8\relax
       % XeTeX does not have \pdfhorigin and \pdfvorigin.
+    \else
+      \special{papersize=#8,#7}%
     \fi
   \fi
   %
@@ -11668,21 +11859,21 @@ directory should work if nowhere else does.}
   #1#2#3=\countB\relax
 }
 
-\ifx\XeTeXrevision\thisisundefined
-  \ifx\luatexversion\thisisundefined
+\ifxetex % XeTeX
+  \mtsetprotcode\textrm
+  \def\mtfontexpand#1{}
+\else
+  \ifluatex % LuaTeX
+    \mtsetprotcode\textrm
+    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+  \else
     \ifpdf % pdfTeX
       \mtsetprotcode\textrm
       \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
     \else % TeX
       \def\mtfontexpand#1{}
     \fi
-  \else % LuaTeX
-    \mtsetprotcode\textrm
-    \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
   \fi
-\else % XeTeX
-  \mtsetprotcode\textrm
-  \def\mtfontexpand#1{}
 \fi
 
 
@@ -11691,18 +11882,18 @@ directory should work if nowhere else does.}
 \def\microtypeON{%
   \microtypetrue
   %
-  \ifx\XeTeXrevision\thisisundefined
-    \ifx\luatexversion\thisisundefined
+  \ifxetex % XeTeX
+    \XeTeXprotrudechars=2
+  \else
+    \ifluatex % LuaTeX
+      \adjustspacing=2
+      \protrudechars=2
+    \else
       \ifpdf % pdfTeX
         \pdfadjustspacing=2
         \pdfprotrudechars=2
       \fi
-    \else % LuaTeX
-      \adjustspacing=2
-      \protrudechars=2
     \fi
-  \else % XeTeX
-    \XeTeXprotrudechars=2
   \fi
   %
   \mtfontexpand\textrm
@@ -11713,18 +11904,18 @@ directory should work if nowhere else does.}
 \def\microtypeOFF{%
   \microtypefalse
   %
-  \ifx\XeTeXrevision\thisisundefined
-    \ifx\luatexversion\thisisundefined
+  \ifxetex % XeTeX
+    \XeTeXprotrudechars=0
+  \else
+    \ifluatex % LuaTeX
+      \adjustspacing=0
+      \protrudechars=0
+    \else
       \ifpdf % pdfTeX
         \pdfadjustspacing=0
         \pdfprotrudechars=0
       \fi
-    \else % LuaTeX
-      \adjustspacing=0
-      \protrudechars=0
     \fi
-  \else % XeTeX
-    \XeTeXprotrudechars=0
   \fi
 }
 
index 4939d776e72a41e5d92e1a7668e84dee933e0b31..625195c8565c26b903eb62b829700f78a705535c 100644 (file)
    because the function need not return exactly once and can depend
    on state addressed by its arguments.)
    See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
-   <https://stackoverflow.com/questions/76847905/>.  */
+   <https://stackoverflow.com/questions/76847905/>.
+   ATTENTION! Efforts are underway to change the meaning of this attribute.
+   See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>.  */
 /* Applies to: functions, pointer to functions, function type.  */
 #define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED
 
    because the function need not return exactly once and can affect
    state addressed by its arguments.)
    See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
-   <https://stackoverflow.com/questions/76847905/>.  */
+   <https://stackoverflow.com/questions/76847905/>.
+   ATTENTION! Efforts are underway to change the meaning of this attribute.
+   See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>.  */
 /* Applies to: functions, pointer to functions, function type.  */
 #define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE
 
index 15ee4f5e281fd94245a5eb6a092d6b70c0171e9b..b4d86c29fb5496a9ed3bd87c2d56cf42265e4194 100644 (file)
 #include <stddef.h>
 
 /* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
-   On older platforms without _Alignof, use a pessimistic bound that is
+   If _Alignof might not exist or might not work correctly on
+   structs with flexible array members, use a pessimistic bound that is
    safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
-   On newer platforms, use _Alignof to get a tighter bound.  */
+   Otherwise, use _Alignof to get a tighter bound.  */
 
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 || defined _Alignof
 # define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1))
 #else
 # define FLEXALIGNOF(type) _Alignof (type)
index 22d102b1d8674194fc2dc11206d3d7c644a46620..fa2250cf686b2460a133c5c98f5f228a756de508 100644 (file)
@@ -281,7 +281,6 @@ EXECINFO_H = @EXECINFO_H@
 EXEEXT = @EXEEXT@
 FILE_HAS_ACL_LIB = @FILE_HAS_ACL_LIB@
 FIND_DELETE = @FIND_DELETE@
-FIRSTFILE_OBJ = @FIRSTFILE_OBJ@
 FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
 FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
 FONT_OBJ = @FONT_OBJ@
@@ -960,7 +959,6 @@ HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
 HAVE_XSERVER = @HAVE_XSERVER@
 HAVE__EXIT = @HAVE__EXIT@
-HYBRID_MALLOC = @HYBRID_MALLOC@
 IEEE754_H = @IEEE754_H@
 IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@
 IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@
@@ -1137,7 +1135,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PAXCTL = @PAXCTL@
 PAXCTL_dumped = @PAXCTL_dumped@
 PAXCTL_notdumped = @PAXCTL_notdumped@
 PGTK_LIBS = @PGTK_LIBS@
@@ -1147,10 +1144,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PNG_CFLAGS = @PNG_CFLAGS@
 PNG_LIBS = @PNG_LIBS@
-POST_ALLOC_OBJ = @POST_ALLOC_OBJ@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
-PRE_ALLOC_OBJ = @PRE_ALLOC_OBJ@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PROFILING_CFLAGS = @PROFILING_CFLAGS@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
@@ -1388,7 +1383,6 @@ TREE_SITTER_LIBS = @TREE_SITTER_LIBS@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
-UNEXEC_OBJ = @UNEXEC_OBJ@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
 UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
@@ -1501,10 +1495,16 @@ gl_GNULIB_ENABLED_verify_CONDITION = @gl_GNULIB_ENABLED_verify_CONDITION@
 gl_LIBOBJDEPS = @gl_LIBOBJDEPS@
 gl_LIBOBJS = @gl_LIBOBJS@
 gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gl_libgnu_LIBOBJDEPS = @gl_libgnu_LIBOBJDEPS@
+gl_libgnu_LIBOBJS = @gl_libgnu_LIBOBJS@
+gl_libgnu_LTLIBOBJS = @gl_libgnu_LTLIBOBJS@
 gltests_LIBOBJDEPS = @gltests_LIBOBJDEPS@
 gltests_LIBOBJS = @gltests_LIBOBJS@
 gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
 gltests_WITNESS = @gltests_WITNESS@
+gltests_libgnu_LIBOBJDEPS = @gltests_libgnu_LIBOBJDEPS@
+gltests_libgnu_LIBOBJS = @gltests_libgnu_LIBOBJS@
+gltests_libgnu_LTLIBOBJS = @gltests_libgnu_LTLIBOBJS@
 gsettingsschemadir = @gsettingsschemadir@
 host = @host@
 host_alias = @host_alias@
@@ -1552,9 +1552,9 @@ x_default_search_path = @x_default_search_path@
 noinst_LIBRARIES += libgnu.a
 
 libgnu_a_SOURCES =
-libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS)
-libgnu_a_LIBADD = $(gl_LIBOBJS)
-libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
+libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS) $(GL_CFLAG_ALLOW_WARNINGS)
+libgnu_a_LIBADD = $(gl_libgnu_LIBOBJS)
+libgnu_a_DEPENDENCIES = $(gl_libgnu_LIBOBJS)
 EXTRA_libgnu_a_SOURCES =
 
 ## begin gnulib module absolute-header
@@ -4446,5 +4446,5 @@ mostlyclean-local: mostlyclean-generic
        :
 distclean-local: distclean-gnulib-libobjs
 distclean-gnulib-libobjs:
-       -rm -f @gl_LIBOBJDEPS@
+       -rm -f @gl_libgnu_LIBOBJDEPS@
 maintainer-clean-local: distclean-gnulib-libobjs
index 92dfef2500ac1387caaafbd8d1ffcfc05a2d0440..83efe39910aaf1025a37c362a391b0156f718455 100644 (file)
    signed or floating type.  Do not evaluate E.  */
 #define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e)
 
+/* The same value as as the arithmetic expression E, but with E's type
+   after integer promotions.  For example, if E is of type 'enum {A, B}'
+   then 'switch (INT_PROMOTE (E))' pacifies gcc -Wswitch-enum if some
+   enum values are deliberately omitted from the switch's cases.
+   Here, unary + is safer than a cast or inline function, as unary +
+   does only integer promotions.  */
+#define INT_PROMOTE(e) (+ (e))
+
 
 /* Minimum and maximum values for integer types and expressions.  */
 
index c9cb6dd09eda6d15c9fa50aaf62d172110972703..7e4b0e354d9505858d230a9212d4c09b66a72a0e 100644 (file)
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4
-# serial 34
+# serial 35
 dnl Copyright (C) 2002, 2004-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_ACL_ARG],
     , [enable_acl=auto])
   AC_ARG_WITH([libsmack],
     [AS_HELP_STRING([--without-libsmack],
-       [do not use libsmack, even on systems that have it])]
+       [do not use libsmack, even on systems that have it])],
     [], [with_libsmack=maybe])
 ])
 
index b3b1391bd54edfa322675e88fca01eec1cf7e0e8..6eff85bea128a6441893b36dc35546959d469021 100644 (file)
@@ -1,5 +1,5 @@
 # gnulib-common.m4
-# serial 106
+# serial 107
 dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -753,7 +753,9 @@ AC_DEFUN([gl_COMMON_BODY], [
    than _GL_ATTRIBUTE_PURE because the function need not return
    exactly once and can affect state addressed by its arguments.)
    See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
-   <https://stackoverflow.com/questions/76847905/>.  */
+   <https://stackoverflow.com/questions/76847905/>.
+   ATTENTION! Efforts are underway to change the meaning of this attribute.
+   See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>.  */
 /* Applies to: functions, pointer to functions, function types.  */
 #ifndef _GL_ATTRIBUTE_REPRODUCIBLE
 /* This may be revisited when gcc and clang support [[reproducible]] or possibly
@@ -804,7 +806,9 @@ AC_DEFUN([gl_COMMON_BODY], [
    _GL_ATTRIBUTE_CONST because the function need not return exactly
    once and can depend on state addressed by its arguments.)
    See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
-   <https://stackoverflow.com/questions/76847905/>.  */
+   <https://stackoverflow.com/questions/76847905/>.
+   ATTENTION! Efforts are underway to change the meaning of this attribute.
+   See <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3424.htm>.  */
 /* Applies to: functions, pointer to functions, function types.  */
 #ifndef _GL_ATTRIBUTE_UNSEQUENCED
 /* This may be revisited when gcc and clang support [[unsequenced]] or possibly
index 980baf839986d16bc8acf7fd8bce77ee8f9ee2c5..42f67d0a42ba3b5538b320f465e3832c70b5c561 100644 (file)
@@ -1057,27 +1057,35 @@ AC_DEFUN([gl_INIT],
     gl_libobjs=
     gl_ltlibobjs=
     gl_libobjdeps=
+    gl_libgnu_libobjs=
+    gl_libgnu_ltlibobjs=
+    gl_libgnu_libobjdeps=
     if test -n "$gl_LIBOBJS"; then
       # Remove the extension.
 changequote(,)dnl
       sed_drop_objext='s/\.o$//;s/\.obj$//'
       sed_dirname1='s,//*,/,g'
       sed_dirname2='s,\(.\)/$,\1,'
-      sed_dirname3='s,^[^/]*$,.,'
-      sed_dirname4='s,\(.\)/[^/]*$,\1,'
+      sed_dirname3='s,[^/]*$,,'
       sed_basename1='s,.*/,,'
 changequote([, ])dnl
       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
         gl_libobjs="$gl_libobjs $i.$ac_objext"
         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
-        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3"`
         i_base=`echo "$i" | sed -e "$sed_basename1"`
-        gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
+        gl_libgnu_libobjs="$gl_libgnu_libobjs $i_dir""libgnu_a-$i_base.$ac_objext"
+        gl_libgnu_ltlibobjs="$gl_libgnu_ltlibobjs $i_dir""libgnu_la-$i_base.lo"
+        gl_libobjdeps="$gl_libobjdeps $i_dir\$(DEPDIR)/$i_base.Po"
+        gl_libgnu_libobjdeps="$gl_libgnu_libobjdeps $i_dir\$(DEPDIR)/libgnu_a-$i_base.Po"
       done
     fi
     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
     AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
+    AC_SUBST([gl_libgnu_LIBOBJS], [$gl_libgnu_libobjs])
+    AC_SUBST([gl_libgnu_LTLIBOBJS], [$gl_libgnu_ltlibobjs])
+    AC_SUBST([gl_libgnu_LIBOBJDEPS], [$gl_libgnu_libobjdeps])
   ])
   gltests_libdeps=
   gltests_ltlibdeps=
@@ -1121,27 +1129,35 @@ changequote([, ])dnl
     gltests_libobjs=
     gltests_ltlibobjs=
     gltests_libobjdeps=
+    gltests_libgnu_libobjs=
+    gltests_libgnu_ltlibobjs=
+    gltests_libgnu_libobjdeps=
     if test -n "$gltests_LIBOBJS"; then
       # Remove the extension.
 changequote(,)dnl
       sed_drop_objext='s/\.o$//;s/\.obj$//'
       sed_dirname1='s,//*,/,g'
       sed_dirname2='s,\(.\)/$,\1,'
-      sed_dirname3='s,^[^/]*$,.,'
-      sed_dirname4='s,\(.\)/[^/]*$,\1,'
+      sed_dirname3='s,[^/]*$,,'
       sed_basename1='s,.*/,,'
 changequote([, ])dnl
       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
-        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3"`
         i_base=`echo "$i" | sed -e "$sed_basename1"`
-        gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
+        gltests_libgnu_libobjs="$gltests_libgnu_libobjs $i_dir""libgnu_a-$i_base.$ac_objext"
+        gltests_libgnu_ltlibobjs="$gltests_libgnu_ltlibobjs $i_dir""libgnu_la-$i_base.lo"
+        gltests_libobjdeps="$gltests_libobjdeps $i_dir\$(DEPDIR)/$i_base.Po"
+        gltests_libgnu_libobjdeps="$gltests_libgnu_libobjdeps $i_dir\$(DEPDIR)/libgnu_a-$i_base.Po"
       done
     fi
     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
     AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
+    AC_SUBST([gltests_libgnu_LIBOBJS], [$gltests_libgnu_libobjs])
+    AC_SUBST([gltests_libgnu_LTLIBOBJS], [$gltests_libgnu_ltlibobjs])
+    AC_SUBST([gltests_libgnu_LIBOBJDEPS], [$gltests_libgnu_libobjdeps])
   ])
   AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
   LIBGNU_LIBDEPS="$gl_libdeps"