Functions | |
| static void | st_valid (int type, int rank) |
| void | pile_reset (int type) |
| void | piles_reset (void) |
| int | pile_next (int type) |
| void | pile_manage (int type, int rank, int mode, char *ptr) |
| int | pile_correct (int type, int rank, int mode) |
| char * | pile_get (int type, int rank) |
| void | piles_dump (void) |
Variables | |
| static int | DEBUG = 0 |
| static int | MAX_PILE = 10 |
| static const char * | PILE_NAME [] |
| static int | MAX_COUNT [] = { 10, 4, 4, 2, 4, 1, 1, 1, 2, 2 } |
| static char *** | piles |
| int pile_correct | ( | int | type, |
| int | rank, | ||
| int | mode | ||
| ) |
Check if the Pile is managed correctly
| [in] | type | Type of the pile |
| [in] | rank | Rank of the slot |
| [in] | mode | Status
|
| char* pile_get | ( | int | type, |
| int | rank | ||
| ) |
Returns the address managed in the pile
| [in] | type | Type of the pile |
| [in] | rank | Rank of the slot |
| void pile_manage | ( | int | type, |
| int | rank, | ||
| int | mode, | ||
| char * | ptr | ||
| ) |
Manage the pile
| [in] | type | Type of the pile |
| [in] | rank | Rank of the slot |
| [in] | mode | 1 for allocation and -1 for deallocation |
| [in] | ptr | Pointor to be stored (allocation mode) |
| int pile_next | ( | int | type | ) |
Returns the rank of the first free element
| [in] | type | Type of the pile |
| void pile_reset | ( | int | type | ) |
Reset one pile
| [in] | type | Type of the pile |
| void piles_dump | ( | void | ) |
Dump the piles contents
| void piles_reset | ( | void | ) |
Reset all the piles
|
static |
Check that the type is valid or abort if invalid
| [in] | type | Type of the pile |
| [in] | rank | Rank of the slot (-1 if not defined) |
|
static |
|
static |
|
static |
|
static |
|
static |