Difference between revisions of "Dbmclose()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
Line 11: Line 11:
  
 
<input parameter>
 
<input parameter>
char *dbt; /* File descriptor of a .DBT file to be closed */
+
char *dbt; /* File descriptor of a .DBT file to be closed */
  
 
<output parameter>
 
<output parameter>
Line 35: Line 35:
 
<code lang="c">
 
<code lang="c">
 
#include "dbl.h"
 
#include "dbl.h"
char *dbt; /* File descriptor of a .DBT file */
+
char *dbt; /* File descriptor of a .DBT file */
int rc; /* Return code */
+
int rc; /* Return code */
  
 
rc = dbmclose(dbt);
 
rc = dbmclose(dbt);
if (rc = = SUCCESS)
+
if (rc == SUCCESS)
printf("the memo has been closed.n");
+
printf("the memo has been closed.\n");
 
else {
 
else {
printf("error number %d n", rc);
+
printf("error number %d \n", rc);
 
exit (1);
 
exit (1);
 
}
 
}

Latest revision as of 13:44, 1 May 2009

PURPOSE

close memo file


SYNOPSIS

#include "dbl.h"
 
	int	dbmclose(dbt)
 
	<input parameter>
	char	*dbt;		/* File descriptor of a .DBT file to be closed */
 
	<output parameter>
	none


RETURN VALUE

The dbmclose() function returns 0 for success. See the section on return code values for a detailed list of return codes.


DESCRIPTION

This function closes a .DBT memo file.


EXAMPLE

The following example closes a .DBT file whose file descriptor is in "char *dbt".


#include "dbl.h"
	char	*dbt;		/* File descriptor of a .DBT file */
	int	rc;		/* Return code */
 
	rc = dbmclose(dbt);
	if (rc == SUCCESS)
		printf("the memo has been closed.\n");
	else {
		printf("error number %d \n", rc);
		exit (1);
	}


SEE ALSO

dbmopen(), dbmcreat()