summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-06-19 15:24:34 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-08-07 15:50:43 +0000
commit8adaf7bd23baa6e2cd99e9e88e55d0f5f5db29a2 (patch)
tree708a0dd3995411d49cee3174f340986b9e5587c5 /src/locale
parentffcd3e89d55c870c94aa15ee94dab3e029a586cf (diff)
strv: convert strv_split_quotes into a generic strv_split_extract
strv_split_extract is to strv_split_quotes as extract_first_word was to unquote_first_word. Now there's extract_first_word for extracting a single argument, extract_many_words for extracting a bounded number of arguments, and strv_split_extract for extracting an arbitrary number of arguments.
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/localed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/locale/localed.c b/src/locale/localed.c
index cb4052fdd5..e9489f04c2 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -222,7 +222,7 @@ static int x11_read_data(Context *c) {
if (in_section && first_word(l, "Option")) {
_cleanup_strv_free_ char **a = NULL;
- r = strv_split_quoted(&a, l, 0);
+ r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES);
if (r < 0)
return r;
@@ -245,7 +245,7 @@ static int x11_read_data(Context *c) {
} else if (!in_section && first_word(l, "Section")) {
_cleanup_strv_free_ char **a = NULL;
- r = strv_split_quoted(&a, l, 0);
+ r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES);
if (r < 0)
return -ENOMEM;
@@ -544,7 +544,7 @@ static int read_next_mapping(const char* filename,
if (l[0] == 0 || l[0] == '#')
continue;
- r = strv_split_quoted(&b, l, 0);
+ r = strv_split_extract(&b, l, WHITESPACE, EXTRACT_QUOTES);
if (r < 0)
return r;