Index: libcfa/src/fstream.hfa
===================================================================
--- libcfa/src/fstream.hfa	(revision 5b2b42e67b309c35db8b68a76cd9889a3e28e687)
+++ libcfa/src/fstream.hfa	(revision 4783ff63a739602e9bcfdd2e4da28ce2dcbc57df)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Feb  7 19:00:51 2020
-// Update Count     : 174
+// Last Modified On : Mon Feb 17 08:29:23 2020
+// Update Count     : 175
 //
 
@@ -67,5 +67,5 @@
 void close( ofstream & );
 ofstream & write( ofstream &, const char data[], size_t size );
-int fmt( ofstream &, const char format[], ... );
+int fmt( ofstream &, const char format[], ... ) __attribute__(( format(printf, 2, 3) ));
 
 void ?{}( ofstream & os );
@@ -97,5 +97,5 @@
 ifstream & read( ifstream & is, char * data, size_t size );
 ifstream & ungetc( ifstream & is, char c );
-int fmt( ifstream &, const char format[], ... );
+int fmt( ifstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
 
 void ?{}( ifstream & is );
Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision 5b2b42e67b309c35db8b68a76cd9889a3e28e687)
+++ libcfa/src/iostream.cfa	(revision 4783ff63a739602e9bcfdd2e4da28ce2dcbc57df)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Feb  7 18:48:38 2020
-// Update Count     : 825
+// Last Modified On : Thu Feb 20 15:30:58 2020
+// Update Count     : 827
 //
 
@@ -159,4 +159,44 @@
 		(ostype &)(os | ulli); ends( os );
 	} // ?|?
+
+#if defined( __SIZEOF_INT128__ )
+	//      UINT64_MAX 18_446_744_073_709_551_615_ULL
+	#define P10_UINT64 10_000_000_000_000_000_000_ULL	// 19 zeroes
+
+	static void base10_128( ostype & os, unsigned int128 val ) {
+		if ( val > UINT64_MAX ) {
+			base10_128( os, val / P10_UINT64 );			// recursive
+			fmt( os, "%.19lu", (uint64_t)(val % P10_UINT64) );
+		} else {
+			fmt( os, "%lu", (uint64_t)val );
+		} // if
+	} // base10_128
+
+	static void base10_128( ostype & os, int128 val ) {
+		if ( val < 0 ) {
+			fmt( os, "-" );								// leading negative sign
+			val = -val;
+		} // if
+		base10_128( os, (unsigned int128)val );			// print zero/positive value
+	} // base10_128
+
+	ostype & ?|?( ostype & os, int128 llli ) {
+		if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
+		base10_128( os, llli );
+		return os;
+	} // ?|?
+	void & ?|?( ostype & os, int128 llli ) {
+		(ostype &)(os | llli); ends( os );
+	} // ?|?
+
+	ostype & ?|?( ostype & os, unsigned int128 ullli ) {
+		if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
+		base10_128( os, ullli );
+		return os;
+	} // ?|?
+	void & ?|?( ostype & os, unsigned int128 ullli ) {
+		(ostype &)(os | ullli); ends( os );
+	} // ?|?
+#endif // __SIZEOF_INT128__
 
 	#define PrintWithDP( os, format, val, ... ) \
@@ -464,10 +504,10 @@
 \
 		if ( ! f.flags.pc ) {							/* no precision */ \
-			/* printf( "%s\n", &fmtstr[star] ); */ \
 			fmtstr[sizeof(IFMTNP)-2] = f.base;			/* sizeof includes '\0' */ \
+			/* printf( "%s %c %c\n", &fmtstr[star], f.base, CODE ); */ \
 			fmt( os, &fmtstr[star], f.wd, f.val ); \
 		} else {										/* precision */ \
 			fmtstr[sizeof(IFMTP)-2] = f.base;			/* sizeof includes '\0' */ \
-			/* printf( "%s\n", &fmtstr[star] ); */ \
+			/* printf( "%s %c %c\n", &fmtstr[star], f.base, CODE ); */ \
 			fmt( os, &fmtstr[star], f.wd, f.pc, f.val ); \
 		} /* if */ \
@@ -487,4 +527,74 @@
 IntegralFMTImpl( signed long long int, 'd', "%    *ll ", "%    *.*ll " )
 IntegralFMTImpl( unsigned long long int, 'u', "%    *ll ", "%    *.*ll " )
