From 320c429bc46728c1faddfc561c166810aa134a04 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 1 Mar 2008 08:01:00 -0800 Subject: Version abc80301 --- src/misc/extra/extra.h | 2 ++ src/misc/extra/extraUtilFile.c | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'src/misc/extra') 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 #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 @@ -177,6 +177,29 @@ char * Extra_FileNameGeneric( char * FileName ) return pRes; } +/**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.] -- cgit v1.2.3