home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
228_01
/
isamcls.c
< prev
next >
Wrap
Text File
|
1987-07-31
|
1KB
|
45 lines
/*
HEADER: CUGXXX;
TITLE: Close ISAM index (of ISAM system);
DATE: 3-31-86;
DESCRIPTION: Part of ISAM Library;
KEYWORDS: ISAM;
FILENAME: ISAMCLS.C;
WARNINGS: None;
AUTHORS: John M. Dashner;
COMPILER: Lattice C;
REFERENCES: US-DISK 1310;
ENDREF
*/
/*
** ISAMC - Written by John M. Dashner
*/
#include <stdio.h>
#include <ctype.h>
#include <isam.h>
/*
** CLOSE - Close an ISAMC Index
*/
isamcls(hdr)
struct isam *hdr;
{
if (hdr->q5 == 1) /* ck if index needs to be sorted */
if (isamsrt(hdr) == ERROR)
return ERROR;
else /* if not, update the control records */
if (isamupd(hdr) == ERROR)
return ERROR;
if (close(hdr->q7) == ERROR)
{
isam_err = 8;
return ERROR;
}
free(hdr);
return NULL;
}