cfg_simple_t(3)

πŸ’– NAME πŸ’–

cfg_simple_t β€” bestie, it's the data structure that holds the pointer to a user-provided variable you defined with CFG_SIMPLE_*. That's the whole job. It holds the pointer. It's giving loyal sidekick energy. 🫢


🌸 SYNOPSIS 🌸

#include <confuse.h>

✨ Data Fields ✨

Ok so here's the whole roster β€” every field is just a pointer to your variable, and each one is tagged with the CFG_SIMPLE_* type it pairs with. No cap. πŸ’…

  • long int * number β€” a pointer to a long int, for CFG_SIMPLE_INT
  • int8_t * i8 β€” a pointer to an int8_t, for CFG_SIMPLE_INT8
  • int16_t * i16 β€” a pointer to an int16_t, for CFG_SIMPLE_INT16
  • int32_t * i32 β€” a pointer to an int32_t, for CFG_SIMPLE_INT32
  • int64_t * i64 β€” a pointer to an int64_t, for CFG_SIMPLE_INT64
  • uint8_t * u8 β€” a pointer to a uint8_t, for CFG_SIMPLE_UINT8
  • uint16_t * u16 β€” a pointer to a uint16_t, for CFG_SIMPLE_UINT16
  • uint32_t * u32 β€” a pointer to a uint32_t, for CFG_SIMPLE_UINT32
  • uint64_t * u64 β€” a pointer to a uint64_t, for CFG_SIMPLE_UINT64
  • double * fpnumber β€” a pointer to a double, for CFG_SIMPLE_FLOAT
  • cfg_bool_t * boolean β€” a pointer to a cfg_bool_t, for CFG_SIMPLE_BOOL
  • char ** string β€” a pointer to a char *, for CFG_SIMPLE_STR
  • void ** ptr β€” a pointer to a user value, for CFG_SIMPLE_PTR
Notice how string is char ** and ptr is void **? Yeah bestie, double pointers. You're pointing at a pointer. It's layers. It's an onion. πŸ§… It's also literally what the manpage says, so don't come for me. πŸ™ˆ

πŸ¦‹ Detailed Description πŸ¦‹

Data structure holding the pointer to a user provided variable defined with CFG_SIMPLE_*.

That's it. That's the vibe. One struct, thirteen pointer slots, each one waiting for you to hand it the address of a variable that matches its type. You pick the CFG_SIMPLE_* macro that fits your variable, you drop the pointer in the matching field, and the config machinery handles the rest. Main character behavior, honestly. ✨


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libConfuse from the source code. πŸ€– Not a human, not a bestie, just Doxygen doing its little automated thing and eating, fr fr.


And that's the page, babe πŸ’œ β€” it ships as part of libConfuse, Version 3.4, in the Library Functions Manual, filed under cfg_simple_t(3) because that's just where it lives. Go forth and point at your variables. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from