From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

#ifndef _TAGSTACK_H
#define _TAGSTACK_H 1
struct tagstack_entry {
int tag; /* code of tag */
int value; /* if (true/false) - used in else */
int vcontext; /* visibility context of the tag (visible/unvisible) */
char* position; /* start of tag; useful for loops */
};
static
void tagstack_init(struct tagstack* tagstack);
static
void tagstack_free(struct tagstack* tagstack);
static
void tagstack_push(struct tagstack* tagstack, struct tagstack_entry);
static
struct tagstack_entry tagstack_pop(struct tagstack* tagstack);
static
struct tagstack_entry* tagstack_top(struct tagstack* tagstack);
static
int tagstack_notempty(struct tagstack* tagstack);
static
int tagstack_selftest(struct tagstack* tagstack);
#endif /* tagstack.h */
/*
* Local Variables:
* mode: c
* End:
*/