File: strtoul.3

package info (click to toggle)
manpages-ja 0.5.0.0.20100315-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,156 kB
  • ctags: 1
  • sloc: sh: 13,935; perl: 157; makefile: 114
file content (192 lines) | stat: -rw-r--r-- 5,545 bytes parent folder | download
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
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" References consulted:
.\"     Linux libc source code
.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\"     386BSD man pages
.\" Modified Sun Jul 25 10:54:03 1993 by Rik Faith (faith@cs.unc.edu)
.\" Fixed typo, aeb, 950823
.\" 2002-02-22, joey, mihtjel: Added strtoull()
.\"
.\" Japanese Version Copyright (c) 1999 AKAMATSU, Kazuo
.\"                            and 2006 Akihiro MOTOKI
.\"         all rights reserved.
.\" Translated Thu Jan 31 18:00:00 JST 1999
.\"         by AKAMATSU, Kazuo
.\" Updated & Modified 2006-07-20,
.\"         Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
.\"
.\" WORD:       base            
.\"
.TH STRTOUL 3  2007-07-26 "GNU" "Linux Programmer's Manual"
.SH ̾
strtoul, strtoull, strtouq \- ʸ unsigned long int Ѵ
.SH 
.nf
.B #include <stdlib.h>
.sp
.BI "unsigned long int strtoul(const char *" nptr ", char **" endptr \
", int " base );
.sp
.BI "unsigned long long int strtoull(const char *" nptr ", char **" endptr ,
.BI "                                int " base );
.fi
.sp
.in -4n
glibc εǽޥ׷
.RB ( feature_test_macros (7)
):
.in
.sp
.ad l
.BR strtoull ():
XOPEN_SOURCE >= 600 || _BSD_SOURCE || _SVID_SOURCE || _ISOC99_SOURCE; or
.I cc\ -std=c99
.ad b
.SH 
.BR strtoul ()
ؿϡ \fInptr\fP ʸκǽʬ
\fIbase\fP Ȥ
.I "unsigned long int"
Ѵ롣
 \fIbase\fP  2  36 ޤǤ
뤤̤ʰ̣ 0 ǤʤФʤʤ
.PP
ʸƬˤϡǤդοζ򤬤äƤ褯 (
.BR ( isspace (3)
Ƚꤵ) ޤľˤ \(aq+\(aq  \(aq\-\(aq 
椬äƤ褤
\fIbase\fP  0 ޤ 16 ξˤϡ ʸƬ "0x" ֤Ȥ
Ǥξˤʸ 16ʿȤư롣
ʳʸ \fIbase\fP  0 ξϡ
ʸ \(aq0\(aq ǻϤޤȤ 8ʿȤơ
ʳΤȤ 10ʿȤư롣
.PP
ʸλĤʬ
.I "unsigned long int"
Ѵ뤬Ф
ͭǤʤ줿ѴϽλ롣(11ʿʾǤ \(aqA\(aq 
ʸʸ˴ؤ餺 10 ɽ \(aqB\(aq  11 ɽ,
ʲƱͤˡ \(aqZ\(aq  35 ɽ)
.PP
\fIendptr\fP ̥ (NULL) Ǥʤ硢
.BR strtoul ()
Ϻǽʸ줿ɥ쥹
\fI*endptr\fP ˳ǼƤ롣
ʸͭʿҤȤĤʤС
.BR strtoul ()
 \fInptr\fP
θͤ \fI*endptr\fP ( 0 ֤)
äˡ \fI*nptr\fP  \(aq\\0\(aq ʳǡ֤줿 \fI**endptr\fP 
\(aq\\0\(aq ʤСʸΤͭäȤˤʤ롣
.PP
.BR strtoull ()
ؿ
.BR strtoul ()
ؿƱͤ
.I "unsigned long long int"
֤ͤ
.SH ֤
.BR strtoul ()
ؿѴ̤֤ʸ󤬥ޥʥ椫ϤޤäƤ
ϡ(ȿžͤСեƤʤ) Ѵ̤ȿž
ͤ unsigned ֤ѴǥСեȯ
.B ULONG_MAX
֤
.I errno

.B ERANGE
ꤹ롣
.RB ( ULONG_MAX

.B ULLONG_MAX
ɤؤ)
.BR strtoull ()

.BR strtoul ()
ƱǤ롣
.SH 顼
.TP
.B EINVAL
(C99 ˤϤʤ)
Ϳ줿
.I base
ݡȤƤʤͤǤ롣
.TP
.B ERANGE
ʸ󤬿ͤɽϰϳǤ롣
.LP
ˤäƤϡѴԤʤä(줺
0 ֤)\fIerrno\fP  \fBEINVAL\fP åȤ뤫⤷ʤ
.SH 
.BR strtoul ()
 SVr4, C89, C99  POSIX-2001 ˽򤷤Ƥ롣
.BR strtoull ()
 C99  POSIX.1-2001 ˽򤷤Ƥ롣
.SH 
.B strtoul ()
ԤɤξǤ 0 
.B LONG_MAX
.RB ( strtoull ()
Ǥ
.BR LLONG_MAX )
֤ǽΤǡ
ץϴؿƤӽФ
.I errno
 0 ꤷƤӽФ
.I errno
 0 ʳͤɤǧ顼ȯɤȽǤ
ɬפ롣

"C" ʳΥξ硢¾ʸդ뤫⤷ʤ
(㤨СߤΥ 1000 ζڤʸбƤ뤫⤷ʤ)
.LP
BSD ˤϡ
.sp
.in +4n
.nf
.BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base );
.sp
.in -4n
.fi
ȤƱͤĴؿ롣
ΥƥΥĹǤ뤬δؿ
.BR strtoull ()

.BR stroul ()
ʾ⤢ꤨ롣

ͤϤȤߤʤ졢顼ʤ
б
.I "unsigned long int"
ͤѴ롣
.SH 
.BR strtol (3)
Υޥ˥奢ڡ򻲾ȡ
ΥڡؿλˡƱͤǤ롣
.SH Ϣ
.BR atof (3),
.BR atoi (3),
.BR atol (3),
.BR strtod (3),
.BR strtol (3)