mount_setattr.2: ffix
[man-pages.git] / man3 / ecvt_r.3
blobb7077f2976014cc83d4255901832ab699138f0ce
1 .\" Copyright (C) 2002 Andries Brouwer <aeb@cwi.nl>
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 .\" 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 .\"
30 .TH ECVT_R 3  2021-03-22 "GNU" "Linux Programmer's Manual"
31 .SH NAME
32 ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string
33 .SH SYNOPSIS
34 .nf
35 .B #include <stdlib.h>
36 .PP
37 .BI "int ecvt_r(double " number ", int " ndigits ", int *restrict " decpt ,
38 .BI "           int *restrict " sign ", char *restrict " buf ", size_t " len );
39 .BI "int fcvt_r(double " number ", int " ndigits ", int *restrict " decpt ,
40 .BI "           int *restrict " sign ", char *restrict " buf ", size_t " len );
41 .PP
42 .BI "int qecvt_r(long double " number ", int " ndigits \
43 ", int *restrict " decpt ,
44 .BI "           int *restrict " sign ", char *restrict " buf ", size_t " len );
45 .BI "int qfcvt_r(long double " number ", int " ndigits \
46 ", int *restrict " decpt ,
47 .BI "           int *restrict " sign ", char *restrict " buf ", size_t " len );
48 .fi
49 .PP
50 .RS -4
51 Feature Test Macro Requirements for glibc (see
52 .BR feature_test_macros (7)):
53 .RE
54 .PP
55 .BR ecvt_r (),
56 .BR fcvt_r (),
57 .BR qecvt_r (),
58 .BR qfcvt_r ():
59 .nf
60     /* Glibc since 2.19: */ _DEFAULT_SOURCE
61         || /* Glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
62 .fi
63 .SH DESCRIPTION
64 The functions
65 .BR ecvt_r (),
66 .BR fcvt_r (),
67 .BR qecvt_r (),
68 and
69 .BR qfcvt_r ()
70 are identical to
71 .BR ecvt (3),
72 .BR fcvt (3),
73 .BR qecvt (3),
74 and
75 .BR qfcvt (3),
76 respectively, except that they do not return their result in a static
77 buffer, but instead use the supplied
78 .I buf
79 of size
80 .IR len .
81 See
82 .BR ecvt (3)
83 and
84 .BR qecvt (3).
85 .SH RETURN VALUE
86 These functions return 0 on success, and \-1 otherwise.
87 .SH ATTRIBUTES
88 For an explanation of the terms used in this section, see
89 .BR attributes (7).
90 .ad l
91 .nh
92 .TS
93 allbox;
94 lbx lb lb
95 l l l.
96 Interface       Attribute       Value
98 .BR ecvt_r (),
99 .BR fcvt_r (),
100 .BR qecvt_r (),
101 .BR qfcvt_r ()
102 T}      Thread safety   MT-Safe
106 .sp 1
107 .SH CONFORMING TO
108 These functions are GNU extensions.
109 .SH NOTES
110 These functions are obsolete.
111 Instead,
112 .BR sprintf (3)
113 is recommended.
114 .SH SEE ALSO
115 .BR ecvt (3),
116 .BR qecvt (3),
117 .BR sprintf (3)