Commit Graph

7 Commits

Author SHA1 Message Date
Yaakov Selkowitz 0bda30e1ff ansification: remove _CONST
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:08 -06:00
Corinna Vinschen 8c6e4fec14 Actually return value from __cp_index
Fixes Coverty CID 153470

Also drop redundant declaration of __cp_index.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-10-22 21:08:44 +02:00
Corinna Vinschen 5eb556c849 * libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define.
(_CTYPE_GEORGIAN_PS_255): Define.
	(_CTYPE_PT154_128_254): Define.
	(_CTYPE_PT154_255): Define.
	(__ctype_cp): Add array members for above ctype definitions.
	* libc/locale/locale.c (loadlocale): Make TIS-620 charset name
	available for all targets.  Add guards for setting the conversion
	function pointers.  Add support for GEORGIAN-PS and PT154 charsets.
	Change documentation to reflect current behaviour more closely.
	* libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
	"CP101" to "GEORGIAN-PS" and "CP102" to "PT154".
	* libc/stdlib/sb_charsets.c (__cp_conv): Add conversion arrays
	for GEORGIAN-PS and PT154.
	(__cp_index): Map invalid Windows codepage number 101 to
	GEORGIAN-PS conversion array, 102 to PT154 conversion array.
2010-02-06 18:28:33 +00:00
Jeff Johnston 162a23c504 2009-08-24 Corinna Vinschen <corinna@vinschen.de>
* libc/locale/locale.c: Update documentation.
        (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866.

2009-08-24  Andy Koppe  <andy.koppe@gmail.com>

        * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866)
        and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables.
        * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
2009-08-24 22:11:11 +00:00
Corinna Vinschen c28545227a * libc/ctype/ctype_.c (_CTYPE_DATA_128_255): Rename from
_CTYPE_DATA_128_256.
	* libc/ctype/ctype_cp.h: Split off all character class values for
	character 255 from the rest of the definitions.
	(__ctype_cp): Use the new definitions.  Make sure that the table
	always contains 0 for EOF (-1).
	* libc/ctype/ctype_iso.h: Ditto.
2009-04-21 20:09:01 +00:00
Corinna Vinschen a29a769342 * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Remove _B flag from TAB.
* libc/ctype/ctype_cp.h: Mark non-cased letters in tables for codepages
	720, 862, 874, 1255, and 1256 to _U|_L.  Fix a couple of incorrect
	class mappings.
	* libc/ctype/ctype_iso.h: Mark non-cased letters in ISO-8859 tables
	6, 8, and 11 to _U|_L.  Fix a couple of incorrect class mappings.
	* libc/ctype/isblank.c (isblank): Special case TAB.
	* libc/ctype/islower.c (islower): Check explicitely for _L flag only
	in (_U|_L).
	* libc/ctype/isupper.c (isupper): Ditto, but check for _U flag.
	* libc/include/ctype.h (islower): Same in macro.
	(isupper): Ditto.
	(isblank): Special case TAB.  Redefine macro for GCC only.
2009-04-09 10:37:58 +00:00
Corinna Vinschen 4bc42c05aa * libc/ctype/Makefile.am: Remove _tolower.c and _toupper.c
source files.  Add a dependency rule for ctype_o to note
	changes in ctype_iso.h and ctype_cp.h.
	* libc/ctype/Makefile.in: Regenerate.
	* libc/ctype/_tolower.c: Remove file.
	* libc/ctype/_toupper.c: Remove file.
	* libc/ctype/ctype_.c: Make sure ALLOW_NEGATIVE_CTYPE_INDEX
	is always defined on Cygwin.
	(_ctype_b): Don't make `static const' on Cygwin.
	(ctype_iso.h): Include if _MB_EXTENDED_CHARSETS_ISO is set.
	(ctype_cp.h): Include if _MB_EXTENDED_CHARSETS_WINDOWS is set.
	(__ctype_ptr): Drop definition.
	(__ctype_ptr__): De-constify.  Mark as __EXPORT symbol.
	(_ctype_): Add Cygwin-specifc asm define.
	(__set_ctype): New function to set __ctype_ptr__ according to
	current charset.
	* libc/ctype/ctype_cp.h: New file containing Windows codepage
	specific character class tables.
	* libc/ctype/ctype_iso.h: New file containing ISO-8859-x
	specific character class tables.
	* libc/ctype/tolower.c (tolower): Reimplement to support any singlebyte
	charset if one of the extended charsets is enabled.
	* libc/ctype/toupper.c (toupper): Ditto.
	* libc/include/ctype.h (_tolower): Define as macro per POSIX.
	(_toupper): Ditto.
	(__ctype_ptr__): De-constify.
	(toupper): Disable macro on systems supporting extended charsets.
	(tolower): Ditto.
	* libc/include/sys/config.h (__EXPORT): Define empty if not defined.
	* libc/locale/locale.c (__mb_cur_max): Mark as __EXPORT symbol.
	(__set_ctype): Declare unconditionally.
	(loadlocale): Remove __CYGWIN__ guard around __set_ctype call.
2009-03-31 09:31:38 +00:00