]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/ecvt_r.3
dlinfo.3: ATTRIBUTES: Note function that is thread-safe
[thirdparty/man-pages.git] / man3 / ecvt_r.3
CommitLineData
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
32ecvt_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
51Feature 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
65The functions
e511ffb6
MK
66.BR ecvt_r (),
67.BR fcvt_r (),
9af134cd 68.BR qecvt_r (),
fea681da 69and
e511ffb6 70.BR qfcvt_r ()
fea681da 71are identical to
7a056410
MK
72.BR ecvt (3),
73.BR fcvt (3),
9af134cd 74.BR qecvt (3),
fea681da 75and
7a056410 76.BR qfcvt (3),
fea681da
MK
77respectively, except that they do not return their result in a static
78buffer, but instead use the supplied
79.I buf
80of size
81.IR len .
82See
83.BR ecvt (3)
84and
85.BR qecvt (3).
47297adb 86.SH RETURN VALUE
fea681da 87These functions return 0 on success, and \-1 otherwise.
299cfca4 88.SH ATTRIBUTES
13e527ea
MS
89For an explanation of the terms used in this section, see
90.BR attributes (7).
91.TS
92allbox;
93lbw20 lb lb
94l l l.
95Interface Attribute Value
96T{
97.BR ecvt_r (),
98.BR fcvt_r (),
99.br
100.BR qecvt_r (),
101.BR qfcvt_r ()
102T} Thread safety MT-Safe
103.TE
47297adb 104.SH CONFORMING TO
2b2581ee 105These functions are GNU extensions.
fea681da 106.SH NOTES
c13182ef
MK
107These functions are obsolete.
108Instead,
fb186734 109.BR sprintf (3)
fea681da 110is recommended.
47297adb 111.SH SEE ALSO
fea681da
MK
112.BR ecvt (3),
113.BR qecvt (3),
114.BR sprintf (3)