Quotearg part 4: add tests, fix c-maybe colon quoting.
authorEric Blake <ebb9@byu.net>
Tue, 12 Feb 2008 18:42:29 +0000 (11:42 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 13 Feb 2008 02:04:29 +0000 (19:04 -0700)
commit05230b809c6fec84e0505ef1240f37b9d5b40356
tree39dd1f4c83c1298abc1320275c30076f89e098e0
parent74dd1966a5db708c66201bf952976ef27bd33e7e
Quotearg part 4: add tests, fix c-maybe colon quoting.

* lib/quotearg.h: Improve documentation.
* lib/quotearg.c (quotearg_buffer_restyled): Don't add extra
escapes when adding outer quotes.  When quoting trigraphs, use
valid C notation.  When quoting NUL, omit extra characters if next
character is not digit.  Alter prototype.
(quotearg_buffer, quotearg_alloc_mem, quotearg_n_options): Adjust
callers.
* modules/quotearg-tests: New module.
* tests/test-quotearg.c: New test.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/quotearg.c
lib/quotearg.h
modules/quotearg-tests [new file with mode: 0644]
tests/test-quotearg.c [new file with mode: 0644]