Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/Makefile.am	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 08:54:01 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Wed Feb  3 11:19:35 2016
-## Update Count     : 117
+## Last Modified On : Wed Mar  2 22:59:23 2016
+## Update Count     : 119
 ###############################################################################
 
@@ -63,5 +63,5 @@
 libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
 
-cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
+cheaders = #  expat
 cfaheaders = limits
 include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/Makefile.in	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -215,5 +215,5 @@
 libs = stdlib iostream fstream iterator
 libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
-cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
+cheaders = #  expat
 cfaheaders = limits
 include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
@@ -231,7 +231,7 @@
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libcfa/Makefile'; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libcfa/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/libcfa/Makefile
+	  $(AUTOMAKE) --foreign src/libcfa/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Index: src/libcfa/bfd.h
===================================================================
--- src/libcfa/bfd.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// bfd.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Thu Jan  8 15:50:56 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:44:41 2015
-// Update Count     : 9
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_BFD_H__
-#endif // ! type
-
-#include_next <bfd.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_BFD_H__ )			// reset only if set
-#undef type
-#undef __CFA_BFD_H__
-#endif // type && __CFA_BFD_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/bfdlink.h
===================================================================
--- src/libcfa/bfdlink.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// bfdlink.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sat Jun 27 09:14:00 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:47:03 2015
-// Update Count     : 4
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_BFDLINK_H__
-#endif // ! type
-
-#include_next <bfdlink.h>								// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_BFDLINK_H__ )		// reset only if set
-#undef type
-#undef __CFA_BFDLINK_H__
-#endif // type && __CFA_BFDLINK_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/builtins.cf
===================================================================
--- src/libcfa/builtins.cf	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/builtins.cf	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -390,11 +390,11 @@
 int __builtin_sprintf(char *, const char *, ...);
 int __builtin_sscanf(const char *, const char *, ...);
-int __builtin_vfprintf(struct _IO_FILE *, const char *, void **);
-int __builtin_vfscanf(struct _IO_FILE *, const char *, void **);
-int __builtin_vprintf(const char *, void **);
-int __builtin_vscanf(const char *, void **);
-int __builtin_vsnprintf(char *, unsigned long, const char *, void **);
-int __builtin_vsprintf(char *, const char *, void **);
-int __builtin_vsscanf(const char *, const char *, void **);
+int __builtin_vfprintf(struct _IO_FILE *, const char *, __builtin_va_list);
+int __builtin_vfscanf(struct _IO_FILE *, const char *, __builtin_va_list);
+int __builtin_vprintf(const char *, __builtin_va_list);
+int __builtin_vscanf(const char *, __builtin_va_list);
+int __builtin_vsnprintf(char *, unsigned long, const char *, __builtin_va_list);
+int __builtin_vsprintf(char *, const char *, __builtin_va_list);
+int __builtin_vsscanf(const char *, const char *, __builtin_va_list);
 int __builtin_isalnum(int);
 int __builtin_isalpha(int);
@@ -534,7 +534,7 @@
 void __builtin_unwind_init();
 void __builtin_update_setjmp_buf(void *, int);
-void __builtin_va_copy(void **, void **);
-void __builtin_va_end(void **);
-void __builtin_va_start(void **, ...);
+void __builtin_va_copy(__builtin_va_list, __builtin_va_list);
+void __builtin_va_end(__builtin_va_list);
+void __builtin_va_start(__builtin_va_list, ...);
 int __builtin_va_arg_pack();
 int __builtin_va_arg_pack_len();
@@ -563,10 +563,10 @@
 int __builtin___snprintf_chk(char *, unsigned long, int, unsigned long, const char *, ...);
 int __builtin___sprintf_chk(char *, int, unsigned long, const char *, ...);
-int __builtin___vsnprintf_chk(char *, unsigned long, int, unsigned long, const char *, void **);
-int __builtin___vsprintf_chk(char *, int, unsigned long, const char *, void **);
+int __builtin___vsnprintf_chk(char *, unsigned long, int, unsigned long, const char *, __builtin_va_list);
+int __builtin___vsprintf_chk(char *, int, unsigned long, const char *, __builtin_va_list);
 int __builtin___fprintf_chk(struct _IO_FILE *, int, const char *, ...);
 int __builtin___printf_chk(int, const char *, ...);
-int __builtin___vfprintf_chk(struct _IO_FILE *, int, const char *, void **);
-int __builtin___vprintf_chk(int, const char *, void **);
+int __builtin___vfprintf_chk(struct _IO_FILE *, int, const char *, __builtin_va_list);
+int __builtin___vprintf_chk(int, const char *, __builtin_va_list);
 void __cyg_profile_func_enter(void *, void *);
 void __cyg_profile_func_exit(void *, void *);
@@ -583,5 +583,3 @@
 const char * __builtin_FUNCTION();
 int __builtin_LINE();
-typedef void ** __builtin_va_list;
 extern const char *__PRETTY_FUNCTION__;
-typedef int wchar_t;
Index: src/libcfa/demangle.h
===================================================================
--- src/libcfa/demangle.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// demangle.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sat Jun 27 16:45:01 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:48:30 2015
-// Update Count     : 9
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_DEMANGLE_H__
-#endif // ! type
-
-#include_next <demangle.h>								// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_DEMANGLE_H__ )		// reset only if set
-#undef type
-#undef __CFA_DEMANGLE_H__
-#endif // type && __CFA_DEMANGLE_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/dialog.h
===================================================================
--- src/libcfa/dialog.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// dialog.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 08:34:16 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:38:21 2015
-// Update Count     : 11
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_DIALOG_H__
-#endif // ! type
-
-#include_next <dialog.h>								// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_DIALOG_H__ )		// reset only if set
-#undef type
-#undef __CFA_DIALOG_H__
-#endif // type && __CFA_DIALOG_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/evdns.h
===================================================================
--- src/libcfa/evdns.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// evdns.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 10:09:23 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:51:06 2015
-// Update Count     : 3
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_EVDNS_H__
-#endif // ! type
-
-#include_next <evdns.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_EVDNS_H__ )		// reset only if set
-#undef type
-#undef __CFA_EVDNS_H__
-#endif // type && __CFA_EVDNS_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/evhttp.h
===================================================================
--- src/libcfa/evhttp.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// evhttp.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 10:59:02 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:52:19 2015
-// Update Count     : 2
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_EVHTTP_H__
-#endif // ! type
-
-#include_next <evhttp.h>								// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_EVHTTP_H__ )		// reset only if set
-#undef type
-#undef __CFA_EVHTTP_H__
-#endif // type && __CFA_EVHTTP_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/evrpc.h
===================================================================
--- src/libcfa/evrpc.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// evrpc.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 11:01:31 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:53:14 2015
-// Update Count     : 2
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_EVRPC_H__
-#endif // ! type
-
-#include_next <evrpc.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_EVRPC_H__ )		// reset only if set
-#undef type
-#undef __CFA_EVRPC_H__
-#endif // type && __CFA_EVRPC_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/fcntl.h
===================================================================
--- src/libcfa/fcntl.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// fcntl.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 23:03:14 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:38:39 2015
-// Update Count     : 14
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_FCNTL_H__
-#endif // ! type
-
-#include_next <fcntl.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_FCNTL_H__ )		// reset only if set
-#undef type
-#undef __CFA_FCNTL_H__
-#endif // type && __CFA_FCNTL_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/form.h
===================================================================
--- src/libcfa/form.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// form.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 11:23:56 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:59:46 2015
-// Update Count     : 2
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_FORM_H__
-#endif // ! type
-
-#include_next <form.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_FORM_H__ )		// reset only if set
-#undef type
-#undef __CFA_FORM_H__
-#endif // type && __CFA_FORM_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/fstream
===================================================================
--- src/libcfa/fstream	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/fstream	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -7,9 +7,9 @@
 // fstream -- 
 //
