logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

msr_init - Initializing and freeing MSRecord and related structures

Author

       Chad Trabant
       IRIS Data Management Center

Libmseed API                                       2006/02/27                                        MSR_INIT(3)

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.

Name

       msr_init - Initializing and freeing MSRecord and related structures

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).

Synopsis

#include<libmseed.h>MSRecord*msr_init(MSRecord*msr);voidmsr_free(MSRecord**ppmsr);voidmsr_free_blktchain(MSRecord*msr);

See Also