gd_verbose_prefix(3)
π gd_verbose_prefix β the GetData error-message-glow-up page π
okay bestie, this is the manual page for gd_verbose_prefix(3), living over in the GETDATA manual. it's short, it's sweet, it's giving "tiny function, big personality". let's go β¨
πΈ NAME πΈ
gd_verbose_prefix β set the prefix on error messages printed by GetData
π SYNOPSIS π
#include <getdata.h>
int gd_verbose_prefix(DIRFILE *dirfile, const char *prefix);
β¨ DESCRIPTION β¨
okay so gd_verbose_prefix() sets the prefix that gets printed before error messages output by the GetData library, for the dirfile(5) database you're pointing at with dirfile. π
and listen β if prefix is NULL, the current prefix (if there even is one) gets deleted, and no new prefix is saved. bye bye prefix π«Ά
now here's the tea, and it's important: GetData only prints error messages for a given Dirfile if it was opened along with the GD_VERBOSE flag, or if that flag got set on the dirfile afterwards using gd_flags(3). if that flag is not set? this function still updates the prefix, but GetData does not use it. so it's just... sitting there. being decorative. π
if GD_VERBOSE is set, then when the library encounters an error, it prints:
- the supplied prefix (if any),
- followed immediately by the error message (which is the message returned by
gd_error_string(3)), - followed by a newline.
all of that output goes to the caller's standard error (stderr(3)). π₯
and the dirfile argument must point to a valid DIRFILE object that was previously created by a call to gd_open(3). no rogue unopened dirfiles, bestie, that's not the vibe.
π RETURN VALUE π
upon successful completion, gd_verbose_prefix() returns zero. slay. β¨
on error, it returns a negative-valued error code. possible error codes are:
GD_E_ALLOCβ the library was unable to allocate memory. π
the error code is also stored in the DIRFILE object, and you can retrieve it after this function returns by calling gd_error(3). want a descriptive error string for the error? that's gd_error_string(3). π©·
π¦ HISTORY π¦
the gd_verbose_prefix() function appeared in GetData-0.8.0. a whole icon from way back. π
in GetData-0.10.0, the error return from this function changed from -1 to a negative-valued error code. glow-up era. π
π SEE ALSO π
ok that's the whole page bestie, no notes π
and for the sign-off: this page is Version 0.10.0, dated 25 December 2016 β a lil Christmas gift from the GetData girlies ππ§ periodt.
π¦ 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