-// Author           : Richard C. Bilson
+// Author           : Peter A. Buhr
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 17 14:02:01 2016
-// Update Count     : 22
+// Last Modified On : Wed Mar  2 15:08:14 2016
+// Update Count     : 78
 //
 
@@ -19,25 +19,33 @@
 #include "iostream"
 
-// implement context ostream
-struct ofstream;
+enum { separateSize = 16 };
+struct ofstream { void *file; int separate; char separator[separateSize]; };
 
-int fail( ofstream * os );
-int flush( ofstream * os );
-void open( ofstream ** os, const char * name, const char * mode );
-void close( ofstream * os );
-ofstream * write( ofstream * os, const char * data, streamsize_type size );
+_Bool sepPrt( ofstream * );
+void sepOn( ofstream * );
+void sepOff( ofstream * );
+void sepSet( ofstream *, const char * );
+const char * sepGet( ofstream * );
+void sepDisable( ofstream * );
+void sepEnable( ofstream * );
+int fail( ofstream * );
+int flush( ofstream * );
+void open( ofstream *, const char * name, const char * mode );
+void close( ofstream * );
+ofstream * write( ofstream *, const char * data, unsigned long int size );
+int prtfmt( ofstream *, const char fmt[], ... );
 
 extern ofstream * sout, * serr;
 
 // implement context istream
-struct ifstream;
+struct ifstream { void *file; };
 
 int fail( ifstream * is );
 int eof( ifstream * is );
-void open( ifstream ** is, const char * name, const char * mode );
+void open( ifstream * is, const char * name, const char * mode );
 void close( ifstream * is );
-ifstream * get( ifstream * is, int * data );
-ifstream * read( ifstream * is, char * data, streamsize_type size );
+ifstream * read( ifstream * is, char * data, unsigned long int size );
 ifstream * ungetc( ifstream * is, char c );
+int scanfmt( ifstream *, const char fmt[], ... );
 
 extern ifstream *sin;
@@ -49,2 +57,3 @@
 // tab-width: 4 //
 // End: //
+
Index: src/libcfa/fstream.c
===================================================================
--- src/libcfa/fstream.c	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/fstream.c	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -7,9 +7,9 @@
 // fstream.c -- 
 //
-// Author           : Richard C. Bilson
+// Author           : Peter A. Buhr
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 17 14:03:05 2016
-// Update Count     : 76
+// Last Modified On : Mon Feb 29 18:41:10 2016
+// Update Count     : 162
 //
 
@@ -17,40 +17,53 @@
 
 extern "C" {
-#include <stdio.h>
-#include <stdlib.h>
+#include <stdio.h>										// vfprintf, vfscanf
+#include <stdlib.h>										// exit
+#include <stdarg.h>										// varargs
+#include <string.h>										// strlen
+#include <float.h>										// DBL_DIG, LDBL_DIG
+#include <complex.h>									// creal, cimag
 }
-
-struct ofstream {
-	FILE *file;
-};
 
 #define IO_MSG "I/O error "
 
+_Bool sepPrt( ofstream * os ) { return os->separate == 1; }
+void sepOn( ofstream * os ) { if ( os->separate != 2 ) os->separate = 1; }
+void sepOff( ofstream * os ) { if ( os->separate != 2 ) os->separate = 0; }
+void sepSet( ofstream * os, const char * s ) {
+	strncpy( &(os->separator[0]), s, separateSize - 1 );
+	os->separator[separateSize - 1] = '\0';
+} // sepSet
+const char * sepGet( ofstream * os ) { return &(os->separator[0]); }
+void sepDisable( ofstream *os ) { os->separate = 2; }
+void sepEnable( ofstream *os ) { os->separate = 0; }
+
 int fail( ofstream * os ) {
-	return ferror( os->file );
+	return ferror( (FILE *)(os->file) );
 } // fail
 
 int flush( ofstream * os ) {
-	return fflush( os->file );
+	return fflush( (FILE *)(os->file) );
 } // flush
 
-void open( ofstream ** os, const char * name, const char * mode ) {
-	FILE *t = fopen( name, mode );
-	if ( t == 0 ) {										// do not change unless successful
+void open( ofstream * os, const char * name, const char * mode ) {
+	FILE *file = fopen( name, mode );
+	if ( file == 0 ) {									// do not change unless successful
 		perror( IO_MSG "open output" );
 		exit( EXIT_FAILURE );
 	} // if
-	(*os)->file = t;
+	os->file = file;
+	sepOff( os );
+	sepSet( os, " " );
 } // open
 
 void close( ofstream * os ) {
-	if ( os->file == stdout || os->file == stderr ) return;
+	if ( (FILE *)(os->file) == stdout || (FILE *)(os->file) == stderr ) return;
 
-	if ( fclose( os->file ) == EOF ) {
+	if ( fclose( (FILE *)(os->file) ) == EOF ) {
 		perror( IO_MSG "close output" );
 	} // if 
 } // close
 
-ofstream * write( ofstream * os, const char * data, streamsize_type size ) {
+ofstream * write( ofstream * os, const char * data, unsigned long int size ) {
 	if ( fail( os ) ) {
 		fprintf( stderr, "attempt write I/O on failed stream\n" );
@@ -58,5 +71,5 @@
 	} // if
 
-	if ( fwrite( data, 1, size, os->file ) != size ) {
+	if ( fwrite( data, 1, size, (FILE *)(os->file) ) != size ) {
 		perror( IO_MSG "write" );
 		exit( EXIT_FAILURE );
@@ -65,34 +78,55 @@
 } // write
 
-static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_) };
+int prtfmt( ofstream * os, const char fmt[], ... ) {
+    va_list args;
+
+    va_start( args, fmt );
+    int len = vfprintf( (FILE *)(os->file), fmt, args );
+	if ( len == EOF ) {
+		if ( ferror( (FILE *)(os->file) ) ) {
+			fprintf( stderr, "invalid write\n" );
+			exit( EXIT_FAILURE );
+		} // if
+	} // if
+    va_end( args );
+	return len;
+} // prtfmt
+
+
+static ofstream soutFile = { (FILE *)(&_IO_2_1_stdout_), 0, { ' ', '\0' } };
 ofstream *sout = &soutFile;
-static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_) };
+static ofstream serrFile = { (FILE *)(&_IO_2_1_stderr_), 0, { ' ', '\0' } };
 ofstream *serr = &serrFile;
+
 
 //---------------------------------------
 
-struct ifstream {
-	FILE *file;
-};
 
 int fail( ifstream * is ) {
-	return ferror( is->file );
+	return ferror( (FILE *)(is->file) );
 } // fail
 
 int eof( ifstream * is ) {
-	return feof( is->file );
+	return feof( (FILE *)(is->file) );
 } // eof
 
-ifstream * get( ifstream * is, int * data ) {
-	if ( fscanf( is->file, "%d", data ) == EOF ) {
-		if ( ferror( is->file ) ) {
-			fprintf( stderr, "invalid int read\n" );
-			exit( EXIT_FAILURE );
-		} // if
+void open( ifstream * is, const char * name, const char * mode ) {
+	FILE *t = fopen( name, mode );
+	if ( t == 0 ) {										// do not change unless successful
+		perror( IO_MSG "open input" );
+		exit( EXIT_FAILURE );
 	} // if
-	return is;
-} // read
+	is->file = t;
+} // open
 
-ifstream * read( ifstream * is, char * data, streamsize_type size ) {
+void close( ifstream * is ) {
+	if ( (FILE *)(is->file) == stdin ) return;
+
+	if ( fclose( (FILE *)(is->file) ) == EOF ) {
+		perror( IO_MSG "close input" );
+	} // if 
+} // close
+
+ifstream * read( ifstream * is, char * data, unsigned long int size ) {
 	if ( fail( is ) ) {
 		fprintf( stderr, "attempt read I/O on failed stream\n" );
@@ -100,5 +134,5 @@
 	} // if
 
-	if ( fread( data, size, 1, is->file ) == 0 ) {
+	if ( fread( data, size, 1, (FILE *)(is->file) ) == 0 ) {
 		perror( IO_MSG "read" );
 		exit( EXIT_FAILURE );
@@ -113,5 +147,5 @@
 	} // if
 
-	if ( ungetc( c, is->file ) == EOF ) {
+	if ( ungetc( c, (FILE *)(is->file) ) == EOF ) {
 		perror( IO_MSG "ungetc" );
 		exit( EXIT_FAILURE );
@@ -120,20 +154,19 @@
 } // ungetc
 
-void open( ifstream ** is, const char * name, const char * mode ) {
-	FILE *t = fopen( name, mode );
-	if ( t == 0 ) {										// do not change unless successful
-		perror( IO_MSG "open input" );
-		exit( EXIT_FAILURE );
+int scanfmt( ifstream * is, const char fmt[], ... ) {
+    va_list args;
+
+    va_start( args, fmt );
+    int len = vfscanf( (FILE *)(is->file), fmt, args );
+	if ( len == EOF ) {
+		if ( ferror( (FILE *)(is->file) ) ) {
+			fprintf( stderr, "invalid read\n" );
+			exit( EXIT_FAILURE );
+		} // if
 	} // if
-	(*is)->file = t;
-} // open
+    va_end( args );
+	return len;
+} // prtfmt
 
-void close( ifstream * is ) {
-	if ( is->file == stdin ) return;
-
-	if ( fclose( is->file ) == EOF ) {
-		perror( IO_MSG "close input" );
-	} // if 
-} // close
 
 static ifstream sinFile = { (FILE *)(&_IO_2_1_stdin_) };
Index: src/libcfa/gcrypt.h
===================================================================
--- src/libcfa/gcrypt.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// gcrypt.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Sun Jun 28 11:36:26 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 09:01:25 2015
-// Update Count     : 8
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_GCRYPT_H__
-#endif // ! type
-
-#include_next <gcrypt.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_GCRYPT_H__ )		// reset only if set
-#undef type
-#undef __CFA_GCRYPT_H__
-#endif // type && __CFA_GCRYPT_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/iostream
===================================================================
--- src/libcfa/iostream	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/iostream	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -7,24 +7,33 @@
 // iostream -- 
 //
-// Author           : Richard C. Bilson
+// Author           : Peter A. Buhr
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 17 14:04:24 2016
-// Update Count     : 32
+// Last Modified On : Wed Mar  2 18:05:27 2016
+// Update Count     : 85
 //
 
-#ifndef IOSTREAM_H
-#define IOSTREAM_H
+#ifndef __IOSTREAM_H__
+#define __IOSTREAM_H__
 
 #include "iterator"
 
-typedef unsigned long streamsize_type;
-
-context ostream( dtype ostype ) {
+trait ostream( dtype ostype ) {
+	_Bool sepPrt( ostype * );
+	void sepOn( ostype * );
+	void sepOff( ostype * );
+	void sepSet( ostype *, const char * );
+	const char * sepGet( ostype * );
+	void sepDisable( ostype * );
+	void sepEnable( ostype * );
 	int fail( ostype * );
 	int flush( ostype * );
-	ostype * write( ostype *, const char *, streamsize_type );
+	void open( ostype * os, const char * name, const char * mode );
+	void close( ostype * os );
+	ostype * write( ostype *, const char *, unsigned long int );
+	int prtfmt( ostype *, const char fmt[], ... );
 };
-context writeable( type T ) {
+
+trait writeable( otype T ) {
 	forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
 };
@@ -33,4 +42,7 @@
 
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, char );
+
+forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, short int );
+forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned short int );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, int );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned int );
@@ -39,44 +51,72 @@
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long int );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long long int );
+
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float ); // FIX ME: should not be required
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double );
+
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float _Complex );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double _Complex );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double _Complex );
+
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char * );
 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const void * );
 
-forall( dtype ostype, dtype retostype | ostream( ostype ) | ostream( retostype ) ) retostype * ?|?( ostype *os, retostype * (* manip)(ostype*) );
+forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, ostype * (*)( ostype * ) );
 forall( dtype ostype | ostream( ostype ) ) ostype * endl( ostype * );
+forall( dtype ostype | ostream( ostype ) ) ostype * sepOn( ostype * );
+forall( dtype ostype | ostream( ostype ) ) ostype * sepOff( ostype * );
 
 // writes the range [begin, end) to the given stream
-forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
+forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
 void write( iterator_type begin, iterator_type end, os_type *os );
 
-forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
+forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
 void write_reverse( iterator_type begin, iterator_type end, os_type *os );
 
 //---------------------------------------
 
-context istream( dtype istype ) {
+trait istream( dtype istype ) {
 	int fail( istype * );
 	int eof( istype * );
-	istype * get( istype *, int * );
-	istype * read( istype *, char *, streamsize_type );
+	void open( istype * is, const char * name, const char * mode );
+	void close( istype * is );
+	istype * read( istype *, char *, unsigned long int );
 	istype * ungetc( istype *, char );
+	int scanfmt( istype *, const char fmt[], ... );
 };
 
-context readable( type T ) {
+trait readable( otype T ) {
 	forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, T );
 };
 
-forall( dtype istype | istream( istype ) )
-istype * ?|?( istype *, char * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, char * );
 
-forall( dtype istype | istream( istype ) )
-istype * ?|?( istype *, int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, short int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned short int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long long int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned long int * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, unsigned long long int * );
 
-#endif // IOSTREAM_H
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, float * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, double * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long double * );
+
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, float _Complex * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, double _Complex * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, long double _Complex * );
+
+struct _Istream_str1 { char * s; };
+_Istream_str1 str( char * );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, _Istream_str1 );
+
+struct _Istream_str2 { char * s; int size; };
+_Istream_str2 str( char *, int size );
+forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, _Istream_str2 );
+
+#endif // __IOSTREAM_H__
 
 // Local Variables: //
Index: src/libcfa/iostream.c
===================================================================
--- src/libcfa/iostream.c	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/iostream.c	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// iostream.c -- 
-//
-// Author           : Richard C. Bilson
+// iostream.c --
+//
+// Author           : Peter A. Buhr
 // Created On       : Wed May 27 17:56:53 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 17 14:19:56 2016
-// Update Count     : 76
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Apr 06 14:42:52 2016
+// Update Count     : 227
 //
 
@@ -21,117 +21,190 @@
 #include <float.h>										// DBL_DIG, LDBL_DIG
 #include <complex.h>									// creal, cimag
+#include <ctype.h>										// isspace, ispunct
 }
 
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype *os, char c ) {
-	return write( os, &c, 1 );
+	prtfmt( os, "%c", c );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, short int si ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%hd", si );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, unsigned short int usi ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%hu", usi );
+	return os;
 } // ?|?
 
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype *os, int i ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%d", i ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, unsigned int i ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%u", i ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, long int i ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%ld", i ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, long long int i ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%lld", i ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, unsigned long int i ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%lu", i ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, unsigned long long int i ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%llu", i ) );
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%d", i );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, unsigned int ui ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%u", ui );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, long int li ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%ld", li );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, unsigned long int uli ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%lu", uli );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, long long int lli ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%lld", lli );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, unsigned long long int ulli ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%llu", ulli );
+	return os;
 } // ?|?
 
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype *os, float f ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%g", f ) );
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%g", f );
+	return os;
 } // ?|?
 
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype *os, double d ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%.*lg", DBL_DIG, d ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, long double d ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%.*Lg", LDBL_DIG, d ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, float _Complex c ) {
-	return os | crealf( c ) | (cimagf( c ) < 0 ? "" : "+") | cimagf( c ) | 'i';
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, double _Complex c ) {
-	return os | creal( c ) | (cimag( c ) < 0 ? "" : "+") | cimag( c ) | 'i';
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, long double _Complex c ) {
-	return os | creall( c ) | (cimagl( c ) < 0 ? "" : "+") | cimagl( c ) | 'i';
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%.*lg", DBL_DIG, d );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, long double ld ) {
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%.*Lg", LDBL_DIG, ld );
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, float _Complex fc ) {
+	os | crealf( fc );
+	if ( cimagf( fc ) >= 0 ) os | '+';
+	os | "" | cimagf( fc ) | 'i';
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, double _Complex dc ) {
+	os | creal( dc );
+	if ( cimag( dc ) >= 0 ) os | '+';
+	os | "" | cimag( dc ) | 'i';
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, long double _Complex ldc ) {
+	os | creall( ldc );
+	if ( cimagl( ldc ) >= 0 ) os | '+';
+	os | "" | cimagl( ldc ) | 'i';
+	return os;
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, const char *cp ) {
+	enum { Open = 1, Close, OpenClose };
+	static const char mask[256] = {
+		// opening delimiters
+		['('] : Open, ['['] : Open, ['{'] : Open,
+		['$'] : Open, [L'£'] : Open, [L'¥'] : Open, [L'¢'] : Open, [L'¿'] : Open, [L'«'] : Open,
+		// closing delimiters
+		[','] : Close, ['.'] : Close, [':'] : Close, [';'] : Close, ['!'] : Close, ['?'] : Close,
+		[')'] : Close, [']'] : Close, ['}'] : Close,
+		['%'] : Close, [L'»'] : Close,
+		// opening-closing delimiters
+		['\''] : OpenClose, ['`'] : OpenClose, ['"'] : OpenClose,
+	}; // mask
+
+	int len = strlen( cp );
+	// null string => no separator
+  if ( len == 0 ) { sepOff( os ); return os; }
+	// first character NOT spacing or closing punctuation => add left separator
+	if ( sepPrt( os ) && isspace( cp[0] ) == 0 && mask[ cp[0] ] != Close && mask[ cp[0] ] != OpenClose ) {
+		prtfmt( os, "%s", sepGet( os ) );
+	} // if
+	// last character IS spacing or opening punctuation => turn off separator for next item
+	unsigned int posn = len - 1;
+	if ( isspace( cp[posn] ) || mask[ cp[posn] ] == Open || mask[ cp[posn] ] == OpenClose ) {
+		sepOff( os );
+	} else {
+		sepOn( os );
+	} // if
+	return write( os, cp, len );
 } // ?|?
 
 forall( dtype ostype | ostream( ostype ) )
 ostype * ?|?( ostype *os, const void *p ) {
-	char buffer[32];
-	return write( os, buffer, sprintf( buffer, "%p", p ) );
-} // ?|?
-
-forall( dtype ostype | ostream( ostype ) )
-ostype * ?|?( ostype *os, const char *cp ) {
-	return write( os, cp, strlen( cp ) );
-} // ?|?
-
-
-forall( dtype ostype, dtype retostype | ostream( ostype ) | ostream( retostype ) ) 
-retostype * ?|?( ostype *os, retostype * (*manip)(ostype*) ) {
-  return manip( os );
-}
-
-forall( dtype ostype | ostream( ostype ) ) 
+	if ( sepPrt( os ) ) prtfmt( os, "%s", sepGet( os ) ); else sepOn( os );
+	prtfmt( os, "%p", p );
+	return os;
+} // ?|?
+
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * ?|?( ostype *os, ostype * (* manip)( ostype * ) ) {
+	return manip( os );
+} // ?|?
+
+forall( dtype ostype | ostream( ostype ) )
 ostype * endl( ostype * os ) {
-	os | "\n";
+	os | '\n';
 	flush( os );
+	sepOff( os );
 	return os;
 } // endl
 
+forall( dtype ostype | ostream( ostype ) )
+ostype * sepOn( ostype * os ) {
+	sepOn( os );
+	return os;
+} // sepOn
+
+forall( dtype ostype | ostream( ostype ) )
+ostype * sepOff( ostype * os ) {
+	sepOff( os );
+	return os;
+} // sepOff
+
 //---------------------------------------
 
-forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ),
-		dtype os_type | ostream( os_type ) )
-void write( iterator_type begin, iterator_type end, os_type *os ) {
-	void print( elt_type i ) { os | i | ' '; }
+forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
+void write( iteratortype begin, iteratortype end, ostype *os ) {
+	void print( elttype i ) { os | i; }
 	for_each( begin, end, print );
 } // ?|?
 
-forall( type elt_type | writeable( elt_type ), type iterator_type | iterator( iterator_type, elt_type ),
-		dtype os_type | ostream( os_type ) )
-void write_reverse( iterator_type begin, iterator_type end, os_type *os ) {
-	void print( elt_type i ) { os | i | ' '; }
+forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
+void write_reverse( iteratortype begin, iteratortype end, ostype *os ) {
+	void print( elttype i ) { os | i; }
 	for_each_reverse( begin, end, print );
 } // ?|?
@@ -140,12 +213,116 @@
 
 forall( dtype istype | istream( istype ) )
-istype * ?|?( istype *is, char *cp ) {
-	return read( is, cp, 1 );
-} // ?|?
-
-forall( dtype istype | istream( istype ) )
-istype * ?|?( istype *is, int *ip ) {
-	return get( is, ip );
-} // ?|?
+istype * ?|?( istype * is, char * c ) {
+	scanfmt( is, "%c", c );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, short int * si ) {
+	scanfmt( is, "%hd", si );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, unsigned short int * usi ) {
+	scanfmt( is, "%hu", usi );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, int * i ) {
+	scanfmt( is, "%d", i );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, unsigned int * ui ) {
+	scanfmt( is, "%u", ui );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, long int * li ) {
+	scanfmt( is, "%ld", li );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, unsigned long int * ulli ) {
+	scanfmt( is, "%lu", ulli );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, long long int * lli ) {
+	scanfmt( is, "%lld", lli );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, unsigned long long int * ulli ) {
+	scanfmt( is, "%llu", ulli );
+	return is;
+} // ?|?
+
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, float * f ) {
+	scanfmt( is, "%f", f );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, double * d ) {
+	scanfmt( is, "%lf", d );
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, long double * ld ) {
+	scanfmt( is, "%Lf", ld );
+	return is;
+} // ?|?
+
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, float _Complex * fc ) {
+	float re, im;
+	scanfmt( is, "%g%gi", &re, &im );
+	*fc = re + im * _Complex_I;
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, double _Complex * dc ) {
+	double re, im;
+	scanfmt( is, "%lf%lfi", &re, &im );
+	*dc = re + im * _Complex_I;
+	return is;
+} // ?|?
+
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, long double _Complex * ldc ) {
+	long double re, im;
+	scanfmt( is, "%Lf%Lfi", &re, &im );
+	*ldc = re + im * _Complex_I;
+	return is;
+} // ?|?
+
+_Istream_str1 str( char * str ) { _Istream_str1 s = { str }; return s; }
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, _Istream_str1 str ) {
+	scanfmt( is, "%s", str.s );
+	return is;
+} // str
+
+_Istream_str2 str( char * str, int size ) { _Istream_str2 s = { str, size }; return s; }
+forall( dtype istype | istream( istype ) )
+istype * ?|?( istype * is, _Istream_str2 str ) {
+	char buf[16];
+	sprintf( buf, "%%%ds", str.size );
+	scanfmt( is, buf, str.s );
+	return is;
+} // str
 
 // Local Variables: //
Index: src/libcfa/iterator
===================================================================
--- src/libcfa/iterator	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/iterator	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jan 27 23:49:13 2016
-// Update Count     : 7
+// Last Modified On : Wed Mar  2 18:06:05 2016
+// Update Count     : 9
 //
 
@@ -18,5 +18,5 @@
 
 // An iterator can be used to traverse a data structure.
-context iterator( type iterator_type, type elt_type ) {
+trait iterator( otype iterator_type, otype elt_type ) {
 	// point to the next element
 //	iterator_type ?++( iterator_type * );
@@ -32,5 +32,5 @@
 };
 
-context iterator_for( type iterator_type, type collection_type, type elt_type | iterator( iterator_type, elt_type ) ) {
+trait iterator_for( otype iterator_type, otype collection_type, otype elt_type | iterator( iterator_type, elt_type ) ) {
 //	[ iterator_type begin, iterator_type end ] get_iterators( collection_type );
 	iterator_type begin( collection_type );
@@ -38,8 +38,8 @@
 };
 
-forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
+forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
 void for_each( iterator_type begin, iterator_type end, void (*func)( elt_type ) );
 
-forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
+forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
 void for_each_reverse( iterator_type begin, iterator_type end, void (*func)( elt_type ) );
 
Index: src/libcfa/iterator.c
===================================================================
--- src/libcfa/iterator.c	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/iterator.c	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -10,11 +10,11 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jan 26 17:16:07 2016
-// Update Count     : 26
+// Last Modified On : Wed Mar  2 18:08:11 2016
+// Update Count     : 27
 //
 
 #include "iterator"
 
-forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
+forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
 void for_each( iterator_type begin, iterator_type end, void (*func)( elt_type ) ) {
 	for ( iterator_type i = begin; i != end; ++i ) {
@@ -23,5 +23,5 @@
 }
 
-forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
+forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
 void for_each_reverse( iterator_type begin, iterator_type end, void (*func)( elt_type ) ) {
 	for ( iterator_type i = end; i != begin; ) {
Index: src/libcfa/math.h
===================================================================
--- src/libcfa/math.h	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ 	(revision )
@@ -1,33 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// math.h -- 
-//
-// Author           : Peter A. Buhr
-// Created On       : Mon Nov 10 23:41:29 2014
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Dec 21 08:37:57 2015
-// Update Count     : 12
-
-// This include file uses the CFA keyword "type" as a field name of a structure.
-
-#if ! defined( type )									// nesting ?
-#define type `type`
-#define __CFA_MATH_H__
-#endif // ! type
-
-#include_next <math.h>									// has internal check for multiple expansion
-
-#if defined( type ) && defined( __CFA_MATH_H__ )		// reset only if set
-#undef type
-#undef __CFA_MATH_H__
-#endif // type && __CFA_MATH_H__
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/libcfa/prelude.cf
===================================================================
--- src/libcfa/prelude.cf	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/prelude.cf	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -1,2 +1,3 @@
+# 2 "prelude.cf"  // needed for error messages from this file
 //                               -*- Mode: C -*-
 //
@@ -8,6 +9,6 @@
 // Created On       : Sat Nov 29 07:23:41 2014
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan  4 11:13:26 2016
-// Update Count     : 81
+// Last Modified On : Wed Mar  2 18:03:41 2016
+// Update Count     : 89
 //
 
@@ -63,21 +64,21 @@
 long double _Complex	?--( long double _Complex * ),		?--( volatile long double _Complex * );
 
-forall( type T ) T *			 ?++(		     T ** );
-forall( type T ) const T *		 ?++( const	     T ** );
-forall( type T ) volatile T *		 ?++(	    volatile T ** );
-forall( type T ) const volatile T *	 ?++( const volatile T ** );
-forall( type T ) T *			 ?--(		     T ** );
-forall( type T ) const T *		 ?--( const	     T ** );
-forall( type T ) volatile T *		 ?--(	    volatile T ** );
-forall( type T ) const volatile T *	 ?--( const volatile T ** );
-
-forall( type T ) lvalue T		 ?[?](		      T *,	    ptrdiff_t );
-forall( type T ) const lvalue T		 ?[?]( const	      T *,	    ptrdiff_t );
-forall( type T ) volatile lvalue T	 ?[?](       volatile T *,	    ptrdiff_t );
-forall( type T ) const volatile lvalue T ?[?]( const volatile T *,	    ptrdiff_t );
-forall( type T ) lvalue T		 ?[?](		ptrdiff_t,		  T * );
-forall( type T ) const lvalue T		 ?[?](		ptrdiff_t, const	  T * );
-forall( type T ) volatile lvalue T	 ?[?](		ptrdiff_t,	 volatile T * );
-forall( type T ) const volatile lvalue T ?[?](		ptrdiff_t, const volatile T * );
+forall( otype T ) T *			 ?++(		     T ** );
+forall( otype T ) const T *		 ?++( const	     T ** );
+forall( otype T ) volatile T *		 ?++(	    volatile T ** );
+forall( otype T ) const volatile T *	 ?++( const volatile T ** );
+forall( otype T ) T *			 ?--(		     T ** );
+forall( otype T ) const T *		 ?--( const	     T ** );
+forall( otype T ) volatile T *		 ?--(	    volatile T ** );
+forall( otype T ) const volatile T *	 ?--( const volatile T ** );
+
+forall( otype T ) lvalue T		 ?[?](		      T *,	    ptrdiff_t );
+forall( otype T ) const lvalue T	 ?[?]( const	      T *,	    ptrdiff_t );
+forall( otype T ) volatile lvalue T	 ?[?](       volatile T *,	    ptrdiff_t );
+forall( otype T ) const volatile lvalue T ?[?]( const volatile T *,	    ptrdiff_t );
+forall( otype T ) lvalue T		 ?[?](		ptrdiff_t,		  T * );
+forall( otype T ) const lvalue T	 ?[?](		ptrdiff_t, const	  T * );
+forall( otype T ) volatile lvalue T	 ?[?](		ptrdiff_t,	 volatile T * );
+forall( otype T ) const volatile lvalue T ?[?](		ptrdiff_t, const volatile T * );
 
 // ------------------------------------------------------------
@@ -101,17 +102,17 @@
 long double _Complex	++?( long double _Complex * ),		--?( long double _Complex * );
 
-forall( type T ) T *			 ++?(		     T ** );
-forall( type T ) const T *		 ++?( const	     T ** );
-forall( type T ) volatile T *		 ++?(	    volatile T ** );
-forall( type T ) const volatile T *	 ++?( const volatile T ** );
-forall( type T ) T *			 --?(		     T ** );
-forall( type T ) const T *		 --?( const	     T ** );
-forall( type T ) volatile T *		 --?(	    volatile T ** );
-forall( type T ) const volatile T *	 --?( const volatile T ** );
-
-forall( type T ) lvalue T		 *?(		     T * );
-forall( type T ) const lvalue T		 *?( const	     T * );
-forall( type T ) volatile lvalue T	 *?(       volatile  T * );
-forall( type T ) const volatile lvalue T *?( const volatile  T * );
+forall( otype T ) T *			 ++?(		     T ** );
+forall( otype T ) const T *		 ++?( const	     T ** );
+forall( otype T ) volatile T *		 ++?(	    volatile T ** );
+forall( otype T ) const volatile T *	 ++?( const volatile T ** );
+forall( otype T ) T *			 --?(		     T ** );
+forall( otype T ) const T *		 --?( const	     T ** );
+forall( otype T ) volatile T *		 --?(	    volatile T ** );
+forall( otype T ) const volatile T *	 --?( const volatile T ** );
+
+forall( otype T ) lvalue T		 *?(		     T * );
+forall( otype T ) const lvalue T		 *?( const	     T * );
+forall( otype T ) volatile lvalue T	 *?(       volatile  T * );
+forall( otype T ) const volatile lvalue T *?( const volatile  T * );
 forall( ftype FT ) lvalue FT		 *?( FT * );
 
@@ -183,17 +184,17 @@
 long double _Complex	?+?( long double _Complex, long double _Complex ),	?-?( long double _Complex, long double _Complex );
 
-forall( type T ) T *			?+?(		    T *,	  ptrdiff_t );
-forall( type T ) T *			?+?(	      ptrdiff_t,		T * );
-forall( type T ) const T *		?+?( const	    T *,	  ptrdiff_t );
-forall( type T ) const T *		?+?(	      ptrdiff_t, const		T * );
-forall( type T ) volatile T *		?+?(	   volatile T *,	  ptrdiff_t );
-forall( type T ) volatile T *		?+?(	      ptrdiff_t,       volatile T * );
-forall( type T ) const volatile T *	?+?( const volatile T *,	  ptrdiff_t );
-forall( type T ) const volatile T *	?+?(	      ptrdiff_t, const volatile T * );
-forall( type T ) T *			?-?(		    T *,	  ptrdiff_t );
-forall( type T ) const T *		?-?( const	    T *,	  ptrdiff_t );
-forall( type T ) volatile T *		?-?(	   volatile T *,	  ptrdiff_t );
-forall( type T ) const volatile T *	?-?( const volatile T *,	  ptrdiff_t );
-forall( type T ) ptrdiff_t		?-?( const volatile T *, const volatile T * );
+forall( otype T ) T *			?+?(		    T *,	  ptrdiff_t );
+forall( otype T ) T *			?+?(	      ptrdiff_t,		T * );
+forall( otype T ) const T *		?+?( const	    T *,	  ptrdiff_t );
+forall( otype T ) const T *		?+?(	      ptrdiff_t, const		T * );
+forall( otype T ) volatile T *		?+?(	   volatile T *,	  ptrdiff_t );
+forall( otype T ) volatile T *		?+?(	      ptrdiff_t,       volatile T * );
+forall( otype T ) const volatile T *	?+?( const volatile T *,	  ptrdiff_t );
+forall( otype T ) const volatile T *	?+?(	      ptrdiff_t, const volatile T * );
+forall( otype T ) T *			?-?(		    T *,	  ptrdiff_t );
+forall( otype T ) const T *		?-?( const	    T *,	  ptrdiff_t );
+forall( otype T ) volatile T *		?-?(	   volatile T *,	  ptrdiff_t );
+forall( otype T ) const volatile T *	?-?( const volatile T *,	  ptrdiff_t );
+forall( otype T ) ptrdiff_t		?-?( const volatile T *, const volatile T * );
 
 // ------------------------------------------------------------
@@ -431,20 +432,20 @@
 forall( ftype FT ) FT *			?=?( FT * volatile *, forall( ftype FT2 ) FT2 * );
 
-forall( type T ) T *			?+=?(		     T *	  *, ptrdiff_t );
-forall( type T ) T *			?+=?(		     T * volatile *, ptrdiff_t );
-forall( type T ) const T *		?+=?( const	     T *	  *, ptrdiff_t );
-forall( type T ) const T *		?+=?( const	     T * volatile *, ptrdiff_t );
-forall( type T ) volatile T *		?+=?(	    volatile T *	  *, ptrdiff_t );
-forall( type T ) volatile T *		?+=?(	    volatile T * volatile *, ptrdiff_t );
-forall( type T ) const volatile T *	?+=?( const volatile T *	  *, ptrdiff_t );
-forall( type T ) const volatile T *	?+=?( const volatile T * volatile *, ptrdiff_t );
-forall( type T ) T *			?-=?(		     T *	  *, ptrdiff_t );
-forall( type T ) T *			?-=?(		     T * volatile *, ptrdiff_t );
-forall( type T ) const T *		?-=?( const	     T *	  *, ptrdiff_t );
-forall( type T ) const T *		?-=?( const	     T * volatile *, ptrdiff_t );
-forall( type T ) volatile T *		?-=?(	    volatile T *	  *, ptrdiff_t );
-forall( type T ) volatile T *		?-=?(	    volatile T * volatile *, ptrdiff_t );
-forall( type T ) const volatile T *	?-=?( const volatile T *	  *, ptrdiff_t );
-forall( type T ) const volatile T *	?-=?( const volatile T * volatile *, ptrdiff_t );
+forall( otype T ) T *			?+=?(		     T *	  *, ptrdiff_t );
+forall( otype T ) T *			?+=?(		     T * volatile *, ptrdiff_t );
+forall( otype T ) const T *		?+=?( const	     T *	  *, ptrdiff_t );
+forall( otype T ) const T *		?+=?( const	     T * volatile *, ptrdiff_t );
+forall( otype T ) volatile T *		?+=?(	    volatile T *	  *, ptrdiff_t );
+forall( otype T ) volatile T *		?+=?(	    volatile T * volatile *, ptrdiff_t );
+forall( otype T ) const volatile T *	?+=?( const volatile T *	  *, ptrdiff_t );
+forall( otype T ) const volatile T *	?+=?( const volatile T * volatile *, ptrdiff_t );
+forall( otype T ) T *			?-=?(		     T *	  *, ptrdiff_t );
+forall( otype T ) T *			?-=?(		     T * volatile *, ptrdiff_t );
+forall( otype T ) const T *		?-=?( const	     T *	  *, ptrdiff_t );
+forall( otype T ) const T *		?-=?( const	     T * volatile *, ptrdiff_t );
+forall( otype T ) volatile T *		?-=?(	    volatile T *	  *, ptrdiff_t );
+forall( otype T ) volatile T *		?-=?(	    volatile T * volatile *, ptrdiff_t );
+forall( otype T ) const volatile T *	?-=?( const volatile T *	  *, ptrdiff_t );
+forall( otype T ) const volatile T *	?-=?( const volatile T * volatile *, ptrdiff_t );
 
 _Bool			?=?( _Bool *, _Bool ),					?=?( volatile _Bool *, _Bool );
Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/stdlib	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Feb  5 15:21:18 2016
-// Update Count     : 61
+// Last Modified On : Tue Mar 22 22:34:24 2016
+// Update Count     : 69
 //
 
@@ -20,19 +20,18 @@
 } // extern "C"
 
-forall( type T ) T * memset( T * ptr, unsigned char fill ); // use default value '\0' for fill
-forall( type T ) T * memset( T * ptr );					// remove when default value available
+forall( otype T ) T * malloc( void );
+forall( otype T ) T * malloc( char fill );
+forall( otype T ) T * malloc( T * ptr, size_t size );
+forall( otype T ) T * malloc( T * ptr, size_t size, unsigned char fill );
+forall( otype T ) T * calloc( size_t size );
+forall( otype T ) T * realloc( T * ptr, size_t size );
+forall( otype T ) T * realloc( T * ptr, size_t size, unsigned char fill );
 
-forall( type T ) T * malloc( void );
-forall( type T ) T * malloc( char fill );
-forall( type T ) T * malloc( size_t size );
-forall( type T ) T * malloc( T * ptr, size_t size );
-forall( type T ) T * malloc( T * ptr, size_t size, unsigned char fill );
-forall( type T ) T * calloc( size_t size );
-forall( type T ) T * realloc( T * ptr, size_t size );
-forall( type T ) T * realloc( T * ptr, size_t size, unsigned char fill );
+forall( otype T ) T * aligned_alloc( size_t alignment );
+forall( otype T ) T * memalign( size_t alignment );		// deprecated
+forall( otype T ) int posix_memalign( T ** ptr, size_t alignment );
 
-forall( type T ) T * aligned_alloc( size_t alignment );
-forall( type T ) T * memalign( size_t alignment );		// deprecated
-forall( type T ) int posix_memalign( T ** ptr, size_t alignment );
+forall( otype T ) T * memset( T * ptr, unsigned char fill ); // use default value '\0' for fill
+forall( otype T ) T * memset( T * ptr );				// remove when default value available
 
 //---------------------------------------
@@ -66,13 +65,13 @@
 //---------------------------------------
 
-forall( type T | { int ?<?( T, T ); } )
+forall( otype T | { int ?<?( T, T ); } )
 T * bsearch( const T key, const T * arr, size_t dimension );
 
-forall( type T | { int ?<?( T, T ); } )
+forall( otype T | { int ?<?( T, T ); } )
 void qsort( const T * arr, size_t dimension );
 
 //---------------------------------------
 
-forall( type T | { T ?/?( T, T ); T ?%?( T, T ); } )
+forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
 [ T, T ] div( T t1, T t2 );
 
@@ -94,25 +93,25 @@
 //---------------------------------------
 
-void randseed( long int s );
-char random();
-int random();
-unsigned int random();
-long int random();
-unsigned long int random();
-float random();
-double random();
-float _Complex random();
-double _Complex random();
-long double _Complex random();
+void rand48seed( long int s );
+char rand48();
+int rand48();
+unsigned int rand48();
+long int rand48();
+unsigned long int rand48();
+float rand48();
+double rand48();
+float _Complex rand48();
+double _Complex rand48();
+long double _Complex rand48();
 
 //---------------------------------------
 
-forall( type T | { int ?<?( T, T ); } )
+forall( otype T | { int ?<?( T, T ); } )
 T min( const T t1, const T t2 );
 
-forall( type T | { int ?>?( T, T ); } )
+forall( otype T | { int ?>?( T, T ); } )
 T max( const T t1, const T t2 );
 
-forall( type T )
+forall( otype T )
 void swap( T * t1, T * t2 );
 
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision 5b2f5bb4b0269a726d7840b6f270858c3ff12d9a)
+++ src/libcfa/stdlib.c	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 10 15:45:56 2016
-// Update Count     : 140
+// Last Modified On : Wed Mar 23 13:26:42 2016
+// Update Count     : 146
 //
 
@@ -27,22 +27,13 @@
 } // extern "C"
 
-forall( type T ) T * memset( T * ptr, unsigned char fill ) { // use default value '\0' for fill
-	printf( "memset1\n" );
-    return (T *)memset( ptr, (int)fill, malloc_usable_size( ptr ) );
-} // memset
-forall( type T ) T * memset( T * ptr ) {				// remove when default value available
-	printf( "memset2\n" );
-    return (T *)memset( ptr, 0, malloc_usable_size( ptr ) );
-} // memset
-
-forall( type T ) T * malloc( void ) {
+forall( otype T ) T * malloc( void ) {
 	printf( "malloc1\n" );
     return (T *)malloc( sizeof(T) );
 } // malloc
-forall( type T ) T * malloc( size_t size ) {
+forall( otype T ) T * malloc( size_t size ) {
 	printf( "malloc2\n" );
     return (T *)(void *)malloc( size );
 } // malloc
-forall( type T ) T * malloc( char fill ) {
+forall( otype T ) T * malloc( char fill ) {
 	printf( "malloc3\n" );
 	T * ptr = (T *)malloc( sizeof(T) );
@@ -50,14 +41,14 @@
 } // malloc
 
-forall( type T ) T * calloc( size_t size ) {
+forall( otype T ) T * calloc( size_t size ) {
 	printf( "calloc\n" );
     return (T *)calloc( size, sizeof(T) );
 } // calloc
 
-forall( type T ) T * realloc( T * ptr, size_t size ) {
+forall( otype T ) T * realloc( T * ptr, size_t size ) {
 	printf( "realloc1\n" );
     return (T *)(void *)realloc( (void *)ptr, size );
 } // realloc
-forall( type T ) T * realloc( T * ptr, size_t size, unsigned char fill ) {
+forall( otype T ) T * realloc( T * ptr, size_t size, unsigned char fill ) {
 	printf( "realloc2\n" );
     char * nptr = (T *)(void *)realloc( (void *)ptr, size );
@@ -67,27 +58,36 @@
 } // realloc
 
-forall( type T ) T * malloc( T * ptr, size_t size ) {
+forall( otype T ) T * malloc( T * ptr, size_t size ) {
 	printf( "malloc4\n" );
     return (T *)realloc( ptr, size );
 } // malloc
-forall( type T ) T * malloc( T * ptr, size_t size, unsigned char fill ) {
+forall( otype T ) T * malloc( T * ptr, size_t size, unsigned char fill ) {
 	printf( "malloc5\n" );
     return (T *)realloc( ptr, size, fill );
 } // malloc
 
-forall( type T ) T * aligned_alloc( size_t alignment ) {
+forall( otype T ) T * aligned_alloc( size_t alignment ) {
 	printf( "aligned_alloc\n" );
     return (T *)memalign( alignment, sizeof(T) );
 } // aligned_alloc
 
-forall( type T ) T * memalign( size_t alignment ) {
+forall( otype T ) T * memalign( size_t alignment ) {
 	printf( "memalign\n" );
     return (T *)memalign( alignment, sizeof(T) );
 } // memalign
 
-forall( type T ) int posix_memalign( T ** ptr, size_t alignment ) {
+forall( otype T ) int posix_memalign( T ** ptr, size_t alignment ) {
 	printf( "posix_memalign\n" );
     return posix_memalign( (void **)ptr, alignment, sizeof(T) );
 } // posix_memalign
+
+forall( otype T ) T * memset( T * ptr, unsigned char fill ) { // use default value '\0' for fill
+	printf( "memset1\n" );
+    return (T *)memset( ptr, (int)fill, malloc_usable_size( ptr ) );
+} // memset
+forall( otype T ) T * memset( T * ptr ) {				// remove when default value available
+	printf( "memset2\n" );
+    return (T *)memset( ptr, 0, malloc_usable_size( ptr ) );
+} // memset
 
 //---------------------------------------
@@ -123,4 +123,5 @@
 	return ulli;
 }
+
 float ato( const char * ptr ) {
 	float f;
@@ -138,4 +139,5 @@
 	return ld;
 }
+
 float _Complex ato( const char * ptr ) {
 	float re, im;
@@ -172,4 +174,5 @@
 	return strtoull( sptr, eptr, base );
 }
+
 float strto( const char * sptr, char ** eptr ) {
 	return strtof( sptr, eptr );
@@ -181,4 +184,5 @@
 	return strtold( sptr, eptr );
 }
+
 float _Complex strto( const char * sptr, char ** eptr ) {
 	float re, im;
@@ -208,5 +212,5 @@
 //---------------------------------------
 
-forall( type T | { int ?<?( T, T ); } )
+forall( otype T | { int ?<?( T, T ); } )
 T * bsearch( const T key, const T * arr, size_t dimension ) {
 	int comp( const void * t1, const void * t2 ) { return *(T *)t1 < *(T *)t2 ? -1 : *(T *)t2 < *(T *)t1 ? 1 : 0; }
@@ -214,5 +218,5 @@
 } // bsearch
 
-forall( type T | { int ?<?( T, T ); } )
+forall( otype T | { int ?<?( T, T ); } )
 void qsort( const T * arr, size_t dimension ) {
 	int comp( const void * t1, const void * t2 ) { return *(T *)t1 < *(T *)t2 ? -1 : *(T *)t2 < *(T *)t1 ? 1 : 0; }
@@ -222,5 +226,5 @@
 //---------------------------------------
 
-forall( type T | { T ?/?( T, T ); T ?%?( T, T ); } )
+forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
 [ T, T ] div( T t1, T t2 ) { /* return [ t1 / t2, t1 % t2 ]; */ }
 
@@ -239,29 +243,29 @@
 //---------------------------------------
 
-void randseed( long int s ) { srand48( s ); }
-char random() { return lrand48(); }
-int random() { return mrand48(); }
-unsigned int random() { return lrand48(); }
-long int random() { return mrand48(); }
-unsigned long int random() { return lrand48(); }
-float random() { return (float)drand48(); }				// otherwise float uses lrand48
-double random() { return drand48(); }
-float _Complex random() { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
-double _Complex random() { return drand48() + (double _Complex)(drand48() * _Complex_I); }
-long double _Complex random() { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
-
-//---------------------------------------
-
-forall( type T | { int ?<?( T, T ); } )
+void rand48seed( long int s ) { srand48( s ); }
+char rand48() { return mrand48(); }
+int rand48() { return mrand48(); }
+unsigned int rand48() { return lrand48(); }
+long int rand48() { return mrand48(); }
+unsigned long int rand48() { return lrand48(); }
+float rand48() { return (float)drand48(); }				// otherwise float uses lrand48
+double rand48() { return drand48(); }
+float _Complex rand48() { return (float)drand48() + (float _Complex)(drand48() * _Complex_I); }
+double _Complex rand48() { return drand48() + (double _Complex)(drand48() * _Complex_I); }
+long double _Complex rand48() { return (long double)drand48() + (long double _Complex)(drand48() * _Complex_I); }
+
+//---------------------------------------
+
+forall( otype T | { int ?<?( T, T ); } )
 T min( const T t1, const T t2 ) {
 	return t1 < t2 ? t1 : t2;
 } // min
 
-forall( type T | { int ?>?( T, T ); } )
+forall( otype T | { int ?>?( T, T ); } )
 T max( const T t1, const T t2 ) {
 	return t1 > t2 ? t1 : t2;
 } // max
 
-forall( type T )
+forall( otype T )
 void swap( T * t1, T * t2 ) {
 	T temp = *t1;
