diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-02 16:59:47 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-02-24 23:17:45 +0100 |
| commit | edd831b161e369b6dbf7ef86b1eb2c3fab5f13a0 (patch) | |
| tree | 056a031c75c3fbbc69e8fbee36380e80890246bd | |
| parent | d35f04b33fa5856ee514e234b514bedc0eefd7ee (diff) | |
| download | man-pages-edd831b161e369b6dbf7ef86b1eb2c3fab5f13a0.tar.gz | |
intmax_t.3: Document the [U]INTMAX_* macros
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rw-r--r-- | man3/intmax_t.3 | 41 |
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. |
