summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2022-09-07 11:42:59 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2022-09-07 11:42:59 +0200
commitaa21961c24c14c1e8f3c350552d6a1ae15656e21 (patch)
tree058ca6d4b49f7ba3fcc82645dbcb657b9cb49cfc
parent20f970f569d014420413c475dc87265d1ab35f02 (diff)
downloadabc-aa21961c24c14c1e8f3c350552d6a1ae15656e21.tar.gz
abc-aa21961c24c14c1e8f3c350552d6a1ae15656e21.tar.bz2
abc-aa21961c24c14c1e8f3c350552d6a1ae15656e21.zip
Support using large liberty files
-rw-r--r--src/map/scl/sclLiberty.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/scl/sclLiberty.c b/src/map/scl/sclLiberty.c
index 49b5c237..b448885d 100644
--- a/src/map/scl/sclLiberty.c
+++ b/src/map/scl/sclLiberty.c
@@ -63,7 +63,7 @@ struct Scl_Tree_t_
{
char * pFileName; // input Liberty file name
char * pContents; // file contents
- int nContents; // file size
+ long nContents; // file size
int nLines; // line counter
int nItems; // number of items
int nItermAlloc; // number of items allocated
@@ -506,10 +506,10 @@ void Scl_LibertyFixFileName( char * pFileName )
if ( *pHead == '>' )
*pHead = '\\';
}
-int Scl_LibertyFileSize( char * pFileName )
+long Scl_LibertyFileSize( char * pFileName )
{
FILE * pFile;
- int nFileSize;
+ long nFileSize;
pFile = fopen( pFileName, "rb" );
if ( pFile == NULL )
{
@@ -521,7 +521,7 @@ int Scl_LibertyFileSize( char * pFileName )
fclose( pFile );
return nFileSize;
}
-char * Scl_LibertyFileContents( char * pFileName, int nContents )
+char * Scl_LibertyFileContents( char * pFileName, long nContents )
{
FILE * pFile = fopen( pFileName, "rb" );
char * pContents = ABC_ALLOC( char, nContents+1 );
@@ -558,7 +558,7 @@ void Scl_LibertyStringDump( char * pFileName, Vec_Str_t * vStr )
Scl_Tree_t * Scl_LibertyStart( char * pFileName )
{
Scl_Tree_t * p;
- int RetValue;
+ long RetValue;
// read the file into the buffer
Scl_LibertyFixFileName( pFileName );
RetValue = Scl_LibertyFileSize( pFileName );