gd_entry_type(3)
π gd_entry_type(3) β the GETDATA glow-up π
okay bestie, pull up a chair because we're about to find out exactly what kind of field you're dealing with, and honestly? it's giving detective energy π΅οΈβοΈβ¨
β¨ NAME β¨
gd_entry_type β retrieve the type of a dirfile field π
π SYNOPSIS π
#include <getdata.h>
gd_entype_t gd_entry_type(const DIRFILE *dirfile, const char *field_code);
π¦ DESCRIPTION π¦
so like, the gd_entry_type() function slides into a dirfile(5) database β that's the one you passed in as dirfile β and it's gonna tell you the field type of whatever field you named in field_code. no cap, that's the whole vibe. πΈ
and here's a lil detail that matters: if field_code has a valid representation suffix on it, bestie, it gets ignored. like, completely. don't even worry about it, it's not invited to the party. π
now, the gd_entype_t type? it's an enumerated type, which is fancy speak for "it can only be one of these specific things." and the things are:
GD_BIT_ENTRY, GD_CARRAY_ENTRY, GD_CONST_ENTRY, GD_DIVIDE_ENTRY,
GD_INDEX_ENTRY, GD_INDIR_ENTRY, GD_LINCOM_ENTRY,
GD_LINTERP_ENTRY, GD_MPLEX_ENTRY, GD_MULTIPLY_ENTRY,
GD_PHASE_ENTRY, GD_POLYNOM_ENTRY, GD_RAW_ENTRY, GD_RECIP_ENTRY,
GD_SARRAY_ENTRY, GD_SBIT_ENTRY, GD_SINDIR_ENTRY, GD_STRING_ENTRY,
GD_WINDOW_ENTRY.
nineteen little icons, all with main character energy. it's giving a whole roster. π
π RETURN VALUE π
when everything goes right? gd_entry_type() hands you the field type of the field you asked about. iconic. slay. π«Ά
but when it goes wrong β and bestie, sometimes it goes wrong β gd_entry_type() returns GD_NO_ENTRY and tucks a negative-valued error code into the DIRFILE object. you can get that lil guy back later by calling gd_error(3). the possible error codes are:
GD_E_BAD_DIRFILEβ the dirfile you handed over was invalid. not it. πGD_E_BAD_CODEβ the field you named in field_code? not found in the database. it's simply not there, fr fr. π
and if you want an actual descriptive error string instead of just a code, go call gd_error_string(3). she'll explain everything. π
π HISTORY π
the get_entry_type() function first appeared in GetData-0.5.0. throwback era.
then in GetData-0.7.0, it got renamed to gd_entry_type(). glow-up complete, new name, same energy. β¨
π SEE ALSO π
gd_entry(3)gd_error(3)gd_error_string(3)gd_fragmentname(3)gd_open(3)gd_parent_fragment(3)dirfile(5)
and that's the whole page, bestie!! π this was Version 0.10.0, dated 25 December 2016 β a lil holiday gift from the GETDATA manual, gd_entry_type(3) section. go forth and type-check those fields, you absolute legend. ππ¦πΈπ
π¦ 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, 2009, 2010, 2011, 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