diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-05-15 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-05-15 08:01:00 -0700 |
commit | 74ff01bfb54e9f0a68ac88b827521a422269a144 (patch) | |
tree | 240c07b87e355dba9caa1e6187d6673b92996eac /src/aig/ioa/ioaUtil.c | |
parent | 37b6c727f1276d9d97a79a8f40271aee446a4ba4 (diff) | |
download | abc-74ff01bfb54e9f0a68ac88b827521a422269a144.tar.gz abc-74ff01bfb54e9f0a68ac88b827521a422269a144.tar.bz2 abc-74ff01bfb54e9f0a68ac88b827521a422269a144.zip |
Version abc80515
Diffstat (limited to 'src/aig/ioa/ioaUtil.c')
-rw-r--r-- | src/aig/ioa/ioaUtil.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/aig/ioa/ioaUtil.c b/src/aig/ioa/ioaUtil.c index 6063d8be..b0e5618b 100644 --- a/src/aig/ioa/ioaUtil.c +++ b/src/aig/ioa/ioaUtil.c @@ -69,20 +69,10 @@ int Ioa_FileSize( char * pFileName ) ***********************************************************************/ char * Ioa_FileNameGeneric( char * FileName ) { - char * pDot; - char * pUnd; - char * pRes; - - // find the generic name of the file + char * pDot, * pRes; pRes = Aig_UtilStrsav( FileName ); - // find the pointer to the "." symbol in the file name -// pUnd = strstr( FileName, "_" ); - pUnd = NULL; - pDot = strstr( FileName, "." ); - if ( pUnd ) - pRes[pUnd - FileName] = 0; - else if ( pDot ) - pRes[pDot - FileName] = 0; + if ( (pDot = strrchr( pRes, '.' )) ) + *pDot = 0; return pRes; } @@ -107,8 +97,7 @@ char * Ioa_FileNameGenericAppend( char * pBase, char * pSuffix ) return Buffer; } strcpy( Buffer, pBase ); - pDot = strstr( Buffer, "." ); - if ( pDot ) + if ( (pDot = strrchr( Buffer, '.' )) ) *pDot = 0; strcat( Buffer, pSuffix ); // find the last occurrance of slash |