msr_init man page

msr_init — Initializing and freeing MSRecord and related structures

Synopsis

#include <libmseed.h>

MSRecord *msr_init ( MSRecord *msr );

void      msr_free ( MSRecord **ppmsr );

void      msr_free_blktchain ( MSRecord *msr );

Description

msr_init will initialize a MSRecord structure.  If the msr parameter is NULL a new structure will be allocated.  If the msr parameter is not NULL the blockette chain (MSRecord.blkts) will be freed but any memory allocated for MSRecord.fsdh and MSRecord.datasamples will be preserved as it will cleanly be re-used by routines such as msr_unpack(3).

msr_free will free all memory associated with a MSRecord structure including the blockette chain and set the structure pointer (*ppmsr) to 0.

msr_free_blktchain will free all memory associated with the blockette chain of an MSRecord structure.  The shortcut blockette pointers will also be reset.

Return Values

msr_init returns a pointer to the MSRecord structure initialized on success or NULL on error.

See Also

ms_intro(3), msr_pack(3) and msr_unpack(3).

Author

Chad Trabant
IRIS Data Management Center

Info

2006/02/27 Libmseed API