MSR_DUPLICATE(3)
π MSR_DUPLICATE(3) π
okay bestie, so you found your way into libmseed, the library functions manual, and specifically the page for msr_duplicate. Manual name? MSR_DUPLICATE. Vibe? iconic. Let's get into it β¨
πΈ NAME πΈ
msr_duplicate β duplicate an MSRecord structure
π SYNOPSIS π
#include <libmseed.h>
MSRecord *msr_duplicate ( MSRecord *msr, flag datadup );
π¦ DESCRIPTION π¦
So basically, msr_duplicate makes a copy of an MSRecord structure β and not just the top layer, no ma'am, it goes all the way down through every substructure too, the FSDH and the whole blockette chain. Full clone energy. π
Now here's the part where you actually have to pay attention: the datadup flag is the main character here.
- if
datadupis true β the data samples frommsrget duplicated too π«Ά - if
datadupis false β the copyMSRecordwill have no associated data sample array at all, regardless of whether the sourceMSRecordhad one
like, zero data. not empty, just... not there. no cap. π
π RETURN VALUE π
msr_duplicate returns a pointer to an MSRecord on success, and NULL on error. that's it, that's the whole story β check for NULL, bestie, don't be out here dereferencing your problems away π
π SEE ALSO π
π AUTHOR π
Chad Trabant IRIS Data Management Center
and that's the whole page, fr fr π this was the Libmseed API manual, dated 2007/04/28, filed under MSR_DUPLICATE(3). slay, go duplicate responsibly β¨π
π¦ 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
- 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