gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5020-g5a8a083d


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5020-g5a8a083d
Date: Sun, 26 Mar 2023 05:18:38 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, gawk-5.2-stable has been updated
       via  5a8a083d2a8da1a18024eafb1da4c709ab5dcea4 (commit)
       via  16e559c1c15174171710e87dd47c905b9decd9b7 (commit)
      from  11dd1f9cc4f36ab2ae0f56ee54832781b61bdaa9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=5a8a083d2a8da1a18024eafb1da4c709ab5dcea4

commit 5a8a083d2a8da1a18024eafb1da4c709ab5dcea4
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Mar 26 12:18:22 2023 +0300

    Update texinfo.tex.

diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog
index 3d2ebd28..3a8bca31 100644
--- a/build-aux/ChangeLog
+++ b/build-aux/ChangeLog
@@ -1,3 +1,7 @@
+2023-03-26         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * texinfo.tex: Sync from GNULIB.
+
 2023-02-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * ar-lib, compile, config.guess, config.rpath, config.sub,
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index 3cccf01d..204caf74 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2023-01-02.21}
+\def\texinfoversion{2023-03-21.06}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -2683,25 +2683,21 @@ end
 }
 \setregularquotes
 
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report.  xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
 %
 \def\codequoteright{%
   \ifusingtt
       {\ifflagclear{txicodequoteundirected}%
           {\ifflagclear{codequoteundirected}%
               {'}%
-              {\char'15 }}%
-          {\char'15 }}%
+              {\char"0D }}%
+          {\char"0D }}%
       {'}%
 }
 
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
 % \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
@@ -2709,8 +2705,8 @@ end
       {\ifflagclear{txicodequotebacktick}%
           {\ifflagclear{codequotebacktick}%
               {\relax`}%
-              {\char'22 }}%
-          {\char'22 }}%
+              {\char"12 }}%
+          {\char"12 }}%
       {\relax`}%
 }
 
@@ -2729,7 +2725,7 @@ end
     \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
   \fi\fi
 }
-%
+
 \parseargdef\codequotebacktick{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2744,6 +2740,11 @@ end
   \fi\fi
 }
 
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
@@ -2929,10 +2930,6 @@ end
      \let-\dashnobreak
      \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
   }
   %
@@ -2942,21 +2939,30 @@ end
     %
     % Now, output a discretionary to allow a line break, unless
     % (a) the next character is a -, or
-    % (b) the preceding character is a -.
+    % (b) the preceding character is a -, or
+    % (c) we are at the start of the string.
+    % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
+    %
     % 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
+      \ifx\codedashnobreak\codedash
       \else \discretionary{}{}{}\fi
     \fi
     % we need the space after the = for the case when \next itself is a
     % space token; it would get swallowed otherwise.  As in @code{- a}.
-    \global\let\codedashprev= \next
+    \global\let\codedashnobreak= \next
   }
 }
 \def\normaldash{-}
 %
-\def\codex #1{\tclose{#1}\endgroup}
+\def\codex #1{\tclose{%
+  % Given -foo (with a single dash), we do not want to allow a break
+  % after the -.  \codedashnobreak is set to the first character in
+  % @code.
+  \futurelet\codedashnobreak\relax
+  #1%
+}\endgroup}
 
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
@@ -3950,33 +3956,23 @@ $$%
 
 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
 
-% When we turn headings on, set the page number to 1.
+% Set the page number to 1.
 \def\pageone{
   \global\pageno=1
   \global\arabiccount = \pagecount
 }
 
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{%
-\pageone
-\HEADINGSdoublex
-}
 \let\contentsalignmacro = \chappager
 
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\pageone
-\HEADINGSsinglex
-}
 % \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
 
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
 \let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
+\def\HEADINGSdouble{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
@@ -3986,8 +3982,10 @@ $$%
 \global\let\contentsalignmacro = \chapoddpage
 }
 
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
+\def\HEADINGSsingle{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -3999,7 +3997,6 @@ $$%
 
 % for @setchapternewpage off
 \def\HEADINGSsinglechapoff{%
-\pageone
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -4725,13 +4722,11 @@ $$%
 % except not \outer, so it can be used within macros and \if's.
 \edef\newwrite{\makecsname{ptexnewwrite}}
 
-% \newindex {foo} defines an index named IX.
+% \newindex {IX} defines an index named IX.
 % It automatically defines \IXindex such that
 % \IXindex ...rest of line... puts an entry in the index IX.
 % It also defines \IXindfile to be the number of the output channel for
 % the file that accumulates this index.  The file's extension is IX.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
 %
 \def\newindex#1{%
   \expandafter\chardef\csname#1indfile\endcsname=0
@@ -4989,7 +4984,7 @@ $$%
   \commondummyword\ampchar          {\normalamp}%
   \commondummyword\atchar           {\@}%
   \commondummyword\arrow            {->}%
-  \commondummyword\backslashchar    {}%
+  \commondummyword\backslashchar    {\realbackslash}%
   \commondummyword\bullet           {bullet}%
   \commondummyword\comma            {,}%
   \commondummyword\copyright        {copyright}%
@@ -5089,9 +5084,6 @@ $$%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
-  % makeinfo does not expand macros in the argument to @deffn, which ends up
-  % writing an index entry, and texindex isn't prepared for an index sort entry
-  % that starts with \.
   %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
@@ -7387,6 +7379,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \def\setupverb{%
   \tt
   \def\par{\leavevmode\endgraf}%
+  \parindent = 0pt
   \setcodequotes
   \tabeightspaces
   % Respect line breaks,
@@ -7562,11 +7555,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \exdentamount=\defbodyindent
 }
 
-\newtoks\defidx
-\newtoks\deftext
-
-\def\useindex#1{\defidx={#1}\ignorespaces}
-
 % Called as \printdefunline \deffooheader{text}
 %
 \def\printdefunline#1#2{%
@@ -7574,10 +7562,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \plainfrenchspacing
     % call \deffooheader:
     #1#2 \endheader
-    % create the index entry
-    \defcharsdefault
-    \edef\temp{\noexpand\doind{\the\defidx}{\the\deftext}}%
-    \temp
     % common ending:
     \interlinepenalty = 10000
     \advance\rightskip by 0pt plus 1fil\relax
@@ -7592,6 +7576,24 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 \def\Edefun{\endgraf\medbreak}
 
+% @defblock, @defline do not automatically create index entries
+\envdef\defblock{%
+  \startdefun
+}
+\let\Edefblock\Edefun
+
+\def\defline{%
+  \doingtypefnfalse
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+\def\deflineheader#1 #2 #3\endheader{%
+  \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
+\def\deftypeline{%
+  \doingtypefntrue
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+
 % \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
 %
 % Define \deffoo, \deffoox  \Edeffoo and \deffooheader.
@@ -7643,56 +7645,51 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi\fi
 }
 
-\def\defind#1#2{
-  \defidx={#1}%
-  \deftext={#2}%
-}
-
 % Untyped functions:
 
 % @deffn category name args
 \makedefun{deffn}#1 #2 #3\endheader{%
-  \defind{fn}{\code{#2}}%
-  \defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+  \doind{fn}{\code{#2}}%
+  \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
 }
 
 % @defop category class name args
 \makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
 \def\defopheaderx#1#2 #3 #4\endheader{%
-  \defind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
-  \defname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
+  \doind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
+  \printdefname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
 
 % Typed functions:
 
 % @deftypefn category type name args
 \makedefun{deftypefn}#1 #2 #3 #4\endheader{%
-  \defind{fn}{\code{#3}}%
+  \doind{fn}{\code{#3}}%
   \doingtypefntrue
-  \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
+  \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
 }
 
 % @deftypeop category class type name args
 \makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
 \def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
-  \defind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
+  \doind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
   \doingtypefntrue
-  \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
+  \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
 % Typed variables:
 
 % @deftypevr category type var args
 \makedefun{deftypevr}#1 #2 #3 #4\endheader{%
-  \defind{vr}{\code{#3}}%
-  \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
+  \doind{vr}{\code{#3}}%
+  \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
 }
 
 % @deftypecv category class type var args
 \makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
 \def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
-  \defind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
-  \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
+  \doind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
+  \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
 % Untyped variables:
@@ -7708,8 +7705,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % @deftp category name args
 \makedefun{deftp}#1 #2 #3\endheader{%
-  \defind{tp}{\code{#2}}%
-  \defname{#1}{}{#2}\defunargs{#3\unskip}%
+  \doind{tp}{\code{#2}}%
+  \printdefname{#1}{}{#2}\defunargs{#3\unskip}%
 }
 
 % Remaining @defun-like shortcuts:
@@ -7725,14 +7722,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \makedefun{defivar}{\defcvheaderx\putwordInstanceVariableof}
 \makedefun{deftypeivar}{\deftypecvheaderx\putwordInstanceVariableof}
 
-% \defname, which formats the name of the @def (not the args).
+% \printdefname, which formats the name of the @def (not the args).
 % #1 is the category, such as "Function".
 % #2 is the return type, if any.
 % #3 is the function name.
 %
 % We are followed by (but not passed) the arguments, if any.
 %
-\def\defname#1#2#3{%
+\def\printdefname#1#2#3{%
   \par
   % Get the values of \leftskip and \rightskip as they were outside the @def...
   \advance\leftskip by -\defbodyindent
@@ -7857,7 +7854,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % If we encounter &foo, then turn on ()-hacking afterwards
 \newif\ifampseen
-\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+\def\amprm#1 {\ampseentrue{\rm\&#1 }}
 
 \def\parenfont{%
   \ifampseen
@@ -8181,12 +8178,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 %
 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
 % body to be transformed.
-% Set \macrobody to the body of the macro, and call \defmacro.
+% Set \macrobody to the body of the macro, and call \macrodef.
 %
 {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 
 % Make @ a letter, so that we can make private-to-Texinfo macro names.
 \edef\texiatcatcode{\the\catcode`\@}
@@ -8405,16 +8402,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % \xdef is used so that macro definitions will survive the file
 % they're defined in: @include reads the file inside a group.
 %
-\def\defmacro{%
+\def\macrodef{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifnum\paramno=1
-    \def\xeatspaces##1{##1}%
-    % This removes the pair of braces around the argument.  We don't
-    % use \eatspaces, because this can cause ends of lines to be lost
-    % when the argument to \eatspaces is read, leading to line-based
-    % commands like "@itemize" not being read correctly.
+    \long\def\xeatspaces##1{##1}%
+    % We don't use \xeatspaces for single-argument macros, because we
+    % want to keep ends of lines.  This definition removes \xeatspaces
+    % when \macrobody is expanded below.
   \else
-    \let\xeatspaces\relax % suppress expansion
+    \def\xeatspaces{\string\xeatspaces}%
+    % This expands \xeatspaces as a sequence of character tokens, which
+    % stops \scantokens inserting an extra space after the control sequence.
   \fi
   \ifcase\paramno
   % 0
@@ -8580,6 +8578,75 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi \macnamexxx}
 
 
+% @linemacro
+
+\parseargdef\linemacro{%
+  \getargs{#1}% now \macname is the macname and \argl the arglist
+  \ifx\argl\empty
+    \paramno=0
+    \let\hash\relax
+    \def\paramlist{\hash 1\endlinemacro}%
+  \else
+    \expandafter\linegetparamlist\argl;%
+  \fi
+  \begingroup \macrobodyctxt \usembodybackslash
+  \parselinemacrobody
+}
+
+% Build up \paramlist which will be used as the parameter text for the macro.
+% At the end it will be like "#1 #2 #3\endlinemacro".
+\def\linegetparamlist#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \linegetparamlistxxx#1,;,%
+}
+\def\linegetparamlistxxx#1,{%
+  \if#1;\let\next=\linegetparamlistxxxx
+  \else \let\next=\linegetparamlistxxx
+    \advance\paramno by 1
+    \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+        {\hash\the\paramno}%
+    \edef\paramlist{\paramlist\hash\the\paramno\space}%
+  \fi\next}
+\def\linegetparamlistxxxx{%
+  \expandafter\fixparamlist\paramlist\fixparamlist
+}
+% Replace final space token
+\def\fixparamlist#1 \fixparamlist{%
+  \def\paramlist{#1\endlinemacro}%
+}
+
+% Read the body of the macro, replacing backslash-surrounded variables
+%
+{\catcode`\ =\other\long\gdef\parselinemacrobody#1@end linemacro{%
+\xdef\macrobody{#1}%
+\endgroup
+\linemacrodef
+}}
+
+% Make the definition
+\def\linemacrodef{%
+  \let\hash=##%
+  \expandafter\xdef\csname\the\macname\endcsname{%
+    \bgroup
+    \noexpand\parsearg
+    \expandafter\noexpand\csname\the\macname @@\endcsname
+  }
+  \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+    \egroup
+    \expandafter\noexpand
+    \csname\the\macname @@@\endcsname##1\noexpand\endlinemacro
+  }
+  \expandafter\expandafter
+  \expandafter\xdef
+  \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+    \newlinechar=13 % split \macrobody into lines
+    \noexpand\scantokens{\macrobody}%
+  }
+}
+
+
+
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
 % sign.  Make them active and then expand them all to nothing.
@@ -9571,8 +9638,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 %
 \def\caption{\docaption\thiscaption}
 \def\shortcaption{\docaption\thisshortcaption}
-\def\docaption{\checkenv\float \bgroup\scanctxt\defcaption}
-\def\defcaption#1#2{\egroup \def#1{#2}}
+\def\docaption{\checkenv\float \bgroup\scanctxt\docaptionz}
+\def\docaptionz#1#2{\egroup \def#1{#2}}
 
 % The parameter is the control sequence identifying the counter we are
 % going to use.  Create it if it doesn't exist and assign it to \floatno.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index ba8e5041..8833e698 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2023-03-26         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * texinfo.tex: Sync from GNULIB.
+
 2023-03-09         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawkworkflow.texi (UPDATE-MONTH, EDITION): Updated.
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 3cccf01d..204caf74 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2023-01-02.21}
+\def\texinfoversion{2023-03-21.06}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -2683,25 +2683,21 @@ end
 }
 \setregularquotes
 
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report.  xpdf does work with the regular 0x27.
+% output for ' in @code
+% in tt font hex 0D (undirected) or 27 (curly right quote)
 %
 \def\codequoteright{%
   \ifusingtt
       {\ifflagclear{txicodequoteundirected}%
           {\ifflagclear{codequoteundirected}%
               {'}%
-              {\char'15 }}%
-          {\char'15 }}%
+              {\char"0D }}%
+          {\char"0D }}%
       {'}%
 }
 
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
+% output for ` in @code
+% in tt font hex 12 (grave accent) or 60 (curly left quote)
 % \relax disables Spanish ligatures ?` and !` of \tt font.
 %
 \def\codequoteleft{%
@@ -2709,8 +2705,8 @@ end
       {\ifflagclear{txicodequotebacktick}%
           {\ifflagclear{codequotebacktick}%
               {\relax`}%
-              {\char'22 }}%
-          {\char'22 }}%
+              {\char"12 }}%
+          {\char"12 }}%
       {\relax`}%
 }
 
@@ -2729,7 +2725,7 @@ end
     \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
   \fi\fi
 }
-%
+
 \parseargdef\codequotebacktick{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2744,6 +2740,11 @@ end
   \fi\fi
 }
 
+% Turn them on by default
+\let\SETtxicodequoteundirected = t
+\let\SETtxicodequotebacktick = t
+
+
 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
 \def\noligaturesquoteleft{\relax\lq}
 
@@ -2929,10 +2930,6 @@ end
      \let-\dashnobreak
      \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
   }
   %
@@ -2942,21 +2939,30 @@ end
     %
     % Now, output a discretionary to allow a line break, unless
     % (a) the next character is a -, or
-    % (b) the preceding character is a -.
+    % (b) the preceding character is a -, or
+    % (c) we are at the start of the string.
+    % In both cases (b) and (c), \codedashnobreak should be set to \codedash.
+    %
     % 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
+      \ifx\codedashnobreak\codedash
       \else \discretionary{}{}{}\fi
     \fi
     % we need the space after the = for the case when \next itself is a
     % space token; it would get swallowed otherwise.  As in @code{- a}.
-    \global\let\codedashprev= \next
+    \global\let\codedashnobreak= \next
   }
 }
 \def\normaldash{-}
 %
-\def\codex #1{\tclose{#1}\endgroup}
+\def\codex #1{\tclose{%
+  % Given -foo (with a single dash), we do not want to allow a break
+  % after the -.  \codedashnobreak is set to the first character in
+  % @code.
+  \futurelet\codedashnobreak\relax
+  #1%
+}\endgroup}
 
 \def\codeunder{%
   % this is all so @math{@code{var_name}+1} can work.  In math mode, _
@@ -3950,33 +3956,23 @@ $$%
 
 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
 
-% When we turn headings on, set the page number to 1.
+% Set the page number to 1.
 \def\pageone{
   \global\pageno=1
   \global\arabiccount = \pagecount
 }
 
-% For double-sided printing, put current file name in lower left corner,
-% chapter name on inside top of right hand pages, document
-% title on inside top of left hand pages, and page numbers on outside top
-% edge of all pages.
-\def\HEADINGSdouble{%
-\pageone
-\HEADINGSdoublex
-}
 \let\contentsalignmacro = \chappager
 
-% For single-sided printing, chapter title goes across top left of page,
-% page number on top right.
-\def\HEADINGSsingle{%
-\pageone
-\HEADINGSsinglex
-}
 % \def\HEADINGSon{\HEADINGSdouble} % defined by \CHAPPAGon
 
-\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdouble}
 \let\HEADINGSdoubleafter=\HEADINGSafter
-\def\HEADINGSdoublex{%
+\def\HEADINGSdouble{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
@@ -3986,8 +3982,10 @@ $$%
 \global\let\contentsalignmacro = \chapoddpage
 }
 
-\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
-\def\HEADINGSsinglex{%
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsingle}
+\def\HEADINGSsingle{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -3999,7 +3997,6 @@ $$%
 
 % for @setchapternewpage off
 \def\HEADINGSsinglechapoff{%
-\pageone
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\thischapter\hfil\folio}}
@@ -4725,13 +4722,11 @@ $$%
 % except not \outer, so it can be used within macros and \if's.
 \edef\newwrite{\makecsname{ptexnewwrite}}
 
-% \newindex {foo} defines an index named IX.
+% \newindex {IX} defines an index named IX.
 % It automatically defines \IXindex such that
 % \IXindex ...rest of line... puts an entry in the index IX.
 % It also defines \IXindfile to be the number of the output channel for
 % the file that accumulates this index.  The file's extension is IX.
-% The name of an index should be no more than 2 characters long
-% for the sake of vms.
 %
 \def\newindex#1{%
   \expandafter\chardef\csname#1indfile\endcsname=0
@@ -4989,7 +4984,7 @@ $$%
   \commondummyword\ampchar          {\normalamp}%
   \commondummyword\atchar           {\@}%
   \commondummyword\arrow            {->}%
-  \commondummyword\backslashchar    {}%
+  \commondummyword\backslashchar    {\realbackslash}%
   \commondummyword\bullet           {bullet}%
   \commondummyword\comma            {,}%
   \commondummyword\copyright        {copyright}%
@@ -5089,9 +5084,6 @@ $$%
   %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
-  % makeinfo does not expand macros in the argument to @deffn, which ends up
-  % writing an index entry, and texindex isn't prepared for an index sort entry
-  % that starts with \.
   %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
@@ -7387,6 +7379,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \def\setupverb{%
   \tt
   \def\par{\leavevmode\endgraf}%
+  \parindent = 0pt
   \setcodequotes
   \tabeightspaces
   % Respect line breaks,
@@ -7562,11 +7555,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \exdentamount=\defbodyindent
 }
 
-\newtoks\defidx
-\newtoks\deftext
-
-\def\useindex#1{\defidx={#1}\ignorespaces}
-
 % Called as \printdefunline \deffooheader{text}
 %
 \def\printdefunline#1#2{%
@@ -7574,10 +7562,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
     \plainfrenchspacing
     % call \deffooheader:
     #1#2 \endheader
-    % create the index entry
-    \defcharsdefault
-    \edef\temp{\noexpand\doind{\the\defidx}{\the\deftext}}%
-    \temp
     % common ending:
     \interlinepenalty = 10000
     \advance\rightskip by 0pt plus 1fil\relax
@@ -7592,6 +7576,24 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 \def\Edefun{\endgraf\medbreak}
 
+% @defblock, @defline do not automatically create index entries
+\envdef\defblock{%
+  \startdefun
+}
+\let\Edefblock\Edefun
+
+\def\defline{%
+  \doingtypefnfalse
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+\def\deflineheader#1 #2 #3\endheader{%
+  \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+}
+\def\deftypeline{%
+  \doingtypefntrue
+  \parseargusing\activeparens{\printdefunline\deflineheader}%
+}
+
 % \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
 %
 % Define \deffoo, \deffoox  \Edeffoo and \deffooheader.
@@ -7643,56 +7645,51 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi\fi
 }
 
-\def\defind#1#2{
-  \defidx={#1}%
-  \deftext={#2}%
-}
-
 % Untyped functions:
 
 % @deffn category name args
 \makedefun{deffn}#1 #2 #3\endheader{%
-  \defind{fn}{\code{#2}}%
-  \defname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
+  \doind{fn}{\code{#2}}%
+  \printdefname{#1}{}{#2}\magicamp\defunargs{#3\unskip}%
 }
 
 % @defop category class name args
 \makedefun{defop}#1 {\defopheaderx{#1\ \putwordon}}
 \def\defopheaderx#1#2 #3 #4\endheader{%
-  \defind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
-  \defname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
+  \doind{fn}{\code{#3}\space\putwordon\ \code{#2}}%
+  \printdefname{#1\ \code{#2}}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
 
 % Typed functions:
 
 % @deftypefn category type name args
 \makedefun{deftypefn}#1 #2 #3 #4\endheader{%
-  \defind{fn}{\code{#3}}%
+  \doind{fn}{\code{#3}}%
   \doingtypefntrue
-  \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
+  \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
 }
 
 % @deftypeop category class type name args
 \makedefun{deftypeop}#1 {\deftypeopheaderx{#1\ \putwordon}}
 \def\deftypeopheaderx#1#2 #3 #4 #5\endheader{%
-  \defind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
+  \doind{fn}{\code{#4}\space\putwordon\ \code{#1\ \code{#2}}}%
   \doingtypefntrue
-  \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
+  \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
 % Typed variables:
 
 % @deftypevr category type var args
 \makedefun{deftypevr}#1 #2 #3 #4\endheader{%
-  \defind{vr}{\code{#3}}%
-  \defname{#1}{#2}{#3}\defunargs{#4\unskip}%
+  \doind{vr}{\code{#3}}%
+  \printdefname{#1}{#2}{#3}\defunargs{#4\unskip}%
 }
 
 % @deftypecv category class type var args
 \makedefun{deftypecv}#1 {\deftypecvheaderx{#1\ \putwordof}}
 \def\deftypecvheaderx#1#2 #3 #4 #5\endheader{%
-  \defind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
-  \defname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
+  \doind{vr}{\code{#4}\space\putwordof\ \code{#2}}%
+  \printdefname{#1\ \code{#2}}{#3}{#4}\defunargs{#5\unskip}%
 }
 
 % Untyped variables:
@@ -7708,8 +7705,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % @deftp category name args
 \makedefun{deftp}#1 #2 #3\endheader{%
-  \defind{tp}{\code{#2}}%
-  \defname{#1}{}{#2}\defunargs{#3\unskip}%
+  \doind{tp}{\code{#2}}%
+  \printdefname{#1}{}{#2}\defunargs{#3\unskip}%
 }
 
 % Remaining @defun-like shortcuts:
@@ -7725,14 +7722,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 \makedefun{defivar}{\defcvheaderx\putwordInstanceVariableof}
 \makedefun{deftypeivar}{\deftypecvheaderx\putwordInstanceVariableof}
 
-% \defname, which formats the name of the @def (not the args).
+% \printdefname, which formats the name of the @def (not the args).
 % #1 is the category, such as "Function".
 % #2 is the return type, if any.
 % #3 is the function name.
 %
 % We are followed by (but not passed) the arguments, if any.
 %
-\def\defname#1#2#3{%
+\def\printdefname#1#2#3{%
   \par
   % Get the values of \leftskip and \rightskip as they were outside the @def...
   \advance\leftskip by -\defbodyindent
@@ -7857,7 +7854,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 
 % If we encounter &foo, then turn on ()-hacking afterwards
 \newif\ifampseen
-\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+\def\amprm#1 {\ampseentrue{\rm\&#1 }}
 
 \def\parenfont{%
   \ifampseen
@@ -8181,12 +8178,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 %
 % We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
 % body to be transformed.
-% Set \macrobody to the body of the macro, and call \defmacro.
+% Set \macrobody to the body of the macro, and call \macrodef.
 %
 {\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 {\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
-\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+\xdef\macrobody{\eatcr{#1}}\endgroup\macrodef}}%
 
 % Make @ a letter, so that we can make private-to-Texinfo macro names.
 \edef\texiatcatcode{\the\catcode`\@}
@@ -8405,16 +8402,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % \xdef is used so that macro definitions will survive the file
 % they're defined in: @include reads the file inside a group.
 %
-\def\defmacro{%
+\def\macrodef{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifnum\paramno=1
-    \def\xeatspaces##1{##1}%
-    % This removes the pair of braces around the argument.  We don't
-    % use \eatspaces, because this can cause ends of lines to be lost
-    % when the argument to \eatspaces is read, leading to line-based
-    % commands like "@itemize" not being read correctly.
+    \long\def\xeatspaces##1{##1}%
+    % We don't use \xeatspaces for single-argument macros, because we
+    % want to keep ends of lines.  This definition removes \xeatspaces
+    % when \macrobody is expanded below.
   \else
-    \let\xeatspaces\relax % suppress expansion
+    \def\xeatspaces{\string\xeatspaces}%
+    % This expands \xeatspaces as a sequence of character tokens, which
+    % stops \scantokens inserting an extra space after the control sequence.
   \fi
   \ifcase\paramno
   % 0
@@ -8580,6 +8578,75 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \fi \macnamexxx}
 
 
+% @linemacro
+
+\parseargdef\linemacro{%
+  \getargs{#1}% now \macname is the macname and \argl the arglist
+  \ifx\argl\empty
+    \paramno=0
+    \let\hash\relax
+    \def\paramlist{\hash 1\endlinemacro}%
+  \else
+    \expandafter\linegetparamlist\argl;%
+  \fi
+  \begingroup \macrobodyctxt \usembodybackslash
+  \parselinemacrobody
+}
+
+% Build up \paramlist which will be used as the parameter text for the macro.
+% At the end it will be like "#1 #2 #3\endlinemacro".
+\def\linegetparamlist#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \linegetparamlistxxx#1,;,%
+}
+\def\linegetparamlistxxx#1,{%
+  \if#1;\let\next=\linegetparamlistxxxx
+  \else \let\next=\linegetparamlistxxx
+    \advance\paramno by 1
+    \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+        {\hash\the\paramno}%
+    \edef\paramlist{\paramlist\hash\the\paramno\space}%
+  \fi\next}
+\def\linegetparamlistxxxx{%
+  \expandafter\fixparamlist\paramlist\fixparamlist
+}
+% Replace final space token
+\def\fixparamlist#1 \fixparamlist{%
+  \def\paramlist{#1\endlinemacro}%
+}
+
+% Read the body of the macro, replacing backslash-surrounded variables
+%
+{\catcode`\ =\other\long\gdef\parselinemacrobody#1@end linemacro{%
+\xdef\macrobody{#1}%
+\endgroup
+\linemacrodef
+}}
+
+% Make the definition
+\def\linemacrodef{%
+  \let\hash=##%
+  \expandafter\xdef\csname\the\macname\endcsname{%
+    \bgroup
+    \noexpand\parsearg
+    \expandafter\noexpand\csname\the\macname @@\endcsname
+  }
+  \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+    \egroup
+    \expandafter\noexpand
+    \csname\the\macname @@@\endcsname##1\noexpand\endlinemacro
+  }
+  \expandafter\expandafter
+  \expandafter\xdef
+  \expandafter\expandafter\csname\the\macname @@@\endcsname\paramlist{%
+    \newlinechar=13 % split \macrobody into lines
+    \noexpand\scantokens{\macrobody}%
+  }
+}
+
+
+
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
 % sign.  Make them active and then expand them all to nothing.
@@ -9571,8 +9638,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 %
 \def\caption{\docaption\thiscaption}
 \def\shortcaption{\docaption\thisshortcaption}
-\def\docaption{\checkenv\float \bgroup\scanctxt\defcaption}
-\def\defcaption#1#2{\egroup \def#1{#2}}
+\def\docaption{\checkenv\float \bgroup\scanctxt\docaptionz}
+\def\docaptionz#1#2{\egroup \def#1{#2}}
 
 % The parameter is the control sequence identifying the counter we are
 % going to use.  Create it if it doesn't exist and assign it to \floatno.

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=16e559c1c15174171710e87dd47c905b9decd9b7

commit 16e559c1c15174171710e87dd47c905b9decd9b7
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Mar 26 12:16:50 2023 +0300

    Update support files.

diff --git a/support/ChangeLog b/support/ChangeLog
index 681809ba..7be12deb 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+2023-03-26         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * dfa.c, verify.h: Sync from GNULIB.
+
 2023-02-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * cdefs.h, dfa.c, dfa.h, dynarray.h, flexmember.h, idx.h,
diff --git a/support/dfa.c b/support/dfa.c
index 211e1ed1..d54aab40 100644
--- a/support/dfa.c
+++ b/support/dfa.c
@@ -67,7 +67,10 @@ c_isdigit (char c)
 #ifndef FALLTHROUGH
 # if 201710L < __STDC_VERSION__
 #  define FALLTHROUGH [[__fallthrough__]]
-# elif (__GNUC__ >= 7) || (__clang_major__ >= 10)
+# elif ((__GNUC__ >= 7) \
+        || (defined __apple_build_version__ \
+            ? __apple_build_version__ >= 12000000 \
+            : __clang_major__ >= 10))
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
@@ -1199,8 +1202,13 @@ lex (struct dfa *dfa)
      On the plus side, this avoids having a duplicate of the
      main switch inside the backslash case.  On the minus side,
      it means that just about every case tests the backslash flag.  */
-  for (int i = 0; i < 2; ++i)
+  for (int i = 0; ; i++)
     {
+      /* This loop should consume at most a backslash and some other
+         character.  */
+      if (2 <= i)
+        abort ();
+
       if (! dfa->lex.left)
         return dfa->lex.lasttok = END;
       int c = fetch_wc (dfa);
@@ -1588,11 +1596,6 @@ lex (struct dfa *dfa)
           return dfa->lex.lasttok = c;
         }
     }
-
-  /* The above loop should consume at most a backslash
-     and some other character.  */
-  abort ();
-  return END;                   /* keeps pedantic compilers happy.  */
 }
 
 static void
diff --git a/support/verify.h b/support/verify.h
index f0b3fc58..c7002432 100644
--- a/support/verify.h
+++ b/support/verify.h
@@ -285,14 +285,16 @@ template <int w>
 # define _GL_HAS_BUILTIN_TRAP 0
 #endif
 
-#if defined __clang_major__ && __clang_major__ < 5
-# define _GL_HAS_BUILTIN_UNREACHABLE 0
-#elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
-# define _GL_HAS_BUILTIN_UNREACHABLE 1
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
-#else
-# define _GL_HAS_BUILTIN_UNREACHABLE 0
+#ifndef _GL_HAS_BUILTIN_UNREACHABLE
+# if defined __clang_major__ && __clang_major__ < 5
+#  define _GL_HAS_BUILTIN_UNREACHABLE 0
+# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+#  define _GL_HAS_BUILTIN_UNREACHABLE 1
+# elif defined __has_builtin
+#  define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
+# else
+#  define _GL_HAS_BUILTIN_UNREACHABLE 0
+# endif
 #endif
 
 /* Each of these macros verifies that its argument R is nonzero.  To

-----------------------------------------------------------------------

Summary of changes:
 build-aux/ChangeLog   |   4 +
 build-aux/texinfo.tex | 251 ++++++++++++++++++++++++++++++++------------------
 doc/ChangeLog         |   4 +
 doc/texinfo.tex       | 251 ++++++++++++++++++++++++++++++++------------------
 support/ChangeLog     |   4 +
 support/dfa.c         |  17 ++--
 support/verify.h      |  18 ++--
 7 files changed, 350 insertions(+), 199 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]