diff options
| author | kx <kx@radix-linux.su> | 2026-10-01 12:02:28 +0300 |
|---|---|---|
| committer | kx <kx@radix-linux.su> | 2026-10-01 12:02:28 +0300 |
| commit | ba1b04d64bdfaf377915b22f77520216ebe47674 (patch) | |
| tree | 044343035c28b2b04ca9725f26e9b7c39342d19c /src/mcpp-config-file.h | |
| parent | 124b140798456778e2a96851cc7268aa9a726698 (diff) | |
| download | mcpu-cpp-1.0.2.tar.xz | |
Version 1.0.21.0.2
Diffstat (limited to 'src/mcpp-config-file.h')
| -rw-r--r-- | src/mcpp-config-file.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mcpp-config-file.h b/src/mcpp-config-file.h new file mode 100644 index 0000000..b2923ab --- /dev/null +++ b/src/mcpp-config-file.h @@ -0,0 +1,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__ */ |
