Bump to m4 1.4.19
[platform/upstream/m4.git] / doc / m4.texi
index bc50533..94ac851 100644 (file)
@@ -4,6 +4,9 @@
 @setfilename m4.info
 @include version.texi
 @settitle GNU M4 @value{VERSION} macro processor
+@documentencoding UTF-8
+@set txicodequoteundirected
+@set txicodequotebacktick
 @setchapternewpage odd
 @finalout
 
@@ -40,8 +43,8 @@ This manual (@value{UPDATED}) is for GNU M4 (version
 @value{VERSION}), a package containing an implementation of the m4 macro
 language.
 
-Copyright @copyright{} 1989-1994, 2004-2014, 2016 Free Software
-Foundation, Inc.
+Copyright @copyright{} 1989--1994, 2004--2014, 2016--2017, 2020--2021
+Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -352,12 +355,13 @@ language being processed.  Techniques such as conditional and recursive
 macros, and using macros to define other macros, were described by Doug
 McIlroy of Bell Labs in ``Macro Instruction Extensions of Compiler
 Languages'', @emph{Communications of the ACM} 3, 4 (1960), 214--20,
-@url{http://dx.doi.org/10.1145/367177.367223}.
+@url{https://dl.acm.org/doi/10.1145/367177.367223}.
 
 An important precursor of @code{m4} was GPM; see C. Strachey,
 @c The title uses lower case and has no space between "macro" and "generator".
 ``A general purpose macrogenerator'', @emph{Computer Journal} 8, 3
-(1965), 225--41, @url{http://dx.doi.org/10.1093/comjnl/8.3.225}.  GPM is
+(1965), 225--41,
+@url{https://academic.oup.com/comjnl/article/8/3/225/336044}.  GPM is
 also succinctly described in David Gries's book @emph{Compiler
 Construction for Digital Computers}, Wiley (1971).  Strachey was a
 brilliant programmer: GPM fit into 250 machine instructions!
@@ -380,7 +384,7 @@ macro-processor language, which inspired Dennis Ritchie to write
 
 Kernighan and Ritchie then joined forces to develop the original
 @code{m4}, described in ``The M4 Macro Processor'', Bell Laboratories
-(1977), @url{http://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf}.
+(1977), @url{https://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf}.
 It had only 21 builtin macros.
 
 While @code{GPM} was more @emph{pure}, @code{m4} is meant to deal with
@@ -788,7 +792,7 @@ System V version.  @xref{Compatibility}, for a list of these.
 @itemx --hashsize=@var{num}
 Make the internal hash table for symbol lookup be @var{num} entries big.
 For better performance, the number should be prime, but this is not
-checked.  The default is 509 entries.  It should not be necessary to
+checked.  The default is 65537 entries.  It should not be necessary to
 increase this value, unless you define an excessive number of macros.
 
 @item -L @var{num}
@@ -1210,9 +1214,9 @@ round of scanning for the tokens @samp{Result}, @samp{@w{ }},
 
 As a more complicated example, we will contrast an actual code
 example from the Gnulib project@footnote{Derived from a patch in
-@uref{http://lists.gnu.org/archive/html/bug-gnulib/@/2007-01/@/msg00389.html},
+@uref{https://lists.gnu.org/archive/html/bug-gnulib/@/2007-01/@/msg00389.html},
 and a followup patch in
-@uref{http://lists.gnu.org/archive/html/bug-gnulib/@/2007-02/@/msg00000.html}},
+@uref{https://lists.gnu.org/archive/html/bug-gnulib/@/2007-02/@/msg00000.html}},
 showing both a buggy approach and the desired results.  The user desires
 to output a shell assignment statement that takes its argument and turns
 it into a shell variable by converting it to uppercase and prepending a
@@ -4242,23 +4246,19 @@ foo
 @result{}Macro foo.
 @end example
 
-The quotation strings can safely contain eight-bit characters.
-@ignore
-@comment Yuck.  I know of no clean way to render an 8-bit character in
-@comment both info and dvi.  This example uses the `open-guillemot' and
-@comment `close-guillemot' characters of the Latin-1 character set.
+The quotation strings can safely contain non-@sc{ascii} characters.
 
 @example
 define(`a', `b')
 @result{}
-«a»
-@result{}«b»
-changequote(`«', `»')
+«a»
+@result{}«b»
+changequote(`«', `»')
 @result{}
-«a»
+«a»
 @result{}a
 @end example
-@end ignore
+
 If no single character is appropriate, @var{start} and @var{end} can be
 of any length.  Other implementations cap the delimiter length to five
 characters, but GNU has no inherent limit.
@@ -4521,23 +4521,19 @@ changecom(`#', `')
 @result{}# comment again
 @end example
 
-The comment strings can safely contain eight-bit characters.
-@ignore
-@comment Yuck.  I know of no clean way to render an 8-bit character in
-@comment both info and dvi.  This example uses the `open-guillemot' and
-@comment `close-guillemot' characters of the Latin-1 character set.
+The comment strings can safely contain non-@sc{ascii} characters.
 
 @example
 define(`a', `b')
 @result{}
-«a»
-@result{}«b»
-changecom(`«', `»')
+«a»
+@result{}«b»
+changecom(`«', `»')
 @result{}
-«a»
-@result{}«a»
+«a»
+@result{}«a»
 @end example
-@end ignore
+
 If no single character is appropriate, @var{start} and @var{end} can be
 of any length.  Other implementations cap the delimiter length to five
 characters, but GNU has no inherent limit.
@@ -5705,7 +5701,7 @@ Manual}.
 @end ifnothtml
 @ifhtml
 See
-@uref{http://www.gnu.org/@/software/@/emacs/@/manual/@/emacs.html#Regexps,
+@uref{https://www.gnu.org/@/software/@/emacs/@/manual/@/emacs.html#Regexps,
 Syntax of Regular Expressions} in the GNU Emacs Manual.
 @end ifhtml
 Support for ERE, Extended Regular Expressions is not
@@ -5865,10 +5861,11 @@ resulting @samp{b} is not further remapped to @samp{g}; the @samp{d} and
 
 @ignore
 @comment No need to fight 8-bit characters, as it is difficult to get
-@comment rendering right in both info and dvi.
+@comment rendering right in both info and dvi, and examples like this
+@comment do not work correctly with UTF-8 anyway since m4 is byte-oriented.
 
 @example
-translit(`«abc~', `~-»')
+translit(`«abc~', `~-»')
 @result{}abc
 @end example
 
@@ -6748,14 +6745,22 @@ signal number shifted left by eight bits.
 @comment systems where /bin/sh does not create its own process group.
 @comment And PIPE is unreliable, since people tend to run with it
 @comment ignored, with m4 inheriting that choice.  That leaves KILL as
-@comment the only signal we can reliably test.
+@comment the only signal we can reliably test, but even that is tricky:
+@comment on Haiku, 'kill -9' actually causes a process to die with
+@comment signal 15 named KILLTHR on that platform.
 @example
 dnl This test assumes kill is a shell builtin, and that signals are
 dnl recognizable.
 ifdef(`__unix__', ,
       `errprint(` skipping: syscmd does not have unix semantics
 ')m4exit(`77')')dnl
-syscmd(`kill -9 $$')
+changequote(`[', `]')
+@result{}
+syscmd([/bin/sh -c 'kill -9 $$'; st=$?; test $st = 137 || test $st = 265])
+@result{}
+ifelse(sysval, [0], , [errprint([ skipping: shell does not send signal 9
+])m4exit([77])])dnl
+syscmd([kill -9 $$])
 @result{}
 sysval
 @result{}2304
@@ -6763,7 +6768,7 @@ syscmd()
 @result{}
 sysval
 @result{}0
-esyscmd(`kill -9 $$')
+esyscmd([kill -9 $$])
 @result{}
 sysval
 @result{}2304
@@ -7356,7 +7361,7 @@ POSIX is under development and includes several proposals for
 modifying what @code{m4} is required to do.  The requirements for
 @code{m4} are shared between SUSv3 and POSIX, and
 can be viewed at
-@uref{http://www.opengroup.org/onlinepubs/@/000095399/@/utilities/@/m4.html}.
+@uref{https://www.opengroup.org/onlinepubs/@/000095399/@/utilities/@/m4.html}.
 
 @menu
 * Extensions::                  Extensions in GNU M4
@@ -8744,7 +8749,7 @@ macro is introduced the first time.
 @bye
 
 @c Local Variables:
-@c coding: iso-8859-1
+@c coding: utf-8
 @c fill-column: 72
 @c ispell-local-dictionary: "american"
 @c indent-tabs-mode: nil