2 ** This file is in the public domain, so clarified as of
3 ** 2006-07-17 by Arthur David Olson.
11 icatalloc(char *const old, const char *const new)
13 register char * result;
14 register int oldsize, newsize;
16 newsize = (new == NULL) ? 0 : strlen(new);
19 else if (newsize == 0)
21 else oldsize = strlen(old);
22 if ((result = realloc(old, oldsize + newsize + 1)) != NULL)
24 (void) strcpy(result + oldsize, new);
29 icpyalloc(const char *const string)
31 return icatalloc(NULL, string);