summaryrefslogtreecommitdiff
path: root/src/setup.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-10-01 16:35:08 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-10-01 16:35:08 -0700
commitb686b405c6a22b26e9b8082c92ed91513608bea3 (patch)
tree0000f671501863a8ee9b536ba869221d0f6710f9 /src/setup.c
parentd1da5500261e96efe0ede06fbebb32f0e191f3c1 (diff)
*: librototiller->libtil
Largely mechanical rename of librototiller -> libtil, but introducing a til_ prefix to all librototiller (now libtil) functions and types where a rototiller prefix was absent. This is just a step towards a more libized librototiller, and til is just a nicer to type/read prefix than rototiller_.
Diffstat (limited to 'src/setup.c')
-rw-r--r--src/setup.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/setup.c b/src/setup.c
index 2f0353d..9f67374 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -1,11 +1,11 @@
#include <assert.h>
#include <stdio.h>
-#include "settings.h"
-#include "util.h"
+#include "til_settings.h"
+#include "til_util.h"
/* add key=value, but if key is NULL, use value as key. */
-static int add_value(settings_t *settings, const char *key, const char *value)
+static int add_value(til_settings_t *settings, const char *key, const char *value)
{
assert(settings);
@@ -16,17 +16,17 @@ static int add_value(settings_t *settings, const char *key, const char *value)
assert(key);
- return settings_add_value(settings, key, value);
+ return til_settings_add_value(settings, key, value);
}
/* returns negative on error, otherwise number of additions made to settings */
-int setup_interactively(settings_t *settings, int (*setup_func)(settings_t *settings, setting_desc_t **next), int defaults)
+int setup_interactively(til_settings_t *settings, int (*setup_func)(til_settings_t *settings, til_setting_desc_t **next), int defaults)
{
- unsigned additions = 0;
- char buf[256] = "\n";
- setting_desc_t *next;
- int r;
+ unsigned additions = 0;
+ char buf[256] = "\n";
+ til_setting_desc_t *next;
+ int r;
assert(settings);
assert(setup_func);
@@ -117,7 +117,7 @@ int setup_interactively(settings_t *settings, int (*setup_func)(settings_t *sett
}
_next:
- setting_desc_free(next);
+ til_setting_desc_free(next);
}
return r < 0 ? r : additions;
© All Rights Reserved