summaryrefslogtreecommitdiffstats
path: root/src/aig/ioa/ioaUtil.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-03-05 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2008-03-05 08:01:00 -0800
commit8bd19a27bf2f50b7502d01bbbbe71714c154cd2f (patch)
treeb36f9f438158f8d95e932728ab4af809a63838d1 /src/aig/ioa/ioaUtil.c
parent320c429bc46728c1faddfc561c166810aa134a04 (diff)
downloadabc-8bd19a27bf2f50b7502d01bbbbe71714c154cd2f.tar.gz
abc-8bd19a27bf2f50b7502d01bbbbe71714c154cd2f.tar.bz2
abc-8bd19a27bf2f50b7502d01bbbbe71714c154cd2f.zip
Version abc80305
Diffstat (limited to 'src/aig/ioa/ioaUtil.c')
-rw-r--r--src/aig/ioa/ioaUtil.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/aig/ioa/ioaUtil.c b/src/aig/ioa/ioaUtil.c
index 79dcca1e..6063d8be 100644
--- a/src/aig/ioa/ioaUtil.c
+++ b/src/aig/ioa/ioaUtil.c
@@ -88,6 +88,41 @@ char * Ioa_FileNameGeneric( char * FileName )
/**Function*************************************************************
+ Synopsis [Returns the composite name of the file.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+char * Ioa_FileNameGenericAppend( char * pBase, char * pSuffix )
+{
+ static char Buffer[1000];
+ char * pDot;
+ if ( pBase == NULL )
+ {
+ strcpy( Buffer, pSuffix );
+ return Buffer;
+ }
+ strcpy( Buffer, pBase );
+ pDot = strstr( Buffer, "." );
+ if ( pDot )
+ *pDot = 0;
+ strcat( Buffer, pSuffix );
+ // find the last occurrance of slash
+ for ( pDot = Buffer + strlen(Buffer) - 1; pDot >= Buffer; pDot-- )
+ if (!((*pDot >= '0' && *pDot <= '9') ||
+ (*pDot >= 'a' && *pDot <= 'z') ||
+ (*pDot >= 'A' && *pDot <= 'Z') ||
+ *pDot == '_' || *pDot == '.') )
+ break;
+ return pDot + 1;
+}
+
+/**Function*************************************************************
+
Synopsis [Returns the time stamp.]
Description [The file should be closed.]