2 ** This file is in the public domain, so clarified as of
3 ** 2006-07-17 by Arthur David Olson.
7 * $FreeBSD: src/usr.sbin/zic/ialloc.c,v 1.5 1999/08/28 01:21:18 peter Exp $
14 icatalloc(char *const old, const char * const new)
19 newsize = (new == NULL) ? 0 : strlen(new);
22 else if (newsize == 0)
24 else oldsize = strlen(old);
25 if ((result = realloc(old, oldsize + newsize + 1)) != NULL)
27 strcpy(result + oldsize, new);
32 icpyalloc(const char * const string)
34 return icatalloc(NULL, string);