Index: libcfa/src/iostream.cfa
===================================================================
--- libcfa/src/iostream.cfa	(revision a4e1b09472ce1a23ac08c2a4f5e43abc5733f070)
+++ libcfa/src/iostream.cfa	(revision c015e2dcbed8c4388510773acdb9b6ea0ee94b78)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Feb 12 09:26:05 2024
-// Update Count     : 1966
+// Last Modified On : Mon Jul  8 16:49:05 2024
+// Update Count     : 2017
 //
 
@@ -772,15 +772,16 @@
 
 
+#define FALSE "false"
+#define TRUE "true"
+
 forall( istype & | basic_istream( istype ) ) {
 	istype & ?|?( istype & is, bool & b ) {
 		if ( eof( is ) ) throwResume ExceptionInst( missing_data );
-		char val[6];
-		int args = fmt( is, "%5s", val );
-		if ( ! eof( is ) && args != 1 ) throwResume ExceptionInst( missing_data );
-		if ( strcmp( val, "true" ) == 0 ) b = true;
-		else if ( strcmp( val, "false" ) == 0 ) b = false;
-		else {
-			fprintf( stderr, "invalid Boolean constant\n" );
-			abort();									// cannot use abort stream
+		int len = -1;									// len not set if no match
+		// Optional leading whitespace at start of strings.
+		fmt( is, " " FALSE "%n", &len );				// try false
+		if ( len != sizeof( FALSE ) - 1 ) {				// remove null terminate
+			fmt( is, " " TRUE "%n", &len );				// try true
+			if ( len != sizeof( TRUE ) - 1 ) throwResume ExceptionInst( missing_data );
 		} // if
 		return is;
@@ -940,5 +941,5 @@
 	} // ?|?
 
-	istype & ?|?( istype & is, const char fmt[] ) {
+	istype & ?|?( istype & is, const char fmt[] ) {		// match text
 		if ( eof( is ) ) throwResume ExceptionInst( missing_data );
 		size_t len = strlen( fmt );
@@ -946,7 +947,8 @@
 		strcpy( fmtstr, fmt );							// copy format and add %n
 		strcpy( &fmtstr[len], "%n" );
-		int len2 = -1;
-		fmt( is, fmtstr, &len2 );
-		if ( ! eof( is ) && len2 == -1 ) throwResume ExceptionInst( missing_data );
+		len = -1;
+		// scanf cursor does not move if no match
+		fmt( is, fmtstr, &len );
+		if ( ! eof( is ) && len == -1 ) throwResume ExceptionInst( missing_data );
 		return is;
 	} // ?|?
Index: libcfa/src/iostream.hfa
===================================================================
--- libcfa/src/iostream.hfa	(revision a4e1b09472ce1a23ac08c2a4f5e43abc5733f070)
+++ libcfa/src/iostream.hfa	(revision c015e2dcbed8c4388510773acdb9b6ea0ee94b78)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Apr 21 07:32:19 2024
-// Update Count     : 744
+// Last Modified On : Sat Jul  6 11:33:31 2024
+// Update Count     : 758
 //
 
@@ -359,5 +359,9 @@
 	istype & ?|?( istype &, long double _Complex & );
 
-	istype & ?|?( istype &, const char [] );
+	// This is too restrictive as it prevents building a format in a string and using that format.
+	// inline istype & ?|?( istype &, char [] ) {			// possible error, too restrictive to change
+	// 	_Static_assert( false, "reading a character array without a maximum length is unsafe. Use input manipulator \"wdi( N, s )\", where \"char s[N]\" or fmt( s )." );
+	// }
+	istype & ?|?( istype &, const char [] );			// match text
 
 	// manipulators
