about summary refs log tree commit diff
path: root/localedata/tests-mbwc/dat_wcswidth.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-28 04:27:24 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-28 04:27:24 +0000
commit0e16ecfa1e7689c0b3be626f9a3441ebb5710c70 (patch)
tree12a793be9d9a1f7a4a911239194bae33470dcb23 /localedata/tests-mbwc/dat_wcswidth.c
parent37696206076f6f075542adfdc4b1fe49100e9f32 (diff)
downloadglibc-0e16ecfa1e7689c0b3be626f9a3441ebb5710c70.tar.gz
glibc-0e16ecfa1e7689c0b3be626f9a3441ebb5710c70.tar.xz
glibc-0e16ecfa1e7689c0b3be626f9a3441ebb5710c70.zip
Update.
	* locale/programs/ld-ctype.c (ctype_finish): Take all characters from
	the input charset into account when generating the hash table.
	(allocate_arrays): Correct setting default width.  Not all empty slots
	in the table are filled, only those not covert explicitly by the
	locale description and in the charset.

	* stdio-common/vfscanf.c: Make sure to always return WEOF and EOF for
	wide character version.
	For %C handling, test correct pointer variable for NULL.

	* wcsmbs/wctob.c: Handle WEOF special.

	* wcsmbs/wcwidth.h: 0xff in width array means invalid character.

	* wctype/wctype.h: Protect gcc-isms with __extension__.  Avoid
	always-true test to avoid warning.
Diffstat (limited to 'localedata/tests-mbwc/dat_wcswidth.c')
-rw-r--r--localedata/tests-mbwc/dat_wcswidth.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/localedata/tests-mbwc/dat_wcswidth.c b/localedata/tests-mbwc/dat_wcswidth.c
index f8d51341d7..a1c7076e60 100644
--- a/localedata/tests-mbwc/dat_wcswidth.c
+++ b/localedata/tests-mbwc/dat_wcswidth.c
@@ -64,10 +64,10 @@ TST_WCSWIDTH tst_wcswidth_loc [] = {
       { /*input.*/ { { 0x00C1,0x00FF,0x0000 },		 2 },  /* 18 */
 	/*expect*/ { 0,0,1,2				   },
       },
-      { /*input.*/ { { 0x00C1,0x3042,0x0000 },		 2 },  /* 19 */	  /* <WAIVER> */  /* returns 2 */
+      { /*input.*/ { { 0x00C1,0x3042,0x0000 },		 2 },  /* 19 */
 	/*expect*/ { 0,0,1,-1				   },
       },
-      { /*input.*/ { { 0x00C1,0x3044,0x0000 },		 2 },  /* 20 */	  /* <WAIVER> */  /* returns 2 */
+      { /*input.*/ { { 0x00C1,0x3044,0x0000 },		 2 },  /* 20 */
 	/*expect*/ { 0,0,1,-1				   },
       },
       { is_last: 1 }
@@ -85,12 +85,21 @@ TST_WCSWIDTH tst_wcswidth_loc [] = {
       { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 },	 2 },  /* 03 */
 	/*expect*/ { 0,0,1,2				   },
       },
+#ifdef SHOJI_IS_RIGHT
       { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 },	 3 },  /* 04 */
 	/*expect*/ { 0,0,1,3				   },
       },
       { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 },	 4 },  /* 05 */
 	/*expect*/ { 0,0,1,3				   },
       },
+#else
+      { /*input.*/ { { 0x0041,0x0042,0x00C3,0x0000 },	 3 },  /* 04 */
+	/*expect*/ { 0,0,1,-1				   },
+      },
+      { /*input.*/ { { 0x0041,0x0042,0x0043,0x0000 },	 4 },  /* 05 */
+	/*expect*/ { 0,0,1,3				   },
+      },
+#endif
       { /*input.*/ { { 0x0000 },			 1 },  /* 06 */
 	/*expect*/ { 0,0,1,0				   },
       },
@@ -124,17 +133,24 @@ TST_WCSWIDTH tst_wcswidth_loc [] = {
       { /*input.*/ { { 0x0041,0x00A0,0x0000 },		 2 },  /* 16 */
 	/*expect*/ { 0,0,1,-1				   },
       },
+#ifdef SHOJI_IS_RIGHT
       { /*input.*/ { { 0x0041,0x00A1,0x0000 },		 2 },  /* 17 */
 	/*expect*/ { 0,0,1,2				   },
       },
       { /*input.*/ { { 0x0041,0x00FF,0x0000 },		 2 },  /* 18 */
 	/*expect*/ { 0,0,1,2				   },
       },
-      /* <WAIVER> */  /* returns 2 */
+#else
+      { /*input.*/ { { 0x0041,0x007E,0x0000 },		 2 },  /* 17 */
+	/*expect*/ { 0,0,1,2				   },
+      },
+      { /*input.*/ { { 0x0041,0x0020,0x0000 },		 2 },  /* 18 */
+	/*expect*/ { 0,0,1,2				   },
+      },
+#endif
       { /*input.*/ { { 0x0041,0x3042,0x0000 },		 2 },  /* 19 */
 	/*expect*/ { 0,0,1,-1				   },
       },
-      /* <WAIVER> */  /* returns 2 */
       { /*input.*/ { { 0x0041,0x3044,0x0000 },		 2 },  /* 20 */
 	/*expect*/ { 0,0,1,-1				   },
       },
@@ -192,10 +208,17 @@ TST_WCSWIDTH tst_wcswidth_loc [] = {
       { /*input.*/ { { 0x0041,0x00A0,0x0000 },		 2 },  /* 16 */
 	/*expect*/ { 0,0,1,-1				   },
       },
+#ifdef NO_WAIVER
       /* <NO_WAIVER> */	 /* returns 3 */
       { /*input.*/ { { 0x0041,0x00A1,0x0000 },		 2 },  /* 17 */
 	/*expect*/ { 0,0,1,-1				   },
       },
+#else
+      /* XXX U00A1 is valid -> /x8f/xa2/xc4 in JIS X 0212 */
+      { /*input.*/ { { 0x0041,0x00A1,0x0000 },		 2 },  /* 17 */
+	/*expect*/ { 0,0,1,3				   },
+      },
+#endif
       { /*input.*/ { { 0x0041,0xFF71,0x0000 },		 2 },  /* 18 */
 	/*expect*/ { 0,0,1,2				   },
       },