summaryrefslogtreecommitdiff
path: root/src/mcpp-config-file.h
blob: b2923ab038990c620823d15f2280988ba27b1fc9 (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
25
26
27
28
29
30
#ifndef __MCPU_CPP_CONFIG_FILE_H__
#define __MCPU_CPP_CONFIG_FILE_H__ 1

#include <defs.h>

typedef struct mcpu_config_entry mcpu_config_entry;
struct mcpu_config_entry
{
  char              *name;
  char              *value;
  mcpu_config_entry *next;
};

typedef struct mcpu_config mcpu_config;
struct mcpu_config
{
  mcpu_config_entry *first;
  int                verbose;
};

void mcpu_config_init( mcpu_config *config );
void mcpu_config_free( mcpu_config *config );
int  mcpu_config_read( mcpu_config *config, const char *filename,
                       int missing_is_error );
const char *mcpu_config_get( const mcpu_config *config, const char *name );
int  mcpu_config_set( mcpu_config *config, const char *name,
                      const char *value );
int  mcpu_config_dump( const mcpu_config *config, FILE *stream );

#endif /* __MCPU_CPP_CONFIG_FILE_H__ */