Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision b65a9fcb9204196a9d56b7437d18e3a2b1ebfa14)
+++ src/libcfa/stdlib	(revision f3ddc21749f82c4ee7197e7ea8f15ed473a52710)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Apr  1 17:35:24 2017
-// Update Count     : 104
+// Last Modified On : Tue May  9 08:42:44 2017
+// Update Count     : 107
 //
 
@@ -84,6 +84,8 @@
 forall( otype T | { int ?<?( T, T ); } )
 T * bsearch( T key, const T * arr, size_t dimension );
+
 forall( otype T | { int ?<?( T, T ); } )
 unsigned int bsearch( T key, const T * arr, size_t dimension );
+
 
 forall( otype T | { int ?<?( T, T ); } )
@@ -107,4 +109,6 @@
 double abs( double _Complex );
 long double abs( long double _Complex );
+forall ( otype T | { void ?{}( T *, zero_t ); int ?<?( T, T ); T -?( T ); } )
+T abs( T );
 
 //---------------------------------------
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision b65a9fcb9204196a9d56b7437d18e3a2b1ebfa14)
+++ src/libcfa/stdlib.c	(revision f3ddc21749f82c4ee7197e7ea8f15ed473a52710)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Apr 16 10:41:05 2017
-// Update Count     : 189
+// Last Modified On : Tue May  9 08:43:00 2017
+// Update Count     : 191
 //
 
@@ -27,25 +27,32 @@
 } // extern "C"
 
-forall( dtype T | sized(T) ) T * malloc( void ) {
-	//printf( "malloc1\n" );
-    return (T *)(void*)malloc( (size_t)sizeof(T) );
+forall( dtype T | sized(T) ) T * malloc( void ) {		// type-safe
+    return (T *)(void *)malloc( (size_t)sizeof(T) );
 } // malloc
-forall( dtype T | sized(T) ) T * malloc( char fill ) {
-	//printf( "malloc3\n" );
-	T * ptr = (T *)(void*)malloc( (size_t)sizeof(T) );
+
+forall( dtype T | sized(T) ) T * malloc( char fill ) {	// initial with fill value (like calloc)
+	T * ptr = (T *)(void *)malloc( (size_t)sizeof(T) );
     return memset( ptr, (int)fill, sizeof(T) );
 } // malloc
 
-forall( dtype T | sized(T) ) T * calloc( size_t nmemb ) {
-	//printf( "calloc\n" );
+forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size ) { // alternative realloc
+    return (T *)realloc( ptr, size );
+} // malloc
+
+forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size, unsigned char fill ) { // alternative realloc with fill value
+    return (T *)realloc( ptr, size, fill );
+} // malloc
+
+
+forall( dtype T | sized(T) ) T * calloc( size_t nmemb ) { // type-safe array initialization with fill 0
     return (T *)calloc( nmemb, sizeof(T) );
 } // calloc
 
-forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ) {
-	//printf( "realloc1\n" );
+
+forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ) { // type-safe
     return (T *)(void *)realloc( (void *)ptr, size );
 } // realloc
-forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size, unsigned char fill ) {
-	//printf( "realloc2\n" );
+
+forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size, unsigned char fill ) { // alternative realloc with fill value
     char * nptr = (T *)(void *)realloc( (void *)ptr, size );
     size_t unused = malloc_usable_size( nptr );
@@ -54,40 +61,30 @@
 } // realloc
 
-forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size ) {
-	//printf( "malloc4\n" );
-    return (T *)realloc( ptr, size );
-} // malloc
-forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size, unsigned char fill ) {
-	//printf( "malloc5\n" );
-    return (T *)realloc( ptr, size, fill );
-} // malloc
-
-forall( dtype T | sized(T) ) T * aligned_alloc( size_t alignment ) {
-	//printf( "aligned_alloc\n" );
+
+forall( dtype T | sized(T) ) T * aligned_alloc( size_t alignment ) { // aligned allocation
     return (T *)memalign( alignment, sizeof(T) );
 } // aligned_alloc
 
 forall( dtype T | sized(T) ) T * memalign( size_t alignment ) {
-	//printf( "memalign\n" );
     return (T *)memalign( alignment, sizeof(T) );
 } // memalign
 
 forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t alignment ) {
-	//printf( "posix_memalign\n" );
     return posix_memalign( (void **)ptr, alignment, sizeof(T) );
 } // posix_memalign
 
-forall( dtype T, ttype Params | sized(T) | { void ?{}( T *, Params ); } )
+
+forall( dtype T, ttype Params | sized(T) | { void ?{}( T *, Params ); } ) //  new
 T * new( Params p ) {
 	return ((T *)malloc()){ p };
-}
-
-forall( dtype T | { void ^?{}(T *); } )
+} // new
+
+forall( dtype T | { void ^?{}(T *); } )					// delete
 void delete( T * ptr ) {
-  if ( ptr ) {
-    ^ptr{};
-    free( ptr );
-  }
-}
+	if ( ptr ) {
+		^ptr{};
+		free( ptr );
+	}
+} // delete
 
 forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } )
@@ -98,5 +95,5 @@
 	}
 	delete( rest );
-}
+} // delete
 
 //---------------------------------------
@@ -106,30 +103,36 @@
 	if ( sscanf( ptr, "%d", &i ) == EOF ) {}
 	return i;
-}
+} // ato
+
 unsigned int ato( const char * ptr ) {
 	unsigned int ui;
 	if ( sscanf( ptr, "%u", &ui ) == EOF ) {}
 	return ui;
-}
+} // ato
+
 long int ato( const char * ptr ) {
 	long int li;
 	if ( sscanf( ptr, "%ld", &li ) == EOF ) {}
 	return li;
-}
+} // ato
+
 unsigned long int ato( const char * ptr ) {
 	unsigned long int uli;
 	if ( sscanf( ptr, "%lu", &uli ) == EOF ) {}
 	return uli;
-}
+} // ato
+
 long long int ato( const char * ptr ) {
 	long long int lli;
 	if ( sscanf( ptr, "%lld", &lli ) == EOF ) {}
 	return lli;
-}
+} // ato
+
 unsigned long long int ato( const char * ptr ) {
 	unsigned long long int ulli;
 	if ( sscanf( ptr, "%llu", &ulli ) == EOF ) {}
 	return ulli;
-}
+} // ato
+
 
 float ato( const char * ptr ) {
@@ -137,15 +140,18 @@
 	if ( sscanf( ptr, "%f", &f ) == EOF ) {}
 	return f;
-}
+} // ato
+
 double ato( const char * ptr ) {
 	double d;
 	if ( sscanf( ptr, "%lf", &d ) == EOF ) {}
 	return d;
-}
+} // ato
+
 long double ato( const char * ptr ) {
 	long double ld;
 	if ( sscanf( ptr, "%Lf", &ld ) == EOF ) {}
 	return ld;
-}
+} // ato
+
 
 float _Complex ato( const char * ptr ) {
@@ -153,44 +159,56 @@
 	if ( sscanf( ptr, "%g%gi", &re, &im ) == EOF ) {}
 	return re + im * _Complex_I;
-}
+} // ato
+
 double _Complex ato( const char * ptr ) {
 	double re, im;
 	if ( sscanf( ptr, "%lf%lfi", &re, &im ) == EOF ) {}
 	return re + im * _Complex_I;
-}
+} // ato
+
 long double _Complex ato( const char * ptr ) {
 	long double re, im;
 	if ( sscanf( ptr, "%Lf%Lfi", &re, &im ) == EOF ) {}
 	return re + im * _Complex_I;
-}
+} // ato
+
 
 int strto( const char * sptr, char ** eptr, int base ) {
 	return (int)strtol( sptr, eptr, base );
-}
+} // strto
+
 unsigned int strto( const char * sptr, char ** eptr, int base ) {
 	return (unsigned int)strtoul( sptr, eptr, base );
-}
+} // strto
+
 long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtol( sptr, eptr, base );
-}
+} // strto
+
 unsigned long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtoul( sptr, eptr, base );
-}
+} // strto
+
 long long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtoll( sptr, eptr, base );
-}
+} // strto
+
 unsigned long long int strto( const char * sptr, char ** eptr, int base ) {
 	return strtoull( sptr, eptr, base );
-}
+} // strto
+
 
 float strto( const char * sptr, char ** eptr ) {
 	return strtof( sptr, eptr );
-}
+} // strto
+
 double strto( const char * sptr, char ** eptr ) {
 	return strtod( sptr, eptr );
-}
+} // strto
+
 long double strto( const char * sptr, char ** eptr ) {
 	return strtold( sptr, eptr );
-}
+} // strto
+
 
 float _Complex strto( const char * sptr, char ** eptr ) {
@@ -201,5 +219,6 @@
 	if ( sptr == *eptr ) return 0.0;
 	return re + im * _Complex_I;
-}
+} // strto
+
 double _Complex strto( const char * sptr, char ** eptr ) {
 	double re, im;
@@ -209,5 +228,6 @@
 	if ( sptr == *eptr ) return 0.0;
 	return re + im * _Complex_I;
-}
+} // strto
+
 long double _Complex strto( const char * sptr, char ** eptr ) {
 	long double re, im;
@@ -217,5 +237,5 @@
 	if ( sptr == *eptr ) return 0.0;
 	return re + im * _Complex_I;
-}
+} // strto
 
 //---------------------------------------
