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: Wed, 30 May 2007 13:37:00 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      07/05/30 13:36:59

Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- doc/m4.texinfo      28 May 2007 21:48:41 -0000      1.104
+++ doc/m4.texinfo      30 May 2007 13:36:58 -0000      1.105
@@ -403,8 +403,8 @@
 @acronym{GNU} @code{m4} 1.4 that were floating around the net and
 released 1.4.3 and 1.4.4.  And in 2006, Eric Blake joined the team and
 prepared patches for the release of 1.4.5, 1.4.6, 1.4.7, and 1.4.8.  The
-1.4.x series remains open for bug fixes, including release 1.4.9 in
-2007.
+1.4.x series remains open for bug fixes, including release 1.4.9 and
+1.4.10 in 2007.
 
 Meanwhile, development was underway for new features for @code{m4},
 such as dynamic module loading and additional builtins, practically
@@ -5988,18 +5988,26 @@
 
 Its use is best described by a few examples:
 
address@hidden This test is a bit fragile, if someone tries to port to a
address@hidden platform without infinity.
 @example
 define(`foo', `The brown fox jumped over the lazy dog')
 @result{}
 format(`The string "%s" uses %d characters', foo, len(foo))
 @result{}The string "The brown fox jumped over the lazy dog" uses 38 characters
+format(`%*.*d', `-1', `-1', `1')
address@hidden
 format(`%.0f', `56789.9876')
 @result{}56790
 len(format(`%-*X', `5000', `1'))
 @result{}5000
+ifelse(format(`%010F', `infinity'), `       INF', `success',
+       format(`%010F', `infinity'), `  INFINITY', `success',
+       format(`%010F', `infinity'))
address@hidden
 ifelse(format(`%.1A', `1.999'), `0X1.0P+1', `success',
        format(`%.1A', `1.999'), `0X2.0P+0', `success',
-       `fail')
+       format(`%.1A', `1.999'))
 @result{}success
 @end example
 
@@ -6030,18 +6038,30 @@
 function, and supports these @samp{%} specifiers: @samp{c}, @samp{s},
 @samp{d}, @samp{o}, @samp{x}, @samp{X}, @samp{u}, @samp{a}, @samp{A},
 @samp{e}, @samp{E}, @samp{f}, @samp{F}, @samp{g}, @samp{G}, and
address@hidden; it supports field widths and precisions, and the modifiers
address@hidden, @samp{-}, @address@hidden }}, @samp{0}, @samp{#}, @samp{h} and
address@hidden  For more details on the functioning of @code{printf}, see the
-C Library Manual, or the @acronym{POSIX} specification (for example,
address@hidden is supported even on platforms that haven't yet implemented
-C99 hexadecimal floating point output natively).
address@hidden; it supports field widths and precisions, and the flags
address@hidden, @samp{-}, @samp{ }, @samp{0}, @samp{#}, and @samp{'}.  For
+integer specifiers, the width modifiers @samp{hh}, @samp{h}, and
address@hidden are recognized, and for floating point specifiers, the width
+modifier @samp{l} is recognized.  Items not yet supported include
+positional arguments, the @samp{n}, @samp{p}, @samp{S}, and @samp{C}
+specifiers, the @samp{z}, @samp{t}, @samp{j}, @samp{L} and @samp{ll}
+modifiers, and any platform extensions available in the native
address@hidden  For more details on the functioning of @code{printf},
+see the C Library Manual, or the @acronym{POSIX} specification (for
+example, @samp{%a} is supported even on platforms that haven't yet
+implemented C99 hexadecimal floating point output natively).
 
 @c FIXME - format still needs some improvements.
-For now, unrecognized specifiers are silently ignored, but it is
-anticipated that a future release of @acronym{GNU} @code{m4} will support more
-specifiers, and give warnings when problems are encountered.  Likewise,
-escape sequences are not yet recognized.
+Unrecognized specifiers result in a warning.  It is anticipated that a
+future release of @acronym{GNU} @code{m4} will support more specifiers,
+and give better warnings when various problems such as overflow are
+encountered.  Likewise, escape sequences are not yet recognized.
+
address@hidden
+format(`%p', `0')
address@hidden:stdin:1: Warning: format: unrecognized specifier in `%p'
address@hidden
address@hidden example
 
 @node Arithmetic
 @chapter Macros for doing arithmetic




reply via email to

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