]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3type/intptr_t.3type
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3type / intptr_t.3type
1 .\" Copyright (c) 2020-2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
2 .\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\"
7 .TH INTPTR_T 3type 2022-02-25 "Linux man-pages (unreleased)"
8 .SH NAME
9 intptr_t, uintptr_t \- integer types wide enough to hold pointers
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <stdint.h>
16 .PP
17 .BR typedef " /* ... */ " intptr_t;
18 .BR typedef " /* ... */ " uintptr_t;
19 .PP
20 .BR "#define INTPTR_WIDTH" " /* ... */"
21 .B #define UINTPTR_WIDTH INTPTR_WIDTH
22 .PP
23 .BR "#define INTPTR_MAX" " /* 2**(INTPTR_WIDTH \- 1) \- 1 */"
24 .BR "#define INTPTR_MIN" " /* \- 2**(INTPTR_WIDTH \- 1) */"
25 .BR "#define UINTPTR_MAX" " /* 2**UINTPTR_WIDTH \- 1 */"
26 .fi
27 .SH DESCRIPTION
28 .I intptr_t
29 is a signed integer type
30 such that any valid
31 .RI ( "void *" )
32 value can be converted to this type and then converted back.
33 It is capable of storing values in the range
34 .RB [ INTPTR_MIN ,
35 .BR INTPTR_MAX ].
36 .PP
37 .I uintptr_t
38 is an unsigned integer type
39 such that any valid
40 .RI ( "void *" )
41 value can be converted to this type and then converted back.
42 It is capable of storing values in the range
43 .RB [ 0 ,
44 .BR INTPTR_MAX ].
45 .PP
46 The macros
47 .RB [ U ] INTPTR_WIDTH
48 expand to the width in bits of these types.
49 .PP
50 The macros
51 .RB [ U ] INTPTR_MAX
52 expand to the maximum value that these types can hold.
53 .PP
54 The macro
55 .B INTPTR_MIN
56 expands to the minimum value that
57 .I intptr_t
58 can hold.
59 .PP
60 The length modifiers for the
61 .RI [ u ] intptr_t
62 types
63 for the
64 .BR printf (3)
65 family of functions
66 are expanded by the macros
67 .BR PRIdPTR ,
68 .BR PRIiPTR ,
69 and
70 .B PRIuPTR
71 (defined in
72 .IR <inttypes.h> );
73 resulting commonly in
74 .B %"PRIdPTR"
75 or
76 .B %"PRIiPTR"
77 for printing
78 .I intptr_t
79 values.
80 The length modifiers for the
81 .IR [ u ] intptr_t
82 types
83 for the
84 .BR scanf (3)
85 family of functions
86 are expanded by the macros
87 .BR SCNdPTR ,
88 .BR SCNiPTR ,
89 and
90 .B SCNuPTR
91 (defined in
92 .IR <inttypes.h> );
93 resulting commonly in
94 .B %"SCNuPTR"
95 for scanning
96 .I uintptr_t
97 values.
98 .SH STANDARDS
99 C99 and later; POSIX.1-2001 and later.
100 .SH NOTES
101 The following header also provides these types:
102 .IR <inttypes.h> .
103 .SH SEE ALSO
104 .BR intmax_t (3type),
105 .BR void (3)