Go to the first, previous, next, last section, table of contents.


setmsheader

int setmsheader(char *record, char *snarray[], unsigned int nsegments)

Return:

0
Success
-1
Failure: illegal record name, or no segments specified, or header not writable
-2
Failure: segment name too long, or insufficient memory
-3
Failure: attempt to nest multi-segment records, or unreadable segment `header'
-4
Failure: segment length unspecified, or numbers of signals or sampling frequencies don't match between segments

This function creates a `header' file (in the current directory) for a multi-segment record (see section Multi-Segment Records. snarray contains the names of the segments, each of which must be an existing (single-segment) record; nsegments specifies the number of segments in snarray. Once a `header' has been created by setmsheader, any DB application can read the concatenated signal files of the constituent segment simply by opening the multi-segment record (using isigopen or dbinit). Note that the signal files themselves are not modified in any way, nor are they copied; rather, the other DB library functions that read signals (getvec, getframe, isigsettime, and isgsettime) automatically switch among the signal files of the segments as required. For an example of the use of setmsheader, see `app/dbcollate.c' (`app/dbcoll8.c' under MS-DOS) in the DB Software Package. (This function was first introduced in DB library version 9.1.)


Go to the first, previous, next, last section, table of contents.



George B. Moody (george@hstbme.mit.edu)