From 28eadbdc4c53974c04fb415dc751a2682eaa8b1a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 21 Aug 2019 11:37:09 -0700 Subject: [PATCH] autoupdate --- build-aux/texinfo.tex | 216 +++++++++++++++++++++--------------------- doc/maintain.texi | 40 ++++++-- doc/standards.texi | 162 +++++++++++++++++++++++-------- lib/regex_internal.c | 11 ++- 4 files changed, 272 insertions(+), 157 deletions(-) diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index e540acd987..d2e895f362 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -1,5 +1,5 @@ % texinfo.tex -- TeX macros to handle Texinfo files. -% +% % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % @@ -218,7 +218,7 @@ % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. -% +% \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} @@ -323,9 +323,9 @@ % the output routine. The saved contents are valid until we actually % \shipout a page. % -% (We used to run a short output routine to actually set \topmark and -% \firstmark to the right values, but if this was called with an empty page -% containing whatsits for writing index entries, the whatsits would be thrown +% (We used to run a short output routine to actually set \topmark and +% \firstmark to the right values, but if this was called with an empty page +% containing whatsits for writing index entries, the whatsits would be thrown % away and the index auxiliary file would remain empty.) % \newtoks\savedtopmark @@ -365,7 +365,7 @@ \let\thischapterheading\thischapter \else % \thischapterheading is the same as \thischapter except it is blank - % for the first page of a chapter. This is to prevent the chapter name + % for the first page of a chapter. This is to prevent the chapter name % being shown twice. \def\thischapterheading{}% \fi @@ -448,7 +448,7 @@ }% } -% First remove any @comment, then any @c comment. Pass the result on to +% First remove any @comment, then any @c comment. Pass the result on to % \argcheckspaces. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} @@ -1137,7 +1137,7 @@ where each line of input produces a line of output.} % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. -% +% % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so @@ -1442,7 +1442,7 @@ output) for that.)} % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. - % + % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike @@ -2726,7 +2726,7 @@ end } % Commands to set the quote options. -% +% \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword @@ -2767,7 +2767,7 @@ end % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% - \ifusingtt + \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next @@ -2914,14 +2914,14 @@ end \gdef\codedash{\futurelet\next\codedashfinish} \gdef\codedashfinish{% \normaldash % always output the dash character itself. - % + % % Now, output a discretionary to allow a line break, unless % (a) the next character is a -, or % (b) the preceding character is a -. % E.g., given --posix, we do not want to allow a break after either -. % Given --foo-bar, we do want to allow a break between the - and the b. \ifx\next\codedash \else - \ifx\codedashprev\codedash + \ifx\codedashprev\codedash \else \discretionary{}{}{}\fi \fi % we need the space after the = for the case when \next itself is a @@ -3003,7 +3003,7 @@ end % For pdfTeX and LuaTeX \ifurefurlonlylink % PDF plus option to not display url, show just arg - \unhbox0 + \unhbox0 \else % PDF, normally display both arg and url for consistency, % visibility, if the pdf is eventually used to print, etc. @@ -3016,7 +3016,7 @@ end % For XeTeX \ifurefurlonlylink % PDF plus option to not display url, show just arg - \unhbox0 + \unhbox0 \else % PDF, normally display both arg and url for consistency, % visibility, if the pdf is eventually used to print, etc. @@ -3074,10 +3074,10 @@ end } } -% By default we'll break after the special characters, but some people like to -% break before the special chars, so allow that. Also allow no breaking at +% By default we'll break after the special characters, but some people like to +% break before the special chars, so allow that. Also allow no breaking at % all, for manual control. -% +% \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone @@ -3095,7 +3095,7 @@ end \def\wordbefore{before} \def\wordnone{none} -% Allow a ragged right output to aid breaking long URL's. Putting stretch in +% Allow a ragged right output to aid breaking long URL's. Putting stretch in % between characters of the URL doesn't look good. \def\urefallowbreak{% \hskip 0pt plus 4 em\relax @@ -3299,7 +3299,7 @@ end % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. -% +% \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} @@ -3307,7 +3307,7 @@ end \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } -% +% % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if % FMTNAME is tex, else ELSE-TEXT. \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish} @@ -3323,7 +3323,7 @@ end % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. -% +% \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% @@ -3600,7 +3600,7 @@ end % for non-CM glyphs. That is ec* for regular text and tc* for the text % companion symbols (LaTeX TS1 encoding). Both are part of the ec % package and follow the same conventions. -% +% \def\ecfont{\etcfont{e}} \def\tcfont{\etcfont{t}} % @@ -3672,7 +3672,7 @@ end after the title page.}}% \def\setshortcontentsaftertitlepage{% \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo - command; move your @shortcontents and @contents commands if you + command; move your @shortcontents and @contents commands if you want the contents after the title page.}}% \parseargdef\shorttitlepage{% @@ -3727,7 +3727,7 @@ end % don't worry much about spacing, ragged right. This should be used % inside a \vbox, and fonts need to be set appropriately first. \par should % be specified before the end of the \vbox, since a vbox is a group. -% +% \def\raggedtitlesettings{% \rm \hyphenpenalty=10000 @@ -4350,7 +4350,7 @@ end } % multitable-only commands. -% +% % @headitem starts a heading row, which we typeset in bold. Assignments % have to be global since we are inside the implicit group of an % alignment entry. \everycr below resets \everytab so we don't have to @@ -4669,7 +4669,7 @@ end % Like \expandablevalue, but completely expandable (the \message in the % definition above operates at the execution level of TeX). Used when % writing to auxiliary files, due to the expansion that \write does. -% If flag is undefined, pass through an unexpanded @value command: maybe it +% If flag is undefined, pass through an unexpanded @value command: maybe it % will be set by the time it is read back in. % % NB flag names containing - or _ may not work here. @@ -4693,7 +4693,7 @@ end % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. -% +% % To get the special treatment we need for `@end ifset,' we call % \makecond and then redefine. % @@ -4726,7 +4726,7 @@ end % without the @) is in fact defined. We can only feasibly check at the % TeX level, so something like `mathcode' is going to considered % defined even though it is not a Texinfo command. -% +% \makecond{ifcommanddefined} \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} % @@ -4834,8 +4834,8 @@ end \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} - -% Used for the aux, toc and index files to prevent expansion of Texinfo + +% Used for the aux, toc and index files to prevent expansion of Texinfo % commands. % \def\atdummies{% @@ -5180,7 +5180,7 @@ end } \def\defglyph#1#2{\def#1##1{#2}} % see above - + % #1 is the index name, #2 is the entry text. @@ -5207,7 +5207,7 @@ end \ifx\suffix\indexisfl\def\suffix{f1}\fi % Open the file \immediate\openout\csname#1indfile\endcsname \jobname.\suffix - % Using \immediate above here prevents an object entering into the current + % Using \immediate above here prevents an object entering into the current % box, which could confound checks such as those in \safewhatsit for % preceding skips. \typeout{Writing index file \jobname.\suffix}% @@ -5259,7 +5259,7 @@ end \ifx\segment\isfinish \else % - % Fully expand the segment, throwing away any @sortas directives, and + % Fully expand the segment, throwing away any @sortas directives, and % trim spaces. \edef\trimmed{\segment}% \edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}% @@ -5317,12 +5317,12 @@ end % the current value of \escapechar. \def\escapeisbackslash{\escapechar=`\\} -% Use \ in index files by default. texi2dvi didn't support @ as the escape -% character (as it checked for "\entry" in the files, and not "@entry"). When -% the new version of texi2dvi has had a chance to become more prevalent, then -% the escape character can change back to @ again. This should be an easy -% change to make now because both @ and \ are only used as escape characters in -% index files, never standing for themselves. +% Use \ in index files by default. texi2dvi didn't support @ as the escape +% character (as it checked for "\entry" in the files, and not "@entry"). When +% the new version of texi2dvi has had a chance to become more prevalent, then +% the escape character can change back to @ again. This should be an easy +% change to make now because both @ and \ are only used as escape characters in +% index files, never standing for themselves. % \set txiindexescapeisbackslash @@ -5342,7 +5342,7 @@ end \def\}{\rbracechar{}}% \uccode`\~=`\\ \uppercase{\def~{\backslashchar{}}}% % - % Split the entry into primary entry and any subentries, and get the index + % Split the entry into primary entry and any subentries, and get the index % sort key. \splitindexentry\indextext % @@ -5523,18 +5523,18 @@ end \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1 \expandafter\ifx\csname SETtxiskipindexfileswithbackslash\endcsname\relax \errmessage{% -ERROR: A sorted index file in an obsolete format was skipped. +ERROR: A sorted index file in an obsolete format was skipped. To fix this problem, please upgrade your version of 'texi2dvi' or 'texi2pdf' to that at . -If you are using an old version of 'texindex' (part of the Texinfo +If you are using an old version of 'texindex' (part of the Texinfo distribution), you may also need to upgrade to a newer version (at least 6.0). You may be able to typeset the index if you run 'texindex \jobname.\indexname' yourself. -You could also try setting the 'txiindexescapeisbackslash' flag by +You could also try setting the 'txiindexescapeisbackslash' flag by running a command like -'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'. If you do +'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'. If you do this, Texinfo will try to use index files in the old format. -If you continue to have problems, deleting the index files and starting again +If you continue to have problems, deleting the index files and starting again might help (with 'rm \jobname.?? \jobname.??s')% }% \else @@ -5603,7 +5603,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % bottom of a column to reduce an increase in inter-line spacing. \nobreak \vskip 0pt plus 5\baselineskip - \penalty -300 + \penalty -300 \vskip 0pt plus -5\baselineskip % % Typeset the initial. Making this add up to a whole number of @@ -5719,7 +5719,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \advance\dimen@ii by 1\dimen@i \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line \ifdim\dimen@ > 0.8\dimen@ii % due to long index text - % Try to split the text roughly evenly. \dimen@ will be the length of + % Try to split the text roughly evenly. \dimen@ will be the length of % the first line. \dimen@ = 0.7\dimen@ \dimen@ii = \hsize @@ -5927,7 +5927,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \newbox\balancedcolumns \setbox\balancedcolumns=\vbox{shouldnt see this}% % -% Only called for the last of the double column material. \doublecolumnout +% Only called for the last of the double column material. \doublecolumnout % does the others. \def\balancecolumns{% \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120. @@ -5955,7 +5955,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% }% % Now the left column is in box 1, and the right column in box 3. % - % Check whether the left column has come out higher than the page itself. + % Check whether the left column has come out higher than the page itself. % (Note that we have doubled \vsize for the double columns, so % the actual height of the page is 0.5\vsize). \ifdim2\ht1>\vsize @@ -6252,7 +6252,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \let\top\unnumbered % Sections. -% +% \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 @@ -6275,7 +6275,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } % Subsections. -% +% % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% @@ -6300,7 +6300,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } % Subsubsections. -% +% % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% @@ -7358,7 +7358,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @indentedblock is like @quotation, but indents only on the left and % has no optional argument. -% +% \makedispenvdef{indentedblock}{\indentedblockstart} % \def\indentedblockstart{% @@ -7658,7 +7658,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. -% +% \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword @@ -7677,8 +7677,8 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \dosubind {index}{topic}{subtopic} % % If SUBTOPIC is present, precede it with a space, and call \doind. -% (At some time during the 20th century, this made a two-level entry in an -% index such as the operation index. Nobody seemed to notice the change in +% (At some time during the 20th century, this made a two-level entry in an +% index such as the operation index. Nobody seemed to notice the change in % behaviour though.) \def\dosubind#1#2#3{% \def\thirdarg{#3}% @@ -7853,7 +7853,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: - \hfil\vadjust{\nobreak}\break + \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi @@ -8000,7 +8000,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \scantokens{#1@comment}% % % The \comment is to remove the \newlinechar added by \scantokens, and - % can be noticed by \parsearg. Note \c isn't used because this means cedilla + % can be noticed by \parsearg. Note \c isn't used because this means cedilla % in math mode. } @@ -8201,7 +8201,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % list to some hook where the argument is to be expanded. If there are % less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be -% defined `a la TeX in the macro body. +% defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % @@ -8232,8 +8232,8 @@ might help (with 'rm \jobname.?? \jobname.??s')% % % Read recursive and nonrecursive macro bodies. (They're different since % rec and nonrec macros end differently.) -% -% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro +% +% 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. % @@ -8267,7 +8267,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % twice the \macarg.BLAH macros does not cost too much processing power. \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax - \else + \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa @@ -8352,7 +8352,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Replace arguments by their values in the macro body, and place the result % in macro \@tempa. -% +% \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument @@ -8376,9 +8376,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } -% Define the named-macro outside of this group and then close this group. -% -\def\macargexpandinbody@{% +% Define the named-macro outside of this group and then close this group. +% +\def\macargexpandinbody@{% \expandafter \endgroup \macargdeflist@ @@ -8416,7 +8416,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } % Trailing missing arguments are set to empty. -% +% \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ @@ -8493,7 +8493,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \else % at most 9 \ifnum\paramno<10\relax % @MACNAME sets the context for reading the macro argument - % @MACNAME@@ gets the argument, processes backslashes and appends a + % @MACNAME@@ gets the argument, processes backslashes and appends a % comma. % @MACNAME@@@ removes braces surrounding the argument list. % @MACNAME@@@@ scans the macro body with arguments substituted. @@ -8537,11 +8537,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Call #1 with a list of tokens #2, with any doubled backslashes in #2 % compressed to one. % -% This implementation works by expansion, and not execution (so we cannot use -% \def or similar). This reduces the risk of this failing in contexts where -% complete expansion is done with no execution (for example, in writing out to +% This implementation works by expansion, and not execution (so we cannot use +% \def or similar). This reduces the risk of this failing in contexts where +% complete expansion is done with no execution (for example, in writing out to % an auxiliary file for an index entry). -% +% % State is kept in the input stream: the argument passed to % @look_ahead, @gobble_and_check_finish and @add_segment is % @@ -8563,11 +8563,11 @@ might help (with 'rm \jobname.?? \jobname.??s')% % #3 - NEXT_TOKEN % #4 used to look ahead % -% If the next token is not a backslash, process the rest of the argument; +% If the next token is not a backslash, process the rest of the argument; % otherwise, remove the next token. @gdef@look_ahead#1!#2#3#4{% @ifx#4\% - @expandafter@gobble_and_check_finish + @expandafter@gobble_and_check_finish @else @expandafter@add_segment @fi#1!{#2}#4#4% @@ -8591,9 +8591,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% % #3 - NEXT_TOKEN % #4 is input stream until next backslash % -% Input stream is either at the start of the argument, or just after a -% backslash sequence, either a lone backslash, or a doubled backslash. -% NEXT_TOKEN contains the first token in the input stream: if it is \finish, +% Input stream is either at the start of the argument, or just after a +% backslash sequence, either a lone backslash, or a doubled backslash. +% NEXT_TOKEN contains the first token in the input stream: if it is \finish, % finish; otherwise, append to ARG_RESULT the segment of the argument up until % the next backslash. PENDING_BACKSLASH contains a backslash to represent % a backslash just before the start of the input stream that has not been @@ -8605,13 +8605,13 @@ might help (with 'rm \jobname.?? \jobname.??s')% % append the pending backslash to the result, followed by the next segment @expandafter@is_fi@look_ahead#1#2#4!{\}@fi % this @fi is discarded by @look_ahead. - % we can't get rid of it with \expandafter because we don't know how + % we can't get rid of it with \expandafter because we don't know how % long #4 is. } % #1 - THE_MACRO % #2 - ARG_RESULT -% #3 discards the res of the conditional in @add_segment, and @is_fi ends the +% #3 discards the res of the conditional in @add_segment, and @is_fi ends the % conditional. @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} @@ -8623,7 +8623,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % for reading the argument (slightly different in the two cases). Then, % to read the argument, in the whole-line case, it then calls the regular % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. -% +% \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup @@ -8677,7 +8677,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % Used so that the @top node doesn't have to be wrapped in an @ifnottex % conditional. -% \doignore goes to more effort to skip nested conditionals but we don't need +% \doignore goes to more effort to skip nested conditionals but we don't need % that here. \def\omittopnode{% \ifx\lastnode\wordTop @@ -8685,7 +8685,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% } \def\wordTop{Top} -% Until the next @node or @bye command, divert output to a box that is not +% Until the next @node or @bye command, divert output to a box that is not % output. \def\ignorenode{\setbox\dummybox\vbox\bgroup\def\node{\egroup\node}% \ignorenodebye @@ -8752,7 +8752,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. -% +% \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword @@ -8768,7 +8768,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi\fi } -% +% % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed @@ -8921,24 +8921,24 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi \else % node/anchor (non-float) references. - % + % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. - % + % \ifdim \wd\printedmanualbox > 0pt % Cross-manual reference with a printed manual name. - % + % \crossmanualxref{\cite{\printedmanual\unskip}}% % \else\ifdim \wd\infofilenamebox > 0pt % Cross-manual reference with only an info filename (arg 4), no % printed manual name (arg 5). This is essentially the same as % the case above; we output the filename, since we have nothing else. - % + % \crossmanualxref{\code{\infofilename\unskip}}% % \else @@ -8978,20 +8978,20 @@ might help (with 'rm \jobname.?? \jobname.??s')% \endgroup} % Output a cross-manual xref to #1. Used just above (twice). -% +% % Only include the text "Section ``foo'' in" if the foo is neither % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply % "see The Foo Manual", the idea being to refer to the whole manual. -% +% % But, this being TeX, we can't easily compare our node name against the % string "Top" while ignoring the possible spaces before and after in % the input. By adding the arbitrary 7sp below, we make it much less % likely that a real node name would have the same width as "Top" (e.g., % in a monospaced font). Hopefully it will never happen in practice. -% +% % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. -% +% \def\crossmanualxref#1{% \setbox\toprefbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% @@ -9038,7 +9038,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% \fi\fi\fi } -% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX +% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX % is output afterwards if non-empty. \def\refx#1#2{% \requireauxfile @@ -9070,9 +9070,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% #2% Output the suffix in any case. } -% This is the macro invoked by entries in the aux file. Define a control -% sequence for a cross-reference target (we prepend XR to the control sequence -% name to avoid collisions). The value is the page number. If this is a float +% This is the macro invoked by entries in the aux file. Define a control +% sequence for a cross-reference target (we prepend XR to the control sequence +% name to avoid collisions). The value is the page number. If this is a float % type, we have more work to do. % \def\xrdef#1#2{% @@ -9088,10 +9088,10 @@ might help (with 'rm \jobname.?? \jobname.??s')% \bgroup \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% \egroup - % We put the \gdef inside a group to avoid the definitions building up on - % TeX's save stack, which can cause it to run out of space for aux files with + % We put the \gdef inside a group to avoid the definitions building up on + % TeX's save stack, which can cause it to run out of space for aux files with % thousands of lines. \gdef doesn't use the save stack, but \csname does - % when it defines an unknown control sequence as \relax. + % when it defines an unknown control sequence as \relax. % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname @@ -9450,7 +9450,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% % \ifimagevmode \medskip % space after a standalone image - \fi + \fi \ifx\centersub\centerV \egroup \fi \endgroup} @@ -10281,7 +10281,7 @@ directory should work if nowhere else does.} \uppercase{.} \endgroup \else - \errhelp = \EMsimple + \errhelp = \EMsimple \errmessage{Unicode character U+#1 not supported, sorry}% \fi \else @@ -10314,7 +10314,7 @@ 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. % @@ -10326,7 +10326,7 @@ directory should work if nowhere else does.} \expandafter\expandafter \expandafter\expandafter \expandafter\gdef \UTFviiiTmp{#2}% - % + % \expandafter\ifx\csname uni:#1\endcsname \relax \else \message{Internal error, already defined: #1}% \fi @@ -10365,7 +10365,7 @@ directory should work if nowhere else does.} \divide\countUTFz by 64 \countUTFy = \countUTFz % Save to be the future value of \countUTFz. \multiply\countUTFz by 64 - + % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract % in order to get the last five bits. \advance\countUTFx by -\countUTFz @@ -10400,7 +10400,7 @@ directory should work if nowhere else does.} % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B -% +% % Many of our renditions are less than wonderful, and all the missing % characters are available somewhere. Loading the necessary fonts % awaits user request. We can't truly support Unicode without @@ -11438,9 +11438,9 @@ directory should work if nowhere else does.} \def\texinfochars{% \let< = \activeless \let> = \activegtr - \let~ = \activetilde + \let~ = \activetilde \let^ = \activehat - \markupsetuplqdefault \markupsetuprqdefault + \markupsetuplqdefault \markupsetuprqdefault \let\b = \strong \let\i = \smartitalic % in principle, all other definitions in \tex have to be undone too. diff --git a/doc/maintain.texi b/doc/maintain.texi index a83585903e..d25acb9021 100644 --- a/doc/maintain.texi +++ b/doc/maintain.texi @@ -5,7 +5,7 @@ @c For double-sided printing, uncomment: @c @setchapternewpage odd @c This date is automagically updated when you save this file: -@set lastupdate April 28, 2019 +@set lastupdate August 14, 2019 @c %**end of header @documentencoding UTF-8 @@ -130,7 +130,6 @@ thing.'' This release of the GNU Maintainer Information was last updated @value{lastupdate}. - @node Getting Help @chapter Getting Help @cindex help, getting @@ -182,10 +181,13 @@ The directory @file{/gd/gnuorg} mentioned throughout this document is available on the general GNU server, currently @code{fencepost.gnu.org}. If you are the maintainer of a GNU package, you should have an account there. If you don't have one already, see -@url{https://www.gnu.org/software/README.accounts.html}. You can also -ask for accounts for people who significantly help you in working on -the package. Such GNU login accounts include email -(see @url{https://www.fsf.org/about/systems/sending-mail-via-fencepost}). +@url{https://www.gnu.org/software/README.accounts.html}. Such GNU +login accounts include email (see +@url{https://www.fsf.org/about/systems/sending-mail-via-fencepost}). + +You can request for accounts for people who significantly help you in +working on the package; we will do this in special cases when there is +a good reason. @end macro @gdgnuorgtext{} @@ -458,6 +460,18 @@ an assignment for a new separate program or manual, unless it is quite small, but a disclaimer is acceptable if the contributor insists on handling the matter that way. +When a copyright holder has signed an assignment for all future +changes to the package, and contributes a change made up of new files +which require no change to any of the old files, we want to avoid any +uncertainty about whether these files are intended as a change to the +package and thus covered by that assignment. The way to do this is to +ask the contributor to say so in a message to you --- for instance, +``My modules `frog' and `kangaroo' are intended as changes to the +program Hoppers.'' Forward the message to @email{assign@@gnu.org}, +who will save it permanently. A variation on this procedure: the +contributor who wrote the new files can send copies of the new files +which contain such a message. + If a contributor wants the FSF to publish only a pseudonym, that is ok. The contributor should say this, and state the desired pseudonym, when answering the @file{request-} form. The actual legal papers will @@ -786,6 +800,7 @@ please write @email{licensing@@gnu.org}. * Canonical: Canonical License Sources. * Code: License Notices for Code. * Documentation: License Notices for Documentation. +* Examples: License Notices for Code Examples. * Other: License Notices for Other Files. @end menu @@ -972,6 +987,19 @@ section@tie{}6). However, the printed (@samp{.dvi}, @samp{.pdf}, set up to be printed and published only together. Therefore, it is usually simplest to include the GFDL in each manual. +@node License Notices for Code Examples +@subsection License Notices for Code Examples + +When a code example in documentation is more than two or three lines, +and specific enough that people might want to copy and adapt it, we +suggest putting a copy of the example in a file of code and releasing +that under some free software license. That means it will be +released under two different licenses: in the manual under the GFDL, +and in the code example file under a software license. + +If the example is important and nontrivial, and 40 lines or more, we +suggest releasing the code copy under the same license as the program +it pertains to. Otherwise, we recommend releasing it under the X11 license. @node License Notices for Other Files @subsection License Notices for Other Files diff --git a/doc/standards.texi b/doc/standards.texi index 12d995d6c2..6653cfb82b 100644 --- a/doc/standards.texi +++ b/doc/standards.texi @@ -3,7 +3,7 @@ @setfilename standards.info @settitle GNU Coding Standards @c This date is automagically updated when you save this file: -@set lastupdate April 28, 2019 +@set lastupdate August 9, 2019 @c %**end of header @dircategory GNU organization @@ -531,6 +531,8 @@ command line interface, and how libraries should behave. * Libraries:: Library behavior. * Errors:: Formatting error messages. * User Interfaces:: Standards about interfaces generally. +* Finding Program Files:: How to find the program's executable + and other files that go with it. * Graphical Interfaces:: Standards for graphical interfaces. * Command-Line Interfaces:: Standards for command line interfaces. * Dynamic Plug-In Interfaces:: Standards for dynamic plug-in interfaces. @@ -815,13 +817,16 @@ end with a period. @cindex program name and its behavior @cindex behavior, dependent on program's name -Please don't make the behavior of a utility depend on the name used -to invoke it. It is useful sometimes to make a link to a utility -with a different name, and that should not change what it does. +Please don't make the behavior of a utility depend on the name used to +invoke it. It is useful sometimes to make a link to a utility with a +different name, and that should not change what it does. Thus, if you +make @file{foo} a link to @file{ls}, the program should behave the +same regardless of which of those names is used to invoke it. Instead, use a run time option or a compilation switch or both to select among the alternate behaviors. You can also build two versions -of the program, with different names and different default behaviors. +of the program, with different default behaviors, and install them +under two different names. @cindex output device and program's behavior Likewise, please don't make the behavior of a command-line program @@ -854,6 +859,72 @@ output device type. For example, we provide a @code{dir} program much like @code{ls} except that its default output format is always multi-column format. +@node Finding Program Files +@section Finding the Program's Executable and Associated Files + +A program may need to find the executable file it was started with, so +as to relaunch the same program. It may need to find associated +files, either source files or files constructed by building, that +it uses at run time. + +The way to find them starts with looking at @code{argv[0]}. + +If that string contains a slash, it is by convention the file name of +the executable and its directory part is the directory that contained +the executable. This is the case when the program was not found +through @env{PATH}, which normally means it was built but not +installed, and run from the build directory. The program can use the +@code{argv[0]} file name to relaunch itself, and can look in its +directory part for associated files. If that file name is not +absolute, then it is relative to the working directory in which the +program started. + +If @code{argv[0]} does not contain a slash, it is a command name whose +executable was found via @env{PATH}. The program should search for +that name in the directories in @env{PATH}, interpreting @file{.} as +the working directory that was current when the program started. + +If this procedure finds the executable, we call the directory it was +found in the @dfn{iinvocation directory}. The program should check +for the presence in that directory of the associated files it needs. + +If the program's executable is normally built in a subdirectory of the +main build directory, and the main build directory contains associated +files (perhaps including subdirectories), the program should look at +the parent of the invocation directory, checking for the associated +files and subdirectories the main build directory should contain. + +If the invocation directory doesn't contain what's needed, but the +executable file name is a symbolic link, the program should try using +the link target's containing directory as the invocation directory. + +If this procedure doesn't come up with an invocation directory that is +valid---normally the case for an installed program that was found via +@env{PATH}---the program should look for the associated files in the +directories where the program's makefile installs them. +@xref{Directory Variables}. + +Providing valid information in @code{argv[0]} is a convention, not +guaranteed. Well-behaved programs that launch other programs, such as +shells, follow the convention; your code should follow it too, when +launching other programs. But it is always possible to launch the +program and give a nonsensical value in @code{argv[0]}. + +Therefore, any program that needs to know the location of its +executable, or that of of other associated files, should offer the +user environment variables to specify those locations explicitly. + +@strong{Don't give special privilege, such as with the @code{setuid} +bit, to programs that will search heuristically for associated files +or for their own executables when invoked that way.} Limit that +privilege to programs that find associated files in hard-coded +installed locations such as under @file{/usr} and @file{/etc}. + +@c ??? Is even that safe, in a setuid program? + +@xref{Bourne Shell Variables,,, Bash, Bash Reference Manual}, +for more information about @env{PATH}. + @node Graphical Interfaces @section Standards for Graphical Interfaces @cindex graphical user interface @@ -3320,8 +3391,8 @@ reference points. Decades from now, all but old folks will have very different cultural reference points; many things that "everyone knows about" today may be mostly forgotten. -For this reason, try to avoid writing in a way that crucially depends on -cultural reference points for understanding, or that refers to them in +For this reason, try to avoid writing in a way that depends on +cultural reference points for proper understanding, or that refers to them in ways that would impede reading for someone that doesn't recognize them. Likewise, be conservative in your choice of words (aside from technical @@ -3334,6 +3405,12 @@ localized reference points or facts, if it is directly pertinent or as an aside. Changing these few things (which in any case stand out) when they no longer make sense will not be a lot of work. +By contrast, it is always proper to refer to concepts of GNU and the +free software movement, when they are pertinent. These are a central +part of our message, so we should take advantage of opportunities to +mention them. They are fundamental moral positions, so they will +rarely if ever change. + Programmers tend to carry over the structure of the program as the structure for its documentation. But this structure is not necessarily good for explaining how to use the program; it may be @@ -4201,7 +4278,7 @@ ethical problem, and our aim is to put an end to that problem. We can't stop some people from writing proprietary programs, or stop other people from using them, but we can and should refuse to advertise them to new potential customers, or to give the public the -idea that their existence is ethical. +impression that their existence is legitimate. The GNU definition of free software is found on the GNU web site at @url{https://www.gnu.org/@/philosophy/@/free-sw.html}, and the definition @@ -4220,7 +4297,8 @@ passing---that is harmless, since users who might want to use it probably already know about it. For instance, it is fine to explain how to build your package on top of some widely used non-free operating system, or how to use it together with some widely used -non-free program. +non-free program, after first explaining how to use it on the GNU +system. However, you should give only the necessary information to help those who already use the non-free program to use your program with @@ -4233,6 +4311,11 @@ program with it, while people who don't already use the proprietary program will not see anything likely to lead them to take an interest in it. +You shouldn't recommend any non-free add-ons for the non-free program, +but it is ok to mention free add-ons that help it to work with your +program, and how to install the free add-ons even if that requires +running some non-free program. + If a non-free program or system is obscure in your program's domain, your program should not mention or support it at all, since doing so would tend to popularize the non-free program more than it popularizes @@ -4241,17 +4324,18 @@ program among the users of Foobar, if the existence of Foobar is not generally known among people who might want to use your program.) Sometimes a program is free software in itself but depends on a -non-free platform in order to run. For instance, many Java programs -depend on some non-free Java libraries. To recommend or promote such -a program is to promote the other programs it needs. This is why we -are careful about listing Java programs in the Free Software -Directory: we don't want to promote the non-free Java libraries. - -We hope this particular problem with Java will be gone by and by, as -we replace the remaining non-free standard Java libraries with free -software, but the general principle will remain the same: don't -recommend, promote or legitimize programs that depend on non-free -software to run. +non-free platform in order to run. For instance, it used to be the +case that many Java programs depended on some non-free Java libraries. +(See @uref{https://www.gnu.org/philosophy/java-trap.html}.) +To recommend or promote such a program is to promote the other +programs it needs; therefore, judge mentions of the former as if they +were mentions of the latter. For this reason, we were careful about +listing Java programs in the Free Software Directory: we wanted to +avoid promoting the non-free Java libraries. + +Java no longer has this problem, but the general principle will remain +the same: don't recommend, promote or legitimize programs that depend +on non-free software to run. Some free programs strongly encourage the use of non-free software. A typical example is @command{mplayer}. It is free software in itself, @@ -4285,25 +4369,25 @@ program is promoting that program, so please do not make links to (or mention by name) web sites that contain such material. This policy is relevant particularly for the web pages for a GNU package. -Following links from nearly any web site can lead eventually to -non-free software; this is inherent in the nature of the web. So it -makes no sense to criticize a site for having such links. As long as -the site does not itself recommend a non-free program, there is no -need to consider the question of the sites that it links to for other -reasons. - -Thus, for example, you should not refer to AT&T's web site if that -recommends AT&T's non-free software packages; you should not refer to -a page @var{p} that links to AT&T's site presenting it as a place to get -some non-free program, because that part of the page @var{p} itself -recommends and legitimizes the non-free program. However, that @var{p} -contains a link to AT&T's web site for some other purpose (such as -long-distance telephone service) is not an objection against it. - -A web page recommends a program in a particularly strong way if it -requires users to run that program in order to use the page. Many -pages contain Javascript code which they recommend in this way. This -Javascript code may be free or nonfree, but nonfree is the usual case. +What about chains of links? Following links from nearly any web site +can lead eventually to promotion of non-free software; this is +inherent in the nature of the web. Here's how we treat that. + +You should not refer to AT&T's web site if that recommends AT&T's +non-free software packages; you should not refer to a page @var{p} +that links to AT&T's site presenting it as a place to get some +non-free program, because that part of the page @var{p} itself +recommends and legitimizes the non-free program. + +However, if @var{p} contains a link to AT&T's web site for some other +purpose (such as long-distance telephone service), that is no reason +you should not link to @var{p}. + +A web page recommends a program in an implicit but particularly strong +way if it requires users to run that program in order to use the page. +Many pages contain Javascript code which they recommend in this way. +This Javascript code may be free or nonfree, but nonfree is the usual +case. If the purpose for which you would refer to the page cannot be carried out without running nonfree Javascript code, then you should not refer diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 9004ce809e..99fbb26ecb 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -1311,7 +1311,6 @@ re_node_set_insert (re_node_set *set, Idx elem) first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { - idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } @@ -1716,15 +1715,19 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, { if (newstate->entrance_nodes == &newstate->nodes) { - newstate->entrance_nodes = re_malloc (re_node_set, 1); - if (__glibc_unlikely (newstate->entrance_nodes == NULL)) + re_node_set *entrance_nodes = re_malloc (re_node_set, 1); + if (__glibc_unlikely (entrance_nodes == NULL)) { free_state (newstate); return NULL; } + newstate->entrance_nodes = entrance_nodes; if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) - return NULL; + { + free_state (newstate); + return NULL; + } nctx_nodes = 0; newstate->has_constraint = 1; } -- 2.39.5