termios.3: wfix
[man-pages.git] / man3 / qecvt.3
blob251694456ad61795d27ef3ba526ac4aaf7d58949
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 .TH QECVT 3  2021-03-22 "GNU" "Linux Programmer's Manual"
29 .SH NAME
30 qecvt, qfcvt, qgcvt \- convert a floating-point number to a string
31 .SH SYNOPSIS
32 .nf
33 .B #include <stdlib.h>
34 .PP
35 .BI "char *qecvt(long double " number ", int " ndigits \
36 ", int *restrict " decpt ,
37 .BI "            int *restrict " sign );
38 .BI "char *qfcvt(long double " number ", int " ndigits \
39 ", int *restrict " decpt ,
40 .BI "            int *restrict " sign );
41 .BI "char *qgcvt(long double " number ", int " ndigit ", char *" buf );
42 .fi
43 .PP
44 .RS -4
45 Feature Test Macro Requirements for glibc (see
46 .BR feature_test_macros (7)):
47 .RE
48 .PP
49 .BR qecvt (),
50 .BR qfcvt (),
51 .BR qgcvt ():
52 .nf
53     Since glibc 2.19:
54         _DEFAULT_SOURCE
55     In glibc up to and including 2.19:
56         _SVID_SOURCE
57 .fi
58 .\" FIXME . The full FTM picture looks to have been something like the
59 .\" following mess:
60 .\"    glibc 2.20 onward
61 .\"        _DEFAULT_SOURCE
62 .\"    glibc 2.18 to glibc 2.19
63 .\"        _BSD_SOURCE || _SVID_SOURCE
64 .\"    glibc 2.10 to glibc 2.17
65 .\"        _SVID_SOURCE || (_XOPEN_SOURCE >= 500 ||
66 .\"            (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
67 .\"                ! (_POSIX_C_SOURCE >= 200809L))
68 .\"    Before glibc 2.10:
69 .\"        _SVID_SOURCE || _XOPEN_SOURCE >= 500 ||
70 .\"            (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
71 .SH DESCRIPTION
72 The functions
73 .BR qecvt (),
74 .BR qfcvt (),
75 and
76 .BR qgcvt ()
77 are identical to
78 .BR ecvt (3),
79 .BR fcvt (3),
80 and
81 .BR gcvt (3)
82 respectively, except that they use a
83 .I "long double"
84 argument
85 .IR number .
86 See
87 .BR ecvt (3)
88 and
89 .BR gcvt (3).
90 .SH ATTRIBUTES
91 For an explanation of the terms used in this section, see
92 .BR attributes (7).
93 .ad l
94 .nh
95 .TS
96 allbox;
97 lbx lb lb
98 l l l.
99 Interface       Attribute       Value
101 .BR qecvt ()
102 T}      Thread safety   MT-Unsafe race:qecvt
104 .BR qfcvt ()
105 T}      Thread safety   MT-Unsafe race:qfcvt
107 .BR qgcvt ()
108 T}      Thread safety   MT-Safe
112 .sp 1
113 .SH CONFORMING TO
114 SVr4.
115 Not seen in most common UNIX implementations,
116 but occurs in SunOS.
117 .\" Not supported by libc4 and libc5.
118 Supported by glibc.
119 .SH NOTES
120 These functions are obsolete.
121 Instead,
122 .BR snprintf (3)
123 is recommended.
124 .SH SEE ALSO
125 .BR ecvt (3),
126 .BR ecvt_r (3),
127 .BR gcvt (3),
128 .BR sprintf (3)