diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:04:53 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:04:53 -0700 |
commit | 0398ced8243806439b814f21ca7d6e584cea13a1 (patch) | |
tree | 8812787fdd028d6fa04b1206c628a1b0c4743417 /src/map/mapper | |
parent | 70697f868a263930e971c062e5b46e64fbb1ee18 (diff) | |
download | abc-0398ced8243806439b814f21ca7d6e584cea13a1.tar.gz abc-0398ced8243806439b814f21ca7d6e584cea13a1.tar.bz2 abc-0398ced8243806439b814f21ca7d6e584cea13a1.zip |
Version abc90714
committer: Baruch Sterin <baruchs@gmail.com>
Diffstat (limited to 'src/map/mapper')
-rw-r--r-- | src/map/mapper/mapperLib.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c index 942caa8e..cc64d8b8 100644 --- a/src/map/mapper/mapperLib.c +++ b/src/map/mapper/mapperLib.c @@ -174,15 +174,20 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) { Abc_Frame_t * pAbc = Abc_FrameGetGlobalFrame(); char * pNameGeneric; - char FileNameGenlib[100]; - char FileNameSuper[100]; - char CommandSuper[500]; - char CommandRead[500]; + char * FileNameGenlib; + char * FileNameSuper; + char * CommandSuper; + char * CommandRead; FILE * pFile; if ( pLib == NULL ) return 0; + FileNameGenlib = ABC_ALLOC( char, 10000 ); + FileNameSuper = ABC_ALLOC( char, 10000 ); + CommandSuper = ABC_ALLOC( char, 10000 ); + CommandRead = ABC_ALLOC( char, 10000 ); + // write the current library into the file sprintf( FileNameGenlib, "%s_temp", Mio_LibraryReadName(pLib) ); pFile = fopen( FileNameGenlib, "w" ); @@ -197,6 +202,10 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) sprintf( CommandSuper, "super -l 1 -i 5 -d 10000000 -a 10000000 -t 100 %s", FileNameGenlib ); if ( Cmd_CommandExecute( pAbc, CommandSuper ) ) { + ABC_FREE( FileNameGenlib ); + ABC_FREE( FileNameSuper ); + ABC_FREE( CommandSuper ); + ABC_FREE( CommandRead ); fprintf( stdout, "Cannot execute command \"%s\".\n", CommandSuper ); return 0; } @@ -215,6 +224,10 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) unlink( FileNameSuper ); #endif fprintf( stdout, "Cannot execute command \"%s\".\n", CommandRead ); + ABC_FREE( FileNameGenlib ); + ABC_FREE( FileNameSuper ); + ABC_FREE( CommandSuper ); + ABC_FREE( CommandRead ); return 0; } @@ -225,6 +238,10 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) unlink( FileNameSuper ); #endif */ + ABC_FREE( FileNameGenlib ); + ABC_FREE( FileNameSuper ); + ABC_FREE( CommandSuper ); + ABC_FREE( CommandRead ); return 1; } |