summaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-16 01:12:06 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-16 01:12:06 +0200
commit481744a2ba4d9b795918d3bc0767321e05e10bbd (patch)
tree8b83d43aff0e35f565fca981d324ef2cff203e8d /lib/include
parent5b78d4d695cf0f0eb09e2ee3c96be31250611534 (diff)
Move splitkv function to libcfg
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/libcfg.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/include/libcfg.h b/lib/include/libcfg.h
index 5724bdc..83b9213 100644
--- a/lib/include/libcfg.h
+++ b/lib/include/libcfg.h
@@ -95,4 +95,13 @@ int unescape(char *src);
*/
int pack_argv(char *str);
+/*
+ Split the current input line into a space seperted keyword
+ (alphabetical characters only) and a value (the rest of the line).
+
+ If errors are encounted, prints a diagnostic message to stderr and
+ returns -1. On success, zero is returned.
+ */
+int splitkv(rdline_t *rd, char **k, char **v);
+
#endif /* LIBCONFIG_H */