Stacks

Data Structures and functions for manipulating stacks. More...

Typedefs

typedef _GGZList GGZStack
 Simple implementation of stacks using GGZList.

Functions

GGZStackggz_stack_new (void)
 Create a new stack.
void ggz_stack_push (GGZStack *stack, void *data)
 Push a data item onto the top of the stack.
void * ggz_stack_pop (GGZStack *stack)
 Pop the top item off of the stack.
void * ggz_stack_top (GGZStack *stack)
 Get the top item on the stack without popping it.
void ggz_stack_free (GGZStack *stack)
 Free the stack.

Detailed Description

Data Structures and functions for manipulating stacks.


Function Documentation

GGZStack* ggz_stack_new ( void   ) 

Create a new stack.

Returns:
Pointer to a newly allocated GGZStack object

void ggz_stack_push ( GGZStack stack,
void *  data 
)

Push a data item onto the top of the stack.

Parameters:
stack Pointer to a GGZStack
data Pointer to data to insert onto stack

void* ggz_stack_pop ( GGZStack stack  ) 

Pop the top item off of the stack.

Parameters:
stack Pointer to a GGZStack
Returns:
Pointer to the data item on the top of the stack

void* ggz_stack_top ( GGZStack stack  ) 

Get the top item on the stack without popping it.

Parameters:
stack Pointer to a GGZList
Returns:
Pointer to the data item currently in to of the stack

void ggz_stack_free ( GGZStack stack  ) 

Free the stack.

Note:
This does not free the data stored in the stack.
Parameters:
stack Pointer to a GGZStack


Generated on Fri Nov 30 14:58:03 2007 for LibGGZ by  doxygen 1.5.1