KDK_CONF_RELOAD(3)

📦 version 3.0.1.3, in arch rolling, ubuntu resolute, ubuntu stonking

💖 KDK_CONF_RELOAD 💖

okay bestie, this is the manual page for kdk_conf_reload from the libkyconf library functions crew (section 3, library functions manual, iykyk ✨). It's giving "reload my whole config file, no cap."


✨ NAME ✨

kdk_conf_reload — 重新载入配置文件 (a.k.a. reload the config file, periodt 💅)


🌸 SYNOPSIS 🌸

#include <libkyconf.h>

Functions

  • int kdk_conf_reload (int id) — 重新载入配置文件 (reload that config file, bestie 🦋)

Parameters

  • id — 由kdk_conf_init返回的配置文件句柄 (the config file handle that kdk_conf_init hands back to you — you do NOT make this up yourself, she's giving what she's giving)

Returns

  • int — 成功返回0,失败返回错误码 (success = 0, and if it flops you get an error code back, no shade 😭)
Link with -lkyconf. Do not forget. She will not link herself. 🙈

🎀 DESCRIPTION 🎀

The whole point of this function, the main character energy of it all: 接口的主要功能是重新载入配置文件 — the main job of this interface is to reload the configuration file. That's it. That's the vibe. ✨


🔥 EXAMPLES 🔥

Here's the whole example, verbatim, because I am NOT touching a single character of working code (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;
}

👑 CONFORMING TO 👑

These functions are as per the withdrawn POSIX.1e draft specification (withdrawn, bestie — she's an icon of a bygone era 💀). And these following functions are Linux extensions: kdk_conf_init(), kdk_conf_destroy(), kdk_conf_get_value(), kdk_conf_list_key(), kdk_conf_list_group() and kdk_config_freeall().


🦋 SEE ALSO 🦋


💜 Author 💜

Generated automatically by Doxygen for libkyconf.h from the source code. (Not a human. A robot wrote this. And she ate. 🤖💅)


okay that's the whole page, you're so welcome 🫶

This one comes from My Project, dated Fri Sep 22 2023 — that's the version and the date stamped on the source page, so go off, take a screenshot, it's history. ✨📸

now go reload that config and slay, bestie 💖🌈⭐

📦 where this page comes from