1 From e2220ed33e69d8bc6504e3f6279894afe33a99a5 Mon Sep 17 00:00:00 2001
2 From: Paul Eggert <eggert@cs.ucla.edu>
3 Date: Wed, 29 Mar 2023 12:59:09 -0700
4 Subject: [PATCH 02/29] build: run "make fetch", which updated these:
6 * build-aux/texinfo.tex: Update from texinfo.
7 * lib/Autom4te/FileUtils.pm: Update from automake.
9 Upstream-Status: Backport
10 Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 build-aux/texinfo.tex | 50 +++++++++++++++++++++------------------
13 lib/Autom4te/FileUtils.pm | 5 +++-
14 2 files changed, 31 insertions(+), 24 deletions(-)
16 diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
17 index d25161109..55a002d27 100644
18 --- a/build-aux/texinfo.tex
19 +++ b/build-aux/texinfo.tex
21 % Load plain if necessary, i.e., if running under initex.
22 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
24 -\def\texinfoversion{2023-03-21.06}
25 +\def\texinfoversion{2023-03-27.21}
27 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
29 @@ -1102,27 +1102,33 @@ where each line of input produces a line of output.}
31 % Output page labels information.
32 % See PDF reference v.1.7 p.594, section 8.3.1.
33 +% Page label ranges must be increasing.
36 \def\title{0 << /P (T-) /S /D >>}%
37 - \edef\roman{\the\romancount << /S /r >>}%
38 - \edef\arabic{\the\arabiccount << /S /D >>}%
40 - % Page label ranges must be increasing. Remove any duplicates.
41 - % (There is a slight chance of this being wrong if e.g. there is
42 - % a @contents but no @titlepage, etc.)
44 - \ifnum\romancount=0 \def\roman{}\fi
45 - \ifnum\arabiccount=0 \def\title{}%
47 - \ifnum\romancount=\arabiccount \def\roman{}\fi
50 - \ifnum\romancount<\arabiccount
51 - \pdfcatalog{/PageLabels << /Nums [\title \roman \arabic ] >> }\relax
52 + % support @contents at very end of document
53 + \ifnum\contentsendcount=\pagecount
54 + \ifnum\arabiccount<\romancount
55 + \pdfcatalog{/PageLabels << /Nums
57 + \the\arabiccount << /S /D >>
58 + \the\romancount << /S /r >>
61 + % no contents in document
62 + \else\ifnum\contentsendcount=0
63 + \pdfcatalog{/PageLabels << /Nums
65 + \the\arabiccount << /S /D >>
68 - \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax
70 + \pdfcatalog{/PageLabels << /Nums
72 + \the\romancount << /S /r >>
73 + \the\contentsendcount << /S /D >>
79 @@ -1131,6 +1137,8 @@ where each line of input produces a line of output.}
80 \newcount\pagecount \pagecount=0
81 \newcount\romancount \romancount=0
82 \newcount\arabiccount \arabiccount=0
83 +\newcount\contentsendcount \contentsendcount=0
86 \let\ptxadvancepageno\advancepageno
88 @@ -6809,12 +6817,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
89 % Get ready to use Arabic numerals again
90 \def\contentsendroman{%
91 \lastnegativepageno = \pageno
92 - \global\pageno = \savepageno
94 - % If \romancount > \arabiccount, the contents are at the end of the
95 - % document. Otherwise, advance where the Arabic numerals start for
97 - \ifnum\romancount>\arabiccount\else\global\arabiccount=\pagecount\fi
99 + \contentsendcount = \pagecount
102 % Typeset the label for a chapter or appendix for the short contents.
103 diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
104 index ab58b9de4..2468fe6d8 100644
105 --- a/lib/Autom4te/FileUtils.pm
106 +++ b/lib/Autom4te/FileUtils.pm
107 @@ -39,9 +39,12 @@ use strict;
108 use warnings FATAL => 'all';
111 -use Time::HiRes qw(stat);
114 +# use sub-second resolution timestamps if available,
115 +# carry on with one-second resolution timestamps if that is all we have
116 +BEGIN { eval { require Time::HiRes; import Time::HiRes qw(stat) } }
118 use Autom4te::Channels;
119 use Autom4te::ChannelDefs;