mount_setattr.2: Minor tweaks to Christian's patch
[man-pages.git] / man3 / strtoimax.3
bloba1b0c2b392ac2299c2e77cc7415cd2c2ab81efea
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .TH STRTOIMAX 3 2021-03-22 "" "Linux Programmer's Manual"
25 .SH NAME
26 strtoimax, strtoumax \- convert string to integer
27 .SH SYNOPSIS
28 .nf
29 .B #include <inttypes.h>
30 .PP
31 .BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr ,
32 .BI "                   int " base );
33 .BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr ,
34 .BI "                   int " base );
35 .fi
36 .SH DESCRIPTION
37 These functions are just like
38 .BR strtol (3)
39 and
40 .BR strtoul (3),
41 except that they return a value of type
42 .I intmax_t
43 and
44 .IR uintmax_t ,
45 respectively.
46 .SH RETURN VALUE
47 On success, the converted value is returned.
48 If nothing was found to convert, zero is returned.
49 On overflow or underflow
50 .B INTMAX_MAX
52 .B INTMAX_MIN
54 .B UINTMAX_MAX
55 is returned, and
56 .I errno
57 is set to
58 .BR ERANGE .
59 .SH ATTRIBUTES
60 For an explanation of the terms used in this section, see
61 .BR attributes (7).
62 .ad l
63 .nh
64 .TS
65 allbox;
66 lbx lb lb
67 l l l.
68 Interface       Attribute       Value
70 .BR strtoimax (),
71 .BR strtoumax ()
72 T}      Thread safety   MT-Safe locale
73 .TE
74 .hy
75 .ad
76 .sp 1
77 .SH CONFORMING TO
78 POSIX.1-2001, POSIX.1-2008, C99.
79 .SH SEE ALSO
80 .BR imaxabs (3),
81 .BR imaxdiv (3),
82 .BR strtol (3),
83 .BR strtoul (3),
84 .BR wcstoimax (3)