Dbmemoformat()

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

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

PURPOSE

toggle memo input formatting


SYNOPSIS

#include "dbl.h"
 
	int	dbmemoformat(format)
 
	<input parameters>
	int	format;		/* Memo Format flag, 0 – OFF, 1 – ON */
 
	<output parameters>
	none


RETURN VALUE

The dbmemoformat() function returns 0.


DESCRIPTION

Memo formatting automatically formats memo field data when placed into the file. Spaces and other control characters are stripped if memo format is ON. This function allows access to this characteristic from within the libraries. If the input parameter is 0, function dbputm() and dbupdm() attempt no formatting of memos. Otherwise, those functions strip spaces and control characters.


EXAMPLE

This example toggles |MEMOFORMAT ON. The buffer that is to be written to the memo field will be stripped of extra spaces and control characters.

#include "dbl.h"
	int	dbt;				/* .DBT file descriptor */
	char	memo[512];		/* Memo buffer */
	int	rc;				/* Return code variable */
 
	rc = dbmemoformat(1)
	if( rc = dbupdm(dbt, memo,
				&record[53],
				&record[53]) ! = 0) {
		fprintf(stderr, "Error on dbupdm(): %d\n", rc);
		exit(1);
	}


SEE ALSO

dbgetm(), dbmopen(), dbputm(),dbupdm()