aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/m4/m4.1
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-07-27 22:54:13 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-07-27 22:54:13 +0000
commit88497f0c68b1469cbf8560b8c4a022dbc509ceae (patch)
treebaccaebeb197c2b665518fe1a74fa0902fbf5d98 /usr.bin/m4/m4.1
parentc448f58f4595746b2d31d095bff032fe4e74bc28 (diff)
downloadsrc-88497f0c68b1469cbf8560b8c4a022dbc509ceae.tar.gz
src-88497f0c68b1469cbf8560b8c4a022dbc509ceae.zip
Sync with OpenBSD
This brings: - check for integer overflows in custom allocs - fix potential integer overflows in memory allocation - annotate regexp error messages with source string - better error handling in mkstemp/unlink/fdopen logic
Notes
Notes: svn path=/head/; revision=269162
Diffstat (limited to 'usr.bin/m4/m4.1')
-rw-r--r--usr.bin/m4/m4.128
1 files changed, 16 insertions, 12 deletions
diff --git a/usr.bin/m4/m4.1 b/usr.bin/m4/m4.1
index a32dc62ff1ce..c72ffac85828 100644
--- a/usr.bin/m4/m4.1
+++ b/usr.bin/m4/m4.1
@@ -1,5 +1,5 @@
.\" $NetBSD: m4.1,v 1.23 2012/04/08 22:00:39 wiz Exp $
-.\" @(#) $OpenBSD: m4.1,v 1.59 2010/10/21 13:20:51 jmc Exp $
+.\" @(#) $OpenBSD: m4.1,v 1.62 2014/04/14 07:00:47 jmc Exp $
.\"
.\" Copyright (c) 1989, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,7 +33,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 21, 2010
+.Dd January 12 2014 $
.Dt M4 1
.Os
.Sh NAME
@@ -88,9 +88,7 @@ In arguments to macros, leading unquoted space, tab, and newline
.Pq Sq \en
characters are ignored.
To quote strings, use left and right single quotes
-.Po e.g.,\ \&
-.Sq "\ this is a string with a leading space"
-.Pc .
+.Pq e.g., Sq \ \&this is a string with a leading space .
You can change the quote characters with the
.Ic changequote
built-in macro.
@@ -258,15 +256,17 @@ Prints the first argument on the standard error output stream.
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 .
-.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
@@ -441,12 +441,12 @@ macro can modify the exit status.
.Sh STANDARDS
The
.Nm
-utility is mostly compliant with the
+utility is compliant with the
.St -p1003.1-2008
specification.
.Pp
The flags
-.Op Fl dgIot
+.Op Fl dgIPot
and the macros
.Ic builtin ,
.Ic esyscmd ,
@@ -467,9 +467,13 @@ are extensions to that specification.
is not supposed to be a synonym for
.Ic mkstemp ,
but instead to be an insecure temporary file name creation function.
-The change causes no known compatibility issues.
+It is marked by
+.St -p1003.1-2008
+as being obsolescent and should not be used if portability is a concern.
.Pp
-The output format of tracing and of
+The output format of
+.Ic traceon
+and
.Ic dumpdef
are not specified in any standard,
are likely to change and should not be relied upon.