29 lines
522 B
C
29 lines
522 B
C
#ifndef STACK_H__
|
|
#define STACK_H__
|
|
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct hoedown_stack {
|
|
void **item;
|
|
size_t size;
|
|
size_t asize;
|
|
};
|
|
|
|
void hoedown_stack_free(struct hoedown_stack *);
|
|
int hoedown_stack_grow(struct hoedown_stack *, size_t);
|
|
int hoedown_stack_init(struct hoedown_stack *, size_t);
|
|
|
|
int hoedown_stack_push(struct hoedown_stack *, void *);
|
|
|
|
void *hoedown_stack_pop(struct hoedown_stack *);
|
|
void *hoedown_stack_top(struct hoedown_stack *);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|