aboutsummaryrefslogtreecommitdiffstats
path: root/stack.h
blob: 16fe07b3570789e5a03d27578ffbdd1403ef4630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdlib.h>
#include <stdio.h>

#ifndef STACK_H
#define STACK_H

typedef int stackitem;

typedef struct {
    int size;
    int maxsize;
    stackitem* start;
} stack;


stack* newstack();

stackitem pop(stack* s);

stackitem peek(stack* s);

void push(stack *s, stackitem si);

#endif