Added pop() and function prototypes.

This commit is contained in:
Murilo Soares Pereira
2010-04-04 21:20:37 -03:00
parent 1c65ae3672
commit f0aa621e69
2 changed files with 18 additions and 0 deletions
+12
View File
@@ -43,3 +43,15 @@ void push(struct stack *stack, struct card *card) {
stack = new_stack;
}
}
struct stack *pop(struct stack *stack) {
struct stack *popped_entry = NULL;
if(!empty(stack)) {
popped_entry = stack;
popped_entry = NULL;
stack = stack->next;
}
return(popped_entry);
}