Dbiopen()

From Recital Documentation Wiki
Revision as of 13:29, 1 May 2009 by Yvonnemilne (Talk | contribs)

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

PURPOSE

open an existing index file


SYNOPSIS

#include "dbl.h"
 
	int	dbiopen(name, ndx)
 
	<input parameter>
	char	*name;		/* Address of a buffer containing the .NDX file name */
 
	<output parameters>
	char	*ndx;		/* .NDX file descriptor */


RETURN VALUE

The dbiopen() function returns 0 for success, or < 0 if an error occurs. See the section on return value codes for a detailed list of failure codes.


DESCRIPTION

This function opens an existing .NDX file and returns its file descriptor. The file descriptor is released after The dbiclose() function has been called for this file.


EXAMPLE

The following example opens the .NDX file "person.ndx". The file descriptor is returned by the function dbiopen() in "char *ndx".

#include "dbl.h"
 
	char	*ndx;	/* .NDX file descriptor */
	int	rc;		/* Return code */
 
	rc = dbiopen("person.ndx", &ndx);
	if (rc == SUCCESS) printf("index opened \n");
	else {
		printf("error number %d \n", rc);
		exit (1);
	}


SEE ALSO

dbfilemode(), dbicache(), dbiclose(), dbiflsh(), dbopen()