#include <libmseed.h> MSRecord *msr_init ( MSRecord *msr ); void msr_free ( MSRecord **ppmsr ); void msr_free_blktchain ( MSRecord *msr );
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.
msr_init returns a pointer to the MSRecord structure initialized on success or NULL on error.
ms_intro(3), msr_pack(3) and msr_unpack(3).
Chad Trabant IRIS Data Management Center
The man pages msr_free(3) and msr_free_blktchain(3) are aliases of msr_init(3).