#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <malloc.h>
Go to the source code of this file.
◆ CVTBUFSIZE
◆ cvt()
Definition at line 45 of file fcvtbuf.c.
46{
48 double fi, fj;
50
56 {
59 }
62
63 if (fi != 0)
64 {
66 while (fi != 0)
67 {
68 fj =
modf(fi / 10, &fi);
69 *--p1 = (
int)((fj + .03) * 10) +
'0';
71 }
73 }
75 {
76 while ((fj =
arg * 10) < 1)
77 {
80 }
81 }
83 if (eflag == 0) p1 +=
r2;
86 {
89 }
91 {
94 *
p++ = (
int) fj +
'0';
95 }
97 {
100 }
102 *p1 += 5;
103 while (*p1 > '9')
104 {
105 *p1 = '0';
107 ++*--p1;
108 else
109 {
110 *p1 = '1';
111 (*decpt)++;
112 if (eflag == 0)
113 {
114 if (
p >
buf) *
p =
'0';
116 }
117 }
118 }
121}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLenum GLuint GLenum GLsizei const GLchar * buf
_Check_return_ _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y)
static size_t double int ndigits
static size_t double int int * decpt
Referenced by fcvtbuf(), _Locale_impl::insert_ctype_facets(), and CodecvtTest::special_encodings().
◆ fcvtbuf()
Definition at line 123 of file fcvtbuf.c.
124{
126}
static char * cvt(double arg, int ndigits, int *decpt, int *sign, char *buf, int eflag)
Referenced by _fcvt().