#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <assert.h>
#include <appconfig.h>
#include <stack.h>
Go to the source code of this file.
Data Structures | |
| struct | tag_dsObj |
| the data structure for the stack object More... | |
Typedefs | |
| typedef tag_dsObj | dsObj |
| the data structure for the stack object | |
Functions | |
| void | StackResize (dsObj *sp, Int32 newSize) |
| resize the stack based on the current size | |
| dsObj * | StackNew (void) |
| Create a new stack. | |
| void | StackDelete (dsObj *sp) |
| delete the stack object | |
| void | StackPush (dsObj *sp, Int32 value) |
| push an item onto the stack | |
| Int32 | StackPop (dsObj *sp) |
| pop the first item from the stack | |
| Int8 | StackIsEmpty (dsObj *sp) |
| check is the stack empty | |
| void | StackDoEmpty (dsObj *sp) |
| empty the stack | |
| int | StackNElements (dsObj *sp) |
| get the number of elements on the stack | |
| Int32 | ListGet (dsObj *sp, Int32 index) |
| get the specific item from the list | |
| void | ListSet (dsObj *sp, Int32 index, Int32 element) |
| set the value at a certain index into the list to the value | |
| void | ListInsert (dsObj *sp, Int32 index, Int32 element) |
| insert an item into the list at a certain location | |
| Int32 | ListRemove (dsObj *ds, Int32 index) |
| remove an item from the list | |
Part of the pocketcity application.
It's almost identical to the palm one except it uses malloc/realloc normally. realloc on palm has problems (fragmented heap)
Definition in file stack.c.
|
||||||||||||
|
get the specific item from the list
Definition at line 103 of file stack.c. References tag_dsObj::bp, Int32, and tag_dsObj::sp. |
|
||||||||||||||||
|
insert an item into the list at a certain location It is inserted at the location shuffling the old item down one on the list.
Definition at line 118 of file stack.c. References tag_dsObj::bp, Int32, tag_dsObj::sp, and StackPush(). |
|
||||||||||||
|
remove an item from the list
Definition at line 131 of file stack.c. References tag_dsObj::bp, Int32, tag_dsObj::sp, and StackPop(). |
|
||||||||||||||||
|
set the value at a certain index into the list to the value
Definition at line 111 of file stack.c. References tag_dsObj::bp, Int32, and tag_dsObj::sp. |
|
|
delete the stack object
Definition at line 56 of file stack.c. References tag_dsObj::bp. Referenced by DoDistribute(). |
|
|
empty the stack
Definition at line 90 of file stack.c. References tag_dsObj::bp, and tag_dsObj::sp. Referenced by DoDistribute(). |
|
|
check is the stack empty
Definition at line 82 of file stack.c. References tag_dsObj::bp, and tag_dsObj::sp. Referenced by DistributeUnvisited(), and SupplyIfPlant(). |
|
|
get the number of elements on the stack
Definition at line 97 of file stack.c. References tag_dsObj::bp, and tag_dsObj::sp. |
|
|
Create a new stack. preallocates 128 elements to the stack Definition at line 49 of file stack.c. Referenced by DoDistribute(). |
|
|
pop the first item from the stack
Definition at line 70 of file stack.c. References tag_dsObj::bp, and tag_dsObj::sp. Referenced by DistributeUnvisited(), ListRemove(), and SupplyIfPlant(). |
|
||||||||||||
|
push an item onto the stack
Definition at line 63 of file stack.c. References Int32, tag_dsObj::se, tag_dsObj::sl, tag_dsObj::sp, and StackResize(). Referenced by AddNeighbors(), DistributeUnvisited(), and ListInsert(). |
|
||||||||||||
|
resize the stack based on the current size
Definition at line 39 of file stack.c. References tag_dsObj::bp, Int32, tag_dsObj::se, tag_dsObj::sl, and tag_dsObj::sp. Referenced by StackPop(), and StackPush(). |
1.2.18