Advanced Strategic Command
Macros | Functions | Variables
stack.cpp File Reference

A small general-purpose stack (not type safe) More...

#include <cstring>
#include "global.h"
#include "stack.h"
Include dependency graph for stack.cpp:

Go to the source code of this file.

Macros

#define stacksize   10000
 

Functions

void push_data (Uint8 *daten, int size)
 
void pop_data (Uint8 *daten, int size)
 
void pushdata (Uint8 *daten, int size)
 
void popdata (Uint8 *daten, int size)
 
int stackfree (void)
 

Variables

Uint8 * stackpointer = NULL
 
int stackofs = 0
 
const int magic = 0x12345678
 

Detailed Description

A small general-purpose stack (not type safe)

Definition in file stack.cpp.

Macro Definition Documentation

#define stacksize   10000

Definition at line 31 of file stack.cpp.

Referenced by pushdata(), and stackfree().

Function Documentation

void pop_data ( Uint8 *  daten,
int  size 
)

Definition at line 47 of file stack.cpp.

References stackofs, and stackpointer.

Referenced by popdata().

void popdata ( Uint8 *  daten,
int  size 
)

Definition at line 69 of file stack.cpp.

References magic, and pop_data().

void push_data ( Uint8 *  daten,
int  size 
)

Definition at line 38 of file stack.cpp.

References stackofs, and stackpointer.

Referenced by pushdata().

void pushdata ( Uint8 *  daten,
int  size 
)

Definition at line 58 of file stack.cpp.

References magic, push_data(), stackofs, stackpointer, and stacksize.

int stackfree ( void  )

Definition at line 79 of file stack.cpp.

References stackofs, and stacksize.

Variable Documentation

const int magic = 0x12345678
int stackofs = 0

Definition at line 34 of file stack.cpp.

Referenced by pop_data(), push_data(), pushdata(), and stackfree().

Uint8* stackpointer = NULL

Definition at line 33 of file stack.cpp.

Referenced by pop_data(), push_data(), and pushdata().