about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--localedata/ChangeLog4
-rw-r--r--localedata/tst-fmon.data71
-rw-r--r--stdio-common/tst-obprintf.c10
4 files changed, 50 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 961ca0fd42..6e8e2a33ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,15 @@
 2000-03-27  Ulrich Drepper  <drepper@redhat.com>
 
+	* stdio-common/tst-obprintf.c (main): Add another check to see
+	obstack_printf handling all possible beginnings of the block
+	inside an obstack chunk.
+
 	* locale/programs/localedef.c: Use __malloc_initialize_hook to
 	install mcheck handler.
 
 	* libio/obprintf.c (_IO_obstack_vprintf): Fix one more memory
 	handling problem.
+
 2000-03-27  Roland McGrath  <roland@baalperazim.frob.com>
 
 	* stdio-common/tmpfile.c: Use <shlib-compat.h> macros.
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index f663a95517..5b4abcd1be 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,7 @@
+2000-03-27  Ulrich Drepper  <drepper@redhat.com>
+
+	* tst-fmon.data: Update test after last strfmon change.
+
 2000-03-15  Andreas Jaeger  <aj@suse.de>
 
 	* locales/sl_SI: Fix entries for june and july.
diff --git a/localedata/tst-fmon.data b/localedata/tst-fmon.data
index 2a1cb3ab62..d7e80734d1 100644
--- a/localedata/tst-fmon.data
+++ b/localedata/tst-fmon.data
@@ -1,5 +1,5 @@
 # Test data for test-strfmon, which checks it's implementation in glibc
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
 #
@@ -22,7 +22,7 @@
 # for strfmon.  Fields are separated by TABs.  Lines that start with a
 # '#' are comments and are ignored.
 #
-# Field Deskription
+# Field Description
 # #1    locale which is to be checked
 # #2    format string which is fed into strfmon
 # #3    double value that is used for formatting
@@ -30,39 +30,38 @@
 #
 # First the implementation without any locale-dependent data
 # - no currency symbol is printed, formatting is somewhat standard
-C			%n	1.23		 1.23
+C			%n	1.23		1.23
 C			%n	-1.23		-1.23
-C			%n	0		 0.00
+C			%n	0		0.00
 C			%%	0		%
-C			*%n*	1.23		* 1.23*
+C			*%n*	1.23		*1.23*
 C			%9n	1.23		     1.23
-C			%#9n	1.23		         1.23
-C			%=*#9n	1.23		 ********1.23
+C			%#9n	1.23		        1.23
+C			%=*#9n	1.23		********1.23
 #
 # check both the german locale and strfmon with that data
 #
-de_DE.ISO-8859-1	%n	1.23		 DM1,23
+de_DE.ISO-8859-1	%n	1.23		DM1,23
 de_DE.ISO-8859-1	%n	-1.23		-DM1,23
-de_DE.ISO-8859-1	%n	1234.56		 DM1.234,56
+de_DE.ISO-8859-1	%n	1234.56		DM1.234,56
 de_DE.ISO-8859-1	%11n	123.45		   DM123,45
 de_DE.ISO-8859-1	%11n	-123.45		  -DM123,45
 de_DE.ISO-8859-1	%11n	3456.781	 DM3.456,78
-de_DE.ISO-8859-1	%^n	1234.56		 DM1234,56
-de_DE.ISO-8859-1	%+n	1234.56		 DM1.234,56
+de_DE.ISO-8859-1	%^n	1234.56		DM1234,56
+de_DE.ISO-8859-1	%+n	1234.56		DM1.234,56
 de_DE.ISO-8859-1	%+n	-1234.56	-DM1.234,56
