summaryrefslogtreecommitdiff
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index 3af8f68e..70ceeae5 100644
--- a/conf.c
+++ b/conf.c
@@ -128,3 +128,16 @@ conf_set_str (const char *key, const char *val) {
conf_items = it;
}
+void
+conf_set_int (const char *key, int val) {
+ char s[10];
+ snprintf (s, sizeof (s), "%d", val);
+ conf_set_str (key, s);
+}
+
+void
+conf_set_float (const char *key, float val) {
+ char s[10];
+ snprintf (s, sizeof (s), "%0.7f", val);
+ conf_set_str (key, s);
+}