summaryrefslogtreecommitdiffstats
path: root/man/man3type/ptrdiff_t.3type
diff options
context:
space:
mode:
Diffstat (limited to 'man/man3type/ptrdiff_t.3type')
-rw-r--r--man/man3type/ptrdiff_t.3type47
1 files changed, 47 insertions, 0 deletions
diff --git a/man/man3type/ptrdiff_t.3type b/man/man3type/ptrdiff_t.3type
new file mode 100644
index 000000000..5a881dd9b
--- /dev/null
+++ b/man/man3type/ptrdiff_t.3type
@@ -0,0 +1,47 @@
+.\" Copyright (c) 2020-2022 by Alejandro Colomar <alx@kernel.org>
+.\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\"
+.TH ptrdiff_t 3type (date) "Linux man-pages (unreleased)"
+.SH NAME
+ptrdiff_t \- count of elements or array index
+.SH LIBRARY
+Standard C library
+.RI ( libc )
+.SH SYNOPSIS
+.nf
+.B #include <stddef.h>
+.P
+.BR typedef " /* ... */ " ptrdiff_t;
+.fi
+.SH DESCRIPTION
+Used for a count of elements, or an array index.
+It is the result of subtracting two pointers.
+It is a signed integer type
+capable of storing values in the range
+.RB [ PTRDIFF_MIN ,
+.BR PTRDIFF_MAX ].
+.P
+The length modifier for
+.I ptrdiff_t
+for the
+.BR printf (3)
+and the
+.BR scanf (3)
+families of functions is
+.BR t ,
+resulting commonly in
+.B %td
+or
+.B %ti
+for printing
+.I ptrdiff_t
+values.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
+.SH SEE ALSO
+.BR size_t (3type)