gd_alias_target(3)
π gd_alias_target(3) β GETDATA π
okay bestie, welcome to the manual page for gd_alias_target, living in the GETDATA section 3 of your friendly neighbourhood man pages. it's giving "who is this alias actually pointing at" energy and honestly? we're obsessed. π¦
β¨ NAME β¨
gd_alias_target β determine the target of an alias defined in a Dirfile database πΈ
π SYNOPSIS π
#include <getdata.h>
const char *gd_alias_target(DIRFILE *dirfile, const char *alias_name);
π DESCRIPTION π
so. the gd_alias_target() function queries a dirfile(5) database β the one you specify with dirfile β and figures out the target field code of the alias you named in alias_name. that's it. that's the whole vibe. β¨
the dirfile argument must point to a valid DIRFILE object that you already made with a call to gd_open(3). no shortcuts, no pretending, no "i'll make it later". valid object or bust. π
note bestie, listen up: the target may itself be an alias, and that alias will have its own target. aliases in aliases, it's giving inception fr fr. π if you want the canonical name of the field that's ultimately referenced by alias_name, pass it togd_entry(3)and go inspect thefieldmember of thegd_entry_tstructure it hands back. iykyk. π
π₯ RETURN VALUE π₯
when everything slays, gd_alias_target() returns a pointer to a read-only character string containing the name of the target of the alias you asked about. you don't own it, don't touch it, just read it and move on. π«Ά
on error, gd_alias_target() returns NULL and sets the dirfile error to a non-zero error value. possible error values are:
GD_E_BAD_CODEβ the name alias_name was not found in the dirfile. πGD_E_BAD_DIRFILEβ the supplied dirfile was invalid. πGD_E_BAD_FIELD_TYPEβ the entry specified by alias_name was not an alias. girl, that's not an alias, that's something else entirely. π
you can grab the dirfile error by calling gd_error(3). and if you want a whole descriptive error string for the last error encountered, hit up gd_error_string(3) β it'll tell you what went wrong in actual words. π
π HISTORY π
the function gd_alias_target() first appeared in GetData-0.8.0. a true icon, a legend, the moment. π
β SEE ALSO β
and that's the page bestie!! this manual is Version 0.10.0, dated 25 December 2016 β a little holiday gift from the GetData girlies. go forth and resolve your aliases, you absolute main character. πβ¨ππ¦πΈπ
π¦ 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