TDAT(3SP)

NAME
TdatRead, fTdatRead, TdatWrite, fTdatWrite - routines to read and write Tdat files.

SYNOPSIS

#include <speech.h>

int TdatRead (char *file, char ***data, AsciiHdr **header)

int fTdatRead (FILE *fp, char ***data, AsciiHdr **header )

int TdatWrite (char *file, char **data, AsciiHdr *header)

int fTdatWrite (FILE *fp, char **data, AsciiHdr *header)

DESCRIPTION

These routines read and write Tdat files.

TdatRead() reads file into memory. The space for data is allocated using Alloc2d(3SP) and can be freed with Free2d(3SP). The header contains the header portion of the Tdat file. header is an array of struct AsciiHdr. The header should be freed with FreeHeader(3SP). fTdatRead() works the same as TdatRead() except that the data is read from the stream fp.

TdatWrite() writes data with header header to the Tdat file file. The data must be allocated with Alloc2d(3SP). header is an array of struct header. fTdatWrite() works the same as TdatWrite() except that the data is writen to the stream fp.

DIAGNOSTICS

TdatRead(), fTdatRead(), TdatWrite(), and fTdatWrite() returns a negative number on error and sets ErrorString.

SEE ALSO
ErrorString(3SP), Alloc2d(3SP), Free2d(3SP),
FreeHeader(3SP), malloc(3), free(3),

BUGS

AUTHORS
Center for Spoken Language Understanding
Department of Computer Science and Engineering
Oregon Graduate Institute of Science & Technology