source: trunk/util/xc_stack.h @ 982

Last change on this file since 982 was 982, checked in by moo, 21 months ago

move files to subdirs

  • Property svn:eol-style set to native
File size: 507 bytes
RevLine 
[982]1#ifndef __XC_UTIL_STACK
2#define __XC_UTIL_STACK
[1]3
4typedef struct {
5    void **data;
6    int cnt;
7    int size;
8} xc_stack_t;
9
10#define S xc_stack_t*
[307]11void xc_stack_init_ex(S stack, int initsize);
12#define xc_stack_init(stack) xc_stack_init_ex(stack, 8)
[1]13void xc_stack_destroy(S stack);
14void xc_stack_push(S stack, void *item);
15void *xc_stack_pop(S stack);
16void *xc_stack_top(S stack);
17void *xc_stack_get(S stack, int n);
[307]18int xc_stack_count(S stack);
[1]19void xc_stack_reverse(S stack);
20#undef S
[982]21
22#endif /* __XC_UTIL_STACK */
Note: See TracBrowser for help on using the repository browser.