Bob Proulx [Thu, 21 Feb 2008 08:07:10 +0000 (09:07 +0100)]
Enable use of older two part flavor 'git describe'.
* build-aux/git-version-gen: If using the older two part flavor of
git version then recreate the third part now present in the
newer three part flavor of git describe.
Eric Blake [Sat, 16 Feb 2008 14:40:47 +0000 (07:40 -0700)]
Avoid doubling \ in common case of "c-maybe" quoting style.
* 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.
Eric Blake [Tue, 12 Feb 2008 18:42:29 +0000 (11:42 -0700)]
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.
Eric Blake [Thu, 7 Feb 2008 21:35:51 +0000 (14:35 -0700)]
Quotearg part 2: add flag that can control NUL elision.
* 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.
Simon Josefsson [Thu, 31 Jan 2008 10:10:36 +0000 (11:10 +0100)]
md2: clarify comments to say that alignment is not required.
* lib/md2.h: Remove warning about alignment in comment.
* lib/md2.c (md2_read_ctx, md2_finish_ctx): Doc fix, alignment
has never been required.
Simon Josefsson [Thu, 31 Jan 2008 10:08:05 +0000 (11:08 +0100)]
md4: adapt alignment constraint fix from sha1.
* lib/md4.c (set_uint32): New function, from sha1.c
(md4_read_ctx): Use it.
(md4_finish_ctx): Doc fix.
* lib/md4.h: Doc fix.
Simon Josefsson [Thu, 31 Jan 2008 10:05:46 +0000 (11:05 +0100)]
md5: adapt alignment constraint fix from sha1.
* lib/md5.c (set_uint32): New function, from sha1.c
(md5_read_ctx): Use it.
(md5_finish_ctx): Doc fix.
* lib/md5.h: Doc fix.
Peter Palfrader [Wed, 30 Jan 2008 12:36:13 +0000 (13:36 +0100)]
sha1: remove the result buffer alignment constraint
* lib/sha1.c (set_uint32): New function.
(sha1_read_ctx): Rewrite to remove the result buffer alignment
constraint.
(sha1_finish_ctx): Remove comment warning about alignment constraint.
* lib/sha1.h: Likewise.
Jim Meyering [Tue, 29 Jan 2008 09:32:15 +0000 (10:32 +0100)]
vasnprintf.c: Avoid warning about unused label
* lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Guard the
"overflow" label definition and associated code with the
same cpp condition that guards the sole use of that label.
Paul Eggert [Wed, 16 Jan 2008 00:32:59 +0000 (16:32 -0800)]
Fix problem with getdate on mingw32 reported by Simon Josefsson
in <http://lists.gnu.org/archive/html/bug-gnulib/2008-01/msg00192.html>.
* lib/getdate.y (get_date): Check "HAVE_DECL_TZNAME", not "defined
tzname", when deciding whether to declare tzname.
* lib/strftime.c (tzname): Likewise.
Eric Blake [Fri, 11 Jan 2008 05:22:51 +0000 (22:22 -0700)]
Convert strcasestr module to use Two-Way algorithm.
* modules/strcasestr-simple: New module, based on the old
strcasestr, but with Two-Way rather than KMP.
* modules/strcasestr (Depends-on): Change to strcasestr-simple.
* lib/string.in.h (rpl_strcasestr): Declare.
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Check for linear
performance.
* lib/strcasestr.c (strcasestr): Simplify, and avoid malloc.
* modules/string (Makefile.am): Support strcasestr.
* m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Likewise.
* modules/strcasestr-tests (Depends-on): Check for alarm.
* tests/test-strcasestr.c: Augment test.
* lib/str-two-way.h: Clean up stray macro.
* NEWS: Document new module.
* MODULES.html.sh (string handling): Likewise.
* doc/functions/strcasestr.texi: New file.
* doc/gnulib.texi (Function Substitutes): New node. Move memmem
here, since it is not a POSIX function.