Debian Codegraph @

upstream/debian-trixie/man3/div_t.3type

raw
1 .\" Copyright (c) 2020-2022 by Alejandro Colomar <[email protected]>
2 .\" and Copyright (c) 2020 by Michael Kerrisk <[email protected]>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\"
7 .TH div_t 3type 2024-05-02 "Linux man-pages 6.9.1"
8 .SH NAME
9 div_t, ldiv_t, lldiv_t, imaxdiv_t \-
10 quotient and remainder of an integer division
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc )
14 .SH SYNOPSIS
15 .EX
16 .B #include <stdlib.h>
17 .P
18 .B typedef struct {
19 .BR " int quot;" " /* Quotient */"
20 .BR " int rem;" " /* Remainder */"
21 .B } div_t;
22 .P
23 .B typedef struct {
24 .BR " long quot;" " /* Quotient */"
25 .BR " long rem;" " /* Remainder */"
26 .B } ldiv_t;
27 .P
28 .B typedef struct {
29 .BR " long long quot;" " /* Quotient */"
30 .BR " long long rem;" " /* Remainder */"
31 .B } lldiv_t;
32 .P
33 .B #include <inttypes.h>
34 .P
35 .B typedef struct {
36 .BR " intmax_t quot;" " /* Quotient */"
37 .BR " intmax_t rem;" " /* Remainder */"
38 .B } imaxdiv_t;
39 .EE
40 .SH DESCRIPTION
41 .RI [[ l ] l ] div_t
42 is the type of the value returned by the
43 .RB [[ l ] l ]\c
44 .BR div (3)
45 function.
46 .P
47 .I imaxdiv_t
48 is the type of the value returned by the
49 .BR imaxdiv (3)
50 function.
51 .SH STANDARDS
52 C11, POSIX.1-2008.
53 .SH HISTORY
54 C99, POSIX.1-2001.
55 .SH SEE ALSO
56 .BR div (3),
57 .BR imaxdiv (3),
58 .BR ldiv (3),
59 .BR lldiv (3)