📄 auxqhist_rec.3
字号:
.\" Copyright (c) 1987 Entropic Speech, Inc.; All rights reserved.\" @(#)auxqhist_rec.3 1.1 8/7/87 ESI.TH AUXQHIST_REC 3\-ESPS 8/7/87.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Speech, Inc..ds ]Y "\fBESI INTERNAL\fP.SH NAMEallo_auxqhist_rec \- allocate memory for auxiliary portion of an expandedESPS FEA_QHIST file record..brinit_auxqhist_hd \- initialize an expanded FEA file header for subtype FEA_QHIST..SH SYNOPSIS.ft B.nf#include <esps/esps.h>#include <esps/fea.h>#include <esps/feaqhist.h>#include <esps/feahuff.h>struct auxqhist *allo_auxqhist_rec( hd, p )struct header *hd;struct feaqhist *p;intinit_auxqhist_hd( hd )struct header *hd;.fi.ft.SH DESCRIPTION\fIAllo_auxqhist_rec\fR allocates memory for the auxiliary portion of anexpanded FEA_QHIST file record and returns a pointer to it. The memoryallocations assume that the header was initialized by a call to\fIinit_auxqhist_hd\fR. Because the size of the allocated recorddepends on values in the data file header, it is important to ensure thatan expanded FEA_QHIST record is consistent with the header of the file itis being used with [see \fIinit_auxqhist_hd\fR]. Internally,\fIallo_auxqhist_rec\fR hooks the FEA record up to an \fIauxqhist\fR struct..PP\fIInit_auxqhist_hd\fR accepts a pointer \fIhd\fR to an ESPS FEA file header. Itinitializes the record-field definitions to describe the auxiliary fields thatmake up an expanded file of subtype FEA_QHIST. It does this by means of calls to\fIadd_fea_fld\fR (3\-ESPS). For a description of the expanded FEA_QHIST recordfields, see \fIaux_qhist\fR (5\-ESPS). \fIInit_auxqhist_hd\fR returns 1 if any ofthe internal calls to \fIadd_fea_fld\fR (3\-ESPS) return an error code; otherwise,it returns 0. \fIInit_auxqhist_hd\fR should be called only when creating a newexpanded FEA_QHIST file, after the call to \fInew_header\fR (3\-ESPS), or\fIcopy_header\fR (3\-ESPS)..SH EXAMPLES.if n .ta 33.if t .ta 3i.nf\fB\s-1Reading an existing file:\s+1\fRFILE *ifp;struct auxqhist *auxqhist_rec;struct feaqhist *feaqhist_rec;struct header *ih;ih = read_header( ifp );feaqhist_rec = allo_feaqhist_rec( ih );auxqhist_rec = allo_auxqhist_rec( ih, feaqhist_rec );if ( get_feaqhist_rec( feaqhist_rec, ih, ifp ) == EOF ) . . .c = *auxqhist_rec\->code;\fB\s-1Creating a new file:\s+1\fRFILE *ifp;FILE *ofp;struct auxqhist *auxqhist_rec;struct feaqhist *feaqhist_rec;struct header *ih;struct header *oh;ih = read_header( ifp );oh = copy_header( ih );if ( init_auxqhist_hd( oh ) ) ERROR_EXIT( "error filling expanded FEA_QHIST header" ); . . .write_header( oh, ofp );feaqhist_rec = allo_feaqhist_rec( oh );auxqhist_rec = allo_auxqhist_rec( oh, feaqhist_rec ); . . .*auxqhist_rec\->code = c;put_feaqhist_rec( feaqhist_rec, oh, ofp );.fi.PPIn both of these examples, notice that the FEA_QHIST read and writeroutines, \fIget_feaqhist_rec\fR (3\-ESPS) and \fIput_feaqhist_rec\fR(3\-ESPS), implicitly perform the I/O for the auxiliary data \- noseparate routines are needed..SH DIAGNOSTICSIf \fIhd\fR does not point to a FEA header of subtype FEA_QHIST, theprogram terminates with an assertion failure. .SH BUGSNone known..SH SEE ALSOallo_feaqhist_rec (3\-ESPS), init_feaqhist_hd (3\-ESPS), aux_qhist (5\-ESPS),fea_qhist (5\-ESPS)..SH AUTHORPrograms and manual page by Jim Elliott.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -