File: stack.h

package info (click to toggle)
rlinetd 0.5.18
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,952 kB
  • ctags: 596
  • sloc: sh: 8,537; ansic: 2,833; yacc: 1,415; lex: 122; makefile: 109; perl: 4
file content (20 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef H_STACK
#define H_STACK

#define STACKSIZE 8

struct rl_stack {
	rl_opcode_t data[STACKSIZE];
	int top;
};

void rlstk_push(struct rl_stack *, rl_opcode_t);
rl_opcode_t rlstk_pop(struct rl_stack *);
rl_opcode_t rlstk_peek(struct rl_stack *, int);
void rlstk_poke(struct rl_stack *, int, rl_opcode_t);
struct rl_stack *rlstk_new();
void rlstk_free(struct rl_stack *);

#endif /* !H_STACK */

/* vim: set ts=2: */