summaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-12 16:44:28 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-06-12 17:02:58 -0700
commitffb0ed186bd33d916633e9501250522b94423766 (patch)
treeaf4ba95c7789d8a65a1a468d657dcb125d5b3733 /src/setup.c
parent8fb3b27efa707f53bf0b0d74aec0e055f0d10e96 (diff)
til_settings: pivot settings path printing to til_str
This eliminates more open_memstream() usage in favor of the new til_str stuff. While here I've split up the path construction API exposing the til_str oriented variants, rather than only providing a FILE*-oriented API. This way you just use the FILE* stuff when convenient (like printing to stdout/stderr) and go til_str_t when you're building up a buffer. Such is life in a sans-open_memstream-world. Also while here the FILE*-oriented settings path printers were renamed s/print/fprint/g hence touching setup.c
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/setup.c b/src/setup.c
index f2b50e3..cf39f08 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -96,7 +96,7 @@ int setup_interactively(til_settings_t *settings, int (*setup_func)(const til_se
/* multiple choice */
if (!defaults) {
- til_setting_desc_print_path(desc, stdout);
+ til_setting_desc_fprint_path(desc, stdout);
printf(":\n %s:\n", desc->spec.name);
}
@@ -116,7 +116,7 @@ int setup_interactively(til_settings_t *settings, int (*setup_func)(const til_se
} else {
/* arbitrarily typed input */
if (!defaults) {
- til_setting_desc_print_path(desc, stdout);
+ til_setting_desc_fprint_path(desc, stdout);
printf(":\n %s [%s]: ", desc->spec.name, desc->spec.preferred);
}
}
© All Rights Reserved