Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
handles.h
Go to the documentation of this file.
1/*
2 * This file is part of the Fun programming language.
3 * https://fun-lang.xyz/
4 *
5 * Copyright 2025 Johannes Findeisen <you@hanez.org>
6 * Licensed under the terms of the Apache-2.0 license.
7 * https://opensource.org/license/apache-2-0
8 */
9
14
15#pragma once
16
17#ifdef FUN_WITH_INI
18#if defined(__has_include)
19#if __has_include(<iniparser/iniparser.h>)
20#include <iniparser/dictionary.h>
21#include <iniparser/iniparser.h>
22#elif __has_include(<iniparser.h>)
23#include <dictionary.h>
24#include <iniparser.h>
25#else
26#error "iniparser headers not found"
27#endif
28#else
29#include <iniparser/dictionary.h>
30#include <iniparser/iniparser.h>
31#endif
32#include <stddef.h>
33
38typedef struct {
39 dictionary *dict;
40 int in_use;
41} IniSlot;
42
44extern IniSlot g_ini[64];
45
51int ini_alloc_handle(dictionary *d);
57dictionary *ini_get(int h);
63int ini_free_handle(int h);
64
72void ini_make_full_key(char *buf, size_t cap, const char *sec, const char *key);
73#endif /* FUN_WITH_INI */
size_t cap
Definition input_line.c:101
char * buf
Definition input_line.c:103