]> Savannah Git Hosting - gnulib.git/commit
quotearg: minimize shell quoting using double quotes
authorPádraig Brady <P@draigBrady.com>
Mon, 26 Sep 2016 14:13:34 +0000 (15:13 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 3 Oct 2016 14:12:43 +0000 (15:12 +0100)
commit2ed5c11d9bf7293179fcc536fa4fe3aed8f7ab7d
treecc82d608e595dd4ff33c15b61ee198580a1a14f5
parente63f5eb55570a1ea3e51ce47df33689785e085c1
quotearg: minimize shell quoting using double quotes

I.E. 'it'\''s awkward like this'; "it's better like this"

* lib/quotearg.c (quotearg_buffer_restyled): If an ASCII single
quote in encountered then use double quotes (c style quoting)
when possible, as it simplifies the quoting.
* tests/test-quotearg-simple.c: Add test cases.
* tests/test-quotearg.h (use_quotearg_buffer): Adjust to account
for the fact we now may write beyond the returned length.
ChangeLog
lib/quotearg.c
tests/test-quotearg-simple.c
tests/test-quotearg.h