.\" $Id: freechain.3,v 1.1 2002/03/08 13:51:02 fred Exp $ .\" @(#)freechain.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot .if t \{\ .XS \n% .ti 0.2i freechain .XE .XS4 \n% .ti 0.2i freechain .XE4 \} .TH FREECHAIN 3 "October 1, 1997" "ASIM/LIP6" "MBK UTILITY FUNCTIONS" .SH NAME freechain \- free a \fBchain_list\fP .so jessie/alliance/alc_origin.1.en.gz .SH SYNOPSYS .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "mut.h" void freechain(pt) chain_list \(**pt; .ft R .fi .SH PARAMETER .TP 20 \fIpt\fP Pointer to the \fBchain\fP list to be freed .SH DESCRIPTION \fBfreechain\fP frees the \fBchain_list\fP pointed to by \fIpt\fP. All the elements of the list are put back in the list of free blocks. .SH EXAMPLE .ta 3n 6n 9n 12n 15n 18n 21n .nf .if n \{\ .ft B \} .if t \{\ .ft CR \} #include "mut.h" void free_from(c, i) /\(** erase list from ith element \(**/ chain_list \(**c; int i; { chain_list \(**t; while (i--) c = c\->NEXT; t = c\->NEXT, c\->NEXT = NULL; freechain(t); } .ft R .fi .SH SEE ALSO .BR mbk (1), .BR chain (3), .BR addchain (3), .BR delchain (3). .so jessie/alliance/alc_bug_report.1.en.gz