/*****************************************************************************/ /* */ /* UNIT: NTL1_Destroy_Plain_List (Level 1 library routine) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 14 MAR 97 Version 1.0 */ /* */ /* Function: */ /* */ /* Procedure releases all memory space occupied by a list of records */ /* loaded from a plain format landmarks file; returns NULL as the proper */ /* new value for the destroyed list head pointer */ /* */ /*****************************************************************************/ #include #include #include "ntl1.h" /*****************************************************************************/ plain_ptr NTL1_Destroy_Plain_List (plain_ptr plain_list) { plain_ptr current; while (plain_list != NULL) { current = plain_list; plain_list = plain_list -> next; if (current -> text != NULL) free (current -> text); free (current); } return NULL; }