Mercurial > sos > sos
view include/stack.h @ 160:3d891b634acb default tip
Fix to make make work
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Fri, 25 Nov 2011 23:27:09 -0500 |
parents | c1ad124f2aaf |
children |
line wrap: on
line source
#ifndef __STACK_H #define __STACK_H typedef double eltType; struct STACKELT { eltType elt; struct STACKELT *next; }; typedef struct STACKELT StackElt; struct STACK { StackElt* top; unsigned int size; }; typedef struct STACK Stack; short pop(Stack *stack, eltType *value); //pop returns 0 on success and -1 on failure. If the function call is //successful, *value will be the value removed from the stack void push(Stack *stack, eltType val); Stack* stack_init(); void stack_destroy(Stack *stack); #endif //__STACK_H