SummaryRefsLogTreeCommitDiffStats
path: root/src/utils.c
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2017-04-26 21:54:13 +0200
committerMathieu Lirzin <mthl@gnu.org>2017-09-28 18:13:08 +0200
commitdd30cb9e547f90d0bffc8eb758c58bba0e2c08ad (patch)
treeaefb3e175184bd698e54c67ec16d0d44cde4c296 /src/utils.c
parentd01195784352b29fe13d0676a2f50d60371d007f (diff)
downloadmcron-dd30cb9e547f90d0bffc8eb758c58bba0e2c08ad.tar.gz
mcron-dd30cb9e547f90d0bffc8eb758c58bba0e2c08ad.tar.bz2
mcron-dd30cb9e547f90d0bffc8eb758c58bba0e2c08ad.zip
utils: Add 'assq_symbol_set_x' function
* src/utils.c (assq_symbol_set_x): New function. * src/mcron.c (parse_opt): Use it.
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index b011e77..3ea05f3 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -18,9 +18,6 @@
#include "utils.h"
#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
void
wrap_env_path (const char *envar, const char *dir)
@@ -42,3 +39,9 @@ wrap_env_path (const char *envar, const char *dir)
free (new_path);
}
}
+
+void
+assq_symbol_set_x (SCM *alst, const char *symbol, SCM val)
+{
+ *alst = scm_assq_set_x (*alst, scm_from_utf8_symbol (symbol), val);
+}