summaryrefslogtreecommitdiffstats
path: root/src/misc/extra
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-03-01 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2008-03-01 08:01:00 -0800
commit320c429bc46728c1faddfc561c166810aa134a04 (patch)
treec773cc96431cd38ae35484dae7d7d17a79671ac2 /src/misc/extra
parentf65983c2c0810cfb933f696952325a81d2378987 (diff)
downloadabc-320c429bc46728c1faddfc561c166810aa134a04.tar.gz
abc-320c429bc46728c1faddfc561c166810aa134a04.tar.bz2
abc-320c429bc46728c1faddfc561c166810aa134a04.zip
Version abc80301
Diffstat (limited to 'src/misc/extra')
-rw-r--r--src/misc/extra/extra.h2
-rw-r--r--src/misc/extra/extraUtilFile.c23
2 files changed, 25 insertions, 0 deletions
diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h
index 314257a2..dc2aac28 100644
--- a/src/misc/extra/extra.h
+++ b/src/misc/extra/extra.h
@@ -52,6 +52,7 @@ extern "C" {
#include <time.h>
#include "st.h"
#include "cuddInt.h"
+#include "port_type.h"
/*---------------------------------------------------------------------------*/
/* Constant declarations */
@@ -314,6 +315,7 @@ extern char * Extra_FileGetSimilarName( char * pFileNameWrong, char * pS1,
extern char * Extra_FileNameExtension( char * FileName );
extern char * Extra_FileNameAppend( char * pBase, char * pSuffix );
extern char * Extra_FileNameGeneric( char * FileName );
+extern char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix );
extern int Extra_FileSize( char * pFileName );
extern char * Extra_FileRead( FILE * pFile );
extern char * Extra_TimeStamp();
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c
index 4c51b8b5..243f3457 100644
--- a/src/misc/extra/extraUtilFile.c
+++ b/src/misc/extra/extraUtilFile.c
@@ -179,6 +179,29 @@ char * Extra_FileNameGeneric( char * FileName )
/**Function*************************************************************
+ Synopsis [Returns the composite name of the file.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix )
+{
+ static char Buffer[1000];
+ char * pDot;
+ strcpy( Buffer, pBase );
+ pDot = strstr( Buffer, "." );
+ if ( pDot )
+ *pDot = 0;
+ strcat( Buffer, pSuffix );
+ return Buffer;
+}
+
+/**Function*************************************************************
+
Synopsis [Returns the file size.]
Description [The file should be closed.]