summaryrefslogtreecommitdiff
path: root/src/til_settings.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-05-26 18:31:42 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-05-26 18:31:42 -0700
commit7b26b18e69e7e1af3eeb5176e3575eb049451f44 (patch)
tree0e041fa3764297920659fbc9be734c0ee04caa16 /src/til_settings.h
parent1a89d30e76d2bdb8268c17073d8a780b5adf3049 (diff)
til_settings: add some settings and desc path printers
These print to a stdio FILE*, which for now is harmless since setup_interactively() will be the only consumer (... for now). If one needed the path in a buffer, they could use open_memstream() and pass that FILE* to the printers. And since commit 40feb61 there's already a dependency on the function, but it's icky to dig deeper into that portability trap. Although it seemed like rototiller actually compiled on MacOS at Gene's house, so maybe open_memstream() isn't as problematic as it once was. Anywhow, this commit only adds the path printing helpers, nothing is using them yet.
Diffstat (limited to 'src/til_settings.h')
-rw-r--r--src/til_settings.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/til_settings.h b/src/til_settings.h
index 2e2afe9..858ff66 100644
--- a/src/til_settings.h
+++ b/src/til_settings.h
@@ -56,8 +56,10 @@ int til_settings_apply_desc_generators(const til_settings_t *settings, const til
int til_setting_desc_new(const til_settings_t *settings, const til_setting_spec_t *spec, const til_setting_desc_t **res_desc);
til_setting_desc_t * til_setting_desc_free(const til_setting_desc_t *desc);
+int til_setting_desc_print_path(const til_setting_desc_t *desc, FILE *out);
int til_setting_spec_check(const til_setting_spec_t *spec, const char *value);
int til_settings_label_setting(const til_settings_t *settings, const til_setting_t *setting, char **res_label);
+int til_settings_print_path(const til_settings_t *settings, FILE *out);
#ifndef TIL_SETTINGS_STR
#define _TIL_SETTINGS_STR(s) #s
© All Rights Reserved