1 /******************************************************************************
2  *
3  * File:           istack.h
4  *
5  * Created:        06/06/2001
6  *
7  * Author:         Pavel Sakov
8  *                 CSIRO Marine Research
9  *
10  * Purpose:        Header for handling stack of integers.
11  *
12  * Description:    None
13  *
14  * Revisions:      None
15  *
16  *****************************************************************************/
17 
18 #if !defined(_ISTACK_H)
19 #define _ISTACK_H
20 
21 #if !defined(_ISTACK_STRUCT)
22 #define _ISTACK_STRUCT
23 struct istack;
24 typedef struct istack istack;
25 #endif
26 
27 struct istack {
28     int n;
29     int nallocated;
30     int* v;
31 };
32 
33 istack* istack_create(void);
34 void istack_destroy(istack* s);
35 void istack_push(istack* s, int v);
36 int istack_pop(istack* s);
37 int istack_contains(istack* s, int v);
38 void istack_reset(istack* s);
39 
40 #endif
41