Difference between revisions of "Dbiopen()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 31: | Line 31: | ||
==EXAMPLE== | ==EXAMPLE== | ||
− | The following example opens the .NDX file "person.ndx". The file descriptor is returned by the function | + | The following example opens the .NDX file "person.ndx". The file descriptor is returned by the function dbiopen() in "char *ndx". |
<code lang="c"> | <code lang="c"> |
Revision as of 10:31, 2 April 2009
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); }