
| Args: | |||
| _ chksz | : buffer size increment | ||
| Returns: | |||
| _ NULL | : if no memory was available | ||
| else the newly allocated Stack. | |||
| Errors: | |||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ stk | : Stack to free | ||
| Args: | |||
| _ stk | : Stack we want to get information about | ||
| Returns: | |||
| _ -1 | : if a NULL Stack was passed as argument | ||
| else the Stack's depth. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Stack was passed as argument | ||
| Args: | |||
| _ stk | : Stack to push on | ||
| _ obj | : object to push | ||
| Returns: | |||
| _ -1 | : if some error occurred | ||
| else the new depth of the Stack. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Stack or object was passed as argument | ||
| _ EACCES | : if the Stack was freezed and consequently cannot receive objects | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ stk | : non-empty Stack | ||
| Returns: | |||
| _ NULL | : if the Stack was NULL, empty or freezed | ||
| else the object popped from the stack. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Stack was passed as argument | ||
| _ EACCES | : if the Stack was freezed and consequently cannot yield objects | ||
| _ ENOMEM | : if a memory disallocation failed (non-fatal error) | ||
| Args: | |||
| _ stk | : non-empty Stack | ||
| _ num | : level at which to look for an object | ||
| Returns: | |||
| _ NULL | : if the XCLE_Stack was NULL, or the level invalid | ||
| else the object at level 'num' of the Stack (first level is 1). | |||
| Errors: | |||
| _ EINVAL | : if a NULL or empty Stack was passed as argument, or the level was invalid | ||
| Args: | |||
| _ stk | : Stack to put in | ||
| _ obj | : object to put | ||
| _ num | : level at which to put an object | ||
| Returns: | |||
| _ NULL | : if the Stack was NULL, or the level invalid | ||
| else the old object at the specified level of the Stack (first level is 1). | |||
| Errors: | |||
| _ EINVAL | : if a NULL Stack or object was passed as argument, or the level was invalid | ||
| Args: | |||
| _ stk | : Stack to map | ||
| _ obj | : object to put | ||
| _ map | : map handler | ||
| _ dat | : user data pointer | ||
| Returns: | |||
| _ -1 | : if the Stack or the map handler were NULL | ||
| _ -1 | : if the map handler retuned -1 at some time | ||
| else the sum of all the values returned by the map handler | |||
| Errors: | |||
| _ EINVAL | : if a NULL Stack or object was passed as argument, or the level was invalid | ||
| and any error generated by the map handler. | |||
| Note: | |||
| The map handler takes several arguments: | |||
| _ lvl | : the Stack level being currently mapped | ||
| _ obj | : the Object at this level | ||
| _ dat | : the user data pointer passed to XCLE_StackMap | ||
| The mapping stops when all the non-empty levels have been mapped, or the map handler | |||
| returns a value of ~0 (i.e. -1). | |||
| Args: | |||
| _ stk | : Stack to type-check | ||
| _ argc | : number of objects to check | ||
| _ argt | : types of objects to check (or-ed types of admissible objects, level by level) | ||
| Returns: | |||
| _ -1 | : if the Stack was NULL or there were not enough objects on Stack | ||
| else an error flag (0 if all arguments were OK, every bit standing as an individual | |||
| error flag for each level). | |||
| Errors: | |||
| _ EINVAL | : if a NULL Stack was passed as argument | ||
| Args: | |||
| _ chksz | : buffer size increment | ||
| Returns: | |||
| _ NULL | : if no memory was available | ||
| else a new empty Hash. | |||
| Errors: | |||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ hsh | : XCLE_Hash to free | ||
| Args: | |||
| _ hsh | : Hash to query | ||
| _ name | : key, or "Object name" | ||
| Returns: | |||
| _ NULL | : if a NULL Hash or name was passed as argument, or no object was indexed by this key | ||
| else the Object under this 'name'. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Hash or name was passed as argument | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ hsh | : Hash to query | ||
| _ name | : key, or "Object name" | ||
| _ obj | : object to set under its "name" | ||
| Returns: | |||
| _ NULL | : if some error occurred | ||
| else the old object under this key, if it existed (and it is then dereferenced) | |||
| or the object passed as argument. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Hash, name or object was passed as argument | ||
| _ EACCES | : if the Hash was freezed and consequently cannot receive objects | ||
| _ ENOMEM | : if no memory was available | ||
| Args: | |||
| _ hsh | : Hash to query | ||
| _ name | : key, or "Object name" | ||
| Returns: | |||
| _ NULL | : if a NULL Hash or name was passed as argument, or the key was not found | ||
| else the object under name 'name'. | |||
| Errors: | |||
| _ EINVAL | : if a NULL Hash or name was passed as argument | ||
| _ EACCES | : if the Hash was freezed and consequently cannot yield objects | ||
| _ ENOMEM | : if a disallocation failed (non-fatal error) | ||
| Args: | |||
| _ hsh | : Hash to map | ||
| _ obj | : object to put | ||
| _ map | : map handler | ||
| _ dat | : user data pointer | ||
| Returns: | |||
| _ -1 | : if the Hash or the map handler were NULL | ||
| _ -1 | : if the map handler retuned -1 at some time | ||
| else the sum of all the values returned by the map handler | |||
| Errors: | |||
| _ EINVAL | : if a NULL Hash or object was passed as argument, or the level was invalid | ||
| and any error generated by the map handler. | |||
| Note: | |||
| The map handler takes several arguments: | |||
| _ name | : the Hash key being currently mapped | ||
| _ obj | : the Object at this level | ||
| _ dat | : the user data pointer passed to XCLE_HashMap | ||
| The mapping stops when all the keys have been mapped, or the map handler returns a | |||
| value of ~0 (i.e. -1). | |||