summaryrefslogtreecommitdiff
path: root/lib/quotearg.h
Commit message (Collapse)AuthorAgeFilesLines
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-2/+2
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-15/+15
|
* quotearg: document limitations of quote_these_tooJoel E. Denny2009-08-231-2/+5
| | | | | | | | * lib/quotearg.c (quotearg_buffer_restyled): Add comments where those limitations are created. * lib/quotearg.h (set_char_quoting): Document that digits and letters that are special after backslash are not permitted. (quotearg_char): Cross-reference set_char_quoting documentation.
* quotearg: implement custom_quoting_styleJoel E. Denny2009-08-231-3/+84
| | | | | | | | | | | | | | | | | | | | | | * lib/quotearg.c: (struct quoting_options): Add left_quote and right_quote fields. (set_custom_quoting): New public function. (quotearg_buffer_restyled): Add left_quote and right_quote arguments, handle them very much like locale quoting, and update all uses. (quotearg_n_custom): New public function. (quotearg_n_custom_mem): New public function. (quotearg_custom): New public function. (quotearg_custom_mem): New public function. * lib/quotearg.h: Prototype and document new public functions. (enum quoting_style): For escape_quoting_style and clocale_quoting_style, comment that QA_SPLIT_TRIGRAPHS is ignored even though they're otherwise like c_quoting_style. Add custom_quoting_style member and document with comparison to clocale_quoting_style. * tests/test-quotearg.c (custom_quotes): New array. (custom_results): New array. (main): Extend to test custom quoting.
* Avoid doubling \ in common case of "c-maybe" quoting style.Eric Blake2008-02-161-1/+2
| | | | | | | | | | | | * lib/quotearg.c (quotearg_buffer_restyled): Don't escape \ when eliding outer quotes. * lib/quotearg.h: Document this. * tests/test-quotearg.c (result_strings, inputs, results_g) (flag_results, locale_results): Test it by adding a new string to each test group. (compare_strings): Test new string. Signed-off-by: Eric Blake <ebb9@byu.net>
* Avoid trigraph quoting in default output.Eric Blake2008-02-161-12/+17
| | | | | | | | | * lib/quotearg.h (enum quoting_flags): Add QA_SPLIT_TRIGRAPHS. * lib/quotearg.c (quotearg_buffer_restyled): Don't quote trigraphs unless explicitly requested. * tests/test-quotearg.c (flag_results, main): Add additional tests. Signed-off-by: Eric Blake <ebb9@byu.net>
* Quotearg part 4: add tests, fix c-maybe colon quoting.Eric Blake2008-02-121-9/+104
| | | | | | | | | | | | | | * 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>
* Quotearg part 3: add flag to control outer quote elision.Eric Blake2008-02-121-9/+31
| | | | | | | | | | | * lib/quotearg.h (c_maybe_quoting_style): New style. (enum quoting_flags): Better documentation of flags. * lib/quotearg.c (quoting_style_args, quoting_style_vals): Add c-maybe style. (quotearg_buffer_restyled): Handle new flag to elide outer quotes. Signed-off-by: Eric Blake <ebb9@byu.net>
* Quotearg part 2: add flag that can control NUL elision.Eric Blake2008-02-121-10/+26
| | | | | | | | | | | | | * lib/quotearg.h (set_quoting_flags): New prototype. * lib/quotearg.c (struct quoting_options): Add flag field. (set_quoting_flags): New function. (quotearg_buffer_restyled): Add flags parameter. (quotearg_alloc_mem): Set the flag if length cannot be returned. (quotearg_n_options): Set the flag, since length cannot be returned. (quoting_options_from_style): Default flags correctly. Signed-off-by: Eric Blake <ebb9@byu.net>
* Quotearg part 1: more wrappers, restore quotearg_char state.Eric Blake2008-02-121-2/+29
| | | | | | | | | | | | | * lib/quotearg.h (quotearg_alloc_mem, quotearg_n_mem) (quotearg_mem, quotearg_style_mem, quotearg_char_mem) (quotearg_colon_mem): New wrappers. * lib/quotearg.c (quotearg_alloc, quotearg_char): Rewrite... (quotearg_alloc_mem, quotearg_char_mem): ...in terms of these new functions. (quotearg_n_mem, quotearg_mem, quotearg_style_mem) (quotearg_colon_mem): New functions. Signed-off-by: Eric Blake <ebb9@byu.net>
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* * lib/quotearg.h (quotearg_free): New decl.Paul Eggert2006-11-081-2/+5
| | | | | | * lib/quotearg.c (quotearg_free): New function. (slot0, nslots, slotvec0, slotvec): Now file-scope so that quotearg_free can get at them.
* *** empty log message ***Paul Eggert2005-05-141-1/+1
|
* Merge from coreutils.Paul Eggert2004-08-071-1/+1
|
* New function quotearg_alloc. Treat { } = as special sometimes.Paul Eggert2004-02-051-8/+31
| | | | Work around bug in multibyte handling in older shells.
* Allow multiple inclusion by surrounding withPaul Eggert2002-11-231-29/+29
| | | | | | "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t, so that we can be included first. (PARAMS): Remove; we now assume C89 or later. All uses removed.
* (quotearg_n_style_mem): New function.Jim Meyering2002-01-221-1/+6
|
* (quotearg_n, quotearg_n_style):Jim Meyering2001-11-281-3/+2
| | | | First arg is int, not unsigned.
* (enum quoting style): New enum clocale_quoting_style.Jim Meyering2000-07-141-1/+2
|
* update copyright dateJim Meyering2000-07-091-1/+1
|
* (locale_quoting_style): New enum value.Jim Meyering1999-08-101-3/+12
| | | | (quotearg_n_style, quotearg_style): New decls.
* (quoting_style_vals): New public array.Jim Meyering1999-01-011-4/+5
|
* Update from patch-2.5.3.Jim Meyering1998-03-211-14/+16
|
* .Jim Meyering1998-02-231-0/+97