MGE System Utility Library - API Documentation v1.6.2
Library of system utility functions.
Loading...
Searching...
No Matches
mge-configfile.h
Go to the documentation of this file.
1
16#ifndef MGE_CONFIGFILE_H
17#define MGE_CONFIGFILE_H
18
19#include <libmgec/mge-portability.h>
20
21BEGIN_C_DECLS
22
24#define MAX_KEYVAL_LENGTH 1000
25
27#define MAX_KEYS_PER_SECTION 1000
28
30#define MAX_LINE_LENGTH 1000
31
33struct confkey {
34 const char *key;
36 int present;
38};
39
47
48int parsefile(struct confsection *params, int nparams, const char *filename);
49
50END_C_DECLS
51
52#endif /* ndef MGE_CONFIGFILE_H */
#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