Module Name: src
Committed By: wiz
Date: Tue Jan 7 13:32:21 UTC 2014
Modified Files:
src/usr.bin/m4: m4.1
Log Message:
Better document eval, mentioning optional second and third arguments.
Requested by martin.
Bump date.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/m4/m4.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/m4/m4.1
diff -u src/usr.bin/m4/m4.1:1.24 src/usr.bin/m4/m4.1:1.25
--- src/usr.bin/m4/m4.1:1.24 Sat Jul 20 21:40:00 2013
+++ src/usr.bin/m4/m4.1 Tue Jan 7 13:32:21 2014
@@ -1,4 +1,4 @@
-.\" $NetBSD: m4.1,v 1.24 2013/07/20 21:40:00 wiz Exp $
+.\" $NetBSD: m4.1,v 1.25 2014/01/07 13:32:21 wiz Exp $
.\" @(#) $OpenBSD: m4.1,v 1.56 2009/10/14 17:19:47 sthen Exp $
.\"
.\" Copyright (c) 1989, 1993
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 14, 2009
+.Dd January 7, 2014
.Dt M4 1
.Os
.Sh NAME
@@ -256,15 +256,17 @@ Prints the first argument on the standar
Passes its first argument to a shell and returns the shell's standard output.
Note that the shell shares its standard input and standard error with
.Nm m4 .
-.It Fn eval expr
+.It Fn eval expr[,radix[,minimum]]
Computes the first argument as an arithmetic expression using 32-bit
arithmetic.
Operators are the standard C ternary, arithmetic, logical,
shift, relational, bitwise, and parentheses operators.
You can specify
octal, decimal, and hexadecimal numbers as in C.
-The second argument (if any)
-specifies the radix for the result and the third argument (if any)
+The optional second argument
+.Fa radix
+specifies the radix for the result and the optional third argument
+.Fa minimum
specifies the minimum number of digits in the result.
.It Fn expr expr
This is an alias for