PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
printf_hack.h
Go to the documentation of this file.
1
/*
2
* print_double(x) has the same effect as printf("%g", x), but is intended
3
* to produce the same formatting across all platforms.
4
*/
5
static
void
6
print_double
(
double
x
)
7
{
8
#ifdef WIN32
9
/* Change Windows' 3-digit exponents to look like everyone else's */
10
char
convert
[128];
11
int
vallen;
12
13
sprintf
(
convert
,
"%g"
,
x
);
14
vallen = strlen(
convert
);
15
16
if
(vallen >= 6 &&
17
convert
[vallen - 5] ==
'e'
&&
18
convert
[vallen - 3] ==
'0'
)
19
{
20
convert
[vallen - 3] =
convert
[vallen - 2];
21
convert
[vallen - 2] =
convert
[vallen - 1];
22
convert
[vallen - 1] =
'\0'
;
23
}
24
25
printf
(
"%s"
,
convert
);
26
#else
27
printf
(
"%g"
,
x
);
28
#endif
29
}
x
int x
Definition:
isn.c:75
sprintf
#define sprintf
Definition:
port.h:241
printf
#define printf(...)
Definition:
port.h:245
print_double
static void print_double(double x)
Definition:
printf_hack.h:6
convert
static void convert(const int32 val, char *const buf)
Definition:
zic.c:1992
src
interfaces
ecpg
test
printf_hack.h
Generated on Thu Mar 27 2025 06:13:27 for PostgreSQL Source Code by
1.9.4