about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-26 23:00:05 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-26 23:00:05 +0000
commit476b6d7fa4b5e47b5f07431b8a1af05a17489040 (patch)
tree46e456059fd0f6bb99f79ccdab352e0a092aa238
parent9f4fa5bc33f7c116e35e700b6ad2a3f5ab16a405 (diff)
downloadglibc-476b6d7fa4b5e47b5f07431b8a1af05a17489040.tar.gz
glibc-476b6d7fa4b5e47b5f07431b8a1af05a17489040.tar.xz
glibc-476b6d7fa4b5e47b5f07431b8a1af05a17489040.zip
Update.
2000-07-26  Ulrich Drepper  <drepper@redhat.com>

	* libio/iofwide.c: Enable transliteration for conversion from wchar_t
	by default.
	* locale/C-ctype.c: Likewise.
	* wcsmbs/wcsmbsload.c: Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--libio/iofwide.c9
-rw-r--r--locale/C-ctype.c4
-rw-r--r--locale/C-translit.h.in2
-rw-r--r--localedata/ChangeLog2
-rw-r--r--wcsmbs/wcsmbsload.c4
6 files changed, 21 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b293da563..0edb79291d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-07-26  Ulrich Drepper  <drepper@redhat.com>
+
+	* libio/iofwide.c: Enable transliteration for conversion from wchar_t
+	by default.
+	* locale/C-ctype.c: Likewise.
+	* wcsmbs/wcsmbsload.c: Likewise.
+
 2000-07-26  Greg McGary  <greg@mcgary.org>
 
 	* Makeconfig (+link-bounded, link-libc-bounded,
diff --git a/libio/iofwide.c b/libio/iofwide.c
index c0ee083029..ae4f63f454 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -35,6 +35,7 @@
 # include <langinfo.h>
 # include <locale/localeinfo.h>
 # include <wcsmbs/wcsmbsload.h>
+# include <iconv/gconv_int.h>
 #endif
 
 
@@ -76,6 +77,12 @@ struct _IO_codecvt __libio_codecvt =
 };
 
 
+static struct __gconv_trans_data libio_translit =
+{
+  .__trans_fct = __gconv_transliterate
+};
+
+
 /* Return orientation of stream.  If mode is nonzero try to change
    the orientation first.  */
 #undef _IO_fwide
@@ -134,7 +141,7 @@ _IO_fwide (fp, mode)
 	cc->__cd_out.__cd.__data[0].__statep = &fp->_wide_data->_IO_state;
 
 	/* XXX For now no transliteration.  */
-	cc->__cd_out.__cd.__data[0].__trans = NULL;
+	cc->__cd_out.__cd.__data[0].__trans = &libio_translit;
       }
 #else
 # error "somehow determine this from LC_CTYPE"
diff --git a/locale/C-ctype.c b/locale/C-ctype.c
index 66f2d21598..0b960d9b59 100644
--- a/locale/C-ctype.c
+++ b/locale/C-ctype.c
@@ -343,9 +343,9 @@ const char _nl_C_LC_CTYPE_width[256] =
 const struct locale_data _nl_C_LC_CTYPE =
 {
   _nl_C_name,
-  NULL, 0, 0, /* no file mapped */
+  NULL, 0, 0,	/* no file mapped */
   UNDELETABLE,
-  0,
+  1,		/* Enable transliteration by default.  */
   NULL,
   66,
   {
diff --git a/locale/C-translit.h.in b/locale/C-translit.h.in
index e2f711ea59..4734789ecb 100644
--- a/locale/C-translit.h.in
+++ b/locale/C-translit.h.in
@@ -1,4 +1,4 @@
-/* Transliteration for the C locale.
+/* Transliteration for the C locale.  -*-C-*-
    Copyright (C) 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 7a1debfd69..822fb1fe83 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,7 +1,7 @@
 2000-07-26  Ulrich Drepper  <drepper@redhat.com>
 
 	* charmaps/BIG5: New file.
-	Contributed by Tung-Han Hsieh <thhsieh@twcpro.phys.ntu.edu.tw>.Update.
+	Contributed by Tung-Han Hsieh <thhsieh@twcpro.phys.ntu.edu.tw>.
 
 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
 
diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
index 51c7ef5051..ea246032d5 100644
--- a/wcsmbs/wcsmbsload.c
+++ b/wcsmbs/wcsmbsload.c
@@ -41,7 +41,7 @@ static struct __gconv_step to_wc =
   .__shlib_handle = NULL,
   .__modname = NULL,
   .__counter = INT_MAX,
-  .__from_name = "ANSI_X3.4-1968//",
+  .__from_name = "ANSI_X3.4-1968//TRANSLIT",
   .__to_name = "INTERNAL",
   .__fct = __gconv_transform_ascii_internal,
   .__init_fct = NULL,
@@ -60,7 +60,7 @@ static struct __gconv_step to_mb =
   .__modname = NULL,
   .__counter = INT_MAX,
   .__from_name = "INTERNAL",
-  .__to_name = "ANSI_X3.4-1968//",
+  .__to_name = "ANSI_X3.4-1968//TRANSLIT",
   .__fct = __gconv_transform_internal_ascii,
   .__init_fct = NULL,
   .__end_fct = NULL,