if (ptr == NULL) \
ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \
if (ptr == NULL) \
errx(1, "out of space"); \
if (ptr == NULL) \
ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \
if (ptr == NULL) \
errx(1, "out of space"); \