Added CollIndex and CollDeleteItem
git-svn-id: svn://svn.cc65.org/cc65/trunk@708 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
/* (C) 2000-2001 Ullrich von Bassewitz */
|
||||
/* Wacholderweg 14 */
|
||||
/* D-70597 Stuttgart */
|
||||
/* EMail: uz@musoftware.de */
|
||||
/* EMail: uz@cc65.org */
|
||||
/* */
|
||||
/* */
|
||||
/* This software is provided 'as-is', without any expressed or implied */
|
||||
@@ -102,12 +102,22 @@ void* CollLast (Collection* C);
|
||||
const void* CollConstLast (const Collection* C);
|
||||
/* Return the last item in a collection */
|
||||
|
||||
int CollIndex (Collection* C, const void* Item);
|
||||
/* Return the index of the given item in the collection. Return -1 if the
|
||||
* item was not found in the collection.
|
||||
*/
|
||||
|
||||
void CollDelete (Collection* C, unsigned Index);
|
||||
/* Remove the item with the given index from the collection. This will not
|
||||
* free the item itself, just the pointer. All items with higher indices
|
||||
* will get moved to a lower position.
|
||||
*/
|
||||
|
||||
void CollDeleteItem (Collection* C, const void* Item);
|
||||
/* Delete the item pointer from the collection. The item must be in the
|
||||
* collection, otherwise FAIL will be called.
|
||||
*/
|
||||
|
||||
void CollDeleteAll (Collection* C);
|
||||
/* Delete all items from the given collection. This will not free the items
|
||||
* itself, it will only remove the pointers.
|
||||
|
||||
Reference in New Issue
Block a user