m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/doc/m4.texinfo,v


From: Eric Blake
Subject: Changes to m4/doc/m4.texinfo,v
Date: Tue, 07 Nov 2006 19:18:11 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/11/07 19:18:10

Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- doc/m4.texinfo      31 Oct 2006 14:14:18 -0000      1.75
+++ doc/m4.texinfo      7 Nov 2006 19:18:10 -0000       1.76
@@ -5610,13 +5610,15 @@
 @cindex printing error messages
 @cindex error messages, printing
 @cindex messages, printing error
+You can print error messages using @code{errprint}:
+
 @deffn {Builtin (m4)} errprint (@var{message}, @dots{})
-You can print error messages using @code{errprint}, which simply prints
address@hidden and the rest of the arguments on standard error,
-independently of the @option{--debugfile} option (@pxref{Debugging
-options, , Invoking m4}).
+Prints @var{message} and the rest of the arguments to standard error,
+separated by spaces.  Standard error is used, regardless of the
address@hidden option (@pxref{Debugging options, , Invoking m4}).
 
 The expansion of @code{errprint} is void.
+The macro @code{errprint} is recognized only with parameters.
 @end deffn
 
 @example
@@ -5624,11 +5626,20 @@
 ')
 @error{}Illegal arguments to forloop
 @result{}
+errprint(`1')errprint(`2',`3
+')
address@hidden 3
address@hidden
 @end example
 
-A trailing newline is @emph{not} printed automatically, so it must be
-supplied as part of the argument, as in the example.  (BSD flavored
address@hidden's do append a trailing newline on each @code{errprint} call).
+A trailing newline is @emph{not} printed automatically, so it should be
+supplied as part of the argument, as in the example.  Unfortunately, the
+exact output of @code{errprint} is not very portable to other @code{m4}
+implementations: @acronym{POSIX} requires that all arguments be printed,
+but some implementations of @code{m4} only print the first.
+Furthermore, some BSD implementations always append a newline for each
address@hidden call, regardless of whether the last argument already
+had one, and @acronym{POSIX} is silent on whether this is acceptable.
 
 @node Location
 @section Printing current location




reply via email to

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