cfg_t(3)
π cfg_t(3) β Library Functions Manual π
okay bestie, sit down, hydrate, because we're talking about cfg_t β and no, it's not a random struct, it's the struct. this is a page from the Library Functions Manual, and honestly? iconic. π
β¨ NAME β¨
cfg_t β the data structure that holds all the info about a 'section'. that's it. that's the whole name section. she's simple, she's powerful, she's the main character. π
πΈ SYNOPSIS πΈ
#include <confuse.h>
π¦ Data Fields π¦
cfg_flag_t flagsβ any flags that got passed intocfg_init(). whatever you handed over, it's living here now. β¨char * nameβ the name of this section. and listen β the root section that comes back fromcfg_init()is always named'root'. no exceptions, no nicknames, it's just'root'. πchar * commentβ optional annotation / comment. a lil note, if you wanna leave one. πcfg_opt_t * optsβ the array of options. this is where the actual stuff lives.char * titleβ optional title for this section, and it only gets set if theCFGF_TITLEflag is on. conditional queen. βchar * filenameβ name of the file that's being parsed.int lineβ line number in the config file. so when something goes wrong you know exactly where. π«Άcfg_errfunc_t errfuncβ this function (if you set it withcfg_set_error_function) gets called for any error message.cfg_searchpath_t * pathβ linked list of directories to search. it's giving scavenger hunt. πcfg_print_filter_func_t pffβ printing filter function.char * rawβ the verbatim body, set forCFGT_RAWSECsections. untouched, unedited, raw. no cap. π
π Detailed Description π
Data structure holding information about a 'section'.
Sections can be nested, bestie. like genuinely nested. a section has a list of options β strings, numbers, booleans, or even other sections β all grouped together. it's a whole little ecosystem in there. π§
π Examples π
the glow-ups you can study:
addsec.c, cli.c, deprecated.c, env.c, ftpconf.c, nested.c, parsebuf.c, reread.c, and simple.c.
π₯ Field Documentation π₯
cfg_errfunc_t cfg_t::errfunc
This function (if set with cfg_set_error_function) is called for any error message.
it's the friend who always picks up the phone when things go sideways. π
Referenced by cfg_addtsec(), cfg_error(), cfg_init(), cfg_set_error_function(), and cfg_setopt().
π Author π
Generated automatically by Doxygen for libConfuse from the source code. so technically a robot wrote this and i'm just translating it into feelings. π
okay and that's the whole page, bestie!! π this is libConfuse, Version 3.4, page cfg_t(3), and you absolutely ate reading the whole thing. go forth and parse responsibly. slay, periodt, bye!! π
β¨π¦
π¦ where this page comes from
- fedora 43: libconfuse 3.4-1.fc43 Β· ISC
- fedora 43: libconfuse 3.4-1.fc43 Β· ISC
- fedora 44: libconfuse 3.4-1.fc44 Β· ISC
- fedora 44: libconfuse 3.4-1.fc44 Β· ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms