aboutsummaryrefslogtreecommitdiffstats
path: root/man3/libsimple_strtou.3
blob: 62c3bb882d65ca3e65a851f1a4801b0cc3f2d474 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
.TH LIBSIMPLE_STRTOU 3 libsimple
.SH NAME
libsimple_strto{u,uh,uhh,uz,u8,u16,u32,u64} \- parse a string as an unsigned integer

.SH SYNOPSIS
.nf
#include <libsimple.h>

unsigned int libsimple_strtou(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
unsigned short int libsimple_strtouh(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
unsigned char libsimple_strtouhh(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
inline size_t libsimple_strtouz(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
uint_least8_t libsimple_strtou8(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
uint_least16_t libsimple_strtou16(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
uint_least32_t libsimple_strtou32(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);
uint_least64_t libsimple_strtou64(const char *\fInptr\fP, char **\fIend\fP, int \fIbase\fP);

#ifndef strtou
# define strtou libsimple_strtou
#endif
#ifndef strtouh
# define strtouh libsimple_strtouh
#endif
#ifndef strtouhh
# define strtouhh libsimple_strtouhh
#endif
#ifndef strtouz
# define strtouz libsimple_strtouz
#endif
#ifndef strtou8
# define strtou8 libsimple_strtou8
#endif
#ifndef strtou16
# define strtou16 libsimple_strtou16
#endif
#ifndef strtou32
# define strtou32 libsimple_strtou32
#endif
#ifndef strtou64
# define strtou64 libsimple_strtou64
#endif
.fi
.PP
Link with
.IR \-lsimple .

.SH DESCRIPTION
The
.BR libsimple_strtou ()
function is a version of the
.BR strtoul (3)
function, that returns au
.BR "unsigned int" .
.PP
The
.BR libsimple_strtouh ()
function is a version of the
.BR strtoul (3)
function, that returns au
.BR "unsigned short int" .
.PP
The
.BR libsimple_strtouhh ()
function is a version of the
.BR strtoul (3)
function, that returns au
.BR "unsigned char" .
.PP
The
.BR libsimple_strtouz ()
function is a version of the
.BR strtoul (3)
function, that returns a
.BR size_t .
.PP
The
.BR libsimple_strtou8 ()
function is a version of the
.BR strtoul (3)
function, that returns a
.B uint_least8_t
restricted to the range of
.BR uint8_t .
.PP
The
.BR libsimple_strtou16 ()
function is a version of the
.BR strtoul (3)
function, that returns a
.B uint_least16_t
restricted to the range of
.BR uint16_t .
.PP
The
.BR libsimple_strtou32 ()
function is a version of the
.BR strtoul (3)
function, that returns a
.B uint_least32_t
restricted to the range of
.BR uint32_t .
.PP
The
.BR libsimple_strtou64 ()
function is a version of the
.BR strtoul (3)
function, that returns a
.B uint_least64_t
restricted to the range of
.BR uint64_t .

.SH RETURN VALUE
See
.BR strtoul (3).

.SH ERRORS
See
.BR strtoul (3).

.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.TS
allbox;
lb lb lb
l l l.
Interface	Attribute	Value
T{
.BR libsimple_strtou (),
.br
.BR libsimple_strtouh (),
.br
.BR libsimple_strtouhh (),
.br
.BR libsimple_strtouz (),
.br
.BR libsimple_strtou8 (),
.br
.BR libsimple_strtou16 (),
.br
.BR libsimple_strtou32 (),
.br
.BR libsimple_strtou64 ()
T}	Thread safety	MT-Safe
T{
.BR libsimple_strtou (),
.br
.BR libsimple_strtouh (),
.br
.BR libsimple_strtouhh (),
.br
.BR libsimple_strtouz (),
.br
.BR libsimple_strtou8 (),
.br
.BR libsimple_strtou16 (),
.br
.BR libsimple_strtou32 (),
.br
.BR libsimple_strtou64 ()
T}	Async-signal safety	AS-Safe
T{
.BR libsimple_strtou (),
.br
.BR libsimple_strtouh (),
.br
.BR libsimple_strtouhh (),
.br
.BR libsimple_strtouz (),
.br
.BR libsimple_strtou8 (),
.br
.BR libsimple_strtou16 (),
.br
.BR libsimple_strtou32 (),
.br
.BR libsimple_strtou64 ()
T}	Async-cancel safety	AC-Safe
.TE

.SH EXAMPLES
None.

.SH APPLICATION USAGE
None.

.SH RATIONALE
None.

.SH FUTURE DIRECTIONS
None.

.SH NOTES
None.

.SH HISTORY
libsimple 1.4

.SH BUGS
None.

.SH SEE ALSO
.BR libsimple_strtoi (3),
.BR strtoul (3),
.BR strtoull (3)