Context algorithm
Semi-predictive context algorithm implementation
 All Data Structures Files Functions Variables Typedefs Macros Pages
stack.h File Reference
#include <assert.h>
#include "spacedef.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define NOTSTACKEMPTY   (stacktop > 0)
 Indicates if the stack is empty. More...
 
#define PUSHNODE(N)
 Pushes a new item to the stack. More...
 
#define POPNODE(N)   N = stack[--stacktop]
 Pops an element out of the stack. More...
 

Macro Definition Documentation

#define NOTSTACKEMPTY   (stacktop > 0)

Indicates if the stack is empty.

Returns
True if the stack is not empty.

Definition at line 30 of file stack.h.

#define POPNODE (   N)    N = stack[--stacktop]

Pops an element out of the stack.

Parameters
[out]Nthe retrieved element.

Definition at line 51 of file stack.h.

#define PUSHNODE (   N)
Value:
{\
stackalloc += 100;\
}\
assert(stack != NULL);\
unsigned long Uint
Unsigned int type.
Definition: types.h:54
static Uint * stack
Definition: statistics.c:24
static Uint stackalloc
Definition: statistics.c:24
static Uint stacktop
Definition: statistics.c:24
#define REALLOC(V, S, T, N)
Resizes a block of memory and prints an error message if necessary.
Definition: spacedef.h:43

Pushes a new item to the stack.

Parameters
[in]Nnew item to add to the stack.

Definition at line 37 of file stack.h.