--- stack/stack.c 2002/01/08 14:31:23 1.9 +++ stack/stack.c 2002/01/08 17:31:27 1.10 @@ -308,6 +308,18 @@ *stack_head= new_head; } +extern void swap(stackitem** stack_head) +{ + stackitem* temp= (*stack_head); + + if((*stack_head)==NULL || (*stack_head)->next==NULL) + return; + + *stack_head= (*stack_head)->next; + temp->next= (*stack_head)->next; + (*stack_head)->next= temp; +} + extern void quit() { exit(EXIT_SUCCESS); @@ -328,8 +340,7 @@ printf("okidok\n "); } - - return EXIT_SUCCESS; + exit(EXIT_SUCCESS); } /* Local Variables: */