diff options
Diffstat (limited to 'src/aig/nwk/nwkMan.c')
-rw-r--r-- | src/aig/nwk/nwkMan.c | 15 |
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; } |