KDK_CONFIG_FREEALL(3)
✨ NAME ✨
kdk_config_freeall — 用于回收字符串列表 (translation for the girlies: it reclaims a string list, i.e. it frees the whole thing for you 💖)
🌸 SYNOPSIS 🌸
#include <libkyconf.h>
🫶 Functions 🫶
void kdk_config_freeall (char ** ptr) [inline]— 用于回收字符串列表 (frees up a string list, no cap)
Parameters
ptr— 字符串列表 (the string list in question 🎀)
Link with -lkyconf. (yes bestie, you have to link it, don't forget 💅)
🦋 Detailed Description 🦋
接口的主要功能是用于回收字符串列表
(the whole point of this function is to free/reclaim a string list — that's it, that's the job, and it does it beautifully ✨)
🎀 EXAMPLES 🎀
okay so here's the full glow-up, the main character moment, copy it exactly because the details matter fr fr 👑
#include <libkyconf.h>
#include <stdio.h>
#include <string.h>
int main()
{
char **keylist = NULL;
int id = kdk_conf_init("struct.conf");
ASSERT_NOT_NULL(id, -1);
char **grouplist = kdk_conf_list_group(id);
ASSERT_NOT_NULL(grouplist, -1);
char *tmpgroup;
int index = 0;
while ((tmpgroup = grouplist[index]))
{
printf("Group: %s0, tmpgroup);
keylist = kdk_conf_list_key(id, tmpgroup);
ASSERT_NOT_NULL(keylist, -1);
char *tmpkey;
int k_index = 0;
while ((tmpkey = keylist[k_index]))
{
const char *tmpval = kdk_conf_get_value(id, tmpgroup, tmpkey);
printf("%s = %s0, tmpkey , tmpval);
k_index ++;
}
kdk_config_freeall(keylist);
index ++;
}
kdk_conf_destroy(id);
kdk_config_freeall(grouplist);
return 0;
}
not me pointing out thatkdk_config_freeall(keylist)shows up inside the loop andkdk_config_freeall(grouplist)shows up at the end — like yes, clean up after yourself every single time, that's the vibe check 🙈
💅 CONFORMING TO 💅
These functions are as per the withdrawn POSIX.1e draft specification. (withdrawn, bestie — it's giving vintage, it's giving archived, but it is what it is 💀)
The following functions are Linux extensions: kdk_conf_init(), kdk_conf_destroy(), kdk_conf_reload(), kdk_conf_get_value(), kdk_conf_list_key() and kdk_conf_list_group().
👑 SEE ALSO 👑
kdk_conf_init(3), kdk_conf_destroy(3), kdk_conf_reload(3), kdk_conf_get_value(3), kdk_conf_list_key(3) and kdk_conf_list_group(3). (the whole friend group 🫶 go read them too)
🌈 Author 🌈
Generated automatically by Doxygen for libkyconf.h from the source code. (so like… not a person, a robot did it, and honestly? slay 🤖✨)
and that's the whole page, bestie!! this one came from My Project, dated Fri Sep 22 2023, and it's the KDK_CONFIG_FREEALL(3) page from the Library Functions Manual 🎀💖 go free those strings, you iconic queen 👑🌸
📦 where this page comes from
- arch rolling: libkysdk-base 3.0.1.1-1 · Apache-2.0 AND LGPL-3.0-or-later AND MIT
- ubuntu resolute: libkysdk-base-dev 3.0.1.2-0ubuntu1 · LGPL-3.0-or-later
- ubuntu stonking: libkysdk-base-dev 3.0.1.3-1build1 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms