summaryrefslogtreecommitdiffstats
path: root/src/config-ini.h
blob: 802195db91469e8b0906187cd94d93684f33b0a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <libubox/list.h>

typedef struct {
	struct list_head node;
	char *key;
	char *value;
} ini_field_t;

typedef struct {
	struct list_head node;
	struct list_head fields;
	char *name;
} ini_section_t;

typedef struct {
	struct list_head sections;
} ini_file_t;

ini_file_t * read_ini_file(const char *filename);
void free_ini_file(ini_file_t *file);