Dbunlocki()

From Recital Documentation Wiki
Revision as of 14:32, 1 April 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

unlock an index file


SYNOPSIS

#include "dbl.h"
 
	int	dbunlocki(ndx)
 
	<input parameter>
	char	*ndx;		/* File descriptor of a .NDX file to be unlocked */
 
	<output parameter>
	none


RETURN VALUE

The dbunlocki() 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 dbunlocki() function unlocks the index file from the given file descriptor "char *ndx".


EXAMPLE

The following example unlocks the .NDX file whose file descriptor is in "char *ndx".

#include "dbl.h"
 
	char	*ndx;		/* Index file descriptor	*/
	int	rc;		/* Return code			*/
 
	rc = dbunlock(ndx);
	if (rc = SUCCESS) printf("index is unlocked n");
	else {
		printf("error number %d n", rc);
		return (ERROR);
	}


SEE ALSO

dbfilemode(), dblockf(), dblocki(), dblockr(), dbtlockf(), dbtlockr(), dbunlockf(), dbunlockr()