From 56e6004336aeb3a7e92e8418430217c42feb2515 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 4 Apr 2018 14:03:23 +0200 Subject: Simplifiy service file syntax Signed-off-by: David Oberhollenzer --- lib/include/util.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'lib/include') diff --git a/lib/include/util.h b/lib/include/util.h index e99be3b..0ed7002 100644 --- a/lib/include/util.h +++ b/lib/include/util.h @@ -68,20 +68,10 @@ typedef struct { char *rdline(int fd, int argc, const char *const *argv); /* - Split a line of the shape "key = value" into key and value part. - - The key can contain alphanumeric characters and can be padded with - spaces or tabs. - - The value can be either a sequence of alphanumeric characters, period - or underscore OR a string in quotation marks. For strings, the - quotation marks are removed and escape sequences are processed. - - The value may also be padded with spaces or tabs but the line may not - contain anything else after the value, except for spaces, tabs or - the '#' symbol which is interpreted as start of a comment. + Remove double quotes ('"') from a string and substitute escape + sequences in between double quotes. */ -int splitkv(char *line, char **key, char **value); +int unescape(char *src); /* Search through an array of enum_map_t entries to resolve a string to -- cgit v1.2.3