]>
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 | .\" | |
97986708 | 30 | .TH ECVT_R 3 2016-03-15 "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 | 35 | .B #include <stdlib.h> |
68e4db0a | 36 | .PP |
fea681da | 37 | .BI "int ecvt_r(double " number ", int " ndigits ", int *" decpt , |
b9f02710 | 38 | .BI " int *" sign ", char *" buf ", size_t " len ); |
68e4db0a | 39 | .PP |
fea681da | 40 | .BI "int fcvt_r(double " number ", int " ndigits ", int *" decpt , |
b9f02710 | 41 | .BI " int *" sign ", char *" buf ", size_t " len ); |
68e4db0a | 42 | .PP |
fea681da | 43 | .BI "int qecvt_r(long double " number ", int " ndigits ", int *" decpt , |
b9f02710 | 44 | .BI " int *" sign ", char *" buf ", size_t " len ); |
68e4db0a | 45 | .PP |
fea681da | 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 | |
68e4db0a | 49 | .PP |
cc4615cc MK |
50 | .in -4n |
51 | Feature Test Macro Requirements for glibc (see | |
52 | .BR feature_test_macros (7)): | |
53 | .in | |
68e4db0a | 54 | .PP |
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 |
2b1b0424 MK |
61 | /* Glibc since 2.19: */ _DEFAULT_SOURCE |
62 | || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE | |
89572547 | 63 | .RE |
7fa092c8 | 64 | .ad b |
fea681da MK |
65 | .SH DESCRIPTION |
66 | The functions | |
e511ffb6 MK |
67 | .BR ecvt_r (), |
68 | .BR fcvt_r (), | |
9af134cd | 69 | .BR qecvt_r (), |
fea681da | 70 | and |
e511ffb6 | 71 | .BR qfcvt_r () |
fea681da | 72 | are identical to |
7a056410 MK |
73 | .BR ecvt (3), |
74 | .BR fcvt (3), | |
9af134cd | 75 | .BR qecvt (3), |
fea681da | 76 | and |
7a056410 | 77 | .BR qfcvt (3), |
fea681da MK |
78 | respectively, except that they do not return their result in a static |
79 | buffer, but instead use the supplied | |
80 | .I buf | |
81 | of size | |
82 | .IR len . | |
83 | See | |
84 | .BR ecvt (3) | |
85 | and | |
86 | .BR qecvt (3). | |
47297adb | 87 | .SH RETURN VALUE |
fea681da | 88 | These functions return 0 on success, and \-1 otherwise. |
299cfca4 | 89 | .SH ATTRIBUTES |
13e527ea MS |
90 | For an explanation of the terms used in this section, see |
91 | .BR attributes (7). | |
92 | .TS | |
93 | allbox; | |
94 | lbw20 lb lb | |
95 | l l l. | |
96 | Interface Attribute Value | |
97 | T{ | |
98 | .BR ecvt_r (), | |
99 | .BR fcvt_r (), | |
100 | .br | |
101 | .BR qecvt_r (), | |
102 | .BR qfcvt_r () | |
103 | T} Thread safety MT-Safe | |
104 | .TE | |
47297adb | 105 | .SH CONFORMING TO |
2b2581ee | 106 | These functions are GNU extensions. |
fea681da | 107 | .SH NOTES |
c13182ef MK |
108 | These functions are obsolete. |
109 | Instead, | |
fb186734 | 110 | .BR sprintf (3) |
fea681da | 111 | is recommended. |
47297adb | 112 | .SH SEE ALSO |
fea681da MK |
113 | .BR ecvt (3), |
114 | .BR qecvt (3), | |
115 | .BR sprintf (3) |