From 179d8a02e231fe853831cdf886c9196929303adb Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sun, 18 Mar 2018 02:45:09 -0400 Subject: 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. --- src/survive_config.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/survive_config.h') 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 -- cgit v1.2.3