+
+
+#if defined( __SIZEOF_INT128__ )
+// Default prefix for non-decimal prints is 0b, 0, 0x.
+#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 ) { \
+		fmt.val /= P10_UINT64; \
+		base10_128( os, fmt ); /* 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 );	\
+		sepOff( os ); \
+		(ostype &)(os | fmt2); \
+	} else { \
+		printf( "fmt %c %lld %d\n", fmt.base, fmt.val, fmt.all ); \
+		(ostype &)(os | fmt); \
+	} /* if */ \
+} /* base10_128 */						   \
+forall( dtype ostype | ostream( ostype ) ) { \
+	ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
+		if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) ); \
+\
+		if ( f.base == 'b' | f.base == 'o' | f.base == 'x' | f.base == 'X' ) { \
+			unsigned long long int msig = (unsigned long long int)(f.val >> 64); \
+			unsigned long long int lsig = (unsigned long long int)(f.val); \
+			_Ostream_Manip(SIGNED long long int) fmt @= { msig, f.wd, f.pc, f.base, { .all : f.all } }; \
+			_Ostream_Manip(unsigned long long int) fmt2 @= { lsig, 0, 0, f.base, { .all : 0 } }; \
+			if ( msig == 0 ) { \
+				fmt.val = lsig; \
+				(ostype &)(os | fmt); \
+			} else { \
+				fmt2.flags.pad0 = fmt2.flags.nobsdp = true;	\
+				if ( f.base == 'b' ) { \
+					if ( f.wd > 64 ) fmt.wd = f.wd - 64; \
+					fmt2.wd = 64; \
+					(ostype &)(os | fmt | "" | fmt2); \
+				} else if ( f.base == 'o' ) { \
+					fmt.val = (unsigned long long int)fmt.val >> 2; \
+					if ( f.wd > 21 ) fmt.wd = f.wd - 21; \
+					fmt2.wd = 1; \
+					fmt2.val = ((msig & 0x3) << 1) + 1; \
+					(ostype &)(os | fmt | "" | fmt2); \
+					sepOff( os ); \
+					fmt2.wd = 21; \
+					fmt2.val = lsig & 0x7fffffffffffffff; \
+					(ostype &)(os | fmt2); \
+				} else { \
+					if ( f.flags.left ) { \
+						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 */ \
+					(ostype &)(os | fmt | "" | fmt2); \
+				} /* if */ \
+			} /* if */ \
+		} else { \
+			base10_128( os, f ); \
+		} /* if */ \
+		return os; \
+	} /* ?|? */ \
+	void ?|?( ostype & os, _Ostream_Manip(T) f ) { (ostype &)(os | f); ends( os ); } \
+} // distribution
+
+IntegralFMTImpl128( int128, signed, 'd', "%    *ll ", "%    *.*ll " )
+IntegralFMTImpl128( unsigned int128, unsigned, 'u', "%    *ll ", "%    *.*ll " )
+#endif // __SIZEOF_INT128__
 
 //*********************************** floating point ***********************************
Index: libcfa/src/iostream.hfa
===================================================================
--- libcfa/src/iostream.hfa	(revision 5b2b42e67b309c35db8b68a76cd9889a3e28e687)
+++ libcfa/src/iostream.hfa	(revision 4783ff63a739602e9bcfdd2e4da28ce2dcbc57df)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Feb  7 17:53:52 2020
-// Update Count     : 336
+// Last Modified On : Thu Feb 20 15:30:56 2020
+// Update Count     : 337
 //
 
@@ -98,4 +98,10 @@
 	ostype & ?|?( ostype &, unsigned long long int );
 	void ?|?( ostype &, unsigned long long int );
+#if defined( __SIZEOF_INT128__ )
+	ostype & ?|?( ostype &, int128 );
+	void ?|?( ostype &, int128 );
+	ostype & ?|?( ostype &, unsigned int128 );
+	void ?|?( ostype &, unsigned int128 );
+#endif // __SIZEOF_INT128__
 
 	ostype & ?|?( ostype &, float );
@@ -206,4 +212,8 @@
 IntegralFMTDecl( signed long long int, 'd' )
 IntegralFMTDecl( unsigned long long int, 'u' )
+#if defined( __SIZEOF_INT128__ )
+IntegralFMTDecl( int128, 'd' )
+IntegralFMTDecl( unsigned int128, 'u' )
+#endif
 
 //*********************************** floating point ***********************************
