/*****************************************************************************/ /* */ /* UNIT: NTL1_Flip_Blocks (Level 1 library routine) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 12 JUL 94 Version 1.0 */ /* */ /* Function: */ /* */ /* Procedure reverses the received link list of block cells (from */ /* alignment files); returns the pointer to the new head of the list */ /* */ /*****************************************************************************/ #include #include #include "ntl1.h" /*****************************************************************************/ block_ptr NTL1_Flip_Blocks (block_ptr list) { block_ptr ret_val; if (list == NULL) return NULL; else if (list -> next == NULL) return list; else { ret_val = NTL1_Flip_Blocks (list -> next); (list -> next) -> next = list; list -> next = NULL; return ret_val; } }