summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-13 13:10:56 -0300
committerpommicket <pommicket@gmail.com>2023-08-13 13:10:56 -0300
commit31c1f3acc7a56683b5512620419b8989a26dad4b (patch)
tree648fdec6c81f238903490f8c68092ad7241507fd /ted.c
parent598d72c0674bb059c0f38f03c4851bcc61e5852d (diff)
documentation
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ted.c b/ted.c
index 379217d..771f344 100644
--- a/ted.c
+++ b/ted.c
@@ -317,12 +317,12 @@ Status ted_get_file(Ted const *ted, const char *name, char *out, size_t outsz) {
return true;
}
if (*ted->local_data_dir) {
- str_printf(out, outsz, "%s" PATH_SEPARATOR_STR "%s", ted->local_data_dir, name);
+ str_printf(out, outsz, "%s%c%s", ted->local_data_dir, PATH_SEPARATOR, name);
if (fs_file_exists(out))
return true;
}
if (*ted->global_data_dir) {
- str_printf(out, outsz, "%s" PATH_SEPARATOR_STR "%s", ted->global_data_dir, name);
+ str_printf(out, outsz, "%s%c%s", ted->global_data_dir, PATH_SEPARATOR, name);
if (fs_file_exists(out))
return true;
}
@@ -689,9 +689,9 @@ void ted_load_configs(Ted *ted) {
// copy global config to local config
char local_config_filename[TED_PATH_MAX];
- strbuf_printf(local_config_filename, "%s" PATH_SEPARATOR_STR TED_CFG, ted->local_data_dir);
+ strbuf_printf(local_config_filename, "%s%c" TED_CFG, ted->local_data_dir, PATH_SEPARATOR);
char global_config_filename[TED_PATH_MAX];
- strbuf_printf(global_config_filename, "%s" PATH_SEPARATOR_STR TED_CFG, ted->global_data_dir);
+ strbuf_printf(global_config_filename, "%s%c" TED_CFG, ted->global_data_dir, PATH_SEPARATOR);
if (!fs_file_exists(local_config_filename)) {
if (fs_file_exists(global_config_filename)) {
if (!copy_file(global_config_filename, local_config_filename)) {
@@ -709,7 +709,7 @@ void ted_load_configs(Ted *ted) {
if (ted->search_start_cwd) {
// read config in start_cwd
char start_cwd_filename[TED_PATH_MAX];
- strbuf_printf(start_cwd_filename, "%s" PATH_SEPARATOR_STR TED_CFG, ted->start_cwd);
+ strbuf_printf(start_cwd_filename, "%s%c" TED_CFG, ted->start_cwd, PATH_SEPARATOR);
config_read(ted, &parts, start_cwd_filename);
}