Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
5d01ed7f
Commit
5d01ed7f
authored
Jul 13, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the integer print-out problem.
parent
3c4351ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
src/misc/util/abc_global.h
+18
-12
No files found.
src/misc/util/abc_global.h
View file @
5d01ed7f
...
...
@@ -287,21 +287,27 @@ static inline void Abc_Print( int level, const char * format, ... )
static
inline
void
Abc_PrintInt
(
int
i
)
{
double
v3
=
(
double
)
i
/
1000
;
double
v6
=
(
double
)
i
/
1000000
;
Abc_Print
(
1
,
" "
);
if
(
i
>
-
1000
&&
i
<
1000
)
Abc_Print
(
1
,
" %4d"
,
i
);
else
if
(
i
>
-
10000
&&
i
<
10000
)
Abc_Print
(
1
,
"%4.2fk"
,
(
double
)
i
/
1000
);
else
if
(
i
>
-
100000
&&
i
<
100000
)
Abc_Print
(
1
,
"%4.1fk"
,
(
double
)
i
/
1000
);
else
if
(
i
>
-
1000000
&&
i
<
1000000
)
Abc_Print
(
1
,
"%4.0fk"
,
(
double
)
i
/
1000
);
else
if
(
i
>
-
10000000
&&
i
<
10000000
)
Abc_Print
(
1
,
"%4.2fm"
,
(
double
)
i
/
1000000
);
else
if
(
i
>
-
100000000
&&
i
<
100000000
)
Abc_Print
(
1
,
"%4.1fm"
,
(
double
)
i
/
1000000
);
else
if
(
i
>
-
1000000000
&&
i
<
1000000000
)
Abc_Print
(
1
,
"%4.0fm"
,
(
double
)
i
/
1000000
);
else
if
(
v3
>
-
10
.
0
&&
v3
<
10
.
0
)
Abc_Print
(
1
,
"%4.2fk"
,
v3
);
else
if
(
v3
>
-
100
.
0
&&
v3
<
100
.
0
)
Abc_Print
(
1
,
"%4.1fk"
,
v3
);
else
if
(
v3
>
-
1000
.
0
&&
v3
<
1000
.
0
)
Abc_Print
(
1
,
"%4.0fk"
,
v3
);
else
if
(
v6
>
-
10
.
0
&&
v6
<
10
.
0
)
Abc_Print
(
1
,
"%4.2fm"
,
v6
);
else
if
(
v6
>
-
100
.
0
&&
v6
<
100
.
0
)
Abc_Print
(
1
,
"%4.1fm"
,
v6
);
else
if
(
v6
>
-
1000
.
0
&&
v6
<
1000
.
0
)
Abc_Print
(
1
,
"%4.0fm"
,
v6
);
}
static
inline
void
Abc_PrintTime
(
int
level
,
const
char
*
pStr
,
clock_t
time
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment