MSR_DUPLICATE(3)

πŸ“¦
version 2.19.8 Β· 2 versions
  • 2.19.8 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.19.5 Β· fedora 43, fedora 44
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 datadup is true β€” the data samples from msr get duplicated too 🫢
  • if datadup is false β€” the copy MSRecord will have no associated data sample array at all, regardless of whether the source MSRecord had 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 βœ¨πŸŽ€