CVSROOT:        /sources/m4
Module name:    m4
Branch:         branch-1_4
Changes by:     Eric Blake <ericb>      06/11/13 19:10:57

Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.1.1.1.2.100
retrieving revision 1.1.1.1.2.101
diff -u -b -r1.1.1.1.2.100 -r1.1.1.1.2.101
--- doc/m4.texinfo      11 Nov 2006 12:54:46 -0000      1.1.1.1.2.100
+++ doc/m4.texinfo      13 Nov 2006 19:10:56 -0000      1.1.1.1.2.101
@@ -3652,20 +3652,6 @@
 f
 m4exit
 @end example
-
[EMAIL PROTECTED] We also need to test allocation overflow.  On 32-bit
[EMAIL PROTECTED] platforms, this should fail outright.  But on 64-bit platforms
[EMAIL PROTECTED] with enough memory, the allocation might succeed (hopefully
[EMAIL PROTECTED] testers don't mind the memory thrashing), so fake the same
[EMAIL PROTECTED] output for test success.
-
[EMAIL PROTECTED]
-divert(eval(`1<<28'))
-divert(`2')
-errprint(__program__`: memory exhausted
-')m4exit(`1')
[EMAIL PROTECTED]: memory exhausted
[EMAIL PROTECTED] example
 @end ignore
 
 @c FIXME: need some explanation here why this is a useful feature, not
@@ -3725,10 +3711,10 @@
 @result{}Wrapped TEXT preceeds diverted text.
 @end example
 
-If output is diverted to a non-existent diversion, it is simply
-discarded.  This can be used to suppress unwanted output.  A common
-example of unwanted output is the trailing newlines after macro
-definitions.  Here is how to avoid them.
+If output is diverted to a negative diversion, it is simply discarded.
+This can be used to suppress unwanted output.  A common example of
+unwanted output is the trailing newlines after macro definitions.  Here
+is a common programming idiom in @code{m4} for avoiding them.
 
 @example
 divert(`-1')
@@ -3738,7 +3724,19 @@
 @result{}
 @end example
 
-This is a common programming idiom in @code{m4}.
[EMAIL PROTECTED] @acronym{GNU} extensions
+Traditional implementations only supported ten diversions.  But as a
[EMAIL PROTECTED] extension, diversion numbers can be as large as positive
+integers will allow, rather than treating a multi-digit diversion number
+as a request to discard text.
+
[EMAIL PROTECTED]
+divert(eval(`1<<28'))world
+divert(`2')hello
+^D
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] example
 
 Note that @code{divert} is an English word, but also an active macro
 without arguments.  When processing plain text, the word might appear in


Reply via email to