Lennart Poettering
e3ead6bb42
systemctl: move strv_skip_first() out of systemctl.c
...
Make it generic, call it strv_skip() and move it to strv.[ch]
2015-09-29 21:55:52 +02:00
Lennart Poettering
fe382237ca
strv: add strv_free_free() to strv.c and make use of it
...
Let's teach it a new trick, and make it return NULL.
2015-09-29 21:08:37 +02:00
Lennart Poettering
ece174c543
tree-wide: drop {} from one-line if blocks
...
Patch via coccinelle.
2015-09-09 08:20:20 +02:00
Lennart Poettering
a1e58e8ee1
tree-wide: use coccinelle to patch a lot of code to use mfree()
...
This replaces this:
free(p);
p = NULL;
by this:
p = mfree(p);
Change generated using coccinelle. Semantic patch is added to the
sources.
2015-09-09 08:19:27 +02:00
Richard Maw
04c14b2541
strv: Add strv_shell_escape
...
This modifies the strv in-place, replacing strings with their escaped
version. It's mostly just a convenience function for when you need to
join a strv together because it's passed as a string to something, and
the separator needs escaping.
2015-08-07 15:50:43 +00:00
Richard Maw
8adaf7bd23
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.
2015-08-07 15:50:43 +00:00
Richard Maw
12ba2c44dd
util: Don't interpret quotes by default in extract_first_word
...
This adds an EXTRACT_QUOTES option to allow the previous behaviour, of
not interpreting any character inside ' or " quotes as separators.
2015-08-07 15:50:42 +00:00
Richard Maw
6868560773
util: change unquote_*_word to extract_*_word
...
It now takes a separators argument, which defaults to WHITESPACE if NULL
is passed.
2015-08-07 15:50:42 +00:00
Kay Sievers
a095315b3c
build-sys: split internal basic/ library from shared/
...
basic/ can be used by everything
cannot use anything outside of basic/
libsystemd/ can use basic/
cannot use shared/
shared/ can use libsystemd/
2015-06-11 10:52:46 +02:00