25 lines
429 B
C
25 lines
429 B
C
|
#ifndef _MODFETCH_CONFIG_H
|
||
|
#define _MODFETCH_CONFIG_H
|
||
|
|
||
|
#include <stddef.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
typedef struct {
|
||
|
// path to the binary of this module
|
||
|
char *path;
|
||
|
// name=value strings for each value in config
|
||
|
char **config;
|
||
|
} Module;
|
||
|
|
||
|
typedef struct {
|
||
|
size_t module_count;
|
||
|
Module *modules;
|
||
|
} Config;
|
||
|
|
||
|
|
||
|
void parsing_error(size_t line);
|
||
|
|
||
|
Config parse_config(FILE *config_file);
|
||
|
|
||
|
#endif // _MODFETCH_CONFIG_H
|