gd_flags(3)
π gd_flags(3) π
okay so welcome to the GetData manual, bestie β this one's gd_flags, and it's literally the little knob-panel for your dirfile's vibe settings. no cap.
β¨ NAME β¨
gd_flags β alter GetData operational flags π
πΈ SYNOPSIS πΈ
#include <getdata.h>
unsigned long gd_flags(DIRFILE *dirfile, unsigned long set,
unsigned long reset);
π¦ DESCRIPTION π¦
So gd_flags() does the thing where it messes with the operational flags of the dirfile(5) database you point at with dirfile, and then it hands you back the new value of the flags register. it's giving "I changed the settings AND I'm telling you what they are now" energy. π
The flags you can peek at or poke with this interface are a subset of the open flags (go see gd_cbopen(3) for the full set). here's the lineup:
GD_PRETTY_PRINTβ when your dirfile metadata get flushed to disk (either you asked for it explicitly withgd_metaflush(3),gd_rewrite_fragment(3), orgd_flush(3), or it just happens implicitly when the dirfile gets closed), GetData will attempt to cook up a nicer looking format specification β nicer from a human-readable standpoint, that is. π BUT. What that explicitly means is not part of the API, so don't you dare rely on any particular behaviour, fr fr. Also, if the dirfile was opened read-only, this flag is just ignored. πGD_VERBOSEβ this one says: whenever the library triggers an error while working on this dirfile, the corresponding error string β the one you'd get by callinggd_error_string(3)β should get written to the caller's standard error stream (stderr(3)) by GetData. The error string may be prefixed by a string that the caller specified; peepgd_verbose_prefix(3)for that. Without this flag? GetData writes nothing to standard error. (and GetData never writes to standard output, periodt. π)
π§ the set/reset rules (this is the important part)
- flags that show up only in
setget turned on (enabled) β - flags that show up only in
resetget turned off (disabled) β - flags that show up in both
setandresetget toggled π - flags that show up in neither are left completely unchanged π€
So, accordingly:
- wanna just query the current flags? pass both
setandresetas zero. π - wanna explicitly specify all the flags, ignoring their old values entirely? give the new flags register in
set, and its bitwise complement inreset. slay.
π₯ RETURN VALUE π₯
gd_flags() returns a bitwise or'd collection of those flags from the list above which are enabled after it does the modifications you specified (if any).
And here's the best part: this function does not fail. no error codes, no drama, no nothing. iconic behaviour honestly. β¨
π HISTORY π
The gd_flags() function appeared in GetData-0.8.0. a whole era. π
π SEE ALSO π
and that's the whole page, bestie!! this was Version 0.10.0, dated 25 December 2016, and yeah β it's a gd_flags(3) situation, written by the GETDATA girlies. mwah, go set some flags π
ππ«Ά
π¦ 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) 2012, 2016 D.V. Wiebe
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms