Add some <stdint.h> types
cover Add some <stdint.h> types
Hi Michael,
I started with <stdint.h> types.
I joined them by groups:intN_t instead of having an entry for each int8_t, int16_t, ... I think that way I could better explain the types, common things, differences, and exceptions.
I'll wait until you review them to write about the remaining <stdint.h>
types: [u]int_leastN_t, [u]int_fastN_t, and [u]intptr_t.
Thanks,
Alex
Alejandro Colomar (8):
system_data_types.7: Add 'intmax_t'
intmax_t.3: New link to system_data_types(7) system_data_types.7: Add 'uintmax_t'
uintmax_t.3: New link to system_data_types(7) system_data_types.7: Add intN_t family of types
int8_t.3, int16_t.3, int32_t.3, int64_t.3, intN_t.3: New links to
system_data_types(7)
system_data_types.7: Add uintN_t family of types uint8_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uintN_t.3: New links to
system_data_types(7)
man3/int16_t.3 | 1 + man3/int32_t.3 | 1 + man3/int64_t.3 | 1 + man3/int8_t.3 | 1 + man3/intN_t.3 | 1 + man3/intmax_t.3 | 1 + man3/uint16_t.3 | 1 + man3/uint32_t.3 | 1 + man3/uint64_t.3 | 1 + man3/uint8_t.3 | 1 + man3/uintN_t.3 | 1 + man3/uintmax_t.3 | 1 + man7/system_data_types.7 | 272 +++++++++++++++++++++++++++++++++++++++ 13 files changed, 284 insertions(+) create mode 100644 man3/int16_t.3 create mode 100644 man3/int32_t.3 create mode 100644 man3/int64_t.3 create mode 100644 man3/int8_t.3 create mode 100644 man3/intN_t.3 create mode 100644 man3/intmax_t.3 create mode 100644 man3/uint16_t.3 create mode 100644 man3/uint32_t.3 create mode 100644 man3/uint64_t.3 create mode 100644 man3/uint8_t.3 create mode 100644 man3/uintN_t.3 create mode 100644 man3/uintmax_t.3
Signature · 1 line
2.28.0
v2 cover Add some <stdint.h> types
Hi Michael,
I made a mistake when sending the emails, and I only CCd linux-man (and other lists) in PATCH 0/8. The rest were only sent to you. Actually, I was playing with the --cc option in git format-patch.
I'm resending all of them as v2.
I fixed a typo in 5/8, while the rest are all identical to v1.
Thanks,
Alex
Alejandro Colomar (8):
system_data_types.7: Add 'intmax_t'
intmax_t.3: New link to system_data_types(7) system_data_types.7: Add 'uintmax_t'
uintmax_t.3: New link to system_data_types(7) system_data_types.7: Add intN_t family of types
int8_t.3, int16_t.3, int32_t.3, int64_t.3, intN_t.3: New links to
system_data_types(7)
system_data_types.7: Add uintN_t family of types uint8_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uintN_t.3: New links to
system_data_types(7)
man3/int16_t.3 | 1 + man3/int32_t.3 | 1 + man3/int64_t.3 | 1 + man3/int8_t.3 | 1 + man3/intN_t.3 | 1 + man3/intmax_t.3 | 1 + man3/uint16_t.3 | 1 + man3/uint32_t.3 | 1 + man3/uint64_t.3 | 1 + man3/uint8_t.3 | 1 + man3/uintN_t.3 | 1 + man3/uintmax_t.3 | 1 + man7/system_data_types.7 | 272 +++++++++++++++++++++++++++++++++++++++ 13 files changed, 284 insertions(+) create mode 100644 man3/int16_t.3 create mode 100644 man3/int32_t.3 create mode 100644 man3/int64_t.3 create mode 100644 man3/int8_t.3 create mode 100644 man3/intN_t.3 create mode 100644 man3/intmax_t.3 create mode 100644 man3/uint16_t.3 create mode 100644 man3/uint32_t.3 create mode 100644 man3/uint64_t.3 create mode 100644 man3/uint8_t.3 create mode 100644 man3/uintN_t.3 create mode 100644 man3/uintmax_t.3
Signature · 1 line
2.28.0
D'oh! Now I had a typo when CCing myself :(
PATCH v2 1/8 system_data_types.7: Add 'intmax_t'
In reply to Alejandro Colomar--- man7/system_data_types.7 | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+)
man7/system_data_types.7 +56 -0
@@ -343,6 +343,62 @@ Conforming to: C99 and later; POSIX.1-2001 and later. See also: .BR imaxdiv (3) .RE +.\"------------------------------------- intmax_t ---------------------/ +.TP +.I intmax_t +.RS +.br +Include: +.IR <stdint.h> . +Alternatively, +.IR <inttypes.h> . +.PP +A signed integer type +capable of representing any value of any signed integer type +supported by the implementation. +According to the C language standard, it shall be +capable of storing values in the range +.RB [ INTMAX_MIN , +.BR INTMAX_MAX ]. +.PP +The macro +.B INTMAX_C +.\" TODO: Document INT*_C(3) +expands its argument to an integer constant of type +.IR intmax_t . +.PP +The length modifier for +.I intmax_t +for the +.BR printf (3) +and the +.BR scanf (3) +families of functions is +.BR j ; +resulting commonly in +.B %jd +or +.B %ji +for printing +.I intmax_t +values. +.PP +Bugs: +.I intmax_t +is not large enough to represent values of type +.I __int128 +in implementations where +.I __int128 +is defined and +.I long long +is less than 128 bits wide. +.PP +Conforming to: C99 and later; POSIX.1-2001 and later. +.PP +See also the +.I uintmax_t +type in this page. +.RE .\"------------------------------------- lconv ------------------------/ .TP .I lconv
Signature · 1 line
2.28.0
PATCH v2 2/8 intmax_t.3: New link to system_data_types(7)
In reply to Alejandro Colomar--- man3/intmax_t.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/intmax_t.3
man3/intmax_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.28.0
PATCH v2 3/8 system_data_types.7: Add 'uintmax_t'
In reply to Alejandro Colomar--- man7/system_data_types.7 | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+)
man7/system_data_types.7 +55 -0
@@ -1136,6 +1136,61 @@ See also: .BR getpwnam (2), .BR credentials (7) .RE +.\"------------------------------------- uintmax_t --------------------/ +.TP +.I uintmax_t +.RS +.br +Include: +.IR <stdint.h> . +Alternatively, +.IR <inttypes.h> . +.PP +An unsigned integer type +capable of representing any value of any unsigned integer type +supported by the implementation. +According to the C language standard, it shall be +capable of storing values in the range [0, +.BR UINTMAX_MAX ]. +.PP +The macro +.B UINTMAX_C +.\" TODO: Document UINT*_C(3) +expands its argument to an integer constant of type +.IR uintmax_t . +.PP +The length modifier for +.I uintmax_t +for the +.BR printf (3) +and the +.BR scanf (3) +families of functions is +.BR j ; +resulting commonly in +.B %ju +or +.B %jx +for printing +.I uintmax_t +values. +.PP +Bugs: +.I uintmax_t +is not large enough to represent values of type +.I unsigned __int128 +in implementations where +.I unsigned __int128 +is defined and +.I unsigned long long +is less than 128 bits wide. +.PP +Conforming to: C99 and later; POSIX.1-2001 and later. +.PP +See also the +.I intmax_t +type in this page. +.RE .\"------------------------------------- va_list ----------------------/ .TP .I va_list
Signature · 1 line
2.28.0
PATCH v2 4/8 uintmax_t.3: New link to system_data_types(7)
In reply to Alejandro Colomar--- man3/uintmax_t.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/uintmax_t.3
man3/uintmax_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.28.0
PATCH v2 5/8 system_data_types.7: Add intN_t family of types
In reply to Alejandro Colomar--- man7/system_data_types.7 | 79 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+)
man7/system_data_types.7 +79 -0
@@ -399,6 +399,85 @@ See also the .I uintmax_t type in this page. .RE +.\"------------------------------------- intN_t -----------------------/ +.TP +.IR int N _t +.RS +.br +Include: +.IR <stdint.h> . +Alternatively, +.IR <inttypes.h> . +.PP +.IR int8_t ", " int16_t ", " int32_t ", " int64_t +.PP +A signed integer type +of a fixed width of exactly N bits, +N being the value specified in its type name. +According to the C language standard, they shall be +capable of storing values in the range +.RB [ INT N _MIN , +.BR INT N _MAX ], +substituting N by the appropriate number. +.PP +According to POSIX, +.IR int8_t ", " int16_t +and +.I int32_t +are required; +.I int64_t +is only required in implementations that provide integer types +with width 64; +and all other types of this form are optional. +.PP +The length modifiers for the +.IR int N _t +types for the +.BR printf (3) +family of functions +are expanded by macros of the forms +.BR PRId N +and +.BR PRIi N +(defined in +.IR <inttypes.h> ); +resulting for example in +.B %"PRId64" +or +.B %"PRIi64" +for printing +.I int64_t +values. +The length modifiers for the +.IR int N _t +types for the +.BR scanf (3) +family of functions +are expanded by macros of the forms +.BR SCNd N +and +.BR SCNi N, +(defined in +.IR <inttypes.h> ); +resulting for example in +.B %"SCNd8" +or +.B %"SCNi8" +for scanning +.I int8_t +values. +.PP +Conforming to: C99 and later; POSIX.1-2001 and later. +.PP +See also the +.IR __int128 , +.IR intmax_t , +.IR uint N _t , +.I uintmax_t +and +.I unsigned __int128 +types in this page. +.RE .\"------------------------------------- lconv ------------------------/ .TP .I lconv
Signature · 1 line
2.28.0
PATCH v2 6/8 int8_t.3, int16_t.3, int32_t.3, int64_t.3, intN_t.3: New links to system_data_types(7)
In reply to Alejandro Colomar--- man3/int16_t.3 | 1 + man3/int32_t.3 | 1 + man3/int64_t.3 | 1 + man3/int8_t.3 | 1 + man3/intN_t.3 | 1 + 5 files changed, 5 insertions(+) create mode 100644 man3/int16_t.3 create mode 100644 man3/int32_t.3 create mode 100644 man3/int64_t.3 create mode 100644 man3/int8_t.3 create mode 100644 man3/intN_t.3
man3/int16_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/int32_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/int64_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/int8_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/intN_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.28.0
PATCH v2 7/8 system_data_types.7: Add uintN_t family of types
In reply to Alejandro Colomar--- man7/system_data_types.7 | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+)
man7/system_data_types.7 +82 -0
@@ -1270,6 +1270,88 @@ See also the .I intmax_t type in this page. .RE +.\"------------------------------------- uintN_t ----------------------/ +.TP +.IR uint N _t +.RS +.br +Include: +.IR <stdint.h> . +Alternatively, +.IR <inttypes.h> . +.PP +.IR uint8_t ", " uint16_t ", " uint32_t ", " uint64_t +.PP +An unsigned integer type +of a fixed width of exactly N bits, +N being the value specified in its type name. +According to the C language standard, they shall be +capable of storing values in the range [0, +.BR UINT N _MAX ], +substituting N by the appropriate number. +.PP +According to POSIX, +.IR uint8_t ", " uint16_t +and +.I uint32_t +are required; +.I uint64_t +is only required in implementations that provide integer types +with width 64; +and all other types of this form are optional. +.PP +The length modifiers for the +.IR uint N _t +types for the +.BR printf (3) +family of functions +are expanded by macros of the forms +.BR PRIu N, +.BR PRIo N, +.BR PRIx N +and +.BR PRIX N +(defined in +.IR <inttypes.h> ); +resulting for example in +.B %"PRIu32" +or +.B %"PRIx32" +for printing +.I uint32_t +values. +The length modifiers for the +.IR uint N _t +types for the +.BR scanf (3) +family of functions +are expanded by macros of the forms +.BR SCNu N, +.BR SCNo N, +.BR SCNx N +and +.BR SCNX N +(defined in +.IR <inttypes.h> ); +resulting for example in +.B %"SCNu16" +or +.B %"SCNx16" +for scanning +.I uint16_t +values. +.PP +Conforming to: C99 and later; POSIX.1-2001 and later. +.PP +See also the +.IR __int128 , +.IR intmax_t , +.IR int N _t , +.I uintmax_t +and +.I unsigned __int128 +types in this page. +.RE .\"------------------------------------- va_list ----------------------/ .TP .I va_list
Signature · 1 line
2.28.0
PATCH v2 8/8 uint8_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uintN_t.3: New links to system_data_types(7)
In reply to Alejandro Colomar--- man3/uint16_t.3 | 1 + man3/uint32_t.3 | 1 + man3/uint64_t.3 | 1 + man3/uint8_t.3 | 1 + man3/uintN_t.3 | 1 + 5 files changed, 5 insertions(+) create mode 100644 man3/uint16_t.3 create mode 100644 man3/uint32_t.3 create mode 100644 man3/uint64_t.3 create mode 100644 man3/uint8_t.3 create mode 100644 man3/uintN_t.3
man3/uint16_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/uint32_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/uint64_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/uint8_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
man3/uintN_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.28.0
Hi Alex
Quoted 4 lines · Alejandro Colomar
Hi Michael,
I started with <
stdint.h> types.
Good. I wanted those the other day :-), but then I saw they weren't in the page yet!
Quoted 4 lines
I joined them by groups:
intN_tinstead of having an entry for eachint8_t,int16_t, ... I think that way I could better explain the types, common things, differences, and exceptions.
Yes, I think that's a good approach.
Quoted 2 lines
I'll wait until you review them to write about the remaining <
stdint.h>
types: [u]int_leastN_t, [u]int_fastN_t, and [u]intptr_t.
Although the patch at
https://lore.kernel.org/linux-man/[email protected]/
doesn't apply (can you send me a revision please), and even though these patches employ the "Include/Alternatively" form, I've applied them. (Everything is now pushed.)
Thanks,
Michael
Hi Michael,
Quoted 10 lines · Michael Kerrisk (man-pages)
Hi Alex
Quoted 4 lines · Alejandro Colomar
Hi Michael,
I started with <
stdint.h> types.Good. I wanted those the other day :-), but then I saw they weren't in the page yet!
They were complicated, so I left them for when the page was a bit more mature :-)
Quoted 7 lines
Quoted 5 lines
I joined them by groups:
intN_tinstead of having an entry for eachint8_t,int16_t, ... I think that way I could better explain the types, common things, differences, and exceptions.Yes, I think that's a good approach.
Good.
Quoted 9 lines
Quoted 3 lines
I'll wait until you review them to write about the remaining <
stdint.h>
types: [u]int_leastN_t, [u]int_fastN_t, and [u]intptr_t.Although the patch at
https://lore.kernel.org/linux-man/[email protected]/
doesn't apply (can you send me a revision please), and even though these patches employ the "Include/Alternatively" form, I've applied them. (Everything is now pushed.)
I had the following commit history.
I'll rebase again anyway and check what is pending, etc, and fix anything that broke.
* 736f143b4 - Tue, 29 Sep 2020 10:05:33 +0200 (3 hours ago) (origin/alx, origin/HEAD, alx)
| uint8_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uintN_t.3: New links to system_data_types(7) - Alejandro Colomar
* 3afc79ba6 - Tue, 29 Sep 2020 10:04:26 +0200 (3 hours ago)
| system_data_types.7: Add uintN_t family of types - Alejandro Colomar
* 3e317d073 - Tue, 29 Sep 2020 10:03:37 +0200 (3 hours ago)
| int8_t.3, int16_t.3, int32_t.3, int64_t.3, intN_t.3: New links to system_data_types(7) - Alejandro Colomar
* 46f64d53c - Tue, 29 Sep 2020 10:01:52 +0200 (3 hours ago)
| system_data_types.7: Add intN_t family of types - Alejandro Colomar
* 30f375485 - Tue, 29 Sep 2020 10:00:27 +0200 (3 hours ago)
| uintmax_t.3: New link to system_data_types(7) - Alejandro Colomar
* 1c95c8701 - Tue, 29 Sep 2020 10:00:02 +0200 (3 hours ago)
| system_data_types.7: Add 'uintmax_t' - Alejandro Colomar
* 8b1faa88d - Tue, 29 Sep 2020 09:58:08 +0200 (3 hours ago)
| intmax_t.3: New link to system_data_types(7) - Alejandro Colomar
* 0beb4210b - Tue, 29 Sep 2020 09:57:31 +0200 (3 hours ago)
| system_data_types.7: Add 'intmax_t' - Alejandro Colomar
* 40b39dc1f - Mon, 28 Sep 2020 17:08:46 +0200 (20 hours ago)
| system_data_types.7: wfix + ffix - Alejandro Colomar
* 4cefd8302 - Sun, 27 Sep 2020 23:11:43 +0200 (2 days ago)
| FILE.3: New link to system_data_types(7) - Alejandro Colomar
* a65f25603 - Sun, 27 Sep 2020 23:10:36 +0200 (2 days ago)
| system_data_types.7: Add 'FILE' - Alejandro Colomar
* 9cdd2e051 - Sun, 27 Sep 2020 23:13:43 +0200 (2 days ago) (upstream/master, master)
| system_data_types.7: ffix - Alejandro Colomar
Quoted 5 lines
Thanks,
Michael
Thanks,
Alex