/* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/bpo_l_026.c,v $ * $Author: mpoole $ * $Date: 2002/10/07 09:37:36 $ * $Revision: 1.2 $ * ******************************************************************************* * * Change History * * $Log: bpo_l_026.c,v $ * Revision 1.2 2002/10/07 09:37:36 mpoole * Initial checkin of mplib1-3.1.0 * * Revision 1.1 2002/10/07 09:36:53 mpoole * Initial checkin of mplib1-3.1.0 * * ******************************************************************************* */ #ident "$Header: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/bpo_l_026.c,v 1.2 2002/10/07 09:37:36 mpoole Exp $" /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Code starts here ------------------------------------------------------------------ */ static void remove_and_free( bpo_List_t *blp ) { void *vp; bpo_Node_t *bnp,*bnp2=NULL; while( (bnp=bpo_Remove_Head( blp )) ) { if (bnp==bnp2) break; /* Problem with list */ bnp2 = bnp; vp = GRPTR( bnp, bnp->lno_Item ); if (vp) shfree(vp); }; blp->lno_count=0; return; } int bpo_free_list_contents( bpo_List_t *blp ) { bpo_Work_List( blp, (bpo_Work_List_t)remove_and_free, NULL ); return(0); } /* -- End of File -- */