DMPRINTF(5ICD)

NAME
dmPrintf, dmScanf - print/scan formatted data to/from the database

SYNOPSIS

#include "dmincl.h"
dmPrintf (dmstream, format [, arg]... )
DM_STREAM *dmstream;
char *format;
dmScanf (dmstream, format [, arg]... )
DM_STREAM *dmstream;
char *format;

PARAMETERS

dmstream
    is a pointer to a valid DM_STREAM as obtained from function dmOpenStream(). It is the access key of a named stream from / to which the data is read or written.

format
    is a control string which contains conversion specifications to be used for the data that is read or written (see printf(3S) and scanf(3S)).

DESCRIPTION
Function dmPrintf() writes the arguments under control of the format to the open data stream specified by dmstream.

Function dmScanf() reads from the open data stream specified by dmstream under control of the format and stores the data items in the specified pointer arguments.

These functions can be used by programmers who wish to define their own representation of data in the database (this data is not stored in PACKED format).

DIAGNOSTICS
Function dmPrintf() returns the number of bytes written, or EOF if an error was encountered.

Function dmScanf() returns the number of successfully matched and assigned input items; this number can be zero in the event of an early conflict between an input character and the control string. If the input ends before the first conflict or conversion, EOF is returned.

SEE ALSO
dmGetDesignData(5ICD), dmOpenStream(5ICD), printf(3S), scanf(3S).