summaryrefslogtreecommitdiffstats
path: root/src/aig/ioa
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/ioa')
-rw-r--r--src/aig/ioa/ioaUtil.c19
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