thodg/libiconv/lib/iconv_open1.h

Branch :


Log

Author Commit Date CI Message
19b6af5e 2023-04-03 04:12:01 Allow overriding the newline conversion for EBCDIC encodings. Reported by Mike Fulton <mikefultonpersonal@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-04/msg00009.html>. * include/iconv.h.in (ICONV_SURFACE_NONE, ICONV_SURFACE_EBCDIC_ZOS_UNIX): New macros. (ICONV_GET_FROM_SURFACE, ICONV_SET_FROM_SURFACE, ICONV_GET_TO_SURFACE, ICONV_SET_TO_SURFACE): New macros. * lib/converters.h (struct conv_struct): Add the fields isurface, osurface. (swap_x15_x25): New macro. * lib/iconv.c (iconv_open, iconv_open_into): Add local variables from_surface, to_surface. (ALL_SURFACES): New macro. (iconvctl): Adjust ICONV_TRIVIALP implementation. Implement the ICONV_{GET,SET}_{FROM,TO}_SURFACE requests. * lib/iconv_open1.h: Parse a /ZOS_UNIX surface specifier. Set from_surface, to_surface. * lib/iconv_open2.h: Copy the values of from_surface, to_surface into the conversion descriptor. * lib/ebcdic*.h (*_mbtowc): Test the isurface. If requested, call swap_x15_x25 right after fetching an input byte. (*_wctomb): Test the osurface. If requested, call swap_x15_x25 right before storing an output byte. * man/iconvctl.3 (REQUEST VALUES): Document the ICONV_{GET,SET}_{FROM,TO}_SURFACE requests. * src/iconv.c (main): If ICONV_EBCDIC_ZOS_UNIX is set, set the from/to surfaces accordingly. * man/iconv.1 (ENVIRONMENT): New section. * tests/check-ebcdic: New file. * tests/Makefile.in (check): Invoke it. (SOURCE_FILES): Add it. * NEWS: Mention the new functionality.
91f96be0 2021-06-06 11:51:12 Change the license of the library from LGPL 2.0 to LGPL 2.1.
0eb1068c 2020-08-31 23:43:18 Fix some -Wcast-qual warning, reported by clang.
3acb1179 2020-04-04 14:58:34 Change the license of the library from LGPL 2.0 to LGPL 2.1.
e54fc9c1 2018-09-17 18:28:56 Prefer https URLs where possible.
35064ed9 2018-05-04 21:27:39 Simplify code. Drop support for Borland C++ on Windows.
48f31c74 2012-02-12 20:54:51 Replace FSF snail-mail address with URL.
3cdff14a 2011-01-29 18:34:14 Simplify "wchar_t" handling on Cygwin 1.7.x.
c38bdb4f 2011-01-29 18:24:44 Adjust the meaning of "wchar_t" on native Windows systems.
75b3adba 2008-09-17 01:07:53 Part 1 of iconv_open().