MST_INIT(3)

✨ MST_INIT β€” NAME ✨

okay bestie, gather round, because this one is literally the foundation of everything: mst_init β€” initializing and freeing MSTrace and MSTraceGroup structures. that's the whole gig. no cap. πŸ’–


🌸 SYNOPSIS 🌸

she's a libmseed girlie, so first things first:

#include <libmseed.h>

and then the four icons themselves:

MSTrace      *mst_init ( MSTrace *mst );

void        mst_free ( MSTrace **ppmst );

MSTraceGroup *mst_initgroup ( MSTraceGroup *mstg );

void        mst_freegroup ( MSTraceGroup **ppmstg );

πŸ¦‹ DESCRIPTION πŸ¦‹

so, mst_init will initialize a MSTrace structure. if the mst parameter is NULL, a brand new structure gets allocated β€” fresh out the box, main character energy ✨. but if the mst parameter is not NULL, then the structure gets cleared, and any memory allocated for the MSTrace.datasamples and MSTrace.prvtptr members will be freed. so it's like... a glow-up reset. she's clearing the vibes. πŸ’…

mst_free will free all memory associated with a MSTrace structure and set the structure pointer (*ppmst) to 0. and yes, that includes any memory pointed to by the prvtptr member of the MSTrace structure. every last crumb. she does not leave crumbs. πŸŽ€

mst_initgroup will initialize a MSTraceGroup structure. if the mstg parameter is NULL, a new structure will be allocated. if the mstg parameter is not NULL, the structure will be cleared and any all associated MSTrace structures will be freed. bye besties, it's a group unfollow 😭

mst_freegroup will free all memory associated with a MSTraceGroup structure and set the structure pointer (*ppmstg) to 0. periodt. 🫢


πŸ’– RETURN VALUES πŸ’–

mst_init returns a pointer to the MSTrace structure initialized on success, or NULL on error. that's it. that's the vibe check. πŸ’€

mst_initgroup returns a pointer to the MSTraceGroup structure initialized on success, or NULL on error. same energy, different struct. 🌈

fr fr: NULL means something went wrong, so don't just yolo past it, bestie. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


⭐ AUTHOR ⭐

Chad Trabant IRIS Data Management Center


and that's the whole page, bestie!! this lil slice of the Libmseed API is dated 2006/10/10, and the man page itself is MST_INIT(3). ate and left no crumbs. mwah πŸ’‹πŸŒΈ