[systemd-devel] [PATCH 1/9] util: Add unescape_first_word()
Lennart Poettering
lennart at poettering.net
Thu Jun 18 11:30:22 PDT 2015
On Thu, 28.05.15 13:02, Richard Maw (richard.maw at codethink.co.uk) wrote:
> This is a superset of the functionality of unquote_first_word, allowing
> non-whitespace separators, and doesn't interpret quotes unless
> UNQUOTE_QUOTES is included in flags.
Hmm, makes sense, but I'd actually just have one function
extract_first_word() then, which replaces unquote_first_word() but has
the signature of your unescape_first_word(). It would take the
separators parameter, which would default to WHITESPACE if passed as
NULL. THe flags should all be renamed EXTRACT_xyz instead of
UNQUOTE_xyz then, and EXTRACT_UNQUOTE should be a prominent flag.
Then, all our current users of unquote_first_word() should be changed
to use this new call.
Does that make sense?
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list