43 memcpy(alt,
full,
sizeof(alt));
44 for (
size_t i = 0; i <
sizeof(alt) && alt[i]; ++i) {
50 const char *
s = iniparser_getstring(
d,
full, NULL);
51 if (!
s)
s = iniparser_getstring(
d, alt, NULL);
55 if (
n >= 2 && ((
s[0] ==
'"' &&
s[
n - 1] ==
'"') || (
s[0] ==
'\'' &&
s[
n - 1] ==
'\''))) {
56 size_t copy = (
n - 2) <
sizeof(
buf) - 1 ? (
n - 2) :
sizeof(
buf) - 1;
57 memcpy(
buf,
s + 1, copy);
61 while (*
s && (
unsigned char)*
s <=
' ')
64 double v = strtod(
s, &endp);
65 if (endp && endp !=
s)
push_value(vm, make_float(outd))
dictionary * ini_get(int h)
Look up a dictionary pointer by registry handle.
void ini_make_full_key(char *buf, size_t cap, const char *sec, const char *key)
Build a fully qualified key "section:key" into a caller-provided buffer.
Tagged union representing a Fun value.
Value make_float(double v)
Construct a Value representing a double-precision float.
static Value pop_value(VM *vm)
Pop a Value from the VM operand stack.