]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man3/abs.3: Reorganize page
authorAlejandro Colomar <alx@kernel.org>
Mon, 14 Apr 2025 08:56:45 +0000 (10:56 +0200)
committerAlejandro Colomar <alx@kernel.org>
Mon, 14 Apr 2025 09:00:56 +0000 (11:00 +0200)
Cc: Anton Zellerhoff <wg14@ascz.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man3/abs.3

index fbd546cdf19be36d44b171a438ffe9d81480cc90..719082e48372389e578f41d00140405756b92f43 100644 (file)
 .\"
 .TH abs 3 (date) "Linux man-pages (unreleased)"
 .SH NAME
-abs, labs, llabs, imaxabs, uabs, ulabs, ullabs, uimaxabs \- compute the absolute value of an integer
+abs, labs, llabs, imaxabs,
+uabs, ulabs, ullabs, uimaxabs
+\-
+compute the absolute value of an integer
 .SH LIBRARY
 Standard C library
 .RI ( libc ,\~ \-lc )
@@ -54,23 +57,14 @@ Feature Test Macro Requirements for glibc (see
     _ISOC2Y_SOURCE
 .fi
 .SH DESCRIPTION
-The
-.BR abs (),
-.BR labs (),
-.BR llabs (),
-.BR imaxabs (),
-.BR uabs (),
-.BR ulabs (),
-.BR \%ullabs (),
-and
-.BR \%uimaxabs ()
-functions compute the absolute value of the argument
+These functions
+compute the absolute value of the argument
 .I j
 of the
 appropriate integer type for the function.
 .SH RETURN VALUE
-Returns the absolute value of the integer argument, of the appropriate
-integer type for the function.
+Returns the absolute value of the integer argument,
+of the appropriate integer type for the function.
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -93,63 +87,50 @@ T{
 T}     Thread safety   MT-Safe
 .TE
 .SH STANDARDS
-C2Y.
+.TP
+.BR abs ()
+.TQ
+.BR labs ()
+.TQ
+.BR llabs ()
+.TQ
+.BR imaxabs ()
+C23, POSIX.1-2024
 .SH HISTORY
-POSIX.1-2001, C99, SVr4, 4.3BSD.
-.\" POSIX.1 (1996 edition) requires only the
-.\" .BR abs ()
-.\" function.
-.P
-C89 only
-includes the
+.TP
 .BR abs ()
-and
+C89, POSIX.1-1996, SVr4, 4.3BSD.
+.TP
 .BR labs ()
-functions; the functions
+C89, POSIX.1-2001.
+.TP
 .BR llabs ()
-and
+C99, POSIX.1-2001;
+glibc 2.0.
+.TP
 .BR imaxabs ()
-were added in C99.
-The functions
-.BR uabs (),
-.BR ulabs (),
-.BR \%ullabs (),
-and
+C99, POSIX.1-2001;
+glibc 2.1.1.
+.TP
+.BR uabs ()
+.TQ
+.BR ulabs ()
+.TQ
+.BR \%ullabs ()
+.TQ
 .BR \%uimaxabs ()
-were added in C2Y.
-.SH NOTES
+C2y;
+glibc 2.42.
+.SH BUGS
 For
 .BR abs (),
 .BR labs (),
 .BR llabs (),
 and
-.BR imaxabs ()
+.BR imaxabs (),
 trying to take the absolute value of the most negative integer
 is not defined.
-.P
-The
-.BR llabs ()
-function is included since glibc 2.0.
-The
-.BR imaxabs ()
-function is included since glibc 2.1.1.
-The
-.BR uabs (),
-.BR ulabs (),
-.BR \%ullabs (),
-and
-.BR \%uimaxabs ()
-functions are included since glibc 2.42.
-.P
-For
-.BR llabs ()
-to be declared, it may be necessary to define
-.B _ISOC99_SOURCE
-or
-.B _ISOC9X_SOURCE
-(depending on the version of glibc)
-before including any standard headers.
-.P
+.SH NOTES
 By default,
 GCC handles
 .BR abs (),