summaryrefslogtreecommitdiff
path: root/lib/unistr
Commit message (Collapse)AuthorAgeFilesLines
* Make uN_strstr functions O(n) worst-case.Bruno Haible2011-01-214-17/+108
| | | | | | | | | | | | | | | | | | | | | | * lib/unistr/u-strstr.h (FUNC): In the 8-bit case, use strstr. In the 16-bit and 32-bit unit cases, use the unibyte algorithm from lib/mbsstr.c. * lib/unistr/u8-strstr.c: Include <string.h>. (UNIT_IS_UINT8_T): New macro. * lib/unistr/u16-strstr.c: Include malloca.h and str-kmp.h. (U_STRLEN, U_STRNLEN): New macros. * lib/unistr/u32-strstr.c: Include malloca.h and str-kmp.h. (U_STRLEN, U_STRNLEN): New macros. * modules/unistr/u8-strstr (Depends-on): Add strstr. (configure.ac): Update required libunistring version. * modules/unistr/u16-strstr (Files): Add lib/str-kmp.h. (Depends-on): Add unistr/u16-strlen, unistr/u16-strnlen, stdbool, malloca. (configure.ac): Update required libunistring version. * modules/unistr/u32-strstr (Files): Add lib/str-kmp.h. (Depends-on): Add unistr/u32-strlen, unistr/u32-strnlen, stdbool, malloca. (configure.ac): Update required libunistring version.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-01151-151/+151
| | | | Run the new "make update-copyright" rule.
* Port to uClibc.Bruno Haible2010-11-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/relocatable.c (find_shared_library_fullname): Treat uClibc like glibc. * lib/strerror_r.c: Likewise. * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET): Likewise. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Likewise. * m4/glibc21.m4 (gl_GLIBC21): Likewise. * tests/test-sigaction.c (handler, main): Likewise. * lib/localename.c (gl_locale_name_thread_unsafe, HAVE_LOCALE_NULL): Treat uClibc like a non-glibc platform. * lib/propername.c (proper_name_utf8): Likewise. * lib/spawn.in.h: Likewise. * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): Likewise. * lib/striconveh.c (iconveh_open, iconv_carefully, iconv_carefully_1, mem_cd_iconveh_internal): Likewise. * lib/striconveha.c (mem_iconveha, str_iconveha): Likewise. * lib/string.in.h (memchr, memrchr, rawmemchr, strchrnul, strpbrk, strstr, strcasestr): Likewise. * lib/unicodeio.c (unicode_to_mb): Likewise. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise. * m4/glibc2.m4 (gt_GLIBC2): Likewise. * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Likewise. * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE, gl_FUNC_MEMMEM): Likewise. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE, gl_FUNC_STRCASESTR): Likewise. * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE, gl_FUNC_STRSTR): Likewise. * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise. * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H): Likewise. * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise. * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise. * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H): Likewise. * m4/wchar_h.m4 (gl_WCHAR_H): Likewise. * tests/test-getopt.h (OPTIND_MIN): Likewise. * tests/test-striconveha.c (main): Likewise. * doc/posix-functions/getdelim.texi: Mention an uClibc bug. * doc/posix-functions/getline.texi: Likewise. Reported by Mike Frysinger <vapier@gentoo.org>.
* unistr/u8-mbtouc: Improve handling of ill-formed UTF-8 input.Bruno Haible2010-11-135-171/+521
| | | | | | | | | | | | | | | | | | | | * 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.
* Update comments.Bruno Haible2010-11-135-5/+5
| | | | | | | | * lib/unistr/u8-check.c: Update file name in comments. * lib/unistr/u8-mblen.c: Likewise. * lib/unistr/u8-prev.c: Likewise. * lib/unistr/u8-strmblen.c: Likewise. * lib/unistr/u8-strmbtouc.c: Likewise.
* unistr/u8-strstr, unistr/u16-strstr: Optimize the one-character case.Bruno Haible2010-07-313-4/+16
|
* unistr/u8-chr, unistr/u8-strchr: Optimize and add comments.Bruno Haible2010-07-312-11/+71
|
* unistr/u8-strchr: Fix several bugs.Bruno Haible2010-07-311-4/+4
|
* unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.Bruno Haible2010-07-281-0/+2
|
* Use spaces for indentation, not tabs.Bruno Haible2010-07-282-9/+9
|
* unistr/u8-chr, unistr/u8-strchr: use Boyer-Moore like algorithm.Paolo Bonzini2010-07-232-71/+246
| | | | | * lib/unistr/u8-chr.c, lib/unistr/u8-strchr.c: Add Boyer-Moore like operation. * modules/unistr/u8-chr: Depend on memchr.
* unistr/u8-strchr: Optimize non-ASCII argument case.Bruno Haible2010-07-181-3/+3
|
* unistr/u8-strchr: Optimize ASCII argument case.Pádraig Brady2010-07-111-6/+21
|
* Don't use conversion with transliteration in u{8,16,32}_strcoll.Bruno Haible2010-05-244-10/+15
|
* unistr/u*-strcoll: Try harder to distinguish different strings.Bruno Haible2010-01-101-0/+6
|
* unistr/u*-stpncpy: Fix the return value.Bruno Haible2010-01-101-3/+7
|
* unistr/u8-mbsnlen: Fix return value for incomplete character.Bruno Haible2010-01-102-4/+10
|
* unistr/u16-to-u32: Reject invalid input.Bruno Haible2010-01-091-1/+1
|
* unistr/u16-to-u8: Reject invalid input.Bruno Haible2010-01-091-1/+1
|
* unistr/u8-to-u32: Reject invalid input.Bruno Haible2010-01-091-1/+1
|
* unistr/u8-to-u16: Reject invalid input.Bruno Haible2010-01-091-1/+1
|
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-01151-157/+166
| | | | | 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-29129-129/+135
| | | | | | | | | | | | | | | | | | 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-1070-1754/+1754
|
* Avoid test failures on AIX and OSF/1.Bruno Haible2009-04-261-2/+2
|
* Inside libunistring, define the function always.Bruno Haible2009-04-1013-17/+65
|
* New module 'unistr/u32-cmp2'.Bruno Haible2009-04-051-0/+28
|
* New module 'unistr/u16-cmp2'.Bruno Haible2009-04-051-0/+28
|
* New module 'unistr/u8-cmp2'.Bruno Haible2009-04-052-0/+60
|
* New module 'unistr/u32-strcoll'.Bruno Haible2009-02-071-0/+33
|
* New module 'unistr/u16-strcoll'.Bruno Haible2009-02-071-0/+33
|
* New module 'unistr/u8-strcoll'.Bruno Haible2009-02-072-0/+114
|
* Define and declare u{8,16}_uctomb_aux also if !HAVE_INLINE.Bruno Haible2007-10-282-8/+0
|
* Change copyright notice from LGPLv2.0+ to LGPLv3+.Bruno Haible2007-10-07143-1287/+1001
|
* New module unistr/u32-mbsnlenBruno Haible2007-06-111-0/+29
|
* New module 'unistr/u16-mbsnlen'.Bruno Haible2007-06-111-0/+41
|
* New module 'unistr/u8-mbsnlen'.Bruno Haible2007-06-111-0/+41
|
* New module 'unistr/u32-mbtoucr'.Bruno Haible2007-03-281-0/+41
|
* New module 'unistr/u16-mbtoucr'.Bruno Haible2007-03-281-0/+56
|
* New module 'unistr/u8-mbtoucr'.Bruno Haible2007-03-281-0/+287
|
* Enable the function only if HAVE_INLINE.Bruno Haible2007-03-246-0/+24
|
* Move to u16-uctomb-aux.c.Bruno Haible2007-03-241-60/+0
|
* Move to here from ucs4-utf16.c.Bruno Haible2007-03-241-0/+60
|
* Move to u8-uctomb-aux.c.Bruno Haible2007-03-241-71/+0
|
* Move to here from ucs4-utf8.c.Bruno Haible2007-03-241-0/+71
|
* Move to u16-mbtouc-unsafe-aux.c.Bruno Haible2007-03-241-53/+0
|
* Move to here from utf16-ucs4-unsafe.c.Bruno Haible2007-03-241-0/+53
|
* Move to u16-mbtouc-aux.c.Bruno Haible2007-03-241-49/+0
|
* Move to here from utf16-ucs4.c.Bruno Haible2007-03-241-0/+49
|
* Move to u8-mbtouc-unsafe-aux.c.Bruno Haible2007-03-241-166/+0
|