shuntyard

Djiskstra's 'Shunting Yard' algorithm
git clone git://src.gearsix.net/shuntyardshuntyard.zip
Log | Files | Refs | Atom

stack.h (raw) (321B)


   1 #ifndef STACK_H
   2 #define STACK_H
   3 
   4 #include <stdlib.h>
   5 
   6 struct stack {
   7 	char *s;
   8 	int sp, siz;
   9 };
  10 
  11 struct stack *stack_new();
  12 
  13 int  stack_isempty(struct stack *s);
  14 
  15 int  stack_isfull(struct stack *s);
  16 
  17 int  stack_peek(struct stack *s);
  18 
  19 void stack_push(struct stack *s, int item);
  20 
  21 int  stack_pop(struct stack *s);
  22 
  23 #endif