diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-06-17 17:01:44 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-06-17 17:01:44 +0200 |
| commit | 0de6563995e356b1ec7f3c33e9d6d188c6ea457e (patch) | |
| tree | 6255caa40095298c30a316d5d440b57bfc3aacdf | |
| parent | b364da51609224621594c35ad421bab295634ea9 (diff) | |
| download | man-pages-0de6563995e356b1ec7f3c33e9d6d188c6ea457e.tar.gz | |
ssize_t.3type, system_data_types.7: Move ssize_t to a separate page
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rw-r--r-- | man3/ssize_t.3type | 87 | ||||
| -rw-r--r-- | man7/system_data_types.7 | 101 |
2 files changed, 97 insertions, 91 deletions
diff --git a/man3/ssize_t.3type b/man3/ssize_t.3type index db50c0f091..d95f5d6e20 100644 --- a/man3/ssize_t.3type +++ b/man3/ssize_t.3type @@ -1 +1,86 @@ -.so man7/system_data_types.7 +.\" Copyright (c) 2020-2022 by Alejandro Colomar <colomar.6.4.3@gmail.com> +.\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com> +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" +.TH SSIZE_T 3type 2022-06-17 Linux "Linux Programmer's Manual" +.SH NAME +ssize_t \- count of bytes or an error indication +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " ssize_t; +.fi +.SH DESCRIPTION +Used for a count of bytes or an error indication. +According to POSIX, +it shall be a signed integer type +capable of storing values at least in the range +.RB [ \-1 , +.BR SSIZE_MAX ], +and the implementation shall support one or more programming environments +where the width of +.I ssize_t +is no greater than the width of the type +.IR long . +.PP +Glibc and most other implementations provide a length modifier for +.I ssize_t +for the +.BR printf (3) +and the +.BR scanf (3) +families of functions, which is +.BR z ; +resulting commonly in +.B %zd +or +.B %zi +for printing +.I ssize_t +values. +Although +.B z +works for +.I ssize_t +on most implementations, +portable POSIX programs should avoid using it\(emfor example, +by converting the value to +.I intmax_t +and using its length modifier +.RB ( j ). +.SH VERSIONS +.IR <aio.h> , +.IR <mqueue.h> , +and +.I <sys/socket.h> +define +.I size_t +since POSIX.1-2008. +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following headers also provide this type: +.IR <aio.h> , +.IR <monetary.h> , +.IR <mqueue.h> , +.IR <stdio.h> , +.IR <sys/msg.h> , +.IR <sys/socket.h> , +.IR <sys/uio.h> , +and +.IR <unistd.h> . +.SH SEE ALSO +.BR read (2), +.BR readlink (2), +.BR readv (2), +.BR recv (2), +.BR send (2), +.BR write (2), +.BR ptrdiff_t (3type), +.BR size_t (3type) diff --git a/man7/system_data_types.7 b/man7/system_data_types.7 index 23acc1393c..5b24015631 100644 --- a/man7/system_data_types.7 +++ b/man7/system_data_types.7 @@ -177,11 +177,11 @@ values. C99 and later; POSIX.1-2001 and later. .PP .IR "See also" : -the +.BR ssize_t (3type) +.PP +See also the .I size_t -and -.I ssize_t -types in this page. +type in this page. .RE .\"------------------------------------- regex_t ----------------------/ .TP @@ -257,13 +257,13 @@ type. POSIX.1-2001 and later. .PP .IR "See also" : -the +.BR ssize_t (3type) +.PP +See also the .I regmatch_t structure and the .I ptrdiff_t -and -.I ssize_t -types in this page. +type in this page. .RE .\"------------------------------------- sigevent ---------------------/ .TP @@ -502,95 +502,16 @@ C99 and later; POSIX.1-2001 and later. .BR memcmp (3), .BR memcpy (3), .BR memset (3), -.BR offsetof (3) +.BR offsetof (3), +.BR ssize_t (3type) .PP See also the .I ptrdiff_t -and -.I ssize_t -types in this page. +type in this page. .RE .\"------------------------------------- sockaddr ---------------------/ .\"------------------------------------- socklen_t --------------------/ .\"------------------------------------- ssize_t ----------------------/ -.TP -.I ssize_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <aio.h> , -.IR <monetary.h> , -.IR <mqueue.h> , -.IR <stdio.h> , -.IR <sys/msg.h> , -.IR <sys/socket.h> , -.IR <sys/uio.h> , -or -.IR <unistd.h> . -.PP -Used for a count of bytes or an error indication. -According to POSIX, it shall be a signed integer type -capable of storing values at least in the range [-1, -.BR SSIZE_MAX ], -and the implementation shall support one or more programming environments -where the width of -.I ssize_t -is no greater than the width of the type -.IR long . -.PP -Glibc and most other implementations provide a length modifier for -.I ssize_t -for the -.BR printf (3) -and the -.BR scanf (3) -families of functions, which is -.BR z ; -resulting commonly in -.B %zd -or -.B %zi -for printing -.I ssize_t -values. -Although -.B z -works for -.I ssize_t -on most implementations, -portable POSIX programs should avoid using it\(emfor example, -by converting the value to -.I intmax_t -and using its length modifier -.RB ( j ). -.PP -.IR Versions : -.IR <aio.h> , -.IR <mqueue.h> , -and -.I <sys/socket.h> -define -.I size_t -since POSIX.1-2008. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR read (2), -.BR readlink (2), -.BR readv (2), -.BR recv (2), -.BR send (2), -.BR write (2) -.PP -See also the -.I ptrdiff_t -and -.I size_t -types in this page. -.RE .\"------------------------------------- stat -------------------------/ .TP .I stat |
