MSR_INIT(3)
π MSR_INIT(3) β it's giving "Library Functions Manual" β¨
okay bestie, welcome to the libmseed section 3 glow-up π this one's all about spinning up and tearing down your MSRecord structs and the lil blockette chain that lives inside them. no cap, it's a short one, but it's important, so let's go π
πΈ 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 );
like, three functions, three vibes, one header. slay π₯
π DESCRIPTION π
π«Ά msr_init
msr_init will initialize a MSRecord structure, periodt.
- if the
msrparameter isNULL, a new structure will be allocated for you. it's giving "treat yourself" π - if the
msrparameter is notNULL, the blockette chain (MSRecord.blkts) will be freed π§Ή β but heads up, any memory allocated forMSRecord.fsdhandMSRecord.datasampleswill be preserved, because it's going to get cleanly re-used by routines such asmsr_unpack(3). the way that it recycles memory... iconic β»οΈ
π msr_free
msr_free will free all memory associated with a MSRecord structure β including the blockette chain β and it sets the structure pointer (*ppmsr) to 0. so like, zero it out, no dangling nonsense, we do NOT do dangling pointers in this house π
π§ msr_free_blktchain
msr_free_blktchain will free all memory associated with the blockette chain of an MSRecord structure. and bestie, the shortcut blockette pointers will also be reset π
ngl, if you're only nuking the chain and keeping the rest of the record alive, this is your girl. if you want the whole thing gone, that's msr_free's job π
β 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) β go read those too, iykyk π
π AUTHOR π
Chad Trabant IRIS Data Management Center
okay that's the whole page, bestie!! this one came straight out of the Libmseed API, dated 2006/02/27, and yes it is still out here living its MSR_INIT(3) main character era π go forth and free your memory responsibly, ily π«ΆπΈ
π¦ where this page comes from
- debian bookworm: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- debian trixie: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- ubuntu jammy: libmseed-doc 2.19.6-3 Β· LGPL-3.0-or-later
- ubuntu noble: libmseed-doc 2.19.8-1ubuntu2 Β· LGPL-3.0-or-later
- ubuntu questing: libmseed-doc 2.19.8-1ubuntu2
- ubuntu resolute: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- ubuntu stonking: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms