diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-25 22:42:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-26 14:42:04 +0100 |
commit | d390f8ef2dc0cd041914d3c2fd3e1081605cbfc8 (patch) | |
tree | baea925afd20e984696718b5813c2441444184ab /src/basic/fileio.h | |
parent | b2a81c0b524fee0a1713720462b6db5c302c3933 (diff) |
util: introduce fputs_with_space() and make use of it at various places
The call combines outputing a string with prefixing it with a space, optionally. This is useful to shorten the logic
for outputing lists of strings, that are space separated.
Diffstat (limited to 'src/basic/fileio.h')
-rw-r--r-- | src/basic/fileio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/fileio.h b/src/basic/fileio.h index 95e8698941..9e09574133 100644 --- a/src/basic/fileio.h +++ b/src/basic/fileio.h @@ -82,3 +82,5 @@ int tempfn_random_child(const char *p, const char *extra, char **ret); int write_timestamp_file_atomic(const char *fn, usec_t n); int read_timestamp_file(const char *fn, usec_t *ret); + +int fputs_with_space(FILE *f, const char *s, const char *separator, bool *space); |