| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* lib/quotearg.h: Don't include <stddef.h>. Remove stray semicolon.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/quotearg.h, lib/xalloc.h: Include stdlib.h, for
the benefit of _GL_ATTRIBUTE_DALLOC_FREE.
* lib/quotearg.h (clone_quoting_options):
* lib/xalloc.h (xmalloc, ximalloc, xzalloc, xizalloc, xcalloc)
(xicalloc, xrealloc, xirealloc, xireallocarray, x2realloc)
(x2nrealloc, xmemdup, ximemdup, xstrdup, xnmalloc, xcharalloc):
Add _GL_ATTRIBUTE_DALLOC_FREE and _GL_ATTRIBUTE_RETURNS_NONNULL
attributes as appropriate.
|
| |
|
|
|
|
|
| |
* lib/quotearg.h (quotearg_buffer): Use 'restrict'.
* m4/quotearg.m4 (gl_QUOTEARG): Require AC_C_RESTRICT.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
| |
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This quotes with default options of the specified style,
but with quoting enabled for instances of ':'.
While this can be simulated by temporarily modifying
the default quoting style, this is a little awkward,
and care must be taken with such an implementation
to avoid inlining leading to bloated text.
* lib/quotearg.h (quotearg_n_style_colon): Description and declaration.
* lib/quotearg.c (quotearg_n_style_colon): New function implementation.
|
|
|
|
|
| |
* lib/quotearg.h (get_quoting_style): Mark parameter as const.
* lib/quotearg.c (get_quoting_style): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* lib/quotearg.h: Add "shell-escape" and "shell-escape-always"
items and descriptions.
* lib/quotearg.c (quotearg_buffer_restyled): Add support for the
above types by quoting like "shell", but using $'...' syntax
for non printable characters, which should provide unambiguous
printable output for any input.
* tests/test-quotearg-simple.c: Update accordingly.
|
|
|
|
|
|
| |
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
|
|
|
|
|
|
| |
I ran 'make update-copyright'.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
| |
Run "make update-copyright". Compare to commit 1602f0a from last year.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most programs do not have translation catalogs for English and much less
separate catalogs for British and American English. Drop the suggestion
to translators about these two, and provide it automatically for Unicode
locales. Like most programs, even those using American English, we use
single quotation marks. This conflicts with the American typographic
convention, but works better when you cite the entire error message
within double quotes. It also tries not to clash with established
practice and with what non-gnulib programs will usually do.
* lib/quotearg.c (gettext_quote): Hard-code U+2018 and U+2019 when using
an UTF-8 or GB-18030 locale. The list of other locales with quotes was
provided by Bruno Haible.
(quotearg_buffer_restyled): Adjust instructions to translators.
* lib/quotearg.h (locale_quoting_style): Do not put an example in the
text, since this would be wrong when using Unicode.
* modules/quotearg: Depend on c-strcaseeq.
|
|
|
|
| |
Run "make update-copyright".
|
|
|
|
| |
Run the new "make update-copyright" rule.
|
|
|
|
|
| |
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
| |
* lib/quotearg.c (quotearg_free): New function.
(slot0, nslots, slotvec0, slotvec):
Now file-scope so that quotearg_free can get at them.
|
| |
|
| |
|
|
|
|
| |
Work around bug in multibyte handling in older shells.
|
|
|
|
|
|
| |
"#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.
|
| |
|
|
|
|
| |
First arg is int, not unsigned.
|
| |
|
| |
|
|
|
|
| |
(quotearg_n_style, quotearg_style): New decls.
|
| |
|
| |
|
|
|