Debian Codegraph @

upstream/debian-unstable/man3/ecvt_r.3

raw
1 '\" t
2 .\" Copyright 2002, Andries E. Brouwer <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH ecvt_r 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <stdlib.h>
16 .P
17 .BI "[[deprecated]] int ecvt_r(double " number ", int " ndigits ,
18 .BI " int *restrict " decpt ", int *restrict " sign ,
19 .BI " char *restrict " buf ", size_t " size );
20 .BI "[[deprecated]] int fcvt_r(double " number ", int " ndigits ,
21 .BI " int *restrict " decpt ", int *restrict " sign ,
22 .BI " char *restrict " buf ", size_t " size );
23 .P
24 .BI "[[deprecated]] int qecvt_r(long double " number ", int " ndigits ,
25 .BI " int *restrict " decpt ", int *restrict " sign ,
26 .BI " char *restrict " buf ", size_t " size );
27 .BI "[[deprecated]] int qfcvt_r(long double " number ", int " ndigits ,
28 .BI " int *restrict " decpt ", int *restrict " sign ,
29 .BI " char *restrict " buf ", size_t " size );
30 .fi
31 .P
32 .RS -4
33 Feature Test Macro Requirements for glibc (see
34 .BR feature_test_macros (7)):
35 .RE
36 .P
37 .BR ecvt_r (),
38 .BR fcvt_r (),
39 .BR qecvt_r (),
40 .BR qfcvt_r ():
41 .nf
42 /* glibc >= 2.19: */ _DEFAULT_SOURCE
43 || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
44 .fi
45 .SH DESCRIPTION
46 The functions
47 .BR ecvt_r (),
48 .BR fcvt_r (),
49 .BR qecvt_r (),
50 and
51 .BR qfcvt_r ()
52 are identical to
53 .BR ecvt (3),
54 .BR fcvt (3),
55 .BR qecvt (3),
56 and
57 .BR qfcvt (3),
58 respectively, except that they do not return their result in a static
59 buffer, but instead use the supplied
60 .I buf
61 of size
62 .IR size .
63 See
64 .BR ecvt (3)
65 and
66 .BR qecvt (3).
67 .SH RETURN VALUE
68 These functions return 0 on success, and \-1 otherwise.
69 .SH ATTRIBUTES
70 For an explanation of the terms used in this section, see
71 .BR attributes (7).
72 .TS
73 allbox;
74 lbx lb lb
75 l l l.
76 Interface Attribute Value
77 T{
78 .na
79 .nh
80 .BR ecvt_r (),
81 .BR fcvt_r (),
82 .BR qecvt_r (),
83 .BR qfcvt_r ()
84 T} Thread safety MT-Safe
85 .TE
86 .SH STANDARDS
87 GNU.
88 .SH NOTES
89 These functions are obsolete.
90 Instead,
91 .BR sprintf (3)
92 is recommended.
93 .SH SEE ALSO
94 .BR ecvt (3),
95 .BR qecvt (3),
96 .BR sprintf (3)