summaryrefslogtreecommitdiffstats
path: root/src/map/mapper/mapperTree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mapper/mapperTree.c')
-rw-r--r--src/map/mapper/mapperTree.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/map/mapper/mapperTree.c b/src/map/mapper/mapperTree.c
index 76c1e520..6e69bc69 100644
--- a/src/map/mapper/mapperTree.c
+++ b/src/map/mapper/mapperTree.c
@@ -34,7 +34,7 @@ static int Map_LibraryGetMaxSuperPi_rec( Map_Super_t * pGate );
static unsigned Map_LibraryGetGateSupp_rec( Map_Super_t * pGate );
// fanout limits
-static const int s_MapFanoutLimits[10] = { 1/*0*/, 10/*1*/, 5/*2*/, 2/*3*/, 1/*4*/, 1/*5*/, 1/*6*/ };
+extern const int s_MapFanoutLimits[10] = { 1/*0*/, 10/*1*/, 5/*2*/, 2/*3*/, 1/*4*/, 1/*5*/, 1/*6*/ };
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -124,7 +124,14 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam
// get the genlib file name (base)
pLibName = strtok( pTemp, " \t\r\n" );
-
+#ifdef __linux__
+ if( strchr( pLibName, '/' ) != NULL )
+ pLibName = strrchr( pLibName, '/' ) + 1;
+#else
+ if( strchr( pLibName, '\\' ) != NULL )
+ pLibName = strrchr( pLibName, '\\' ) + 1;
+#endif
+
if ( strcmp( pLibName, "GATE" ) == 0 )
{
printf( "The input file \"%s\" looks like a GENLIB file and not a supergate library file.\n", pLib->pName );
@@ -145,7 +152,7 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam
if ( pStr == pLibFile )
strcpy( pLibFile, pLibName );
else
- sprintf( pStr, "/%s", pLibName );
+ sprintf( pStr, "\\%s", pLibName );
}
#endif