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