Changeset 291 for trunk/archive/pslib/include/psDlist.h
- Timestamp:
- Mar 23, 2004, 4:48:25 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psDlist.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psDlist.h
r257 r291 37 37 38 38 /** Constructor */ 39 psDlist *psDlistAlloc(void *data )//!< initial data item; may be NULL40 ;39 psDlist *psDlistAlloc(void *data //!< initial data item; may be NULL 40 ); 41 41 42 42 /** Destructor */ 43 43 void psDlistFree(psDlist *list, //!< list to destroy 44 void (*elemFree)(void *) )//!< destructor for data on list45 ;44 void (*elemFree)(void *) //!< destructor for data on list 45 ); 46 46 47 47 /**** List maintainence functions ****/ … … 50 50 psDlist *psDlistAdd(psDlist *list, //!< list to add to (may be NULL) 51 51 void *data, //!< data item to add 52 int where )//!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL53 ;52 int where //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL 53 ); 54 54 55 55 /** Append to a list */ 56 56 psDlist *psDlistAppend(psDlist *list, //!< list to append to (may be NULL) 57 void *data )//!< data item to add58 ;57 void *data //!< data item to add 58 ); 59 59 60 60 /** Remove from a list */ 61 61 void *psDlistRemove(psDlist *list, //!< list to remove element from 62 62 void *data, //!< data item to remove 63 int which )//!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or64 ;//!< PS_DLIST_PREV65 63 int which //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 64 //!< PS_DLIST_PREV 65 ); 66 66 /** Retrieve from a list */ 67 67 void *psDlistGet(const psDlist *list, //!< list to retrieve element from 68 int which )//!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV69 ;68 int which //!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV 69 ); 70 70 71 71 /**** convenience functions to use psDlistGet as an iterator ******/ … … 74 74 void psDlistSetIterator(psDlist *list, //!< list to retrieve element from 75 75 int where, //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL 76 int which) //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 77 ; //!< PS_DLIST_PREV 76 int which //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 77 //!< PS_DLIST_PREV 78 ); 78 79 79 80 /** Get next element */ 80 81 void *psDlistGetNext(psDlist *list, //!< list to retrieve element from 81 int which) //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 82 ; //!< PS_DLIST_PREV 82 int which //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 83 //!< PS_DLIST_PREV 84 ); 83 85 84 86 /** Get previous element */ 85 87 void *psDlistGetPrev(psDlist *list, //!< list to retrieve element from 86 int which) //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 87 ; //!< PS_DLIST_PREV 88 int which //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or 89 //!< PS_DLIST_PREV 90 ); 88 91 89 92 /** Convert doubly-linked list to an array */ 90 psVoidPtrArray *psDlistToArray(psDlist *dlist )//!< List to convert91 ;93 psVoidPtrArray *psDlistToArray(psDlist *dlist //!< List to convert 94 ); 92 95 93 96 /** Convert array to a doubly-linked list */ 94 psDlist *psArrayToDlist(psVoidPtrArray *arr )//!< Array to convert95 ;97 psDlist *psArrayToDlist(psVoidPtrArray *arr //!< Array to convert 98 ); 96 99 97 100 /* \} */ // End of DataGroup Functions
Note:
See TracChangeset
for help on using the changeset viewer.
