21 #ifndef ABC__base__prs__prs_h
22 #define ABC__base__prs__prs_h
84 #define Cba_PrsForEachModelVec( vVec, p, pName, i ) \
85 for ( i = 0; (i < Vec_IntSize(vVec)) && ((pName) = Abc_NamStr(p->pDesign->pNames, Vec_IntEntry(vVec,i))); i++ )
106 char * pThis;
int iLine = 0;
108 for ( pThis = p->
pBuffer; pThis < p->pCur; pThis++ )
109 iLine += (int)(*pThis ==
'\n');
110 printf(
"Line %d: %s\n", iLine, p->
ErrorStr );
146 int nFileSize, RetValue;
147 FILE * pFile = fopen( pFileName,
"rb" );
150 printf(
"Cannot open input file.\n" );
155 nFileSize = ftell( pFile );
159 pBuffer =
ABC_ALLOC(
char, nFileSize + 3 );
161 RetValue = fread( pBuffer+1, nFileSize, 1, pFile );
163 pBuffer[nFileSize + 0] =
'\n';
164 pBuffer[nFileSize + 1] =
'\0';
165 *ppLimit = pBuffer + nFileSize + 2;
171 char * pBuffer, * pLimit;
173 if ( pBuffer == NULL )
176 p->
pName = pFileName;
static int * Vec_IntArray(Vec_Int_t *p)
static int Cba_PrsErrorSet(Cba_Prs_t *p, char *pError, int Value)
MACRO DEFINITIONS ///.
static Cba_Ntk_t * Cba_NtkAlloc(Cba_Man_t *p, char *pName)
FUNCTION DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define ABC_ALLOC(type, num)
static void Vec_IntErase(Vec_Int_t *p)
char * Mem_FlexEntryFetch(Mem_Flex_t *p, int nBytes)
static Cba_Man_t * Cba_ManAlloc(char *pFileName)
static void Vec_WecZero(Vec_Wec_t *p)
static void Cba_ManFree(Cba_Man_t *p)
static void Cba_PrsErrorClear(Cba_Prs_t *p)
static void Cba_PrsSetupVecInt(Cba_Prs_t *p, Vec_Int_t *vTo, Vec_Int_t *vFrom)
Cba_PrsType_t
INCLUDES ///.
static Cba_Prs_t * Cba_PrsAlloc(char *pFileName)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
static int Cba_PrsErrorPrint(Cba_Prs_t *p)
static Cba_Ntk_t * Cba_PrsAddCurrentModel(Cba_Prs_t *p, int iNameId)
#define ABC_NAMESPACE_HEADER_END
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
static int Vec_IntSize(Vec_Int_t *p)
static void Cba_PrsFree(Cba_Prs_t *p)
#define ABC_CALLOC(type, num)
static char * Cba_PrsLoadFile(char *pFileName, char **ppLimit)
static void Vec_IntClear(Vec_Int_t *p)
static void Vec_StrErase(Vec_Str_t *p)