116 Commits
Author SHA1 Message Date
Paul Eggert a3fd683de3 version-etc: new year
* 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'.
2017-01-01 02:59:23 +00:00
Bruno Haible a24dbc4ae1 Enable Unicode decoder safety unconditionally.
* lib/unistr.in.h (u32_mbtouc_unsafe): Assume CONFIG_UNICODE_SAFETY.
* lib/unistr/u8-mblen.c (u8_mblen): Likewise.
* lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
* lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
* lib/unistr/u8-prev.c (u8_prev): Likewise.
* lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
* lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
* lib/unistr/u16-mblen.c (u16_mblen): Likewise.
* lib/unistr/u16-mbtouc-unsafe.c (u16_mbtouc_unsafe): Likewise.
* lib/unistr/u16-mbtouc-unsafe-aux.c (u16_mbtouc_unsafe_aux): Likewise.
* lib/unistr/u16-prev.c (u16_prev): Likewise.
* lib/unistr/u16-strmblen.c (u16_strmblen): Likewise.
* lib/unistr/u16-strmbtouc.c (u16_strmbtouc): Likewise.
* lib/unistr/u32-mblen.c (u32_mblen): Likewise.
* lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Likewise.
* lib/unistr/u32-prev.c (u32_prev): Likewise.
* lib/unistr/u32-next.c (u32_next): Likewise.
* lib/unistr/u32-strmblen.c (u32_strmblen): Likewise.
* lib/unistr/u32-strmbtouc.c (u32_strmbtouc): Likewise.
* lib/uniconv/u8-conv-to-enc.c (u8_conv_to_encoding): Likewise.
* lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
* tests/unistr/test-u16-prev.c (check_invalid): Enable the
CONFIG_UNICODE_SAFETY tests unconditionally.
* tests/unistr/test-u32-mblen.c (main): Likewise.
* tests/unistr/test-u32-mbtouc.h (test_function): Likewise.
* tests/unistr/test-u32-prev.c (check_invalid): Likewise.
* tests/unistr/test-u32-next.c (main): Likewise.
* tests/unistr/test-u32-strmblen.c (main): Likewise.
* tests/unistr/test-u32-strmbtouc.c (main): Likewise.
* tests/unistr/test-u32-mbtouc.c (FULL_SAFETY): Remove macro.
* lib/unistr/u8-check.c (u8_check): Remove old dead code.
* lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
* lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
* lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
* lib/unistr/u8-uctomb.c (u8_uctomb): Likewise.
* lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Likewise.
* lib/unistr/u16-check.c (u16_check): Update comment.
* NEWS: Mention the changes that callers should be aware of.
2016-11-19 14:11:31 +01:00
Paul Eggert 71090a2a31 version-etc: new year
* 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'.
2016-01-01 00:57:21 -08:00
Daiki Ueno b3b5ecd026 unistr/uN-strtok-tests: avoid a trivial leak
* tests/unistr/test-u-strtok.h (test_u_strtok): Untabify.  Free
input and delim after the multibyte delimiter tests.
2015-07-07 15:12:52 +09:00
Seiya Kawashima 2c5543396b unistr/uN-strtok: handle multibyte delimiters
Previously, uN_strtok moved PTR to the next unit to the token end.
When DELIM contained a multibyte character, the new position could
be a middle of a multibyte character.
* lib/unistr/u-strtok.h (FUNC): Place PTR at the next character
after the token.
* lib/unistr/u8-strtok.c (U_STRMBLEN): New macro.
* lib/unistr/u16-strtok.c (U_STRMBLEN): New macro.
* lib/unistr/u32-strtok.c (U_STRMBLEN): New macro.
* modules/unistr/u8-strtok (Depends-on): Depend on
unistr/u8-strmblen.
* modules/unistr/u16-strtok (Depends-on): Depend on
unistr/u16-strmblen.
* modules/unistr/u32-strtok (Depends-on): Depend on
unistr/u32-strmblen.
* tests/unistr/test-u-strtok.h: New file.
* tests/unistr/test-u8-strtok.c: New file.
* tests/unistr/test-u16-strtok.c: New file.
* tests/unistr/test-u32-strtok.c: New file.
* modules/unistr/u8-strtok-tests: New file.
* modules/unistr/u32-strtok-tests: New file.
* modules/unistr/u16-strtok-tests: New file.
Copyright-paperwork-exempt: yes
Co-authored-by: Daiki Ueno <ueno@gnu.org>
2015-07-03 11:48:29 +09:00
Daiki Ueno ea30903390 u{16,32}-strstr-tests: relax timeout condition
On slower platforms (e.g., Solaris 10/SPARC), u{16,32}-strstr tests can
take longer than 5 seconds to complete.
Reported by Dagobert Michelsen in:
https://lists.gnu.org/archive/html/bug-libunistring/2015-06/msg00006.html
* tests/unistr/test-u16-strstr.c (main): Increase timeout from 5
seconds to 10 seconds.
* tests/unistr/test-u32-strstr.c (main): Likewise.
2015-07-02 16:56:02 +09:00
Paul Eggert b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
Eric Blake 1276a2c5f2 maint: update copyright
I ran 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-01 00:07:10 -07:00
Eric Blake 9fc81090f6 maint: update all copyright year number ranges
Run "make update-copyright".  Compare to commit 1602f0a from last year.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-01-01 00:50:58 +00:00
Jim Meyering 1602f0afed maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:04:58 +01:00
Bruno Haible 50dc8e08d7 uN_strstr: New unit tests.
* modules/unistr/u8-strstr-tests: New file.
* modules/unistr/u16-strstr-tests: New file.
* modules/unistr/u32-strstr-tests: New file.
* tests/unistr/test-u-strstr.h: New file, based on tests/test-strstr.c.
* tests/unistr/test-u8-strstr.c: New file.
* tests/unistr/test-u16-strstr.c: New file.
* tests/unistr/test-u32-strstr.c: New file.
2011-01-21 14:13:10 +01:00
Jim Meyering d60f3b0c6b maint: update almost all copyright ranges to include 2011
Run the new "make update-copyright" rule.
2011-01-01 22:12:59 +01:00
Bruno Haible 8cada094a3 unistr/u8-mbtouc: Improve handling of ill-formed UTF-8 input.
* lib/unistr/u8-mbtouc.c (u8_mbtouc): For an invalid multibyte
character, return the number of bytes that belong together, not always
1.
* lib/unistr/u8-mbtouc-unsafe.c (u8_mbtouc_unsafe): Likewise.
* lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Likewise.
* lib/unistr/u8-mbtouc-unsafe-aux.c (u8_mbtouc_unsafe_aux): Likewise.
* lib/unistr/u8-mbsnlen.c (u8_mbsnlen): Use u8_mbtouc to determine the
number of bytes of an invalid character.
* tests/unistr/test-u8-mbtouc.c (test_safe_function): New function.
(main): Invoke it.
* tests/unistr/test-u8-mbtouc.h (test_function): Update two test results.
* tests/unistr/test-u8-mbsnlen.c (main): Test various kinds of
malformed byte sequences.
* modules/unistr/u8-mbtouc (configure.ac): Bump version number.
* modules/unistr/u8-mbtouc-unsafe (configure.ac): Likewise.
* modules/unistr/u8-mbsnlen (configure.ac): Likewise.
Reported by Ben Pfaff and Paolo Bonzini.
2010-11-13 19:43:06 +01:00
Bruno Haible 52a32bbd66 unistr/u8-strchr: Fix a test failure on i586 glibc systems.
* tests/unistr/test-strchr.h (test_strchr): Disable an invalid check.
2010-09-24 14:36:26 +02:00
Bruno Haible c8068b3df1 More tests for unistr/u8-strchr. 2010-07-31 21:26:01 +02:00
Bruno Haible 9ce199fbdf unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings. 2010-07-28 23:00:52 +02:00
Paolo Bonzini ad9a24a121 unistr/u*-strchr: add tests
* modules/unistr/u16-strchr-tests, modules/unistr/u32-strchr-tests,
modules/unistr/u8-strchr-tests, tests/unistr/test-strchr.h,
tests/unistr/test-u16-strchr.c, tests/unistr/test-u32-strchr.c,
tests/unistr/test-u8-strchr.c: New files.
2010-07-23 14:00:28 +02:00
Paolo Bonzini 26947b67c9 unistr/u*-chr: test multibyte sequences more
* tests/unistr/test-chr.h: Do complete testing of the characters in the
test vector.
* tests/unistr/test-u8-chr.c, tests/unistr/test-u32-chr.c,
tests/unistr/test-u16-chr.c (U_UCTOMB): Define.
2010-07-23 12:54:47 +02:00
Paolo Bonzini 8d53196a5a unistr/u*-chr: test multibyte sequences
* tests/unistr/test-chr.h: Put characters above 0-127 in the test input.
2010-07-23 08:33:06 +02:00
Paolo Bonzini cf67bd4906 unistr/u*-chr: prepare for multibyte tests
* modules/unistr/u16-chr-tests: Depend on u32-to-u16.
* modules/unistr/u8-chr-tests: Depend on u32-to-u8.
* tests/unistr/test-chr.h: Build initial version as UCS-4 then convert.
* tests/unistr/test-u16-chr.c, tests/unistr/test-u32-chr.c,
tests/unistr/test-u8-chr.c: Define U32_TO_U.
2010-07-23 08:33:01 +02:00
Bruno Haible be4eb87a42 Tests for module 'unistr/u32-strdup'. 2010-01-10 23:58:34 +01:00
Bruno Haible cc0cf3448e Tests for module 'unistr/u16-strdup'. 2010-01-10 23:58:08 +01:00
Bruno Haible d5dda51ad9 Tests for module 'unistr/u8-strdup'. 2010-01-10 23:57:41 +01:00
Bruno Haible b754f9b8a7 Tests for module 'unistr/u32-strncmp'. 2010-01-10 23:49:09 +01:00
Bruno Haible 0c3edc55ab Tests for module 'unistr/u16-strncmp'. 2010-01-10 23:48:36 +01:00
Bruno Haible 726b16a774 Tests for module 'unistr/u8-strncmp'. 2010-01-10 23:47:58 +01:00
Bruno Haible ec79b834e7 Tests for module 'unistr/u32-strcoll'. 2010-01-10 23:47:04 +01:00
Bruno Haible cff40b0d27 Tests for module 'unistr/u16-strcoll'. 2010-01-10 23:46:38 +01:00
Bruno Haible 1ba245ef6b Tests for module 'unistr/u8-strcoll'. 2010-01-10 23:46:10 +01:00
Bruno Haible e8fc1a8cdb Tests for module 'unistr/u32-strcmp'. 2010-01-10 23:45:02 +01:00
Bruno Haible bceb492322 Tests for module 'unistr/u16-strcmp'. 2010-01-10 23:44:31 +01:00
Bruno Haible ab2c8f5d19 Tests for module 'unistr/u8-strcmp'. 2010-01-10 23:43:59 +01:00
Bruno Haible 6b5b875759 Tests for module 'unistr/u32-strncat'. 2010-01-10 23:42:54 +01:00
Bruno Haible 7155a693a1 Tests for module 'unistr/u16-strncat'. 2010-01-10 23:42:22 +01:00
Bruno Haible 66386c8f75 Tests for module 'unistr/u8-strncat'. 2010-01-10 23:41:51 +01:00
Bruno Haible 45df4e51c1 Tests for module 'unistr/u32-strcat'. 2010-01-10 23:40:58 +01:00
Bruno Haible 4818e199e6 Tests for module 'unistr/u16-strcat'. 2010-01-10 23:40:32 +01:00
Bruno Haible d92b810e7a Tests for module 'unistr/u8-strcat'. 2010-01-10 23:40:00 +01:00
Bruno Haible 9e61996a79 Tests for module 'unistr/u32-stpncpy'. 2010-01-10 23:39:00 +01:00
Bruno Haible 94012b4faf Tests for module 'unistr/u16-stpncpy'. 2010-01-10 23:38:33 +01:00
Bruno Haible 7d4900610f Tests for module 'unistr/u8-stpncpy'. 2010-01-10 23:38:04 +01:00
Bruno Haible 1d1cb185e6 Tests for module 'unistr/u32-strncpy'. 2010-01-10 23:37:10 +01:00
Bruno Haible 603316688f Tests for module 'unistr/u16-strncpy'. 2010-01-10 23:36:40 +01:00
Bruno Haible 7181bcb1f4 Tests for module 'unistr/u8-strncpy'. 2010-01-10 23:36:07 +01:00
Bruno Haible f6208c33d6 Tests for module 'unistr/u32-stpcpy'. 2010-01-10 23:35:09 +01:00
Bruno Haible 74a9f8aecf Tests for module 'unistr/u16-stpcpy'. 2010-01-10 23:34:33 +01:00
Bruno Haible 49d42d988f Tests for module 'unistr/u8-stpcpy'. 2010-01-10 23:34:03 +01:00
Bruno Haible 03abecaa34 Tests for module 'unistr/u32-strcpy'. 2010-01-10 23:33:09 +01:00
Bruno Haible 4b9f7c799b Tests for module 'unistr/u16-strcpy'. 2010-01-10 23:32:36 +01:00
Bruno Haible 6461b9ed0e Tests for module 'unistr/u8-strcpy'. 2010-01-10 23:32:03 +01:00