Stack manipulation


Functions

int hps_depth (int *depth)
 Gets the depth of the current RPL stack.
int hps_avail (int *avail)
 Gets the available number of levels for the RPL stack.
int hps_drop (void)
 Drops the top of the current RPL stack.
int hps_dropn (int levels)
 Drops the n first objects of the current RPL stack.
int hps_swap (void)
 Swaps the two first levels of the current RPL stack.
int hps_rot (void)
 Rotates the three first levels of the current RPL stack.
int hps_unrot (void)
 Unrotates the three first levels of the current RPL stack.
int hps_roll (int levels)
 Rolls the n first levels of the current RPL stack.
int hps_rolld (int levels)
 Rolls down the n first levels of the current RPL stack.

Function Documentation

int hps_avail int *  avail  ) 
 

Gets the available number of levels for the RPL stack.

This function gets the number of levels that are currently available for the RPL stack.

Parameters:
avail Pointer to the number of available levels
Returns:
HPS_ERROR_PAR if the parameter is a null pointer, HPS_OK otherwise

int hps_depth int *  depth  ) 
 

Gets the depth of the current RPL stack.

This function gets the depth currently used in the RPL stack.

Parameters:
depth Pointer to the depth
Returns:
HPS_ERROR_PAR if the parameter is a null pointer, HPS_OK otherwise

int hps_drop void   ) 
 

Drops the top of the current RPL stack.

This function performs a DROP.

Returns:
HPS_ERROR_STACK if the stack is empty, HPS_OK otherwise

int hps_dropn int  levels  ) 
 

Drops the n first objects of the current RPL stack.

This function performs a DROPN. If there is not enough objects, nothing is dropped.

Parameters:
levels Number of levels to drop.
Returns:
HPS_ERROR_STACK if the stack is too small, HPS_OK otherwise

int hps_roll int  levels  ) 
 

Rolls the n first levels of the current RPL stack.

This function performs a ROLL.

Parameters:
levels The number of objects to roll.
Returns:
HPS_ERROR_STACK if the stack is too small, HPS_OK otherwise

int hps_rolld int  levels  ) 
 

Rolls down the n first levels of the current RPL stack.

This function performs a ROLLD.

Parameters:
levels The number of objects to roll down.
Returns:
HPS_ERROR_STACK if the stack is too small, HPS_OK otherwise

int hps_rot void   ) 
 

Rotates the three first levels of the current RPL stack.

This function performs a ROT.

Returns:
HPS_ERROR_STACK if the stack is too small, HPS_OK otherwise

int hps_swap void   ) 
 

Swaps the two first levels of the current RPL stack.

This function performs a SWAP.

Returns:
HPS_ERROR_STACK if the stack is too small, HPS_OK otherwise

int hps_unrot void   ) 
 

Unrotates the three first levels of the current RPL stack.

This function performs an UNROT.

Returns:
HPS_ERROR_STACK if the stack is too small, HPS_OK otherwise


Generated on Sat Sep 16 18:23:57 2006 for HPStack by  doxygen 1.4.5