diff options
author | cnlohr <lohr85@gmail.com> | 2018-03-18 02:45:09 -0400 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2018-03-18 22:21:59 -0400 |
commit | 179d8a02e231fe853831cdf886c9196929303adb (patch) | |
tree | 7de8df2fc9ef4d167398caebffe906985ed0cb54 /src/survive_config.h | |
parent | d21999e85f29edae7de8abdfb293da870e7fad47 (diff) | |
download | libsurvive-179d8a02e231fe853831cdf886c9196929303adb.tar.gz libsurvive-179d8a02e231fe853831cdf886c9196929303adb.tar.bz2 |
Moving things over... still todo:
* Make functions for changing temp configs.
* Make functions for config_read_str but where it checks the temp one first.
* Parse command-line options.
Diffstat (limited to 'src/survive_config.h')
-rw-r--r-- | src/survive_config.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/survive_config.h b/src/survive_config.h index e2686e9..1ae124d 100644 --- a/src/survive_config.h +++ b/src/survive_config.h @@ -52,9 +52,16 @@ const FLT config_set_float(config_group *cg, const char *tag, const FLT value); const uint32_t config_set_uint32(config_group *cg, const char *tag, const uint32_t value); const char* config_set_str(config_group *cg, const char *tag, const char* value); +//These functions look for a parameter in a specific group, and then chose the best to return. If the parameter does not exist, default will be written. FLT config_read_float(config_group *cg, const char *tag, const FLT def); uint16_t config_read_float_array(config_group *cg, const char *tag, FLT* values, const FLT* def, uint8_t count); uint32_t config_read_uint32(config_group *cg, const char *tag, const uint32_t def); const char* config_read_str(config_group *cg, const char *tag, const char *def); +//These functions search both the stored-general and temporary sections for a parameter and return it. +//FLT survive_config_readf( SurviveContext * ctx, const char *tag, FLT def ); +//uint32_t survive_config_readi( SurviveContext * ctx, const char *tag, uint32_t def ); +//const char * survive_config_reads( SurviveContext * ctx, const char *tag, const char *def ); +//They're actually defined in survive.h for users as well. + #endif |