home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 308_01 / chgcomps.inc < prev    next >
Text File  |  1990-06-17  |  975b  |  53 lines

  1.  
  2. /*
  3.  *  chgcomps.inc -- include file for LIST.C
  4.  */
  5.  
  6. static int chgcomp0(int (*newcompare)());
  7. static int chgcomp1(int (*newcompare)());
  8. static int chgcomp2(int (*newcompare)());
  9. static int chgcomp3(int (*newcompare)());
  10.  
  11. static int (*chgcomps[MAXLISTS])(int (*newcompare)()) = {
  12. chgcomp0, chgcomp1, chgcomp2, chgcomp3 };
  13.  
  14. static int chgcomp0(int (*newcompare)())
  15. {
  16.     if(! newcompare)  {
  17.     lerror = NULL_PTR;
  18.     return 0;
  19.     }
  20.     compare[0] = newcompare;
  21.     return 1;
  22. }
  23.  
  24. static int chgcomp1(int (*newcompare)())
  25. {
  26.     if(! newcompare)  {
  27.     lerror = NULL_PTR;
  28.     return 0;
  29.     }
  30.     compare[1] = newcompare;
  31.     return 1;
  32. }
  33.  
  34. static int chgcomp2(int (*newcompare)())
  35. {
  36.     if(! newcompare)  {
  37.     lerror = NULL_PTR;
  38.     return 0;
  39.     }
  40.     compare[2] = newcompare;
  41.     return 1;
  42. }
  43.  
  44. static int chgcomp3(int (*newcompare)())
  45. {
  46.     if(! newcompare)  {
  47.     lerror = NULL_PTR;
  48.     return 0;
  49.     }
  50.     compare[3] = newcompare;
  51.     return 1;
  52. }
  53.