home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume36 / unpost / part05 / list.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-18  |  843 b   |  29 lines

  1. /******************************************************************************
  2. * Module    :   List --- List building and maintenance module.
  3. *
  4. * Author    :   John Stevens.
  5. ******************************************************************************/
  6.  
  7. #if ! defined(LIST_HEADER_FILE)
  8. #define     LIST_HEADER_FILE
  9.  
  10. /*  Define a list header structure. */
  11. typedef struct  {
  12.     int     NoElems;
  13.     int     TotElems;
  14.     int     ElemSz;
  15.     char    List[1];
  16. } LIST;
  17.  
  18. /*  Function prototypes.    */
  19. extern  void    *AddList(LIST *, void *, int);
  20. extern  void    *CrtList(int);
  21. extern  int     SrchList(LIST   *Head,
  22.                          void   *Elem,
  23.                          int    (*CmpFn)(void *, void *),
  24.                          int    *InsPt);
  25. extern  void    *ListIdx(LIST *, int);
  26. extern  void    *AppList(LIST *, void *);
  27.  
  28. #endif
  29.