From 481744a2ba4d9b795918d3bc0767321e05e10bbd Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 16 Sep 2018 01:12:06 +0200 Subject: Move splitkv function to libcfg Signed-off-by: David Oberhollenzer --- lib/include/libcfg.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/include/libcfg.h') 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 */ -- cgit v1.2.3