16#ifndef MGE_CONFIGFILE_H
17#define MGE_CONFIGFILE_H
19#include <libmgec/mge-portability.h>
24#define MAX_KEYVAL_LENGTH 1000
27#define MAX_KEYS_PER_SECTION 1000
30#define MAX_LINE_LENGTH 1000
#define MAX_KEYS_PER_SECTION
Max number of keys per section.
Definition mge-configfile.h:27
#define MAX_KEYVAL_LENGTH
Max length of Key and value.
Definition mge-configfile.h:24
int parsefile(struct confsection *params, int nparams, const char *filename)
Parse a configuration file.
Definition configfile.c:81
Configuration Key / Value Pair.
Definition mge-configfile.h:33
int present
Pair present, 1 = true, 0 =false.
Definition mge-configfile.h:36
char value[MAX_KEYVAL_LENGTH]
Value part of pair.
Definition mge-configfile.h:37
int mandatory
Mandatory, 1 = true, 0 = false.
Definition mge-configfile.h:35
const char * key
Key part of pair.
Definition mge-configfile.h:34
Configuration section definition.
Definition mge-configfile.h:41
int present
Pair present, 1 = true, 0 =false.
Definition mge-configfile.h:44
struct confkey keys[MAX_KEYS_PER_SECTION]
Array of KV Pairs.
Definition mge-configfile.h:45
const char * section
Section name.
Definition mge-configfile.h:42
int mandatory
Mandatory, 1 = true, 0 = false.
Definition mge-configfile.h:43