OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man3 / gcvt.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 19:32:25 1993 by Rik Faith (faith@cs.unc.edu)
28 .\"
29 .\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya
30 .\"         all rights reserved.
31 .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
32 .\" Updated & Modified Wed Feb 16 23:43:45 JST 2005
33 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
34 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\" Updated 2009-04-24, Akihiro MOTOKI, LDP v3.20
36 .\"
37 .TH GCVT 3 2010-09-20 "" "Linux Programmer's Manual"
38 .\"O .SH NAME
39 .SH 名前
40 .\"O gcvt \- convert a floating-point number to a string
41 gcvt \- 浮動小数点数を文字列へ変換する
42 .\"O .SH SYNOPSIS
43 .SH 書式
44 .nf
45 .B #include <stdlib.h>
46 .sp
47 .BI "char *gcvt(double " number ", size_t " ndigit ", char *" buf );
48 .fi
49 .sp
50 .in -4n
51 .\"O Feature Test Macro Requirements for glibc (see
52 .\"O .BR feature_test_macros (7)):
53 glibc 向けの機能検査マクロの要件
54 .RB ( feature_test_macros (7)
55 参照):
56 .in
57 .sp
58 .BR gcvt ():
59 .ad l
60 .PD 0
61 .RS 4
62 .TP 4
63 .\"O Since glibc 2.10:
64 glibc 2.10 以降:
65 .nf
66 _SVID_SOURCE ||
67     (_XOPEN_SOURCE\ >=\ 500 ||
68         _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
69     !(_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600)
70 .fi
71 .TP 4
72 .\"O Before glibc 2.10:
73 glibc 2.10 より前:
74 _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
75 _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
76 .RE
77 .PD
78 .ad b
79 .\"O .SH DESCRIPTION
80 .SH 説明
81 .\"O The
82 .\"O .BR gcvt ()
83 .\"O function converts \fInumber\fP to a minimal length null-terminated
84 .\"O ASCII string and stores the result in \fIbuf\fP.
85 .\"O It produces \fIndigit\fP significant digits in either
86 .\"O .BR printf (3)
87 .\"O F format or E format.
88 関数
89 .BR gcvt ()
90 は、 \fInumber\fP を、最短の長さの NULL 終端された ASCII
91 文字列へ変換し、変換後の文字列を \fIbuf\fP に格納する。
92 .BR printf (3)
93 の F フォーマットや E フォーマットのように \fIndigit\fP 桁の
94 有効数字を生成する。
95 .\"O .SH "RETURN VALUE"
96 .SH 返り値
97 .\"O The
98 .\"O .BR gcvt ()
99 .\"O function returns the address of the string pointed to
100 .\"O by \fIbuf\fP.
101 関数
102 .BR gcvt ()
103 は文字列 \fIbuf\fP へのポインタを返す。
104 .\"O .SH "CONFORMING TO"
105 .SH 準拠
106 .\"O Marked as LEGACY in POSIX.1-2001.
107 POSIX.1-2001 では、
108 この関数は「過去の名残 (LEGACY)」と位置付けられている。
109 .\"O POSIX.1-2008 removes the specification of
110 .\"O .BR gcvt (),
111 .\"O recommending the use of
112 .\"O .BR sprintf (3)
113 .\"O instead (though
114 .\"O .BR snprintf (3)
115 .\"O may be preferable).
116 POSIX.1-2008 では、
117 .BR gcvt ()
118 の仕様は削除され、
119 代わりに
120 .BR sprintf (3)
121 を使用することが推奨されている
122 .RB ( snprintf (3)
123 の方が適切かもしれないが)。
124 .\"O .SH "SEE ALSO"
125 .SH 関連項目
126 .BR ecvt (3),
127 .BR fcvt (3),
128 .BR sprintf (3)