📄 newheader.3
字号:
.\" Copyright (c) 1987-1990 Entropic Speech, Inc..\" Copyright (c) 1997 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)newheader.3 1.7 18 Apr 1997 ESI/ERL.ds ]W (c) 1997 Entropic Research Laboratory, Inc..TH NEW_HEADER 3\-ESPSu 18 Apr 1997.SH NAMEnew_header \- create a new, all zero ESPS header structure.SH SYNOPSIS.ft Bstruct header *.brnew_header (type) .brint type;.ft.SH DESCRIPTION.I new_header allocates memory for a new ESPS header structure and returns a pointerto the header. If \fItype\fR is zero, then only the part of the headercommon to all ESPS header types is allocated. If \fItype\fR is one of thelegal ESPS file types (as defined in \fI<esps/ftype.h>\fR) then the typespecific part of type \fItype\fR is allocated. If \fItype\fR is non-zeroand not a legal ESPS file type, then the function returns NULL..PPThe current version number of \fI<esps/header.h>\fR is put in \fIcommon.hdvers\fR and the type of the header is put in\fIcommon.type\fR. The current machine type code is put into\fIcommon.machine_code\fR..PPThe case of \fItype\fR equal zero is intended primarily for use by theother header routines. There is no function provided to application programs to allocate the type specific part of the header..PPIf the Unix environment variable \fBESPS_EDR\fR is defined and has avalue of \fIon\fR, then the header item \fIcommon.edr\fR is set toYES, which means that this data file will be written to the disk inEntropic's external data representation (EDR). Otherwise the file iswritten in the host machine's native data format.The default action is not to have\fBESPS_EDR\fR defined and to write files in native format.File written with \fIcommon.edr\fR \fIon\fR can be read by any ESPSimplementation on any supported machine. Files written in nativeformat will be more efficient on some machines, but might not beusable on all ESPS implementations. That is, all implementations canread both their own representation and EDR. In addition, someimplementations can read their own format, EDR, and other formats (forexample SPARC and 680X0 machines can read files in EDR, their ownnative, SUN 386i, and the DEC DS3100 (MIPs CPU))..ppIf the program needs to force the output data representation format,then it can reset the value of \fIcommon.edr\fR..ppThis function is usually used to create a header that is to be writtenwith \fIwrite_header(3)\fR. If it is used to create a header that isimmediately used with the ESPS input routines to read a file, then caremust be taken to insure that all required header items are filled in..SH EXAMPLEif (hd = new_header(FT_FEA) == NULL) \fIerror...\fR.brhd->common.type /* had better be FT_FEA */.SH DIAGNOSTICSNone..SH BUGSNone known..SH SEE ALSO.nf\fIeopen\fP(3\-ESPSu), \fIcopy_header\fP(3\-ESPSu), \fIread_header\fP(3\-ESPSu),\fIwrite_header\fP(3\-ESPSu).fi.SH AUTHOROriginal version by Joe Buck..brModified by Alan Parker for new header structures.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -