Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision f3fc631fd4c6f01e9eff41521dac0171ea98fa7e)
+++ src/libcfa/stdlib	(revision 421a287ec473354e61e4f945989b76535a21aab8)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue May 30 09:07:35 2017
-// Update Count     : 164
+// Last Modified On : Thu Jun  1 22:46:43 2017
+// Update Count     : 216
 //
 
@@ -28,6 +28,4 @@
 //---------------------------------------
 
-extern "C" { void * memset( void * dest, int c, size_t size ); } // use default C routine for void *
-
 // allocation, non-array types
 static inline forall( dtype T | sized(T) ) T * malloc( void ) {
@@ -35,83 +33,83 @@
 	return (T *)(void *)malloc( (size_t)sizeof(T) );	// C malloc
 } // malloc
-static inline forall( dtype T | sized(T) ) T * malloc( char fill ) {
+
+extern "C" { void * calloc( size_t dim, size_t size ); } // default C routine
+static inline forall( dtype T | sized(T) ) T * calloc( size_t dim ) {
 	//printf( "X2\n" );
+	return (T *)(void *)calloc( dim, sizeof(T) );		// C cmalloc
+}
+
+extern "C" { void * realloc( void * ptr, size_t size ); } // default C routine for void *
+static inline forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ) {
+	//printf( "X3\n" );
+	return (T *)(void *)realloc( (void *)ptr, size );
+}
+
+extern "C" { void * memalign( size_t align, size_t size ); } // use default C routine for void *
+static inline forall( dtype T | sized(T) ) T * memalign( size_t align ) {
+	//printf( "X4\n" );
+	return (T *)memalign( align, sizeof(T) );
+} // memalign
+
+static inline forall( dtype T | sized(T) ) T * aligned_alloc( size_t align ) {
+	//printf( "X5\n" );
+	return (T *)memalign( align, sizeof(T) );
+} // aligned_alloc
+
+extern "C" { int posix_memalign( void ** ptr, size_t align, size_t size ); } // use default C routine for void *
+static inline forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t align ) {
+	//printf( "X6\n" );
+	return posix_memalign( (void **)ptr, align, sizeof(T) );
+} // posix_memalign
+
+
+extern "C" { void * memset( void * dest, int c, size_t size ); } // use default C routine for void *
+
+static inline forall( dtype T | sized(T) ) T * alloc( void ) {
+	//printf( "X7\n" );
+	return (T *)(void *)malloc( (size_t)sizeof(T) );	// C malloc
+} // alloc
+static inline forall( dtype T | sized(T) ) T * alloc( char fill ) {
+	//printf( "X8\n" );
 	T * ptr = (T *)(void *)malloc( (size_t)sizeof(T) );	// C malloc
     return memset( ptr, (int)fill, sizeof(T) );			// initial with fill value
-} // malloc
-
-// allocation, array types
-extern "C" { void * calloc( size_t dim, size_t size ); } // use default C routine for void *
-static inline forall( dtype T | sized(T) ) T * calloc( size_t dim ) {
-	//printf( "X3\n" );
-	return (T *)(void *)calloc( dim, sizeof(T) );		// C cmalloc
-}
-static inline forall( dtype T | sized(T) ) T * amalloc( size_t dim ) { // alternative name
-	//printf( "X4\n" );
+} // alloc
+
+static inline forall( dtype T | sized(T) ) T * alloc( size_t dim ) {
+	//printf( "X9\n" );
 	return (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc
-} // amalloc
-static inline forall( dtype T | sized(T) ) T * amalloc( size_t dim, char fill ) { // alternative name
-	//printf( "X5\n" );
+} // alloc
+static inline forall( dtype T | sized(T) ) T * alloc( size_t dim, char fill ) {
+	//printf( "X10\n" );
 	T * ptr = (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc
     return memset( ptr, (int)fill, dim * sizeof(T) );
-} // amalloc
-
-// resize, non-array types
-extern "C" { void * realloc( void * ptr, size_t size ); } // use default C routine for void *
-static inline forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ) {
-	//printf( "X5.5\n" );
-	return (T *)(void *)realloc( (void *)ptr, size );
-}
-forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size, char fill );
-static inline forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size ) {	// alternative name
-	//printf( "X7\n" );
-	return realloc( ptr, size );
-} // malloc
-static inline forall( dtype T | sized(T) ) T * malloc( T * ptr, size_t size, char fill ) { // alternative name
-	//printf( "X8\n" );
-	return realloc( ptr, size, fill );
-} // malloc
-
-// resize, array types
-static inline forall( dtype T | sized(T) ) T * amalloc( T * ptr, size_t dim ) {
-	//printf( "X9\n" );
-	return malloc( ptr, dim * (size_t)sizeof(T) );
-} // amalloc
-static inline forall( dtype T | sized(T) ) T * amalloc( T * ptr, size_t dim, char fill ) {
-	//printf( "X10\n" );
-	return malloc( ptr, dim * (size_t)sizeof(T), fill );
-} // amalloc
-
-// alignment, non-array types
-extern "C" { void * memalign( size_t alignment, size_t size ); } // use default C routine for void *
-static inline forall( dtype T | sized(T) ) T * memalign( size_t alignment ) {
+} // alloc
+
+static inline forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim ) {
 	//printf( "X11\n" );
-	return (T *)memalign( alignment, sizeof(T) );
-} // memalign
-static inline forall( dtype T | sized(T) ) T * memalign( size_t alignment, char fill ) {
-	//printf( "X12\n" );
-    T * ptr = (T *)memalign( alignment, sizeof(T) );
+	return (void *)realloc( (void *)ptr, dim * (size_t)sizeof(T) ); // C realloc
+} // alloc
+forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim, char fill );
+
+static inline forall( dtype T | sized(T) ) T * align_alloc( size_t align ) {
+	//printf( "X13\n" );
+	return (T *)memalign( align, sizeof(T) );
+} // align_alloc
+static inline forall( dtype T | sized(T) ) T * align_alloc( size_t align, char fill ) {
+	//printf( "X14\n" );
+    T * ptr = (T *)memalign( align, sizeof(T) );
     return memset( ptr, (int)fill, sizeof(T) );
-} // memalign
-static inline forall( dtype T | sized(T) ) T * aligned_alloc( size_t alignment ) {
-	//printf( "X13\n" );
-	return (T *)memalign( alignment, sizeof(T) );
-} // aligned_alloc
-extern "C" { int posix_memalign( void ** ptr, size_t alignment, size_t size ); } // use default C routine for void *
-static inline forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t alignment ) {
-	//printf( "X14\n" );
-	return posix_memalign( (void **)ptr, alignment, sizeof(T) );
-} // posix_memalign
-
-// alignment, array types
-static inline forall( dtype T | sized(T) ) T * amemalign( size_t alignment, size_t dim ) {
+} // align_alloc
+
+static inline forall( dtype T | sized(T) ) T * align_alloc( size_t align, size_t dim ) {
 	//printf( "X15\n" );
-	return (T *)memalign( alignment, dim * sizeof(T) );
-} // amemalign
-static inline forall( dtype T | sized(T) ) T * amemalign( size_t alignment, size_t dim, char fill ) {
+	return (T *)memalign( align, dim * sizeof(T) );
+} // align_alloc
+static inline forall( dtype T | sized(T) ) T * align_alloc( size_t align, size_t dim, char fill ) {
 	//printf( "X16\n" );
-    T * ptr = (T *)memalign( alignment, dim * sizeof(T) );
+    T * ptr = (T *)memalign( align, dim * sizeof(T) );
     return memset( ptr, (int)fill, dim * sizeof(T) );
-} // amemalign
+} // align_alloc
+
 
 // data, non-array types
