diff options
Diffstat (limited to 'rsc/source/rscpp')
-rwxr-xr-x[-rw-r--r--] | rsc/source/rscpp/cpp.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | rsc/source/rscpp/cpp4.c | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | rsc/source/rscpp/cpp6.c | 9 |
3 files changed, 9 insertions, 8 deletions
diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index af579fe6303e..c9421412e57a 100644..100755 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -336,8 +336,8 @@ int scanstring( int c, void (*outfun)( int c ) ); void scannumber( int c, void (*outfun)( int c ) ); void save( int c ); char* savestring( char* text ); -FILEINFO* getfile( int bufsize, char* name ); -char *getmem( int size ); +FILEINFO* getfile( size_t bufsize, char* name ); +char *getmem( size_t size ); DEFBUF* lookid( int c ); DEFBUF* defendel( char* name, int delete ); void dunpdef( char* why ); diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 034c0123816e..03f35604a562 100644..100755 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -320,7 +320,7 @@ void doundef() */ void textput(char* text) { - int size; + size_t size; size = strlen(text) + 1; if ((parmp + size) >= &parm[NPARMWORK]) @@ -531,7 +531,7 @@ FILE_LOCAL void expstuff(DEFBUF* tokenp) int c; /* Current character */ char* inp; /* -> repl string */ char* defp; /* -> macro output buff */ - int size; /* Actual parm. size */ + size_t size; /* Actual parm. size */ char* defend; /* -> output buff end */ int string_magic; /* String formal hack */ FILEINFO* file; /* Funny #include */ diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index 6905612dcf86..9444b720c80b 100644..100755 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -485,7 +485,8 @@ char* savestring(char* text) { char* result; - result = getmem(strlen(text) + 1); + size_t size = strlen(text) + 1; + result = getmem(size); strcpy(result, text); return (result); } @@ -493,10 +494,10 @@ char* savestring(char* text) /* * Common FILEINFO buffer initialization for a new file or macro. */ -FILEINFO* getfile(int bufsize, char* name) +FILEINFO* getfile(size_t bufsize, char* name) { FILEINFO* file; - int size; + size_t size; size = strlen(name); /* File/macro name */ file = (FILEINFO*) getmem(sizeof (FILEINFO) + bufsize + size); @@ -518,7 +519,7 @@ FILEINFO* getfile(int bufsize, char* name) /* * Get a block of free memory. */ -char* getmem(int size) +char* getmem(size_t size) { char* result; |