summaryrefslogtreecommitdiff
path: root/src/locale/localed.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-03-23 18:55:36 +0700
committerLennart Poettering <lennart@poettering.net>2015-03-26 11:56:22 +0100
commit4034a06ddb82ec9868cd52496fef2f5faa25575f (patch)
treea832cd56abb7830985f3e7e9dff7451b96478c24 /src/locale/localed.c
parentbe3ce3014eacd66fa292fc9e4e6b3d3b0ef7de23 (diff)
util: rework word parsing and c unescaping code
When parsing words from input files, optionally automatically unescape the passed strings, controllable via a new flags parameter. Make use of this in tmpfiles, and port everything else over, too. This improves parsing quite a bit, since we no longer have to process the same string multiple times with different calls, where an earlier call might corrupt the input for a later call.
Diffstat (limited to 'src/locale/localed.c')
-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 1fb8cdc341..fd0eb2db55 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -227,7 +227,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, false);
+ r = strv_split_quoted(&a, l, 0);
if (r < 0)
return r;
@@ -250,7 +250,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, false);
+ r = strv_split_quoted(&a, l, 0);
if (r < 0)
return -ENOMEM;
@@ -539,7 +539,7 @@ static int read_next_mapping(const char* filename,
if (l[0] == 0 || l[0] == '#')
continue;
- r = strv_split_quoted(&b, l, false);
+ r = strv_split_quoted(&b, l, 0);
if (r < 0)
return r;