Blame view

cfgfile.h 637 Bytes
pdw committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/*
 * cfgfile.h:
 *
 * Copyright (c) 2003 DecisionSoft Ltd.
 *
 */

#ifndef __CFGFILE_H_ /* include guard */
#define __CFGFILE_H_

typedef struct {
    char *name;
    int value;
} config_enumeration_type;

int read_config();

char *config_get_string(const char *directive);
int config_get_bool(const char *directive);
int config_get_int(const char *directive, int *value);
int config_get_float(const char *directive, float *value);
int config_init();
23 24
void config_set_string(const char *directive, const char* s);
int config_get_enum(const char *directive, config_enumeration_type *enumeration, int *value);
pdw committed
25 26 27 28



#endif /* __CFGFILE_H_ */