Returns: | |||
_ NULL | : if no memory was available | ||
else a new List. |
Errors: | |||
_ ENOMEM | : if no memory was available |
Args: | |||
_ numb | : size of space to reservate |
Returns: | |||
_ NULL | : if no memory was available | ||
else a new list, with space already allocated for 'numb' objects. |
Errors: | |||
_ ENOMEM | : if no memory was available |
Args: | |||
_ lst | : List object to copy |
Returns: | |||
_ NULL | : if no memory was available | ||
else a complete (recursive) copy of the List. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument | ||
_ ENOMEM | : if no memory was available |
Note: | |||
This method copies the List given, and fills it with copies of the original's | |||
contents. Thus, this is a complete reallocation, and no memory buffer from the | |||
original List is reused. The new objects' reference counts are set to zero, | |||
while the originals' are unchanged. |
Args: | |||
_ lst |
Returns: | |||
_ NULL | : if no memory was available | ||
else a clone of the List object. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument | ||
_ ENOMEM | : if no memory was available |
Note: | |||
This method does only a "flat" copy of the List object, filling the copy with | |||
direct references to the original's objects. The new List reference count is | |||
set to zero, while the contained objects' reference counts are unchanged. |
Args: | |||
_ lst | : the List to reference |
Returns: | |||
_ NULL | : if a NULL List was passed as argument | ||
else the original List object. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument |
Args: | |||
_ lst | : the List to dereference |
Returns: | |||
_ NULL | : if a NULL List was passed as argument | ||
else the original List object. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument |
Args: | |||
_ lst | : List object to free |
Args: | |||
_ lst | : List to query |
Returns: | |||
_ -1 | : if a NULL List was passed as argument | ||
else the List's length. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument |
Args: | |||
_ lst | : List to query | ||
_ pos | : position of the object to retrieve |
Returns: | |||
_ -1 | : if a NULL List was passed as argument, or the index was out of range | ||
else the retrieved object. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument, or the index was out of range |
Args: | |||
_ lst | : List to update | ||
_ pos | : position of the object to put | ||
_ obj | : object to put into the List |
Returns: | |||
_ NULL | : if a NULL List was passed as argument, or the index was out of range | ||
else the original object that was at this position |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument, or the index was out of range |
Args: | |||
_ lst | : List to update | ||
_ beg | : beginning of the section to cut, starting at 0 | ||
_ end | : end of this section |
Returns: | |||
_ NULL | : if a NULL List was passed, indexes were out of range, or a reallocation failed | ||
else the original List. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument, or indexes were out of range | ||
_ ENOMEM | : if no memory was available |
Args: | |||
_ lst | : List to insert into | ||
_ pos | : position of insertion point, starting at 0 | ||
_ lsi | : inserted List |
Returns: | |||
_ NULL | : if a NULL List was passed, indexes were out of range, or a reallocation failed | ||
else the first List, with the second's objects inserted. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument, or indexes were out of range | ||
_ ENOMEM | : if no memory was available |
Note: | |||
To prevent internal structures and memory corruption, 'lsi' is emptied after successfull | |||
insertion. Using a null 'pos' means the second list is inserted at the very beginning | |||
of 'lst', while a 'pos' equal to the first List length means to insert at the very end. |
Args: | |||
_ lst | : List to update | ||
_ obj | : object to append |
Returns: | |||
_ NULL | : if a NULL List or object was passed as argument, or a reallocation failed | ||
else the updated List, with the object appended. |
Errors: | |||
_ EINVAL | : if a NULL List or object was passed as argument | ||
_ ENOMEM | : if no memory was available |
Args: | |||
_ lst | : List to update |
Returns: | |||
_ NULL | : if a NULL List was passed as argument, the List was empty, or a reallocation failed | ||
else the object deleted from the ned of the List. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument or the List was empty | ||
_ ENOMEM | : if no memory was available |
Args: | |||
_ lst | : List to update | ||
_ obj | : object to prepend |
Returns: | |||
_ NULL | : if a NULL List was passed as argument or a reallocation failed | ||
else the updated list, with the object prepended. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument | ||
_ ENOMEM | : if no memory was available |
Args: | |||
_ lst | : List to update |
Returns: | |||
_ NULL | : if a NULL List was passed as argument, the List was empty, or a reallocation failed | ||
else the object deleted from the beginning of the List. |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument or the List was empty | ||
_ ENOMEM | : if no memory was available |
OOPS: | |||
Something was wrong here |
OOPS: | |||
Something was wrong here |
Args: | |||
_ lst | : List object to compare | ||
_ lstw | : reference List |
Returns: | |||
_ -1 | : if a NULL List was passed as argument | ||
_ 0 | : if the two Lists were distinct | ||
_ +1 | : if the two Lists were identical (i.e., same length, and equal objects) |
Errors: | |||
_ EINVAL | : if a NULL List was passed as argument |