File: tagstack.h

package info (click to toggle)
libhtml-template-pro-perl 0.9524-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,512 kB
  • sloc: ansic: 1,841; perl: 1,474; yacc: 404; pascal: 118; makefile: 6
file content (32 lines) | stat: -rw-r--r-- 794 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#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) */
  const 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, int* is_underflow);
INLINE
static 
struct tagstack_entry* tagstack_top(const struct tagstack* tagstack);
INLINE
static 
int tagstack_notempty(const struct tagstack* tagstack);

#endif /* tagstack.h */

/*
 * Local Variables:
 * mode: c 
 * End: 
 */