summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/abs.3
diff options
context:
space:
mode:
authorschwarze <>2019-01-18 07:32:17 +0000
committerschwarze <>2019-01-18 07:32:17 +0000
commitf088490975411fdaef39d5aee455070b01b5440c (patch)
tree605e3717adf9d42d7e69449883b1199e84fdb429 /src/lib/libc/stdlib/abs.3
parent0c5d69513c289e9ce0ad1d05ba2604b40af21910 (diff)
downloadopenbsd-f088490975411fdaef39d5aee455070b01b5440c.tar.gz
openbsd-f088490975411fdaef39d5aee455070b01b5440c.tar.bz2
openbsd-f088490975411fdaef39d5aee455070b01b5440c.zip
Replace the vague, incorrect, and confusing BUGS sections with CAVEATS
clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
Diffstat (limited to '')
-rw-r--r--src/lib/libc/stdlib/abs.313
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/abs.3 b/src/lib/libc/stdlib/abs.3
index 420bdf6fdf..afacc985df 100644
--- a/src/lib/libc/stdlib/abs.3
+++ b/src/lib/libc/stdlib/abs.3
@@ -29,15 +29,16 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: abs.3,v 1.11 2013/07/17 05:42:11 schwarze Exp $ 32.\" $OpenBSD: abs.3,v 1.12 2019/01/18 07:32:17 schwarze Exp $
33.\" 33.\"
34.Dd $Mdocdate: July 17 2013 $ 34.Dd $Mdocdate: January 18 2019 $
35.Dt ABS 3 35.Dt ABS 3
36.Os 36.Os
37.Sh NAME 37.Sh NAME
38.Nm abs 38.Nm abs
39.Nd integer absolute value function 39.Nd integer absolute value function
40.Sh SYNOPSIS 40.Sh SYNOPSIS
41.In limits.h
41.In stdlib.h 42.In stdlib.h
42.Ft int 43.Ft int
43.Fn abs "int j" 44.Fn abs "int j"
@@ -66,5 +67,9 @@ The
66.Fn abs 67.Fn abs
67function first appeared in 68function first appeared in
68.At v6 . 69.At v6 .
69.Sh BUGS 70.Sh CAVEATS
70The absolute value of the most negative integer remains negative. 71The result of applying
72.Fn abs
73to
74.Dv INT_MIN
75is undefined.