home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 170_01 / isamcls.c < prev    next >
Text File  |  1979-12-31  |  768b  |  32 lines

  1. /*
  2. **                 ISAMC - Written by John M. Dashner
  3. */
  4.  
  5. #include <stdio.h>
  6. #include <ctype.h>
  7.  
  8. #include <isam.h>
  9.  
  10. /*
  11. **                  CLOSE - Close an ISAMC Index
  12. */
  13.  
  14. isamcls(hdr)
  15. struct isam *hdr;
  16. {
  17.     if (hdr->q5 == 1)           /* ck if index needs to be sorted */
  18.         if (isamsrt(hdr) == ERROR)
  19.             return ERROR;
  20.     else                        /* if not, update the control records */
  21.         if (isamupd(hdr) == ERROR)
  22.             return ERROR;
  23.     if (close(hdr->q7) == ERROR)
  24.     {
  25.         isam_err = 8;
  26.         return ERROR;
  27.     }
  28.     free(hdr);
  29.     return NULL;
  30. }
  31.  
  32.