EC_CONFIG_VALIDATE(3)

πŸ“¦
version 0.11.7 Β· 5 versions
, in fedora 44

πŸ’– EC_CONFIG_VALIDATE(3) πŸ’–

okay bestie, welcome to Libecoli Programmer's Manual β€” this one's called ec_config_validate, and yes she's a section 3 girlie. let's get into it ✨


🌸 NAME 🌸

ec_config_validate β€” validate a configuration, periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/config.h>

int ec_config_validate(
    const struct ec_config          *dict,    /* A hash table configuration to validate. */
    /*
     * Pointer to the first element of the schema array. The array must be
     * terminated by a sentinel entry (type == EC_CONFIG_TYPE_NONE).
     */
    const struct ec_config_schema   *schema
);

so like, you hand her a config (dict) and a schema array (schema), and she checks the vibe. ⭐

🚨 real talk: that schema array must be terminated by a sentinel entry, and that sentinel has type == EC_CONFIG_TYPE_NONE. no sentinel, no party. don't skip it, bestie, fr fr.

πŸŽ€ STRUCTURES πŸŽ€

✨ the schema structure ✨

Structure describing the format of a configuration value.

This structure is used in a const array which is referenced by a struct ec_config. Each entry of the array represents a key/value storage of the configuration dictionary.

struct ec_config_schema {
    enum   flags;
};

✨ the config structure ✨

Structure storing the configuration data.

struct ec_config {
    union ec_config::@165033305204240054252215261010262276266146032272  @204272232073016241350260013126061051223010235320;
};

look at that union name, it's giving main character energy 🫢 (yes, copy it exactly, don't you dare retype it by hand 😭)


πŸ‘‘ RETURN VALUE πŸ‘‘

  • 0 β€” success, slay, we ate πŸ’–
  • -1 β€” error, and errno gets set. not iconic but informative. πŸ’€

🌈 SEE ALSO 🌈

the whole friend group, no cap:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the whole page, bestie!! this was libecoli, dated 2026-06-11, filed under EC_CONFIG_VALIDATE(3) β€” go validate something cute, ily, bye πŸ§šπŸ’–βœ¨

πŸ“¦ where this page comes from