]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl> |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
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. | |
c13182ef | 12 | .\" |
fea681da MK |
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. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" This replaces an earlier man page written by Walter Harms | |
26 | .\" <walter.harms@informatik.uni-oldenburg.de>. | |
27 | .\" | |
28 | .\" Corrected return types; from Fabian; 2004-10-05 | |
29 | .\" | |
fe0fefbf | 30 | .TH ECVT_R 3 2015-03-02 "GNU" "Linux Programmer's Manual" |
fea681da MK |
31 | .SH NAME |
32 | ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string | |
33 | .SH SYNOPSIS | |
b9f02710 | 34 | .nf |
fea681da MK |
35 | .B #include <stdlib.h> |
36 | .sp | |
37 | .BI "int ecvt_r(double " number ", int " ndigits ", int *" decpt , | |
b9f02710 | 38 | .BI " int *" sign ", char *" buf ", size_t " len ); |
fea681da MK |
39 | .sp |
40 | .BI "int fcvt_r(double " number ", int " ndigits ", int *" decpt , | |
b9f02710 | 41 | .BI " int *" sign ", char *" buf ", size_t " len ); |
fea681da MK |
42 | .sp |
43 | .BI "int qecvt_r(long double " number ", int " ndigits ", int *" decpt , | |
b9f02710 | 44 | .BI " int *" sign ", char *" buf ", size_t " len ); |
fea681da MK |
45 | .sp |
46 | .BI "int qfcvt_r(long double " number ", int " ndigits ", int *" decpt , | |
b9f02710 MK |
47 | .BI " int *" sign ", char *" buf ", size_t " len ); |
48 | .fi | |
cc4615cc MK |
49 | .sp |
50 | .in -4n | |
51 | Feature Test Macro Requirements for glibc (see | |
52 | .BR feature_test_macros (7)): | |
53 | .in | |
54 | .sp | |
7fa092c8 | 55 | .ad l |
cc4615cc MK |
56 | .BR ecvt_r (), |
57 | .BR fcvt_r (), | |
58 | .BR qecvt_r (), | |
59 | .BR qfcvt_r (): | |
89572547 | 60 | .RS 4 |
cc4615cc | 61 | _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 |
89572547 | 62 | .RE |
7fa092c8 | 63 | .ad b |
fea681da MK |
64 | .SH DESCRIPTION |
65 | The functions | |
e511ffb6 MK |
66 | .BR ecvt_r (), |
67 | .BR fcvt_r (), | |
9af134cd | 68 | .BR qecvt_r (), |
fea681da | 69 | and |
e511ffb6 | 70 | .BR qfcvt_r () |
fea681da | 71 | are identical to |
7a056410 MK |
72 | .BR ecvt (3), |
73 | .BR fcvt (3), | |
9af134cd | 74 | .BR qecvt (3), |
fea681da | 75 | and |
7a056410 | 76 | .BR qfcvt (3), |
fea681da MK |
77 | respectively, except that they do not return their result in a static |
78 | buffer, but instead use the supplied | |
79 | .I buf | |
80 | of size | |
81 | .IR len . | |
82 | See | |
83 | .BR ecvt (3) | |
84 | and | |
85 | .BR qecvt (3). | |
47297adb | 86 | .SH RETURN VALUE |
fea681da | 87 | These functions return 0 on success, and \-1 otherwise. |
299cfca4 | 88 | .SH ATTRIBUTES |
13e527ea MS |
89 | For an explanation of the terms used in this section, see |
90 | .BR attributes (7). | |
91 | .TS | |
92 | allbox; | |
93 | lbw20 lb lb | |
94 | l l l. | |
95 | Interface Attribute Value | |
96 | T{ | |
97 | .BR ecvt_r (), | |
98 | .BR fcvt_r (), | |
99 | .br | |
100 | .BR qecvt_r (), | |
101 | .BR qfcvt_r () | |
102 | T} Thread safety MT-Safe | |
103 | .TE | |
47297adb | 104 | .SH CONFORMING TO |
2b2581ee | 105 | These functions are GNU extensions. |
fea681da | 106 | .SH NOTES |
c13182ef MK |
107 | These functions are obsolete. |
108 | Instead, | |
fb186734 | 109 | .BR sprintf (3) |
fea681da | 110 | is recommended. |
47297adb | 111 | .SH SEE ALSO |
fea681da MK |
112 | .BR ecvt (3), |
113 | .BR qecvt (3), | |
114 | .BR sprintf (3) |