settings set_file() cleanup unused maxlen and check for file exist

maxlen is set to MAX_FILENAME by all callers so lets just make that part of the deal
check the file exists before we set it

Change-Id: I3074f3164fcd4b8873b69612d5c1a51a39de4baf
This commit is contained in:
William Wilgus 2025-01-24 00:20:45 -05:00
parent 14898bc19e
commit bdf89bf4b0
4 changed files with 23 additions and 20 deletions

View file

@ -308,7 +308,7 @@ bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit,
const char* (*formatter)(char*, size_t, int, const char*),
int32_t (*get_talk_id)(int, int));
void set_file(const char* filename, char* setting, const int maxlen);
void set_file(const char* filename, char* setting);
bool set_option(const char* string, const void* variable, enum optiontype type,
const struct opt_items* options, int numoptions, void (*function)(int));