|
Last change
on this file since 982 was
982,
checked in by moo, 11 months ago
|
|
move files to subdirs
|
-
Property svn:eol-style set to
native
|
|
File size:
507 bytes
|
| Line | |
|---|
| 1 | #ifndef __XC_UTIL_STACK |
|---|
| 2 | #define __XC_UTIL_STACK |
|---|
| 3 | |
|---|
| 4 | typedef struct { |
|---|
| 5 | void **data; |
|---|
| 6 | int cnt; |
|---|
| 7 | int size; |
|---|
| 8 | } xc_stack_t; |
|---|
| 9 | |
|---|
| 10 | #define S xc_stack_t* |
|---|
| 11 | void xc_stack_init_ex(S stack, int initsize); |
|---|
| 12 | #define xc_stack_init(stack) xc_stack_init_ex(stack, 8) |
|---|
| 13 | void xc_stack_destroy(S stack); |
|---|
| 14 | void xc_stack_push(S stack, void *item); |
|---|
| 15 | void *xc_stack_pop(S stack); |
|---|
| 16 | void *xc_stack_top(S stack); |
|---|
| 17 | void *xc_stack_get(S stack, int n); |
|---|
| 18 | int xc_stack_count(S stack); |
|---|
| 19 | void xc_stack_reverse(S stack); |
|---|
| 20 | #undef S |
|---|
| 21 | |
|---|
| 22 | #endif /* __XC_UTIL_STACK */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.