bar.h 2.55 KB
Newer Older
Alan Mishchenko committed
1 2
/**CFile****************************************************************

Alan Mishchenko committed
3
  FileName    [bar.h]
Alan Mishchenko committed
4 5 6

  SystemName  [ABC: Logic synthesis and verification system.]

Alan Mishchenko committed
7
  PackageName [Progress bar.]
Alan Mishchenko committed
8 9 10 11 12 13 14

  Synopsis    [External declarations.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

Alan Mishchenko committed
15
  Date        [Ver. 1.0. Started - June 20, 2005.]
Alan Mishchenko committed
16

Alan Mishchenko committed
17
  Revision    [$Id: bar.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
Alan Mishchenko committed
18 19

***********************************************************************/
Alan Mishchenko committed
20 21 22
 
#ifndef __BAR_H__
#define __BAR_H__
Alan Mishchenko committed
23

24

Alan Mishchenko committed
25 26 27
#ifdef _WIN32
#define inline __inline // compatible with MS VS 6.0
#endif
Alan Mishchenko committed
28 29 30 31 32 33 34 35 36

////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

37 38 39 40


ABC_NAMESPACE_HEADER_START

Alan Mishchenko committed
41

Alan Mishchenko committed
42 43
#define BAR_PROGRESS_USE   1

Alan Mishchenko committed
44 45 46
////////////////////////////////////////////////////////////////////////
///                         BASIC TYPES                              ///
////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
47 48
 
typedef struct Bar_Progress_t_ Bar_Progress_t;
Alan Mishchenko committed
49 50 51 52 53 54 55 56 57

////////////////////////////////////////////////////////////////////////
///                      MACRO DEFINITIONS                           ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                    FUNCTION DECLARATIONS                         ///
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
58 59 60 61 62 63 64 65
/*=== bar.c ==========================================================*/
extern Bar_Progress_t *  Bar_ProgressStart( FILE * pFile, int nItemsTotal );
extern void              Bar_ProgressStop( Bar_Progress_t * p );
extern void              Bar_ProgressUpdate_int( Bar_Progress_t * p, int nItemsCur, char * pString );

static inline void       Bar_ProgressUpdate( Bar_Progress_t * p, int nItemsCur, char * pString ) {  
    if ( BAR_PROGRESS_USE && p && (nItemsCur < *((int*)p)) ) return; Bar_ProgressUpdate_int(p, nItemsCur, pString); }

Alan Mishchenko committed
66

67 68 69 70 71


ABC_NAMESPACE_HEADER_END


Alan Mishchenko committed
72 73 74 75 76 77 78

#endif

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////