Dblocki()
From Recital Documentation Wiki
Revision as of 10:23, 2 April 2009 by Yvonnemilne (Talk | contribs)
PURPOSE
lock an index file
SYNOPSIS
#include "dbl.h" int dblocki(ndx) <input parameter> char *ndx; /* File descriptor of a .NDX file to be locked */ <output parameter> none
RETURN VALUE
The dblocki() function returns 0 for success, or < 0 if an error occurs. See the section on return code values for a detailed list of return codes.
DESCRIPTION
The dblocki() function locks the index file from the given file descriptor "char *ndx".
EXAMPLE
The following example locks the .NDX file whose file descriptor is in "char *ndx".
#include "dbl.h" char *ndx; /* Index file descriptor */ int rc; /* Return value */ rc = dblocki(ndx); if (rc = SUCCESS) printf("index is locked n"); else { printf("index could not be locked n"); return (ERROR); }
SEE ALSO
dbfilemode(), dblockf(), dblockr(), dbtlockf(), dbtlockr(), dbunlockf(), dbunlocki(), dbunlockr()