home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / VISIONS.ZIP / USERLIST.H < prev    next >
Text File  |  1990-05-20  |  2KB  |  46 lines

  1. /*------------------------- USERLIST.H -------------------------*/
  2. /*                                */
  3. /*  This file contains definitions used for the list library    */
  4. /*  that are needed by the user of the library.            */
  5. /*                                */
  6. /*        Copyright 1990 Dan Vogel & David Bernazzani        */
  7. /*                                */
  8. /*                                */
  9. /*        Revision History                */
  10. /*                                */
  11. /*  03/05/90   DCV    Release.                */
  12. /*                                */
  13. /*--------------------------------------------------------------*/
  14.  
  15.         /*  Include Files  */
  16.  
  17. #include "SHARLIST.H"            /* Pick up shared definitions */
  18.  
  19.  
  20.         /*  Type Definitions  */
  21.  
  22. typedef unsigned char LIST_LINK;
  23. typedef unsigned char LIST_HEAD;
  24.  
  25.  
  26.         /*  Routine Definitions  */
  27.  
  28. extern  int DefineList(LIST_HEAD * *new_list,int (*compare_f)(unsigned char *,unsigned char *),int (*delete_f)(unsigned char *),int (*display_f)(unsigned char *,char *));
  29. extern  int AddToList(LIST_HEAD *list_root,LIST_LINK *list_ptr,unsigned char *new_item);
  30. extern  int AppendToList(LIST_HEAD *list_top,unsigned char *new_item);
  31. extern  int AllocateLink(LIST_LINK * *new_link);
  32. extern  int AllocateList(LIST_HEAD * *new_list);
  33. extern  int DeleteFromList(LIST_HEAD *list_ptr,unsigned char *remove_item);
  34. extern  int RemoveFromList(LIST_HEAD *list_ptr,unsigned char *remove_item);
  35. extern  int DeleteList(LIST_HEAD *del_list);
  36. extern  int FindInList(LIST_HEAD *list_ptr,unsigned char *find_item,LIST_LINK * *list_fnd);
  37. extern  int DisplayListItem(LIST_HEAD *list_ptr,LIST_LINK *disp_link,char *buffer);
  38. extern  int ListTop(LIST_HEAD *list_ptr,LIST_LINK * *top_link);
  39. extern  int ListBottom(LIST_HEAD *list_ptr,LIST_LINK * *bot_link);
  40. extern  int ListNext(LIST_LINK *curr_link,LIST_LINK * *next_link);
  41. extern  int ListLast(LIST_LINK *curr_link,LIST_LINK * *last_link);
  42. extern  int CountList(LIST_HEAD *list_ptr);
  43. extern  int ListNth(LIST_HEAD *list_ptr,int list_num,LIST_LINK * *ret_link);
  44. extern  int SortList(LIST_HEAD *list_ptr,int (*compare_f)(unsigned char *,unsigned char *));
  45. extern  int DisplayList(BYTE topy,BYTE col,BYTE height,BYTE width,long bkcol,long txtcol,char border,char *title,LIST_HEAD *d_list);
  46.