summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-08-16 20:10:58 +0000
committerschwarze <schwarze@openbsd.org>2017-08-16 20:10:58 +0000
commit0b877f7be9f661a24c3be4eaeba4b4473831eab9 (patch)
treed92b4b6cabf0d350e29f34463c3c4c5eee3875a8
parentremove accidentally duplicated cpp chunks (diff)
downloadwireguard-openbsd-0b877f7be9f661a24c3be4eaeba4b4473831eab9.tar.xz
wireguard-openbsd-0b877f7be9f661a24c3be4eaeba4b4473831eab9.zip
Explicitly say that expr(1) handles decimal integers only, as mandated
by POSIX and as implemented in our utility; triggered by a question from Alessandro DE LAURENZIS <just22 at atlantide dot t28 dot net> on misc@. OK millert@
-rw-r--r--bin/expr/expr.115
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/expr/expr.1 b/bin/expr/expr.1
index a64165f0d56..8c517c51ab1 100644
--- a/bin/expr/expr.1
+++ b/bin/expr/expr.1
@@ -1,10 +1,10 @@
-.\" $OpenBSD: expr.1,v 1.23 2015/01/16 15:30:10 schwarze Exp $
+.\" $OpenBSD: expr.1,v 1.24 2017/08/16 20:10:58 schwarze Exp $
.\" $NetBSD: expr.1,v 1.9 1995/04/28 23:27:13 jtc Exp $
.\"
.\" Written by J.T. Conklin <jtc@netbsd.org>.
.\" Public domain.
.\"
-.Dd $Mdocdate: January 16 2015 $
+.Dd $Mdocdate: August 16 2017 $
.Dt EXPR 1
.Os
.Sh NAME
@@ -39,16 +39,17 @@ Returns the evaluation of
if neither expression evaluates to an empty string or zero;
otherwise, returns zero.
.It Ar expr1 Li "{=, >, >=, <, <=, !=}" Ar expr2
-Returns the results of integer comparison if both arguments are integers;
-otherwise, returns the results of string comparison using the locale-specific
-collation sequence.
+Returns the results of integer comparison if both arguments are
+decimal integers; otherwise, returns the results of string comparison
+using the locale-specific collation sequence.
The result of each comparison is 1 if the specified relation is true,
or 0 if the relation is false.
.It Ar expr1 Li "{+, -}" Ar expr2
-Returns the results of addition or subtraction of integer-valued arguments.
+Returns the results of addition or subtraction of decimal integer-valued
+arguments.
.It Ar expr1 Li "{*, /, %}" Ar expr2
Returns the results of multiplication, integer division, or remainder of
-integer-valued arguments.
+decimal integer-valued arguments.
.It Ar expr1 Li \&: Ar expr2
The
.Ql \&: