File: strtoul.3

package info (click to toggle)
manpages-ja 0.5.0.0.20050315-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,620 kB
  • ctags: 4
  • sloc: sh: 12,675; perl: 157; makefile: 106
file content (133 lines) | stat: -rw-r--r-- 4,556 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
.\" WORD: base 
.\" 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
.\"         all rights reserved.
.\" Translated Thu Jan 31 18:00:00 JST 1999
.\"         by AKAMATSU, Kazuo
.\"
.TH STRTOUL 3  2002-05-30 "GNU" "Linux Programmer's Manual"
.SH ̾
strtoul, strtoull, strtouq \- ʸ unsigned long int Ѵ
.SH 
.nf
.B #include <stdlib.h>
.sp
.BI "unsigned long int"
.BI "strtoul(const char *" nptr ", char **" endptr ", int " base );
.sp
.BI "unsigned long long int"
.BI "strtoull(const char *" nptr ", char **" endptr ", int " base );
.fi
.SH 
\fBstrtoul()\fP ؿ \fInptr\fP ʸκǽʬ
\fIbase\fP Ȥ unsigned long int Ѵ롣
 \fIbase\fP  2  36 ޤǤ
뤤̤ʰ̣ 0 ()ǤʤФʤʤ
.PP
ʸƬˤϡǤդο (
.BR isspace (3)
) 򤬤äƤ褯ޤľˤ `+'  `-' 
Ƥ褤 \fIbase\fP ޤ 16 ξˤϡ `0x' ǤϤޤ
ʸ 16 ʿȤư롣ʳʸФ \fIbase\fP 
ξϡ `0' ǻϤޤʸ 8 ʿȤơ
ʳʸ 10 ʿȤư롣
.PP
ʸλĤʬ unsigned long int Ѵ뤬Ф
ͭǤʤ줿ѴϽλ롣(11 ʿʾǤ `A' 
ʸʸ˴ؤ餺 10 ɽ `B'  11 ɽ,
ʲƱͤˡ `Z'  35 ɽ)
.PP
\fIendptr\fP ̥ (NULL) Ǥʤ硢
\fBstrtoul()\fP Ϻǽʸ줿ɥ쥹
\fI*endptr\fP ˳ǼƤ롣
ʸͭʿҤȤĤʤС \fBstrtoul()\fP  \fInptr\fP
θͤ \fI*endptr\fP ( 0 ֤)
äˡ \fI*nptr\fP  `\\0' ʳǡᤵ줿 \fI**endptr\fP  `\\0'
ʤСʸΤͭäȤˤʤ롣
.PP
.B strtoull()
ؿ
.B strtoul()
ؿƱͤunsigned long long int ֤ͤ
.SH ֤
\fBstrtoul()\fP ؿѴ̤֤ʸ󤬥ޥʥ椫ϤޤäƤ
ϡ(ȿžͤСեƤʤ)Ѵ̤ȿž
֤ѴǥСեȯ ULONG_MAX ֤Хѿ
\fIerrno\fP  ERANGE ꤹ롣
(ULONG_MAX  ULLONG_MAX ɤؤ)
.B strtoull()

.B strtoul()
ƱǤ롣
.SH 顼
.TP
.B EINVAL
(C99 ˤϤʤ)
Ϳ줿
.I base
ݡȤƤʤͤǤ롣
.TP
.B ERANGE
ʸ󤬿ͤɽϰϳǤ롣
.LP
ˤäƤϡѴԤʤä(줺
0 ֤)\fIerrno\fP  \fBEINVAL\fP åȤ뤫⤷ʤ
.SH 
뤬 "C" Ǥʤ硢¾ʸդ뤫⤷ʤ
(㤨СߤΥ 1000 ζڤʸбƤ뤫⤷ʤ)
.LP
BSD ˤϡ
.sp
.in +4n
.nf
.BI "u_quad_t"
.BI "strtouq(const char *" nptr ", char **" endptr ", int base" );
.sp
.in -4n
.fi
ȤƱͤĴؿ롣
ΥƥΥĹǤ뤬δؿ
.B strtoull()

.B stroul()
ʾ⤢ꤨ롣
.SH 
.B strtoul()
 SVID 3, BSD 4.3, ISO 9899 (C99), POSIX ˽򤷤Ƥ롣
.B strtoull()
 ISO 9899 (C99)  POSIX 1003.1-2001 ˽򤷤Ƥ롣
.SH Ϣ
.BR atof (3),
.BR atoi (3),
.BR atol (3),
.BR strtod (3),
.BR strtol (3)