OSDN Git Service

Release pages for LDP v3.77
[linuxjm/LDP_man-pages.git] / release / man3 / atoi.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Mon Mar 29 22:39:41 1993, David Metcalfe
30 .\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu)
31 .\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers
32 .\"
33 .\"*******************************************************************
34 .\"
35 .\" This file was generated with po4a. Translate the source file.
36 .\"
37 .\"*******************************************************************
38 .\"
39 .\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
40 .\"         all rights reserved.
41 .\" Translated Sat, 13 Jul 1996 22:47:32 +0900
42 .\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
43 .\" Updated Tue 30 Jan 2001 JST by Kentaro Shirakata <argrath@ub32.org>
44 .\"
45 .TH ATOI 3 2014\-08\-19 GNU "Linux Programmer's Manual"
46 .SH 名前
47 atoi, atol, atoll \- 文字列を整数型に変換する
48 .SH 書式
49 .nf
50 \fB#include <stdlib.h>\fP
51 .sp
52 \fBint atoi(const char *\fP\fInptr\fP\fB);\fP
53 .br
54 \fBlong atol(const char *\fP\fInptr\fP\fB);\fP
55 .br
56 \fBlong long atoll(const char *\fP\fInptr\fP\fB);\fP
57 .fi
58 .sp
59 .in -4n
60 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
61 .in
62 .sp
63 .ad l
64 \fBatoll\fP():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
67 || _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 または \fIcc\ \-std=c99\fP
70 .RE
71 .ad
72 .SH 説明
73 \fBatoi\fP()  関数は、\fInptr\fP によって指示される文字列のはじめの部分を \fIint\fP 型整数に変換する。 この振る舞いは、
74 \fBatoi\fP()  関数がエラーを見つけない点以外は、
75 .sp
76 .in +4n
77 strtol(nptr, NULL, 10);
78 .in
79 .sp
80 と同じである。
81 .PP
82 \fBatol\fP()  関数と \fBatoll\fP()  関数は \fBatoi\fP()  と同様の振る舞いをするが、 文字列のはじめの部分をそれぞれ
83 \fIlong\fP や \fIlong long\fP に変換する。
84 .SH 返り値
85 変換された値。
86 .SH 属性
87 .SS "マルチスレッディング (pthreads(7) 参照)"
88 関数 \fBatoi\fP(), \fBatol\fP(), \fBatoll\fP() は、例外付きのスレッドセーフである。実行中に \fBsetlocale\fP(3)
89 を呼び出してロケールを変更しない限り、マルチスレッドアプリケーションで安全に使用することができる。
90 .SH 準拠
91 SVr4, POSIX.1\-2001, 4.3BSD, C99.  C89 と POSIX.1\-1996 には \fBatoi\fP()  と
92 \fBatol\fP()  だけが含まれている。
93 .SH 注意
94 .\" The
95 .\" .BR atoll ()
96 .\" function is present in glibc 2 since version 2.0.2, but
97 .\" not in libc4 or libc5.
98 Linux libc は \fBatoll\fP() の古い名前として \fBatoq\fP() を提供していた。 glibc では \fBatoq\fP()
99 は提供されていない。
100 .SH 関連項目
101 \fBatof\fP(3), \fBstrtod\fP(3), \fBstrtol\fP(3), \fBstrtoul\fP(3)
102 .SH この文書について
103 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.77 の一部
104 である。プロジェクトの説明とバグ報告に関する情報は
105 http://www.kernel.org/doc/man\-pages/ に書かれている。