@@ -127,17 +125,22 @@
 
 // data, array types
-static inline forall( dtype T | sized(T) ) T * amemset( T * dest, size_t dim, char c ) {
+static inline forall( dtype T | sized(T) ) T * memset( T dest[], size_t dim, char c ) {
 	//printf( "X19\n" );
 	return memset( dest, c, dim * sizeof(T) );
-} // amemset
-static inline forall( dtype T | sized(T) ) T * amemcpy( T * dest, const T * src, size_t dim ) {
+} // memset
+static inline forall( dtype T | sized(T) ) T * memcpy( T dest[], const T src[], size_t dim ) {
 	//printf( "X20\n" );
-	return memcpy( dest, src, dim * sizeof(T) );
-} // amemcpy
-
-// allocation/deallocation and constructor/destructor
-forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p );
+	return (void *)memcpy( dest, src, dim * sizeof(T) ); // C memcpy
+} // memcpy
+
+// allocation/deallocation and constructor/destructor, non-array types
+forall( dtype T | sized(T), ttype Params | { void ?{}( T *, Params ); } ) T * new( Params p );
 forall( dtype T | { void ^?{}( T * ); } ) void delete( T * ptr );
 forall( dtype T, ttype Params | { void ^?{}( T * ); void delete( Params ); } ) void delete( T * ptr, Params rest );
+
+// allocation/deallocation and constructor/destructor, array types
+forall( dtype T | sized(T), ttype Params | { void ?{}( T *, Params ); } ) T * anew( size_t dim, Params p );
+forall( dtype T | sized(T) | { void ^?{}( T * ); } ) void adelete( size_t dim, T arr[] );
+forall( dtype T | sized(T) | { void ^?{}( T * ); }, ttype Params | { void adelete( Params ); } ) void adelete( size_t dim, T arr[], Params rest );
 
 //---------------------------------------
