EC_CONFIG_SCHEMA_LOOKUP(3)

πŸ’– EC_CONFIG_SCHEMA_LOOKUP(3) πŸ’–

Libecoli Programmer's Manual ✨ (yes bestie, we're in the programmer's manual, get comfy)


✨ NAME ✨

ec_config_schema_lookup β€” find a schema entry that matches the key πŸ”


🌸 SYNOPSIS 🌸

okay so first you gotta include the header, no cap:

#include <ecoli/config.h>

then boom, here's the function:

const struct ec_config_schema * ec_config_schema_lookup(
    /*
     * 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,
    const char                      *key      /* Schema key name. */
);
lowkey important: that first arg is a pointer to the first element of the schema array, and the array must be terminated by a sentinel entry {.type == EC_CONFIG_TYPE_NONE}. don't forget the sentinel or it's giving chaos πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically πŸ’β™€οΈ this one browses the schema array and looks up the given key. That's it. That's the whole job. It's the search bar of your config schema, fr fr. ✨


πŸŽ€ STRUCTURES πŸŽ€

struct ec_config_schema

This structure is the moment. πŸ’… It describes the format of a configuration value.

Here's the vibe: 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. iconic.

struct ec_config_schema {
    enum   flags;
};

πŸ‘‘ RETURN VALUE πŸ‘‘

  • If it matches a key, you get the schema entry back 🫢
  • If not found, you get NULL 😭 (not found era, we've all been there)

🌈 SEE ALSO 🌈

the whole friend group showed up, bestie:


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


and that's the whole page, bestie!! πŸ₯³ this little number lives in libecoli, version 2026-06-11 β€” yes it's giving vintage-but-fresh, and it ate. go look up some keys, you got this. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from