gd_nframes64(3)

πŸ’– gd_nframes64 β€” report the size of a Dirfile, with largefile support πŸ’–

okay bestie, so this one lives in the GETDATA manual, section 3, and it's literally just the big-girl version of gd_nframes(3). let's get into it πŸ¦‹


✨ SYNOPSIS ✨

#define GD_64BIT_API
#include <getdata.h>

gd_off64_t gd_nframes64(DIRFILE *dirfile);

no cap, that #define up top is doing a LOT of heavy lifting here. do not skip it. πŸ™ˆ


🌸 DESCRIPTION 🌸

so the whole point of this function is that it's the same deal as gd_nframes(3), except it uses a 64-bit offset type (gd_off64_t) whenever one is actually available β€” and it does that regardless of how big off_t happens to be on your system. main character energy fr fr. πŸ‘‘

lowkey important: this function is only guaranteed to be available if GD_64BIT_API is defined before you include getdata.h. that's not a vibe, that's a rule. define it first or don't come crying to me. 😭

and here's the tea on how it relates to the 32-bit one:

  • if off_t is already a 64-bit type, then this function and gd_nframes(3) are the same thing. same function, no drama. ✨
  • if off_t is not 64-bit, then it flips: gd_nframes(3) becomes the version of this function that uses a 32-bit off_t. iconic behavior honestly. πŸ’…

so basically they're two sides of the same coin and which one you're holding depends on your off_t. slay. πŸŽ€


🌈 SEE ALSO 🌈


and that's the whole page, bestie! this one's from Version 0.10.0, dated 25 December 2016, out of the GETDATA manual, section 3. go forth and count your frames responsibly. mwah πŸ’–πŸ«Άβœ¨