aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man3/intmax_t.341
1 files changed, 28 insertions, 13 deletions
diff --git a/man3/intmax_t.3 b/man3/intmax_t.3
index e470c2d3af..3b7db7e5c9 100644
--- a/man3/intmax_t.3
+++ b/man3/intmax_t.3
@@ -7,6 +7,16 @@ intmax_t, uintmax_t \- greatest-width basic integer types
.PP
.BR typedef " /* ... */ " intmax_t;
.BR typedef " /* ... */ " uintmax_t;
+.PP
+.BR "#define INTMAX_WIDTH " "/* ... */"
+.B "#define UINTMAX_WIDTH INTMAX_WIDTH"
+.PP
+.BR "#define INTMAX_MAX " "/* 2**(INTMAX_WIDTH - 1) - 1 */"
+.BR "#define INTMAX_MIN " "/* - 2**(INTMAX_WIDTH - 1) */"
+.BR "#define UINTMAX_MAX " "/* 2**UINTMAX_WIDTH - 1 */"
+.PP
+.BI "#define INTMAX_C(" c ) " c " ## " \fR/* ... */\fP"
+.BI "#define UINTMAX_C(" c ) " c " ## " \fR/* ... */\fP"
.fi
.SH DESCRIPTION
.I intmax_t
@@ -26,20 +36,27 @@ According to the C language standard, it shall be
capable of storing values in the range [0,
.BR UINTMAX_MAX ].
.PP
-The macro
-.BR INTMAX_C ()
-expands its argument to an integer constant of type
-.IR intmax_t .
+The macros
+.RB [ U ] INTMAX_WIDTH
+expand to the width in bits of these types.
+.PP
+The macros
+.RB [ U ] INTMAX_MAX
+expand to the maximum value that these types can hold.
.PP
The macro
-.BR UINTMAX_C ()
-expands its argument to an integer constant of type
-.IR uintmax_t .
+.B INTMAX_MIN
+expands to the minimum value that
+.I intmax_t
+can hold.
+.PP
+The macros
+.RB [ U ] INTMAX_C ()
+expand their argument to an integer constant of type
+.RI [ u ] intmax_t .
.PP
The length modifier for
-.I intmax_t
-and
-.I uintmax_t
+.RI [ u ] intmax_t
for the
.BR printf (3)
and the
@@ -53,9 +70,7 @@ resulting commonly in
or
.B %jx
for printing
-.I intmax_t
-or
-.I uintmax_t
+.RI [ u ] intmax_t
values.
.SH CONFORMING TO
C99 and later; POSIX.1-2001 and later.