summaryrefslogtreecommitdiffstats
path: root/src/aig/nwk/nwkMan.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-05-15 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-05-15 08:01:00 -0700
commit74ff01bfb54e9f0a68ac88b827521a422269a144 (patch)
tree240c07b87e355dba9caa1e6187d6673b92996eac /src/aig/nwk/nwkMan.c
parent37b6c727f1276d9d97a79a8f40271aee446a4ba4 (diff)
downloadabc-74ff01bfb54e9f0a68ac88b827521a422269a144.tar.gz
abc-74ff01bfb54e9f0a68ac88b827521a422269a144.tar.bz2
abc-74ff01bfb54e9f0a68ac88b827521a422269a144.zip
Version abc80515
Diffstat (limited to 'src/aig/nwk/nwkMan.c')
-rw-r--r--src/aig/nwk/nwkMan.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/aig/nwk/nwkMan.c b/src/aig/nwk/nwkMan.c
index 55c5354c..da402f21 100644
--- a/src/aig/nwk/nwkMan.c
+++ b/src/aig/nwk/nwkMan.c
@@ -174,19 +174,10 @@ int Nwk_ManCompareAndSaveBest( Nwk_Man_t * pNtk, void * pNtl )
***********************************************************************/
char * Nwk_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;
}