about summary refs log tree commit diff
path: root/iconvdata/utf-32.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* iconv: Remove _STRING_ARCH_unaligned usage for get/set macrosAdhemerval Zanella2023-02-171-3/+3
| | | | | | | | | And use a packed structure instead. The compiler generates optimized unaligned code if the architecture supports it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Fix UTF-16 surrogate handling. [BZ #19727]Stefan Liebler2016-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the latest Unicode standard, a conversion from/to UTF-xx has to report an error if the character value is in range of an utf16 surrogate (0xd800..0xdfff). See https://sourceware.org/ml/libc-help/2015-12/msg00015.html. Thus this patch fixes this behaviour for converting from utf32 to internal and from internal to utf8. Furthermore the conversion from utf16 to internal does not report an error if the input-stream consists of two low-surrogate values. If an uint16_t value is in the range of 0xd800 .. 0xdfff, the next uint16_t value is checked, if it is in the range of a low surrogate (0xdc00 .. 0xdfff). Afterwards these two uint16_t values are interpreted as a high- and low-surrogates pair. But there is no test if the first uint16_t value is really in the range of a high-surrogate (0xd800 .. 0xdbff). If there would be two uint16_t values in the range of a low surrogate, then they will be treated as a valid high- and low-surrogates pair. This patch adds this test. This patch also adds a new testcase, which checks UTF conversions with input values in range of UTF16 surrogates. The test converts from UTF-xx to INTERNAL, INTERNAL to UTF-xx and directly between UTF-xx to UTF-yy. The latter conversion is needed because s390 has iconv-modules, which converts from/to UTF in one step. The new testcase was tested on a s390, power and intel machine. ChangeLog: [BZ #19727] * iconvdata/utf-16.c (BODY): Report an error if first word is not a valid high surrogate. * iconvdata/utf-32.c (BODY): Report an error if the value is in range of an utf16 surrogate. * iconv/gconv_simple.c (BODY): Likewise. * iconvdata/bug-iconv12.c: New file. * iconvdata/Makefile (tests): Add bug-iconv12. rename test
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* 2014-05-01 Steve Ellcey <sellcey@mips.com>Steve Ellcey2014-05-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * iconvdata/ansi_x3.110.c (ONE_DIRECTION): Define. * iconvdata/armscii-8.c (ONE_DIRECTION): Define. * iconvdata/big5.c (ONE_DIRECTION): Define. * iconvdata/big5hkscs.c (ONE_DIRECTION): Define. * iconvdata/cp1255.c (ONE_DIRECTION): Define. * iconvdata/cp1258.c (ONE_DIRECTION): Define. * iconvdata/cp932.c (ONE_DIRECTION): Define. * iconvdata/euc-cn.c (ONE_DIRECTION): Define. * iconvdata/euc-jisx0213.c (ONE_DIRECTION): Define. * iconvdata/euc-jp-ms.c (ONE_DIRECTION): Define. * iconvdata/euc-jp.c (ONE_DIRECTION): Define. * iconvdata/euc-kr.c (ONE_DIRECTION): Define. * iconvdata/euc-tw.c (ONE_DIRECTION): Define. * iconvdata/gb18030.c (ONE_DIRECTION): Define. * iconvdata/gbbig5.c (ONE_DIRECTION): Define. * iconvdata/gbgbk.c (ONE_DIRECTION): Define. * iconvdata/gbk.c (ONE_DIRECTION): Define. * iconvdata/ibm1364.c (ONE_DIRECTION): Define. * iconvdata/ibm930.c (ONE_DIRECTION): Define. * iconvdata/ibm932.c (ONE_DIRECTION): Define. * iconvdata/ibm933.c (ONE_DIRECTION): Define. * iconvdata/ibm935.c (ONE_DIRECTION): Define. * iconvdata/ibm937.c (ONE_DIRECTION): Define. * iconvdata/ibm939.c (ONE_DIRECTION): Define. * iconvdata/ibm943.c (ONE_DIRECTION): Define. * iconvdata/iso-2022-cn-ext.c (ONE_DIRECTION): Define. * iconvdata/iso-2022-cn.c (ONE_DIRECTION): Define. * iconvdata/iso-2022-jp-3.c (ONE_DIRECTION): Define. * iconvdata/iso-2022-jp.c (ONE_DIRECTION): Define. * iconvdata/iso-2022-kr.c (ONE_DIRECTION): Define. * iconvdata/iso646.c (ONE_DIRECTION): Define. * iconvdata/iso8859-1.c (ONE_DIRECTION): Define. * iconvdata/iso_11548-1.c (ONE_DIRECTION): Define. * iconvdata/iso_6937-2.c (ONE_DIRECTION): Define. * iconvdata/iso_6937.c (ONE_DIRECTION): Define. * iconvdata/johab.c (ONE_DIRECTION): Define. * iconvdata/shift_jisx0213.c (ONE_DIRECTION): Define. * iconvdata/sjis.c (ONE_DIRECTION): Define. * iconvdata/t.61.c (ONE_DIRECTION): Define. * iconvdata/tcvn5712-1.c (ONE_DIRECTION): Define. * iconvdata/tscii.c (ONE_DIRECTION): Define. * iconvdata/uhc.c (ONE_DIRECTION): Define. * iconvdata/unicode.c (ONE_DIRECTION): Define. * iconvdata/utf-16.c (ONE_DIRECTION): Define. * iconvdata/utf-32.c (ONE_DIRECTION): Define. * iconvdata/utf-7.c (ONE_DIRECTION): Define.
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-5/+5
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Store invocation-specific data of conversion modules in __gconv_step_dataUlrich Drepper2011-12-211-11/+10
|
* Update.Ulrich Drepper2002-11-201-1/+2
| | | | | | | | | | | | | | * iconv/gconv_simple.c (internal_ucs4le_loop_unaligned): Return __GCONV_EMPTY_INPUT only if input is really empty. Otherwise __GCONV_INCOMPLETE_INPUT. (ucs4le_internal_loop): Likewise. (ucs4le_internal_loop_unaligned): Likewise. * iconvdata/unicode.c (PREPARE_LOOP): Likewise. * iconvdata/utf-16.c (PREPARE_LOOP): Likewise. * iconvdata/utf-32.c (PREPARE_LOOP): Likewise. * iconv/loop.c (LOOPFCT): First test for empty input then for full output buffer.
* Update.Ulrich Drepper2002-06-281-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-26 Bruno Haible <bruno@clisp.org> * iconv/loop.c (STANDARD_FROM_LOOP_ERR_HANDLER): New macro. (STANDARD_TO_LOOP_ERR_HANDLER): Renamed from STANDARD_ERR_HANDLER. All callers changed. * iconv/gconv_simple.c (ascii_internal_loop): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (utf8_internal_loop): Likewise. (ucs2_internal_loop): Likewise. (internal_ucs2_loop): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. * iconvdata/unicode.c (BODY for TO_LOOP): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. * iconvdata/utf-16.c (BODY for TO_LOOP): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. * iconvdata/utf-32.c (BODY for TO_LOOP): Perform error handling like in STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. * iconvdata/big5.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. * iconvdata/iso-2022-jp.c (BODY for FROM_LOOP): Likewise. * iconvdata/8bit-gap.c (BODY for FROM_LOOP): Likewise. * iconvdata/8bit-generic.c (BODY for FROM_LOOP): Likewise. * iconvdata/ansi_x3.110.c (BODY for FROM_LOOP): Likewise. * iconvdata/armscii-8.c (BODY for FROM_LOOP): Likewise. * iconvdata/cp1255.c (BODY for FROM_LOOP): Likewise. * iconvdata/cp1258.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-cn.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-jisx0213.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-jp.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-kr.c (BODY for FROM_LOOP): Likewise. * iconvdata/euc-tw.c (BODY for FROM_LOOP): Likewise. * iconvdata/big5hkscs.c (BODY for FROM_LOOP): Likewise. * iconvdata/gb18030.c (BODY for FROM_LOOP): Likewise. * iconvdata/gbk.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-cn.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-jp-3.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso-2022-kr.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso646.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso_6937-2.c (BODY for FROM_LOOP): Likewise. * iconvdata/iso_6937.c (BODY for FROM_LOOP): Likewise. * iconvdata/johab.c (BODY for FROM_LOOP): Likewise. * iconvdata/shift_jisx0213.c (BODY for FROM_LOOP): Likewise. * iconvdata/sjis.c (BODY for FROM_LOOP): Likewise. * iconvdata/t.61.c (BODY for FROM_LOOP): Likewise. * iconvdata/uhc.c (BODY for FROM_LOOP): Likewise. * iconvdata/utf-7.c (BODY for FROM_LOOP): Likewise. * iconvdata/gbbig5.c (BODY for FROM_LOOP): Likewise. When ignoring an error, still set result = __GCONV_ILLEGAL_INPUT. (BODY for TO_LOOP): Likewise. * iconvdata/ibm930.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm932.c: Include <dlfcn.h> and <stdint.h>. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm933.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm935.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm937.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm939.c (BODY for FROM_LOOP): For error handling use STANDARD_FROM_LOOP_ERR_HANDLER. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/ibm943.c: Include <dlfcn.h> and <stdint.h>. (BODY for FROM_LOOP): Use STANDARD_FROM_LOOP_ERR_HANDLER for error handling. (BODY for TO_LOOP): Here use STANDARD_TO_LOOP_ERR_HANDLER. * iconvdata/gbgbk.c (BODY for FROM_LOOP): Update. * iconvdata/iso8859-1.c (BODY for TO_LOOP): Update. * iconvdata/tcvn5712-1.c (BODY for TO_LOOP): Update. 2002-06-28 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/dl-machine.h (elf_machine_load_address): Use local labels in assembler instructions.
* Update to LGPL v2.1.Andreas Jaeger2001-07-061-8/+8
| | | | | | | | | | | | | | 2001-07-06 Paul Eggert <eggert@twinsun.com> * manual/argp.texi: Remove ignored LGPL copyright notice; it's not appropriate for documentation anyway. * manual/libc-texinfo.sh: "Library General Public License" -> "Lesser General Public License". 2001-07-06 Andreas Jaeger <aj@suse.de> * All files under GPL/LGPL version 2: Place under LGPL version 2.1.
* Update.Ulrich Drepper2001-04-121-0/+270
2001-04-12 Bruno Haible <haible@clisp.cons.org> * iconvdata/TESTS2: New file. * iconvdata/run-iconv-test.sh: Also run tests from TESTS2. * iconvdata/testdata/alfabeta..UTF-8: New file. * iconvdata/testdata/alfabeta..UTF-16.BE: New file. * iconvdata/testdata/alfabeta..UTF-16.LE: New file. * iconvdata/testdata/alfabeta..UTF-32.BE: New file. * iconvdata/testdata/alfabeta..UTF-32.LE: New file. 2001-04-11 Bruno Haible <haible@clisp.cons.org> * iconvdata/utf-32.c: New file. * iconvdata/gconv-modules: Add entries for UTF-32, UTF-32LE, UTF-32BE. * iconvdata/Makefile (modules): Add UTF-32. (distribute): Add utf-32.c. 2001-04-11 Bruno Haible <haible@clisp.cons.org> * iconvdata/utf-16.c (PREPARE_LOOP): Initialize 'swap' after possibly changing it in the state. After incrementing 'inptr', store it back. * iconvdata/unicode.c (PREPARE_LOOP): After incrementing 'inptr', store it back. 2001-04-11 Bruno Haible <haible@clisp.cons.org> * iconvdata/utf-16.c (gconv_init): Use MAX_NEEDED_FROM, not MIN_NEEDED_FROM.