From 709020d7e9a68a1919e46592b067c06708159966 Mon Sep 17 00:00:00 2001 From: Arthur David Olson Date: Mon, 20 Feb 1989 20:44:12 -0500 Subject: [PATCH] const work SCCS-file: ialloc.c SCCS-SID: 8.18 --- ialloc.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ialloc.c b/ialloc.c index 6e5626c..d1db7b5 100644 --- a/ialloc.c +++ b/ialloc.c @@ -27,6 +27,7 @@ void ifree P((char * pointer)); char * imalloc(n) +const int n; { #ifdef MAL register char * result; @@ -40,6 +41,8 @@ imalloc(n) char * icalloc(nelem, elsize) +int nelem; +int elsize; { if (nelem == 0 || elsize == 0) nelem = elsize = 1; @@ -48,7 +51,8 @@ icalloc(nelem, elsize) char * irealloc(pointer, size) -char * pointer; +char * const pointer; +const int size; { if (NULLMAL(pointer)) return imalloc(size); @@ -57,8 +61,8 @@ char * pointer; char * icatalloc(old, new) -char * old; -const char * new; +char * const old; +const char * const new; { register char * result; register oldsize, newsize; @@ -77,14 +81,14 @@ const char * new; char * icpyalloc(string) -const char * string; +const char * const string; { return icatalloc((char *) NULL, string); } void ifree(p) -char * p; +char * const p; { if (!NULLMAL(p)) (void) free(p); @@ -92,7 +96,7 @@ char * p; void icfree(p) -char * p; +char * const p; { if (!NULLMAL(p)) (void) free(p);