RELEASE, man-pages-6.01.Announce: Remove .Announce file
[man-pages.git] / man3type / div_t.3type
blobf62b158167bdf89c1b2dc59637342c96539c33a8
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 DIV_T 3type (date) "Linux man-pages (unreleased)"
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 .PP
18 .B typedef struct {
19 .BR "    int quot;" " /* Quotient */"
20 .BR "    int rem;" "  /* Remainder */"
21 .B } div_t;
22 .PP
23 .B typedef struct {
24 .BR "    long quot;" " /* Quotient */"
25 .BR "    long rem;" "  /* Remainder */"
26 .B } ldiv_t;
27 .PP
28 .B typedef struct {
29 .BR "    long long quot;" " /* Quotient */"
30 .BR "    long long rem;" "  /* Remainder */"
31 .B } lldiv_t;
32 .PP
33 .B #include <inttypes.h>
34 .PP
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 ] div (3)
44 function.
45 .PP
46 .I imaxdiv_t
47 is the type of the value returned by the
48 .BR imaxdiv (3)
49 function.
50 .SH STANDARDS
51 C99 and later; POSIX.1-2001 and later.
52 .SH SEE ALSO
53 .BR div (3),
54 .BR imaxdiv (3),
55 .BR ldiv (3),
56 .BR lldiv (3)