oracular (3) msr_init.3.gz

Provided by: libmseed-doc_2.19.8-1ubuntu2_all bug

NAME

       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