-# The following line ends with a blank
-de_DE.ISO-8859-1	%(n	1234.56		 DM1.234,56 
+de_DE.ISO-8859-1	%(n	1234.56		DM1.234,56
 de_DE.ISO-8859-1	%(n	-1234.56	(DM1.234,56)
-de_DE.ISO-8859-1	%^n	1234.56		 DM1234,56
-de_DE.ISO-8859-1	%i	1.23		 DEM 1,23
+de_DE.ISO-8859-1	%^n	1234.56		DM1234,56
+de_DE.ISO-8859-1	%i	1.23		DEM 1,23
 de_DE.ISO-8859-1	%i	-1.23		-DEM 1,23
-de_DE.ISO-8859-1	%i	1234.56		 DEM 1.234,56
-de_DE.ISO-8859-1	%^i	1234.56		 DEM 1234,56
-de_DE.ISO-8859-1	%+i	1234.56		 DEM 1.234,56
+de_DE.ISO-8859-1	%i	1234.56		DEM 1.234,56
+de_DE.ISO-8859-1	%^i	1234.56		DEM 1234,56
+de_DE.ISO-8859-1	%+i	1234.56		DEM 1.234,56
 de_DE.ISO-8859-1	%+i	-1234.56	-DEM 1.234,56
-de_DE.ISO-8859-1	%(i	1234.56		 DEM 1.234,56 
+de_DE.ISO-8859-1	%(i	1234.56		DEM 1.234,56
 de_DE.ISO-8859-1	%(i	-1234.56	(DEM 1.234,56)
-de_DE.ISO-8859-1	%^i	1234.56		 DEM 1234,56
+de_DE.ISO-8859-1	%^i	1234.56		DEM 1234,56
 de_DE.ISO-8859-1	%#5n	123.45		 DM   123,45
 de_DE.ISO-8859-1	%#5n	-123.45		-DM   123,45
 de_DE.ISO-8859-1	%#5n	3456.781	 DM 3.456,78
@@ -81,26 +80,22 @@ de_DE.ISO-8859-1	%^#5.0n	3456.781	 DM 3457
 de_DE.ISO-8859-1	%^#5.4n	123.45		 DM  123,4500
 de_DE.ISO-8859-1	%^#5.4n	-123.45		-DM  123,4500
 de_DE.ISO-8859-1	%^#5.4n	3456.781	 DM 3456,7810
-# This line is followed by a blank!
-de_DE.ISO-8859-1	%(#5n	123.45		 DM   123,45 
+de_DE.ISO-8859-1	%(#5n	123.45		DM   123,45
 de_DE.ISO-8859-1	%(#5n	-123.45		(DM   123,45)
-# This line is followed by a blank!
-de_DE.ISO-8859-1	%(#5n	3456.781	 DM 3.456,78 
-# This line is followed by a blank!
-de_DE.ISO-8859-1	%!(#5n	123.45		    123,45 
+de_DE.ISO-8859-1	%(#5n	3456.781	DM 3.456,78
+de_DE.ISO-8859-1	%!(#5n	123.45		   123,45
 de_DE.ISO-8859-1	%!(#5n	-123.45		(   123,45)
-# This line is followed by a blank!
-de_DE.ISO-8859-1	%!(#5n	3456.781	  3.456,78 
+de_DE.ISO-8859-1	%!(#5n	3456.781	 3.456,78
 #
 # check both the en_US locale and strfmon with that data
 # a lot of this checks are created from a strfmon(3) man-page.
 #
-en_US.ISO-8859-1	%n	123.45		 $123.45
+en_US.ISO-8859-1	%n	123.45		$123.45
 en_US.ISO-8859-1	%n	-123.45		-$123.45
-en_US.ISO-8859-1	%n	3456.781	 $3,456.78
-en_US.ISO-8859-1	%i	123.45		 USD 123.45
+en_US.ISO-8859-1	%n	3456.781	$3,456.78
+en_US.ISO-8859-1	%i	123.45		USD 123.45
 en_US.ISO-8859-1	%i	-123.45		-USD 123.45
-en_US.ISO-8859-1	%i	3456.781	 USD 3,456.78
+en_US.ISO-8859-1	%i	3456.781	USD 3,456.78
 en_US.ISO-8859-1	%11n	123.45		    $123.45
 en_US.ISO-8859-1	%11n	-123.45		   -$123.45
 en_US.ISO-8859-1	%11n	3456.781	  $3,456.78
@@ -119,16 +114,12 @@ en_US.ISO-8859-1	%^#5.0n	3456.781	 $ 3457
 en_US.ISO-8859-1	%^#5.4n	123.45		 $  123.4500
 en_US.ISO-8859-1	%^#5.4n	-123.45		-$  123.4500
 en_US.ISO-8859-1	%^#5.4n	3456.781	 $ 3456.7810
-# This line is followed by a blank!
-en_US.ISO-8859-1	%(#5n	123.45		 $   123.45 
+en_US.ISO-8859-1	%(#5n	123.45		$   123.45
 en_US.ISO-8859-1	%(#5n	-123.45		($   123.45)
-# This line is followed by a blank!
-en_US.ISO-8859-1	%(#5n	3456.781	 $ 3,456.78 
-# This line is followed by a blank!
-en_US.ISO-8859-1	%!(#5n	123.45		    123.45 
+en_US.ISO-8859-1	%(#5n	3456.781	$ 3,456.78
+en_US.ISO-8859-1	%!(#5n	123.45		   123.45
 en_US.ISO-8859-1	%!(#5n	-123.45		(   123.45)
-# This line is followed by a blank!
-en_US.ISO-8859-1	%!(#5n	3456.781	  3,456.78 
+en_US.ISO-8859-1	%!(#5n	3456.781	 3,456.78
 en_US.ISO-8859-1	%#5n	123.45		 $   123.45
 en_US.ISO-8859-1	%#5n	-123.45		-$   123.45
 en_US.ISO-8859-1	%#5n	3456.781	 $ 3,456.78
diff --git a/stdio-common/tst-obprintf.c b/stdio-common/tst-obprintf.c
index 5d7089b268..39e8fdab6f 100644
--- a/stdio-common/tst-obprintf.c
+++ b/stdio-common/tst-obprintf.c
@@ -25,6 +25,16 @@ main (void)
 	obstack_finish (&ob);
     }
 
+  /* Another loop where we finish all objects, each of size 1.  This will
+     manage to call `obstack_print' with all possible positions inside
+     an obstack chunk.  */
+  for (n = 0; n < 40000; ++n)
+    {
+      mcheck_check_all ();
+      obstack_printf (&ob, "%c", 'a' + n % 26);
+      obstack_finish (&ob);
+    }
+
   /* And a final check.  */
   mcheck_check_all ();