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
1e40c5b7
Commit
1e40c5b7
authored
Mar 02, 2012
by
Niklas Een
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed warning in Abc_Print
parent
90e95fcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
28 deletions
+27
-28
src/misc/util/abc_global.h
+27
-28
No files found.
src/misc/util/abc_global.h
View file @
1e40c5b7
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
Revision [$Id: abc_global.h,v 1.00 2009/01/30 00:00:00 alanmi Exp $]
Revision [$Id: abc_global.h,v 1.00 2009/01/30 00:00:00 alanmi Exp $]
***********************************************************************/
***********************************************************************/
#ifndef ABC__misc__util__abc_global_h
#ifndef ABC__misc__util__abc_global_h
#define ABC__misc__util__abc_global_h
#define ABC__misc__util__abc_global_h
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
# define ABC_NAMESPACE_IMPL_END
# define ABC_NAMESPACE_IMPL_END
# define ABC_NAMESPACE_PREFIX
# define ABC_NAMESPACE_PREFIX
#endif // #ifdef __cplusplus
#endif // #ifdef __cplusplus
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
@@ -208,10 +208,10 @@ typedef ABC_UINT64_T word;
...
@@ -208,10 +208,10 @@ typedef ABC_UINT64_T word;
#define ABC_PRMP(a,f,F) (Abc_Print(1, "%s = ", (a)), Abc_Print(1, "%7.3f Mb (%6.2f %%) ", (1.0*(f)/(1<<20)), ((F)? 100.0*(f)/(F) : 0.0) ) )
#define ABC_PRMP(a,f,F) (Abc_Print(1, "%s = ", (a)), Abc_Print(1, "%7.3f Mb (%6.2f %%) ", (1.0*(f)/(1<<20)), ((F)? 100.0*(f)/(F) : 0.0) ) )
#define ABC_ALLOC(type, num) ((type *) malloc(sizeof(type) * (num)))
#define ABC_ALLOC(type, num) ((type *) malloc(sizeof(type) * (num)))
#define ABC_CALLOC(type, num)
((type *) calloc((num), sizeof(type)))
#define ABC_CALLOC(type, num) ((type *) calloc((num), sizeof(type)))
#define ABC_FALLOC(type, num)
((type *) memset(malloc(sizeof(type) * (num)), 0xff, sizeof(type) * (num)))
#define ABC_FALLOC(type, num) ((type *) memset(malloc(sizeof(type) * (num)), 0xff, sizeof(type) * (num)))
#define ABC_FREE(obj)
((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
#define ABC_FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
#define ABC_REALLOC(type, obj, num)
\
#define ABC_REALLOC(type, obj, num) \
((obj) ? ((type *) realloc((char *)(obj), sizeof(type) * (num))) : \
((obj) ? ((type *) realloc((char *)(obj), sizeof(type) * (num))) : \
((type *) malloc(sizeof(type) * (num))))
((type *) malloc(sizeof(type) * (num))))
...
@@ -247,48 +247,48 @@ static inline int Abc_LitNot( int Lit ) { return Lit ^ 1;
...
@@ -247,48 +247,48 @@ static inline int Abc_LitNot( int Lit ) { return Lit ^ 1;
static
inline
int
Abc_LitNotCond
(
int
Lit
,
int
c
)
{
return
Lit
^
(
int
)(
c
>
0
);
}
static
inline
int
Abc_LitNotCond
(
int
Lit
,
int
c
)
{
return
Lit
^
(
int
)(
c
>
0
);
}
static
inline
int
Abc_LitRegular
(
int
Lit
)
{
return
Lit
&
~
01
;
}
static
inline
int
Abc_LitRegular
(
int
Lit
)
{
return
Lit
&
~
01
;
}
enum
Abc_VerbLevel
enum
Abc_VerbLevel
{
{
ABC_PROMPT
=
-
2
,
ABC_PROMPT
=
-
2
,
ABC_ERROR
=
-
1
,
ABC_ERROR
=
-
1
,
ABC_WARNING
=
0
,
ABC_WARNING
=
0
,
ABC_STANDARD
=
1
,
ABC_STANDARD
=
1
,
ABC_VERBOSE
=
2
ABC_VERBOSE
=
2
};
};
static
inline
void
Abc_Print
(
int
level
,
const
char
*
format
,
...
)
static
inline
void
Abc_Print
(
int
level
,
const
char
*
format
,
...
)
{
{
extern
ABC_DLL
int
Abc_FrameIsBridgeMode
();
extern
ABC_DLL
int
Abc_FrameIsBridgeMode
();
va_list
args
;
va_list
args
;
if
(
level
==
ABC_ERROR
)
if
(
level
==
ABC_ERROR
)
printf
(
"Error: "
);
printf
(
"Error: "
);
else
if
(
level
==
ABC_WARNING
)
else
if
(
level
==
ABC_WARNING
)
printf
(
"Warning: "
);
printf
(
"Warning: "
);
va_start
(
args
,
format
);
va_start
(
args
,
format
);
if
(
Abc_FrameIsBridgeMode
()
)
if
(
Abc_FrameIsBridgeMode
()
)
{
{
extern
int
Gia_ManToBridgeText
(
FILE
*
pFile
,
int
Size
,
unsigned
char
*
pBuffer
);
extern
int
Gia_ManToBridgeText
(
FILE
*
pFile
,
int
Size
,
unsigned
char
*
pBuffer
);
extern
char
*
vnsprintf
(
const
char
*
format
,
va_list
args
);
extern
char
*
vnsprintf
(
const
char
*
format
,
va_list
args
);
unsigned
char
*
tmp
=
vnsprintf
(
format
,
args
);
char
*
tmp
=
vnsprintf
(
format
,
args
);
Gia_ManToBridgeText
(
stdout
,
strlen
(
tmp
),
tmp
);
Gia_ManToBridgeText
(
stdout
,
strlen
(
tmp
),
(
unsigned
char
*
)
tmp
);
free
(
tmp
);
free
(
tmp
);
}
}
else
else
vprintf
(
format
,
args
);
vprintf
(
format
,
args
);
va_end
(
args
);
va_end
(
args
);
}
}
static
inline
void
Abc_PrintTime
(
int
level
,
const
char
*
pStr
,
int
time
)
static
inline
void
Abc_PrintTime
(
int
level
,
const
char
*
pStr
,
int
time
)
{
{
ABC_PRT
(
pStr
,
time
);
ABC_PRT
(
pStr
,
time
);
}
}
static
inline
void
Abc_PrintTimeP
(
int
level
,
const
char
*
pStr
,
int
time
,
int
Time
)
static
inline
void
Abc_PrintTimeP
(
int
level
,
const
char
*
pStr
,
int
time
,
int
Time
)
{
{
ABC_PRTP
(
pStr
,
time
,
Time
);
ABC_PRTP
(
pStr
,
time
,
Time
);
}
}
static
inline
void
Abc_PrintMemoryP
(
int
level
,
const
char
*
pStr
,
int
time
,
int
Time
)
static
inline
void
Abc_PrintMemoryP
(
int
level
,
const
char
*
pStr
,
int
time
,
int
Time
)
{
{
ABC_PRMP
(
pStr
,
time
,
Time
);
ABC_PRMP
(
pStr
,
time
,
Time
);
}
}
...
@@ -300,11 +300,11 @@ static inline int Abc_PrimeCudd( unsigned int p )
...
@@ -300,11 +300,11 @@ static inline int Abc_PrimeCudd( unsigned int p )
p
--
;
p
--
;
do
{
do
{
p
++
;
p
++
;
if
(
p
&
1
)
if
(
p
&
1
)
{
{
pn
=
1
;
pn
=
1
;
i
=
3
;
i
=
3
;
while
((
unsigned
)
(
i
*
i
)
<=
p
)
while
((
unsigned
)
(
i
*
i
)
<=
p
)
{
{
if
(
p
%
i
==
0
)
{
if
(
p
%
i
==
0
)
{
pn
=
0
;
pn
=
0
;
...
@@ -312,8 +312,8 @@ static inline int Abc_PrimeCudd( unsigned int p )
...
@@ -312,8 +312,8 @@ static inline int Abc_PrimeCudd( unsigned int p )
}
}
i
+=
2
;
i
+=
2
;
}
}
}
}
else
else
pn
=
0
;
pn
=
0
;
}
while
(
!
pn
);
}
while
(
!
pn
);
return
(
p
);
return
(
p
);
...
@@ -341,4 +341,3 @@ ABC_NAMESPACE_HEADER_END
...
@@ -341,4 +341,3 @@ ABC_NAMESPACE_HEADER_END
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
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