File: stack.h

package info (click to toggle)
autodocksuite 4.2.6-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 97,028 kB
  • sloc: cpp: 24,257; sh: 4,419; python: 1,261; makefile: 627; perl: 15
file content (21 lines) | stat: -rw-r--r-- 404 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
21
#ifndef _STACK_
#define _STACK_

typedef struct {
    int *base;
    int top;
    int size;
    FILE *trace;
} integer_stack_t;

typedef integer_stack_t * stack;

stack stack_create(const int size);
int   stack_pop(stack s);
void  stack_push(stack s, int i);
int   stack_size(const stack& s);
void  stack_trace(const stack& s, FILE *f);
int   stack_test(void);
int   stack_depth(const stack& s);

#endif