source: svn/trunk/util/xc_stack.h @ 982

Last change on this file since 982 was 982, checked in by Xuefer, 8 years ago

move files to subdirs

  • Property svn:eol-style set to native
File size: 507 bytes
1#ifndef __XC_UTIL_STACK
2#define __XC_UTIL_STACK
4typedef struct {
5    void **data;
6    int cnt;
7    int size;
8} xc_stack_t;
10#define S xc_stack_t*
11void xc_stack_init_ex(S stack, int initsize);
12#define xc_stack_init(stack) xc_stack_init_ex(stack, 8)
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);
18int xc_stack_count(S stack);
19void xc_stack_reverse(S stack);
20#undef S
22#endif /* __XC_UTIL_STACK */
Note: See TracBrowser for help on using the repository browser.