ecoli_node_int(3)

πŸ“¦
version 0.11.3 Β· 2 versions
, in epel 9

✨ ecoli_node_int πŸ’… β€” the integer node manual, bestie edition

okay so picture this: you're deep in Libecoli land (manual section 3, iykyk) and you need nodes that match integers. Not vibes. Actual integers. This page is your girl. 🫢

🌸 NAME 🌸

ecoli_node_int β€” the Integer node, bestie.

  • Nodes that match signed or unsigned integers. That's the whole personality. πŸ’–

✨ SYNOPSIS ✨

the functions, bestie (aka Functions)

struct ec_node * ec_node_int (const char *id, int64_t min, int64_t max,
    unsigned int base)
int ec_node_int_getval (const struct ec_node *node, const char *str,
    int64_t *result)
struct ec_node * ec_node_uint (const char *id, uint64_t min, uint64_t
    max, unsigned int base)
int ec_node_uint_getval (const struct ec_node *node, const char *str,
    uint64_t *result)

like… four whole functions. we love a compact icon. πŸ‘‘


πŸ¦‹ Detailed Description πŸ¦‹

Nodes that match signed or unsigned integers. periodt. That's literally the detailed description and honestly she said what she said.

πŸŽ€ Configuration Schema πŸŽ€

this is the schema for int, no cap:

schema int {
    int64 min  {
        description "The minimum valid value (included).";
    }
    int64 max  {
        description "The maximum valid value (included).";
    }
    uint64 base  {
        description "The base to use. If unset or 0, try to guess.";
    }
}

and here's the other Configuration Schema, for uint this time 🌈:

schema uint {
    uint64 min  {
        description "The minimum valid value (included).";
    }
    uint64 max  {
        description "The maximum valid value (included).";
    }
    uint64 base  {
        description "The base to use. If unset or 0, try to guess.";
    }
}
note the glow-up between the two: int uses int64 for min/max, uint uses uint64. same energy, different signedness. πŸ’…

πŸ”₯ Function Documentation πŸ”₯

🌟 struct ec_node* ec_node_int (const char * id, int64_t min, int64_t max, unsigned int base)

Create a signed integer node. yes bestie, signed. 🌸

Parameters

  • id β€” The node identifier.
  • min β€” The minimum valid value (included).
  • max β€” The maximum valid value (included).
  • base β€” The base to use for parsing. If 0, try to guess from prefix.

Returns

The node, or NULL on error (errno is set). so like… check your return value, bestie, i'm begging 😭


πŸ’œ int ec_node_int_getval (const struct ec_node * node, const char * str, int64_t * result)

Get the value of a parsed signed integer. this is the one that actually reads your string and hands you the number. iconic. ✨

Parameters

  • node β€” The integer node.
  • str β€” The string to parse.
  • result β€” Pointer where the result will be stored on success.

Returns

0 on success, -1 on error (errno is set). classic zero-for-slaying, minus-one-for-oop. πŸ’€


🧚 struct ec_node* ec_node_uint (const char * id, uint64_t min, uint64_t max, unsigned int base)

Create an unsigned integer node. negative numbers? not invited to this party. πŸ™ˆ

Parameters

  • id β€” The node identifier.
  • min β€” The minimum valid value (included).
  • max β€” The maximum valid value (included).
  • base β€” The base to use for parsing. If 0, try to guess from prefix.

Returns

The node, or NULL on error (errno is set). fr fr, errno is set, so go look at it. πŸ‘‘


πŸ’– int ec_node_uint_getval (const struct ec_node * node, const char * str, uint64_t * result)

Get the value of a parsed unsigned integer. the unsigned sibling, equally slay. 🌈

Parameters

  • node β€” The unsigned integer node.
  • str β€” The string to parse.
  • result β€” Pointer where the result will be stored on success.

Returns

0 on success, -1 on error (errno is set). πŸ’…


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Libecoli from the source code. so nobody hand-wrote this and yet she's still serving. we love an auto-generated main character. πŸŽ€


lowkey reminder bestie: min and max are included in the valid range, and base of 0 means "try to guess from prefix." that's it, that's the lore. πŸ“

Version 0.11.3 πŸ’œ dated Thu Apr 9 2026 🌸 β€” and that's the whole page, bestie. go forth and match some integers. mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from