text: /* freblk.c Free up an entire memory_freblk_rcsid[] = "$Id: freblk.c,v 1.8 2002/03/05 19:10:42 ian Rel $"; #endif #include "alloc.h" /* Free up an entire memory block. */ #if UUCONF_ANSI_C void #endif uuconf_free_block (pblock) pointer pblock; { struct sblock *q = (struct sblock *) pblock; struct sblock *qloop; /* We have to free the added blocks first because the list may link into blocks that are earlier on the list. */ for (qloop = q; qloop != NULL; qloop = qloop->qnext) { struct sadded *qadd; for (qadd = qloop->qadded; qadd != NULL; qadd = qadd->qnext) free (qadd->padded); } while (q != NULL) { struct sblock *qnext; qnext = q->qnext; free ((pointer) q); q = qnext; } }