/*****************************************************************************/ /* */ /* UNIT: NTL1_Destroy_Block (Level 1 library routine) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 12 JUL 94 Version 1.0 */ /* */ /* Function: */ /* */ /* Procedure releases all memory space occupied by a block structure */ /* (containing data loaded from an alignment file); returns NULL as the */ /* proper new value for the destroyed block pointer */ /* */ /*****************************************************************************/ #include #include #include "ntl1.h" /*****************************************************************************/ block_ptr NTL1_Destroy_Block (block_ptr target) { if (target == NULL) return NULL; else { if (target -> contents != NULL) free (target -> contents); free (target); return NULL; /* Returned value to be assigned to the destroyed block ptr */ } }