Index: tests/heap.cfa
===================================================================
--- tests/heap.cfa	(revision dc8511c89e456024f8e634c472b1ebc5d96cc56e)
+++ tests/heap.cfa	(revision 80228a77b362124741e3bb6a61cf81b6bc90fea1)
@@ -10,11 +10,11 @@
 // Created On       : Tue Nov  6 17:54:56 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Nov  6 17:55:39 2018
-// Update Count     : 2
+// Last Modified On : Thu Nov  8 09:03:54 2018
+// Update Count     : 17
 // 
 
 #include <thread.hfa>
-#include <kernel.hfa>										// processor
-#include <stdlib.hfa>										// *allocs
+#include <kernel.hfa>									// processor
+#include <stdlib.hfa>									// *allocs
 #include <malloc.h>										// malloc_*
 
@@ -37,32 +37,32 @@
 void main( Worker & ) {
     enum { NoOfAllocs = 5000, NoOfMmaps = 10 };
-    char *locns[NoOfAllocs];
+    char * locns[NoOfAllocs];
     int i;
 
     // check alloc/free
 
-    for ( int j = 0; j < 40; j += 1 ) {
-		for ( i = 0; i < NoOfAllocs; i += 1 ) {
+    for ( j; 40 ) {
+		for ( i; NoOfAllocs ) {
 			locns[i] = alloc( i );
 			//sout | (void *)locns[i] | endl;
-			for ( int k = 0; k < i; k += 1 ) locns[i][k] = '\345';
+			for ( k; i ) locns[i][k] = '\345';
 		} // for
 		//sout | (char *)sbrk(0) - start | " bytes" | endl;
 
-		for ( i = 0; i < NoOfAllocs; i += 1 ) {
+		for ( i; NoOfAllocs ) {
 			//sout | (void *)locns[i] | endl;
-			for ( int k = 0; k < i; k += 1 ) if ( locns[i][k] != '\345' ) abort( "new/delete corrupt storage1" );
+			for ( k; i ) if ( locns[i][k] != '\345' ) abort( "new/delete corrupt storage1" );
 			free( locns[i] );
 		} // for
 		//sout | (char *)sbrk(0) - start | " bytes" | endl;
 
-		for ( i = 0; i < NoOfAllocs; i += 1 ) {
+		for ( i; NoOfAllocs ) {
 			locns[i] = alloc( i );
 			//sout | (void *)locns[i] | endl;
-			for ( int k = 0; k < i; k += 1 ) locns[i][k] = '\345';
-		} // for
-		for ( i = NoOfAllocs - 1; i >=0 ; i -= 1 ) {
+			for ( k; i ) locns[i][k] = '\345';
+		} // for
+		for ( i; NoOfAllocs - 1 -~= 0 ) {
 			//sout | (void *)locns[i] | endl;
-			for ( int k = 0; k < i; k += 1 ) if ( locns[i][k] != '\345' ) abort( "new/delete corrupt storage2" );
+			for ( k; i ) if ( locns[i][k] != '\345' ) abort( "new/delete corrupt storage2" );
 			free( locns[i] );
 		} // for
@@ -71,7 +71,7 @@
     // check malloc/free (sbrk)
 
-    for ( i = 0; i < NoOfAllocs; i += 1 ) {
+    for ( i; NoOfAllocs ) {
 		size_t s = (i + 1) * 20;
-		char *area = (char *)malloc( s );
+		char * area = (char *)malloc( s );
 		if ( area == 0 ) abort( "malloc/free out of memory" );
 		area[0] = '\345'; area[s - 1] = '\345';			// fill first/last
@@ -80,6 +80,6 @@
     } // for
 
-    for ( i = 0; i < NoOfAllocs; i += 1 ) {
-		size_t s = i + 1;				// +1 to make initialization simpler
+    for ( i; NoOfAllocs ) {
+		size_t s = i + 1;								// +1 to make initialization simpler
 		locns[i] = (char *)malloc( s );
 		if ( locns[i] == 0 ) abort( "malloc/free out of memory" );
@@ -87,5 +87,5 @@
 		locns[i][malloc_usable_size( locns[i] ) - 1] = '\345'; // fill ultimate byte
     } // for
-    for ( i = 0; i < NoOfAllocs; i += 1 ) {
+    for ( i; NoOfAllocs ) {
 		size_t s = i + 1;
 		if ( locns[i][0] != '\345' || locns[i][s - 1] != '\345' ||
@@ -96,7 +96,7 @@
     // check malloc/free (mmap)
 
-    for ( i = 0; i < NoOfMmaps; i += 1 ) {
-		size_t s = i + default_mmap_start();				// cross over point
-		char *area = (char *)malloc( s );
+    for ( i; NoOfMmaps ) {
+		size_t s = i + default_mmap_start();			// cross over point
+		char * area = (char *)malloc( s );
 		if ( area == 0 ) abort( "malloc/free out of memory" );
 		area[0] = '\345'; area[s - 1] = '\345';			// fill first/last
@@ -105,6 +105,6 @@
     } // for
 
-    for ( i = 0; i < NoOfMmaps; i += 1 ) {
-		size_t s = i + default_mmap_start();				// cross over point
+    for ( i; NoOfMmaps ) {
+		size_t s = i + default_mmap_start();			// cross over point
 		locns[i] = (char *)malloc( s );
 		if ( locns[i] == 0 ) abort( "malloc/free out of memory" );
@@ -112,6 +112,6 @@
 		locns[i][malloc_usable_size( locns[i] ) - 1] = '\345'; // fill ultimate byte
     } // for
-    for ( i = 0; i < NoOfMmaps; i += 1 ) {
-		size_t s = i + default_mmap_start();				// cross over point
+    for ( i; NoOfMmaps ) {
+		size_t s = i + default_mmap_start();			// cross over point
 		if ( locns[i][0] != '\345' || locns[i][s - 1] != '\345' ||
 			 locns[i][malloc_usable_size( locns[i] ) - 1] != '\345' ) abort( "malloc/free corrupt storage" );
@@ -121,7 +121,7 @@
     // check calloc/free (sbrk)
 
-    for ( i = 0; i < NoOfAllocs; i += 1 ) {
+    for ( i; NoOfAllocs ) {
 		size_t s = (i + 1) * 20;
-		char *area = (char *)calloc( 5, s );
+		char * area = (char *)calloc( 5, s );
 		if ( area == 0 ) abort( "calloc/free out of memory" );
 		if ( area[0] != '\0' || area[s - 1] != '\0' ||
@@ -133,5 +133,5 @@
     } // for
 
-    for ( i = 0; i < NoOfAllocs; i += 1 ) {
+    for ( i; NoOfAllocs ) {
 		size_t s = i + 1;
 		locns[i] = (char *)calloc( 5, s );
@@ -143,5 +143,5 @@
 		locns[i][malloc_usable_size( locns[i] ) - 1] = '\345'; // fill ultimate byte
     } // for
-    for ( i = 0; i < NoOfAllocs; i += 1 ) {
+    for ( i; NoOfAllocs ) {
 		size_t s = i + 1;
 		if ( locns[i][0] != '\345' || locns[i][s - 1] != '\345' ||
@@ -152,7 +152,7 @@
     // check calloc/free (mmap)
 
-    for ( i = 0; i < NoOfMmaps; i += 1 ) {
-		size_t s = i + default_mmap_start();				// cross over point
-		char *area = (char *)calloc( 1, s );
+    for ( i; NoOfMmaps ) {
+		size_t s = i + default_mmap_start();			// cross over point
+		char * area = (char *)calloc( 1, s );
 		if ( area == 0 ) abort( "calloc/free out of memory" );
 		if ( area[0] != '\0' || area[s - 1] != '\0' ) abort( "calloc/free corrupt storage4.1" );
@@ -164,6 +164,6 @@
     } // for
 
-    for ( i = 0; i < NoOfMmaps; i += 1 ) {
-		size_t s = i + default_mmap_start();				// cross over point
+    for ( i; NoOfMmaps ) {
+		size_t s = i + default_mmap_start();			// cross over point
 		locns[i] = (char *)calloc( 1, s );
 		if ( locns[i] == 0 ) abort( "calloc/free out of memory" );
@@ -174,6 +174,6 @@
 		locns[i][malloc_usable_size( locns[i] ) - 1] = '\345'; // fill ultimate byte
     } // for
-    for ( i = 0; i < NoOfMmaps; i += 1 ) {
-		size_t s = i + default_mmap_start();				// cross over point
+    for ( i; NoOfMmaps ) {
+		size_t s = i + default_mmap_start();			// cross over point
 		if ( locns[i][0] != '\345' || locns[i][s - 1] != '\345' ||
 			 locns[i][malloc_usable_size( locns[i] ) - 1] != '\345' ) abort( "calloc/free corrupt storage6" );
@@ -185,8 +185,8 @@
     enum { limit = 64 * 1024 };							// check alignments up to here
 
-    for ( size_t a = libAlign(); a <= limit; a += a ) {	// generate powers of 2
+	for ( a; libAlign() ~= limit ~ a ) {				// generate powers of 2
 		//sout | alignments[a] | endl;
-		for ( int s = 1; s < NoOfAllocs; s += 1 ) {		// allocation of size 0 can return null
-			char *area = (char *)memalign( a, s );
+		for ( s; 1 ~ NoOfAllocs ) {						// allocation of size 0 can return null
+			char * area = (char *)memalign( a, s );
 			if ( area == 0 ) abort( "memalign/free out of memory" );
 			//sout | i | " " | area | endl;
@@ -202,9 +202,9 @@
     // check memalign/free (mmap)
 
-    for ( size_t a = libAlign(); a <= limit; a += a ) {	// generate powers of 2
+	for ( a; libAlign() ~= limit ~ a ) {				// generate powers of 2
 		//sout | alignments[a] | endl;
-		for ( i = 1; i < NoOfMmaps; i += 1 ) {
-			size_t s = i + default_mmap_start();			// cross over point
-			char *area = (char *)memalign( a, s );
+		for ( i; 1 ~ NoOfMmaps ) {
+			size_t s = i + default_mmap_start();		// cross over point
+			char * area = (char *)memalign( a, s );
 			if ( area == 0 ) abort( "memalign/free out of memory" );
 			//sout | i | " " | area | endl;
@@ -220,7 +220,7 @@
     // check calloc/realloc/free (sbrk)
 
-    for ( i = 1; i < 10000; i += 12 ) {
+    for ( i; 1 ~ 10_000 ~ 12 ) {
 		// initial N byte allocation
-		char *area = (char *)calloc( 5, i );
+		char * area = (char *)calloc( 5, i );
 		if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
 		if ( area[0] != '\0' || area[i - 1] != '\0' ||
@@ -229,5 +229,5 @@
 
 		// Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
-		for ( int s = i; s < 256 * 1024; s += 26 ) {	// start at initial memory request
+		for ( s; i ~ 256 * 1024 ~ 26 ) {				// start at initial memory request
 			area = (char *)realloc( area, s );			// attempt to reuse storage
 			if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
@@ -241,8 +241,8 @@
     // check calloc/realloc/free (mmap)
 
-    for ( i = 1; i < 1000; i += 12 ) {
+    for ( i; 1 ~ 10_000 ~ 12 ) {
 		// initial N byte allocation
-		size_t s = i + default_mmap_start();				// cross over point
-		char *area = (char *)calloc( 1, s );
+		size_t s = i + default_mmap_start();			// cross over point
+		char * area = (char *)calloc( 1, s );
 		if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
 		if ( area[0] != '\0' || area[s - 1] != '\0' ||
@@ -251,6 +251,6 @@
 
 		// Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
-		for ( int r = i; r < 256 * 1024; r += 26 ) {	// start at initial memory request
-			area = (char *)realloc( area, r );		// attempt to reuse storage
+		for ( r; i ~ 256 * 1024 ~ 26 ) {				// start at initial memory request
+			area = (char *)realloc( area, r );			// attempt to reuse storage
 			if ( area == 0 ) abort( "calloc/realloc/free out of memory" );
 			if ( area[0] != '\0' || area[r - 1] != '\0' ||
@@ -264,7 +264,7 @@
 
     size_t amount = 2;
-    for ( size_t a = libAlign(); a <= limit; a += a ) {	// generate powers of 2
+	for ( a; libAlign() ~= limit ~ a ) {				// generate powers of 2
 		// initial N byte allocation
-		char *area = (char *)memalign( a, amount );		// aligned N-byte allocation
+		char * area = (char *)memalign( a, amount );	// aligned N-byte allocation
 		if ( area == 0 ) abort( "memalign/realloc/free out of memory" ); // no storage ?
 		//sout | alignments[a] | " " | area | endl;
@@ -275,5 +275,5 @@
 
 		// Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
-		for ( int s = amount; s < 256 * 1024; s += 1 ) { // start at initial memory request
+		for ( s; amount ~ 256 * 1024 ) {				// start at initial memory request
 			if ( area[0] != '\345' || area[s - 2] != '\345' ) abort( "memalign/realloc/free corrupt storage" );
 			area = (char *)realloc( area, s );			// attempt to reuse storage
@@ -290,8 +290,8 @@
     // check cmemalign/free
 
-    for ( size_t a = libAlign(); a <= limit; a += a ) {	// generate powers of 2
+	for ( a; libAlign() ~= limit ~ a ) {				// generate powers of 2
 		//sout | alignments[a] | endl;
-		for ( int s = 1; s < limit; s += 1 ) {			// allocation of size 0 can return null
-			char *area = (char *)cmemalign( a, 1, s );
+		for ( s; 1 ~ limit ) {							// allocation of size 0 can return null
+			char * area = (char *)cmemalign( a, 1, s );
 			if ( area == 0 ) abort( "cmemalign/free out of memory" );
 			//sout | i | " " | area | endl;
@@ -310,7 +310,7 @@
 
     amount = 2;
-    for ( size_t a = libAlign() + libAlign(); a <= limit; a += a ) { // generate powers of 2
+	for ( a; libAlign() ~= limit ~ a ) {				// generate powers of 2
 		// initial N byte allocation
-		char *area = (char *)cmemalign( a, 1, amount );	// aligned N-byte allocation
+		char * area = (char *)cmemalign( a, 1, amount ); // aligned N-byte allocation
 		if ( area == 0 ) abort( "cmemalign/realloc/free out of memory" ); // no storage ?
 		//sout | alignments[a] | " " | area | endl;
@@ -324,5 +324,5 @@
 
 		// Do not start this loop index at 0 because realloc of 0 bytes frees the storage.
-		for ( int s = amount; s < 256 * 1024; s += 1 ) { // start at initial memory request
+		for ( s; amount ~ 256 * 1024 ) {				// start at initial memory request
 			if ( area[0] != '\345' || area[s - 2] != '\345' ) abort( "cmemalign/realloc/free corrupt storage2" );
 			area = (char *)realloc( area, s );			// attempt to reuse storage
