int setheader(char *record, DB_Siginfo *siarray, unsigned int nsig)
Return:
This function creates or recreates a `header' file (in the current
directory) for the specified record, based on the contents of the
first nsig members of siarray. The preferred way to create
a header file for a new record is using newheader, which records
signal checksum and length variables maintained by putvec. The
intended use of setheader is for editing `header' files,
e.g., to change recorded signal gains from a calibration program, or to add
signal descriptions. In the following code fragment, the `header'
file for record `old' is used to create a `header' file for
record `new':
...
int nsig, status;
DB_Siginfo s[DB_MAXSIG];
nsig = isigopen("old", s, -DB_MAXSIG);
if (nsig > 0) {
s[0].gain = 100.0;
status = setheader("new", s, (unsigned int)nsig);
}
...
The `header' file for record `new' will contain the same signal
information as that for record `old', except that the gain
for signal 0 will have been changed as shown. Any "info" strings in
the `header' file for record `old' must be copied explicitly;
see section getinfo, and see section putinfo.
(This function was first
introduced in DB library version 5.0.)
Go to the first, previous, next, last section, table of contents.