IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 376


Ignore:
Timestamp:
Apr 1, 2004, 12:20:40 AM (22 years ago)
Author:
eugene
Message:

updated list functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psDlist.h

    r344 r376  
    3737
    3838/** Constructor */
    39 psDlist *psDlistAlloc(void *data        ///< initial data item; may be NULL
    40                       );
     39psDlist *psDlistAlloc(void *data)       ///< initial data item; may be NULL
     40;
    4141
    4242/** Destructor */
    4343void psDlistFree(psDlist *list,         ///< list to destroy
    44                 void (*elemFree)(void *) ///< destructor for data on list
    45                  );
     44                void (*elemFree)(void *)) ///< destructor for data on list
     45;
    4646
    4747/**** List maintainence functions ****/
     
    5050psDlist *psDlistAdd(psDlist *list,      ///< list to add to (may be NULL)
    5151                    void *data,         ///< data item to add
    52                     int where           ///< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
    53                     );
     52                    int where)          ///< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
     53;
    5454
    5555/** Append to a list */
    5656psDlist *psDlistAppend(psDlist *list,   ///< list to append to (may be NULL)
    57                        void *data       ///< data item to add
    58                        );
     57                       void *data)      ///< data item to add
     58;
    5959
    6060/** Remove from a list */
    6161void *psDlistRemove(psDlist *list,      ///< list to remove element from
    6262                    void *data,         ///< data item to remove
    63                     int which           ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    64                                         ///< PS_DLIST_PREV
    65                     );
     63                    int which)          ///< index of item, or PS_DLIST_UNKNOWN, PS_DLIST_NEXT, PS_DLIST_PREV
     64;
     65
    6666/** Retrieve from a list */
    6767void *psDlistGet(const psDlist *list,   ///< list to retrieve element from
    68                  int which              ///< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
    69                  );
    70 
    71 /**** convenience functions to use psDlistGet as an iterator ******/
     68                 void *data,            ///< data item to retrieve
     69                 int which)             ///< index of item, or PS_DLIST_NEXT, PS_DLIST_PREV, PS_DLIST_UNKNOWN
     70;
    7271
    7372/** Set the iterator */
    7473void psDlistSetIterator(psDlist *list,  ///< list to retrieve element from
    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
    78                         );
     74                        int where)      ///< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
     75;
    7976
    80 /** Get next element */
    81 void *psDlistGetNext(psDlist *list,     ///< list to retrieve element from
    82                      int which          ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    83                                         ///< PS_DLIST_PREV
    84                      );
     77/** Get next element relative to iter */
     78void *psDlistGetNext(psDlist *list)     ///< list to retrieve element from
     79;
    8580
    86 /** Get previous element */
    87 void *psDlistGetPrev(psDlist *list,     ///< list to retrieve element from
    88                      int which          ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    89                                         ///< PS_DLIST_PREV
    90                      );
     81/** Get prev element relative to iter */
     82void *psDlistGetPrev(psDlist *list)     ///< list to retrieve element from
     83;
    9184
    9285/** Convert doubly-linked list to an array */
    93 psVoidPtrArray *psDlistToArray(psDlist *dlist ///< List to convert
    94                                );
     86psVoidPtrArray *psDlistToArray(psDlist *dlist) ///< List to convert
     87;
    9588
    9689/** Convert array to a doubly-linked list */
    97 psDlist *psArrayToDlist(psVoidPtrArray *arr ///< Array to convert
    98                         );
     90psDlist *psArrayToDlist(psVoidPtrArray *arr) ///< Array to convert
     91;
    9992
    10093/* \} */ // End of DataGroup Functions
Note: See TracChangeset for help on using the changeset viewer.