37 dictionary *d = ini_get(h);
39 if (d && sec && key) {
42 ini_make_full_key(full,
sizeof(full), sec, key);
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);
56 if (
n >= 2 && ((
s[0] ==
'"' &&
s[
n - 1] ==
'"') || (
s[0] ==
'\'' &&
s[
n - 1] ==
'\''))) {
57 size_t copy = (
n - 2) <
sizeof(
buf) - 1 ? (
n - 2) : sizeof(
buf) - 1;
58 memcpy(
buf,
s + 1, copy);
63 while (*
s && (
unsigned char)*
s <=
' ')
66 long v = strtol(
s, &endp, 10);
67 if (endp && endp !=
s)
Tagged union representing a Fun value.
void free_value(Value v)
Free dynamic storage owned by a Value.
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.