Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
+++ libcfa/src/iostream.cfa	(revision 852a2f0628368381b2ab97fb5c68f2ed378a0e48)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar  5 15:56:16 2020
-// Update Count     : 834
+// Last Modified On : Wed Mar 11 14:35:35 2020
+// Update Count     : 860
 //
 
@@ -534,18 +534,20 @@
 #define IntegralFMTImpl128( T, SIGNED, CODE, IFMTNP, IFMTP ) \
 forall( dtype ostype | ostream( ostype ) ) \
-static void base10_128( ostype & os, _Ostream_Manip(T) fmt ) { \
-	if ( fmt.val > UINT64_MAX ) { \
-		base10_128( os, fmt.val / P10_UINT64 ); /* recursive */ \
-		_Ostream_Manip(unsigned long long int) fmt2 @= { (uint64_t)(fmt.val % P10_UINT64), 0, 19, 'u', { .all : 0 } }; \
-		fmt2.flags.nobsdp = true; \
-		printf( "fmt2 %c %lld %d\n", fmt2.base, fmt2.val, fmt2.all );	\
+static void base10_128( ostype & os, _Ostream_Manip(T) f ) { \
+	if ( f.val > UINT64_MAX ) { \
+		unsigned long long int lsig = f.val % P10_UINT64; \
+		f.val /= P10_UINT64; /* msig */ \
+		base10_128( os, f ); /* recursion */ \
+		_Ostream_Manip(unsigned long long int) fmt @= { lsig, 0, 19, 'u', { .all : 0 } }; \
+		fmt.flags.nobsdp = true; \
+		/* printf( "fmt1 %c %lld %d\n", fmt.base, fmt.val, fmt.all ); */ \
 		sepOff( os ); \
-		(ostype &)(os | fmt2); \
+		(ostype &)(os | fmt); \
 	} else { \
-		printf( "fmt %c %lld %d\n", fmt.base, (unsigned long long int)fmt.val, fmt.all ); \
-		_Ostream_Manip(SIGNED long long int) x @= { (unsigned long long int)fmt.val, fmt.wd, fmt.pc, fmt.base, { .all : fmt.all } }; \
-		(ostype &)(os | x); \
+		/* printf( "fmt2 %c %lld %d\n", f.base, (unsigned long long int)f.val, f.all ); */ \
+		_Ostream_Manip(SIGNED long long int) fmt @= { (SIGNED long long int)f.val, f.wd, f.pc, f.base, { .all : f.all } }; \
+		(ostype &)(os | fmt); \
 	} /* if */ \
-} /* base10_128 */						   \
+} /* base10_128 */ \
 forall( dtype ostype | ostream( ostype ) ) { \
 	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
@@ -564,4 +566,5 @@
 				if ( f.base == 'b' | f.base == 'B' ) { \
 					if ( f.wd > 64 ) fmt.wd = f.wd - 64; \
+					if ( f.flags.pc && f.pc > 64 ) fmt.pc = f.pc - 64; \
 					fmt2.wd = 64; \
 					(ostype &)(os | fmt | "" | fmt2); \
@@ -569,4 +572,5 @@
 					fmt.val = (unsigned long long int)fmt.val >> 2; \
 					if ( f.wd > 21 ) fmt.wd = f.wd - 21; \
+					if ( f.flags.pc && f.pc > 21 ) fmt.pc = f.pc - 21; \
 					fmt2.wd = 1; \
 					fmt2.val = ((msig & 0x3) << 1) + 1; \
@@ -578,9 +582,10 @@
 				} else { \
 					if ( f.flags.left ) { \
-						if ( f.wd > 16 ) fmt2.wd = f.wd - 16;	\
-						fmt.wd = 16;							\
+						if ( f.wd > 16 ) fmt2.wd = f.wd - 16; \
+						fmt.wd = 16; \
 					} else { \
-						if ( f.wd > 16 ) fmt.wd = f.wd - 16;	\
-						fmt2.wd = 16;							\
+						if ( f.wd > 16 ) fmt.wd = f.wd - 16; \
+						if ( f.flags.pc && f.pc > 16 ) fmt.pc = f.pc - 16; \
+						fmt2.wd = 16; \
 					} /* if */ \
 					(ostype &)(os | fmt | "" | fmt2); \
@@ -588,4 +593,7 @@
 			} /* if */ \
 		} else { \
+			if ( CODE == 'd' ) { \
+				if ( f.val < 0 )  { fmt( os, "-" ); sepOff( os ); f.val = -f.val; f.flags.sign = false; } \
+			} /* if */ \
 			base10_128( os, f ); \
 		} /* if */ \
