summaryrefslogtreecommitdiffstats
path: root/src/aig/ntl/ntlUtil.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/aig/ntl/ntlUtil.c
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/aig/ntl/ntlUtil.c')
-rw-r--r--src/aig/ntl/ntlUtil.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/aig/ntl/ntlUtil.c b/src/aig/ntl/ntlUtil.c
index 0bd86247..c3c6fd49 100644
--- a/src/aig/ntl/ntlUtil.c
+++ b/src/aig/ntl/ntlUtil.c
@@ -20,6 +20,9 @@
#include "ntl.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -30,6 +33,32 @@
/**Function*************************************************************
+ Synopsis [Returns one if the file has a given extension.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Ntl_FileIsType( char * pFileName, char * pS1, char * pS2, char * pS3 )
+{
+ int lenS, lenF = strlen(pFileName);
+ lenS = pS1 ? strlen(pS1) : 0;
+ if ( lenS && lenF > lenS && !strncmp( pFileName+lenF-lenS, pS1, lenS ) )
+ return 1;
+ lenS = pS2 ? strlen(pS2) : 0;
+ if ( lenS && lenF > lenS && !strncmp( pFileName+lenF-lenS, pS2, lenS ) )
+ return 1;
+ lenS = pS3 ? strlen(pS3) : 0;
+ if ( lenS && lenF > lenS && !strncmp( pFileName+lenF-lenS, pS3, lenS ) )
+ return 1;
+ return 0;
+}
+
+/**Function*************************************************************
+
Synopsis [Reads the maximum number of fanins.]
Description []
@@ -419,7 +448,7 @@ Vec_Vec_t * Ntl_ManTransformRegClasses( Ntl_Man_t * pMan, int nSizeMax, int fVer
if ( fVerbose )
{
printf( "The number of selected register clases = %d.\n", Vec_PtrSize(vParts) );
- Vec_PtrForEachEntry( vParts, vPart, i )
+ Vec_PtrForEachEntry( Vec_Int_t *, vParts, vPart, i )
printf( "(%d, %d) ", i, Vec_IntSize(vPart) );
printf( "\n" );
}
@@ -704,3 +733,5 @@ void Ntl_ManRemoveUselessNets( Ntl_Man_t * p )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+