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

#include <libubox/list.h>

#include <stdio.h>

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

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

typedef struct _ini_file {
	struct list_head sections;
} ini_file_t;

ini_file_t * read_ini_file(FILE *f);
void free_ini_file(ini_file_t *file);