chiark / gitweb /
util: Introduce unquote_first_word_and_warn
authorFilipe Brandenburger <filbranden@google.com>
Tue, 9 Jun 2015 04:31:43 +0000 (21:31 -0700)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:01:48 +0000 (10:01 +0100)
commit052cd31ffd9de042f25126992294ebd6db5a67c2
tree6fc54cf9e0c1185e811af0ac72025bef5f5d5e3d
parent61c0276130571598a970f314368866b219d7cddc
util: Introduce unquote_first_word_and_warn

It will try to unquot_first_word, but if it runs into escaping problems
it will retry it adding UNQUOTE_CUNESCAPE_RELAX to the flags.  If it
succeeds on the second try, it will log a warning about it.  If it fails
both times, it will log an error.

Add test cases to confirm it behaves as expected.
src/shared/util.c
src/shared/util.h