home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / alde_c / misc / func / isamc.lbr / ISAMCLS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1984-11-28  |  640 b   |  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.