Index: libcfa/src/strstream.cfa
===================================================================
--- libcfa/src/strstream.cfa	(revision c8371b5a494957f77ac114c53bd54e6f5e7b1d34)
+++ libcfa/src/strstream.cfa	(revision 321a1b15558ad9f12a47389926847583d34b7518)
@@ -10,9 +10,10 @@
 // Created On       : Thu Apr 22 22:24:35 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr 27 20:59:53 2021
-// Update Count     : 78
+// Last Modified On : Sun Oct 10 16:13:20 2021
+// Update Count     : 101
 // 
 
 #include "strstream.hfa"
+#include "fstream.hfa"									// abort
 
 #include <stdio.h>										// vsnprintf
@@ -30,14 +31,14 @@
 
 // private
-bool sepPrt$( ostrstream & os ) { setNL$( os, false ); return os.sepOnOff$; }
-void sepReset$( ostrstream & os ) { os.sepOnOff$ = os.sepDefault$; }
-void sepReset$( ostrstream & os, bool reset ) { os.sepDefault$ = reset; os.sepOnOff$ = os.sepDefault$; }
-const char * sepGetCur$( ostrstream & os ) { return os.sepCur$; }
-void sepSetCur$( ostrstream & os, const char sepCur[] ) { os.sepCur$ = sepCur; }
-bool getNL$( ostrstream & os ) { return os.sawNL$; }
-void setNL$( ostrstream & os, bool state ) { os.sawNL$ = state; }
-bool getANL$( ostrstream & os ) { return os.nlOnOff$; }
-bool getPrt$( ostrstream & os ) { return os.prt$; }
-void setPrt$( ostrstream & os, bool state ) { os.prt$ = state; }
+inline bool sepPrt$( ostrstream & os ) { setNL$( os, false ); return os.sepOnOff$; }
+inline void sepReset$( ostrstream & os ) { os.sepOnOff$ = os.sepDefault$; }
+inline void sepReset$( ostrstream & os, bool reset ) { os.sepDefault$ = reset; os.sepOnOff$ = os.sepDefault$; }
+inline const char * sepGetCur$( ostrstream & os ) { return os.sepCur$; }
+inline void sepSetCur$( ostrstream & os, const char sepCur[] ) { os.sepCur$ = sepCur; }
+inline bool getNL$( ostrstream & os ) { return os.sawNL$; }
+inline void setNL$( ostrstream & os, bool state ) { os.sawNL$ = state; }
+inline bool getANL$( ostrstream & os ) { return os.nlOnOff$; }
+inline bool getPrt$( ostrstream & os ) { return os.prt$; }
+inline void setPrt$( ostrstream & os, bool state ) { os.prt$ = state; }
 
 // public
@@ -128,4 +129,6 @@
 // *********************************** istrstream ***********************************
 
+// private
+bool getANL$( istrstream & is ) { return is.nlOnOff$; }
 
 // public
@@ -136,14 +139,27 @@
 } // ?{}
 
-bool getANL( istrstream & is ) { return is.nlOnOff$; }
 void nlOn( istrstream & is ) { is.nlOnOff$ = true; }
 void nlOff( istrstream & is ) { is.nlOnOff$ = false; }
 
-void ends( istrstream & is ) {
-} // ends
+void ends( istrstream & is ) {}
+bool eof( istrstream & is ) { return false; }
 
-int eof( istrstream & is ) {
-	return 0;
-} // eof
+int fmt( istrstream & is, const char format[], ... ) with(is) {
+	va_list args;
+	va_start( args, format );
+	// THIS DOES NOT WORK BECAUSE VSSCANF RETURNS NUMBER OF VALUES READ VERSUS BUFFER POSITION SCANNED.
+	int len = vsscanf( buf$ + cursor$, format, args );
+	va_end( args );
+	if ( len == EOF ) {
+		abort | IO_MSG "invalid read";
+	} // if
+	// SKULLDUGGERY: This hack skips over characters read by vsscanf by moving to the next whitespace but it does not
+	// handle C reads with wdi manipulators that leave the cursor at a non-whitespace character.
+	for ( ; buf$[cursor$] != ' ' && buf$[cursor$] != '\t' && buf$[cursor$] != '\0'; cursor$ += 1 ) {
+		//printf( "X \'%c\'\n", buf$[cursor$] );
+	} // for
+	if ( buf$[cursor$] != '\0' ) cursor$ += 1;	// advance to whitespace
+	return len;
+} // fmt
 
 istrstream &ungetc( istrstream & is, char c ) {
@@ -154,18 +170,4 @@
 } // ungetc
 
-int fmt( istrstream & is, const char format[], ... ) {
-	va_list args;
-	va_start( args, format );
-	// This does not work because vsscanf does not return buffer position.
-	int len = vsscanf( is.buf$ + is.cursor$, format, args );
-	va_end( args );
-	if ( len == EOF ) {
-		int j;
-		printf( "X %d%n\n", len, &j );
-	} // if
-	is.cursor$ += len;
-	return len;
-} // fmt
-
 // Local Variables: //
 // tab-width: 4 //
Index: libcfa/src/strstream.hfa
===================================================================
--- libcfa/src/strstream.hfa	(revision c8371b5a494957f77ac114c53bd54e6f5e7b1d34)
+++ libcfa/src/strstream.hfa	(revision 321a1b15558ad9f12a47389926847583d34b7518)
@@ -10,6 +10,6 @@
 // Created On       : Thu Apr 22 22:20:59 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Apr 27 20:58:50 2021
-// Update Count     : 41
+// Last Modified On : Sun Oct 10 10:14:22 2021
+// Update Count     : 47
 // 
 
@@ -85,14 +85,17 @@
 // Satisfies basic_istream
 
+// private
+bool getANL$( istrstream & );
+
 // public
-bool getANL( istrstream & );
 void nlOn( istrstream & );
 void nlOff( istrstream & );
 void ends( istrstream & );
+
 int fmt( istrstream &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
-istrstream & ungetc( istrstream & is, char c );
-int eof( istrstream & is );
+istrstream & ungetc( istrstream &, char );
+bool eof( istrstream & );
 
-void ?{}( istrstream & is, char buf[] );
+void ?{}( istrstream &, char buf[] );
 
 // Local Variables: //
