1ECVT_R(3)                  Linux Programmer's Manual                 ECVT_R(3)
2
3
4

NAME

6       ecvt_r, fcvt_r, qecvt_r, qfcvt_r - convert a floating-point number to a
7       string
8

SYNOPSIS

10       #include <stdlib.h>
11
12       int ecvt_r(double number, int ndigits, int *decpt,
13                  int *sign, char *buf, size_t len);
14
15       int fcvt_r(double number, int ndigits, int *decpt,
16                  int *sign, char *buf, size_t len);
17
18       int qecvt_r(long double number, int ndigits, int *decpt,
19                  int *sign, char *buf, size_t len);
20
21       int qfcvt_r(long double number, int ndigits, int *decpt,
22                  int *sign, char *buf, size_t len);
23
24   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
25
26       ecvt_r(), fcvt_r(), qecvt_r(), qfcvt_r():
27           /* Glibc since 2.19: */ _DEFAULT_SOURCE
28               || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
29

DESCRIPTION

31       The functions ecvt_r(), fcvt_r(), qecvt_r(), and qfcvt_r() are  identi‐
32       cal  to  ecvt(3), fcvt(3), qecvt(3), and qfcvt(3), respectively, except
33       that they do not return their result in a static  buffer,  but  instead
34       use the supplied buf of size len.  See ecvt(3) and qecvt(3).
35

RETURN VALUE

37       These functions return 0 on success, and -1 otherwise.
38

ATTRIBUTES

40       For   an   explanation   of   the  terms  used  in  this  section,  see
41       attributes(7).
42
43       ┌─────────────────────┬───────────────┬─────────┐
44Interface            Attribute     Value   
45       ├─────────────────────┼───────────────┼─────────┤
46ecvt_r(), fcvt_r(),  │ Thread safety │ MT-Safe │
47qecvt_r(), qfcvt_r() │               │         │
48       └─────────────────────┴───────────────┴─────────┘

CONFORMING TO

50       These functions are GNU extensions.
51

NOTES

53       These functions are obsolete.  Instead, sprintf(3) is recommended.
54

SEE ALSO

56       ecvt(3), qecvt(3), sprintf(3)
57

COLOPHON

59       This page is part of release 5.07 of the Linux  man-pages  project.   A
60       description  of  the project, information about reporting bugs, and the
61       latest    version    of    this    page,    can     be     found     at
62       https://www.kernel.org/doc/man-pages/.
63
64
65
66GNU                               2016-03-15                         ECVT_R(3)
Impressum