src/aig/bar/bar.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BAR_PROGRESS_USE   1

Typedefs

typedef struct Bar_Progress_t_ Bar_Progress_t

Functions

Bar_Progress_tBar_ProgressStart (FILE *pFile, int nItemsTotal)
void Bar_ProgressStop (Bar_Progress_t *p)
void Bar_ProgressUpdate_int (Bar_Progress_t *p, int nItemsCur, char *pString)
static void Bar_ProgressUpdate (Bar_Progress_t *p, int nItemsCur, char *pString)

Define Documentation

#define BAR_PROGRESS_USE   1

CFile****************************************************************

FileName [bar.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Progress bar.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
bar.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

] INCLUDES /// PARAMETERS ///

Definition at line 40 of file bar.h.


Typedef Documentation

BASIC TYPES ///

Definition at line 46 of file bar.h.


Function Documentation

Bar_Progress_t* Bar_ProgressStart ( FILE *  pFile,
int  nItemsTotal 
)

MACRO DEFINITIONS /// FUNCTION DECLARATIONS ///

FUNCTION DEFINITIONS ///Function*************************************************************

Synopsis [Starts the progress bar.]

Description [The first parameter is the output stream (pFile), where the progress is printed. The current printing position should be the first one on the given line. The second parameters is the total number of items that correspond to 100% position of the progress bar.]

SideEffects []

SeeAlso []

Definition at line 60 of file bar.c.

00061 {
00062     Bar_Progress_t * p;
00063 //    extern int Abc_FrameShowProgress( void * p );
00064 //    extern void * Abc_FrameGetGlobalFrame();
00065 //    if ( !Abc_FrameShowProgress(Abc_FrameGetGlobalFrame()) ) return NULL;
00066     p = (Bar_Progress_t *) malloc(sizeof(Bar_Progress_t));
00067     memset( p, 0, sizeof(Bar_Progress_t) );
00068     p->pFile       = pFile;
00069     p->nItemsTotal = nItemsTotal;
00070     p->posTotal    = 78;
00071     p->posCur      = 1;
00072     p->nItemsNext  = (int)((7.0+p->posCur)*p->nItemsTotal/p->posTotal);
00073     Bar_ProgressShow( p, NULL );
00074     return p;
00075 }

void Bar_ProgressStop ( Bar_Progress_t p  ) 

Function*************************************************************

Synopsis [Stops the progress bar.]

Description []

SideEffects []

SeeAlso []

Definition at line 118 of file bar.c.

00119 {
00120     if ( p == NULL ) return;
00121     Bar_ProgressClean( p );
00122     free( p );
00123 }

static void Bar_ProgressUpdate ( Bar_Progress_t p,
int  nItemsCur,
char *  pString 
) [inline, static]

Definition at line 61 of file bar.h.

00061                                                                                                  {  
00062     if ( BAR_PROGRESS_USE && p && (nItemsCur < *((int*)p)) ) return; Bar_ProgressUpdate_int(p, nItemsCur, pString); }

void Bar_ProgressUpdate_int ( Bar_Progress_t p,
int  nItemsCur,
char *  pString 
)

Function*************************************************************

Synopsis [Updates the progress bar.]

Description []

SideEffects []

SeeAlso []

Definition at line 88 of file bar.c.

00089 {
00090     if ( p == NULL ) return;
00091     if ( nItemsCur < p->nItemsNext )
00092         return;
00093     if ( nItemsCur >= p->nItemsTotal )
00094     {
00095         p->posCur = 78;
00096         p->nItemsNext = 0x7FFFFFFF;
00097     }
00098     else
00099     {
00100         p->posCur += 7;
00101         p->nItemsNext = (int)((7.0+p->posCur)*p->nItemsTotal/p->posTotal);
00102     }
00103     Bar_ProgressShow( p, pString );
00104 }


Generated on Tue Jan 5 12:18:13 2010 for abc70930 by  doxygen 1.6.1