blob: 247efb3804a41b6e3b3a78b660495d43e09a280a (
plain)
1 /**
2 * Copyright (C) 2017 Aaron Ball <nullspoon@oper.io>
3 *
4 * Luminous is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Luminous is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with noteless. If not, see <http://www.gnu.org/licenses/>.
16 */
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <string.h>
20
21 struct config {
22 const char* path;
23 int count; // Number of config entries
24 char** keys;
25 char** vals;
26 };
27
28
29 int config_new(struct config*, const char*);
30
31 int config_load(struct config*);
32
33 void config_dump(struct config*, FILE*);
34
35 int config_get(struct config*, char*, char*);
36
37 int config_free(struct config*);
|