[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/doc/m4.texinfo,v [branch-1_4]
From: |
Eric Blake |
Subject: |
Changes to m4/doc/m4.texinfo,v [branch-1_4] |
Date: |
Mon, 13 Nov 2006 19:10:58 +0000 |
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
-
address@hidden We also need to test allocation overflow. On 32-bit
address@hidden platforms, this should fail outright. But on 64-bit platforms
address@hidden with enough memory, the allocation might succeed (hopefully
address@hidden testers don't mind the memory thrashing), so fake the same
address@hidden output for test success.
-
address@hidden
-divert(eval(`1<<28'))
-divert(`2')
-errprint(__program__`: memory exhausted
-')m4exit(`1')
address@hidden: memory exhausted
address@hidden 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}.
address@hidden @acronym{GNU} extensions
+Traditional implementations only supported ten diversions. But as a
address@hidden 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.
+
address@hidden
+divert(eval(`1<<28'))world
+divert(`2')hello
+^D
address@hidden
address@hidden
address@hidden 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
- Changes to m4/doc/m4.texinfo,v [branch-1_4], Eric Blake, 2006/11/01
- Changes to m4/doc/m4.texinfo,v [branch-1_4], Eric Blake, 2006/11/07
- Changes to m4/doc/m4.texinfo,v [branch-1_4], Eric Blake, 2006/11/08
- Changes to m4/doc/m4.texinfo,v [branch-1_4], Eric Blake, 2006/11/11
- Changes to m4/doc/m4.texinfo,v [branch-1_4],
Eric Blake <=
- Changes to m4/doc/m4.texinfo,v [branch-1_4], Eric Blake, 2006/11/13
- Changes to m4/doc/m4.texinfo,v [branch-1_4], Eric Blake, 2006/11/16