gd_frameoffset(3)
π gd_frameoffset(3) β the getdata girlie's guide π
okay so bestie, welcome to gd_frameoffset(3), a lil function from the GETDATA manual. It's giving "where does my data actually start" energy, and honestly? Iconic. Let's get into it. π¦
β¨ NAME β¨
gd_frameoffset β report the starting frame of fields in a Dirfile πΈ
π SYNOPSIS π
#include <getdata.h>
off_t gd_frameoffset(DIRFILE *dirfile, int fragment_index);
π DESCRIPTION π
So gd_frameoffset() slides into a dirfile(5) database β that's the one you point at with dirfile β and hands you back the frame offset (the details live in dirfile-format(5), go look, iykyk) for the fragment indexed by fragment_index. π«Ά
And what even is a frame offset, you ask? It's the frame number of the very first sample of data stored in the binary files that belong to RAW fields defined in that specified fragment. Basically: your data's origin story. β
Heads up: if a fragment has no RAW fields in it at all, its frame offset is just... ignored. Not relevant, not the main character, moving on. π
Also, the dirfile argument has got to point to a valid DIRFILE object, and it has to be one you already made by calling gd_open(3). No homemade DIRFILEs, bestie, that's not the vibe. π
π₯ RETURN VALUE π₯
When everything goes right, gd_frameoffset() returns a non-negative integer holding the frame offset of the fragment you asked about. Slay. β¨
When things go wrong? It returns a negative-valued error code. Not -1 specifically, just negative, okay? Possible error codes are:
GD_E_BAD_DIRFILEβ the dirfile you handed over was invalid. Not it. πGD_E_BAD_INDEXβ the fragment_index you supplied was out of range. π«
That error code also gets tucked away inside the DIRFILE object, so after the function returns you can go get it with gd_error(3). And if you want a descriptive error string β like, actual words β hit up gd_error_string(3). π
π HISTORY π
- The
get_frameoffset()function appeared in GetData-0.5.0. Baby's first debut. π - In GetData-0.7.0, this function got renamed to
gd_frameoffset(). Glow-up era. π - In GetData-0.10.0, the error return from this function changed from
-1to a negative-valued error code. Periodt. π₯
π SEE ALSO π
And that's the whole page, bestie! This one's from Version 0.10.0, dated 25 December 2016 β a lil Christmas gift of a manpage. π Go forth and find your frames. π§π
π¦ where this page comes from
- debian bookworm: libgetdata-doc 0.11.0-6
- debian trixie: libgetdata-doc 0.11.0-15
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 43: getdata-devel 0.11.0-13.fc43 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- fedora 44: getdata-devel 0.11.0-14.fc44 Β· GPL-2.0-or-later
- nixos 26.05: getdata 0.11.0
- nixpkgs unstable: getdata 0.11.0
- ubuntu jammy: libgetdata-doc 0.11.0-3ubuntu1
- ubuntu noble: libgetdata-doc 0.11.0-13
- ubuntu questing: libgetdata-doc 0.11.0-15
- ubuntu resolute: libgetdata-doc 0.11.0-17build1
- ubuntu stonking: libgetdata-doc 0.11.0-17build2
- Copyright (C) 2016 D. V. Wiebe
- Copyright (C) 2008, 2010, 2016 D. V. Wiebe
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms