Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision 7ece922e321b645f2d258e855ccf7b258e249385)
+++ src/libcfa/stdlib	(revision 87e08e24fea9367db3a245c3721aba70eb863578)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Aug 23 20:29:47 2017
-// Update Count     : 224
+// Last Modified On : Mon Aug  7 11:19:07 2017
+// Update Count     : 223
 //
 
@@ -230,5 +230,5 @@
 
 forall( otype T )
-void swap( T & t1, T & t2 );
+void swap( T * t1, T * t2 );
 
 // Local Variables: //
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision 7ece922e321b645f2d258e855ccf7b258e249385)
+++ src/libcfa/stdlib.c	(revision 87e08e24fea9367db3a245c3721aba70eb863578)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Aug 23 20:30:44 2017
-// Update Count     : 292
+// Last Modified On : Tue Aug  8 17:31:13 2017
+// Update Count     : 291
 //
 
@@ -305,8 +305,8 @@
 
 forall( otype T )
-void swap( T & t1, T & t2 ) {
-	T temp = t1;
-	t1 = t2;
-	t2 = temp;
+void swap( T * t1, T * t2 ) {
+	T temp = *t1;
+	*t1 = *t2;
+	*t2 = temp;
 } // swap
 
Index: src/tests/avltree/avl3.c
===================================================================
--- src/tests/avltree/avl3.c	(revision 7ece922e321b645f2d258e855ccf7b258e249385)
+++ src/tests/avltree/avl3.c	(revision 87e08e24fea9367db3a245c3721aba70eb863578)
@@ -3,9 +3,13 @@
 #include <stdlib>
 
+// from stdlib
+forall(otype T)
+void swap(T *, T *);
+
 // swaps the data within two tree nodes
 forall(otype K | Comparable(K), otype V)
 void node_swap(tree(K, V) * t, tree(K, V) * t2){
-	swap( t->key,  t2->key);
-	swap( t->value, t2->value);
+  swap(&t->key, &t2->key);
+  swap(&t->value, &t2->value);
 }
 
@@ -13,13 +17,13 @@
 forall(otype K | Comparable(K), otype V)
 tree(K, V) * find_successor(tree(K, V) * t){
-	tree(K, V) * find_successor_helper(tree(K, V) * t){
-		// go left as deep as possible, return the last node
-		if (empty(t->left)){
-			return t;
-		} else {
-			return find_successor_helper(t->left);
-		}
-	}
-	return find_successor_helper(t->right);
+  tree(K, V) * find_successor_helper(tree(K, V) * t){
+    // go left as deep as possible, return the last node
+    if (empty(t->left)){
+      return t;
+    } else {
+      return find_successor_helper(t->left);
+    }
+  }
+  return find_successor_helper(t->right);
 }
 
@@ -27,7 +31,7 @@
 forall(otype K | Comparable(K), otype V)
 void deleteSingleNode(tree(K, V) * t) {
-	t->left = NULL;
-	t->right = NULL;
-	delete(t);
+  t->left = NULL;
+  t->right = NULL;
+  delete(t);
 }
 
@@ -35,51 +39,51 @@
 forall(otype K | Comparable(K), otype V)
 tree(K, V) * remove_node(tree(K, V) * t){
-	// is the node a leaf?
-	if (empty(t->left) && empty(t->right)){
-		// yes, just delete this node
-		delete(t);
-		return NULL;
-	} else if (empty(t->left)){
-		// if the left is empty, there is only one child -> move right up
-		node_swap(t, t->right);
-		tree(K, V) * tmp = t->right;
+  // is the node a leaf?
+  if (empty(t->left) && empty(t->right)){
+    // yes, just delete this node
+    delete(t);
+    return NULL;
+  } else if (empty(t->left)){
+    // if the left is empty, there is only one child -> move right up
+    node_swap(t, t->right);
+    tree(K, V) * tmp = t->right;
 
-		// relink tree
-		t->left = tmp->left;
-		t->right = tmp->right;
+    // relink tree
+    t->left = tmp->left;
+    t->right = tmp->right;
 
-		setParent(t->left, t);
-		setParent(t->right, t);
-		deleteSingleNode(tmp);
-		return t;
-	} else if (empty(t->right)){
-		// if the right is empty, there is only one child -> move left up
-		node_swap(t, t->left);
-		tree(K, V) * tmp = t->left;
+    setParent(t->left, t);
+    setParent(t->right, t);
+    deleteSingleNode(tmp);
+    return t;
+  } else if (empty(t->right)){
+    // if the right is empty, there is only one child -> move left up
+    node_swap(t, t->left);
+    tree(K, V) * tmp = t->left;
 
-		// relink tree
-		t->left = tmp->left;
-		t->right = tmp->right;
+    // relink tree
+    t->left = tmp->left;
+    t->right = tmp->right;
 
-		setParent(t->left, t);
-		setParent(t->right, t);
-		deleteSingleNode(tmp);
-		return t;
-	} else {
-		// swap with the successor
-		tree(K, V) * s = find_successor(t);
-		tree(K, V) * parent = s->parent;
+    setParent(t->left, t);
+    setParent(t->right, t);
+    deleteSingleNode(tmp);
+    return t;
+  } else {
+    // swap with the successor
+    tree(K, V) * s = find_successor(t);
+    tree(K, V) * parent = s->parent;
 
-		if (parent->left == s){
-			parent->left = s->right;
-		} else {
-			assert(parent->right == s);
-			parent->right = s->right;
-		}
-		setParent(s->right, parent);
-		node_swap(t, s);
-		deleteSingleNode(s);
-		return t;
-	}
+    if (parent->left == s){
+      parent->left = s->right;
+    } else {
+      assert(parent->right == s);
+      parent->right = s->right;
+    }
+    setParent(s->right, parent);
+    node_swap(t, s);
+    deleteSingleNode(s);
+    return t;
+  }
 }
 
@@ -87,32 +91,28 @@
 forall(otype K | Comparable(K), otype V)
 tree(K, V) * remove_helper(tree(K, V) * t, K key, int * worked){
-	if (empty(t)){
-		// did not work because key was not found
-		// set the status variable and return
-		*worked = 1;
-	} else if (t->key == key) {
-		t = remove_node(t);
-	} else if (t->key < key){
-		t->right = remove_helper(t->right, key, worked);
-	} else {
-		// t->key > key
-		t->left = remove_helper(t->left, key, worked);
-	}
-	// try to fix after deleting
-	if (! empty(t)) {
-		t = tryFix(t);
-	}
-	return t;
+  if (empty(t)){
+    // did not work because key was not found
+    // set the status variable and return
+    *worked = 1;
+  } else if (t->key == key) {
+    t = remove_node(t);
+  } else if (t->key < key){
+    t->right = remove_helper(t->right, key, worked);
+  } else {
+    // t->key > key
+    t->left = remove_helper(t->left, key, worked);
+  }
+  // try to fix after deleting
+  if (! empty(t)) {
+    t = tryFix(t);
+  }
+  return t;
 }
 
 forall(otype K | Comparable(K), otype V)
 int remove(tree(K, V) ** t, K key){
-	int worked = 0;
-	tree(K, V) * newTree = remove_helper(*t, key, &worked);
-	*t = newTree;
-	return worked;
+  int worked = 0;
+  tree(K, V) * newTree = remove_helper(*t, key, &worked);
+  *t = newTree;
+  return worked;
 }
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
Index: src/tests/swap.c
===================================================================
--- src/tests/swap.c	(revision 7ece922e321b645f2d258e855ccf7b258e249385)
+++ src/tests/swap.c	(revision 87e08e24fea9367db3a245c3721aba70eb863578)
@@ -7,9 +7,9 @@
 // swap.c -- 
 //
-// Author           : Peter A. Buhr
+// Author           : Richard C. Bilson
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Aug 23 20:34:45 2017
-// Update Count     : 70
+// Last Modified On : Thu Apr 21 08:10:41 2016
+// Update Count     : 69
 //
 
@@ -20,65 +20,65 @@
 	char c1 = 'a', c2 = 'b';
 	sout | "char\t\t\t" | c1 | ' ' | c2 | "\t\t\tswap ";
-	swap( c1, c2 );
+	swap( &c1, &c2 );
 	sout | '\t' | c1 | ' ' | c2 | endl;
 
 	signed int i1 = -1, i2 = -2;
 	sout | "signed int\t\t" | i1 | i2 | "\t\t\tswap ";
-	swap( i1, i2 );
+	swap( &i1, &i2 );
 	sout | '\t' | i1 | i2 | endl;
 
 	unsigned int ui1 = 1, ui2 = 2;
 	sout | "unsigned int\t\t" | ui1 | ui2 | "\t\t\tswap ";
-	swap( ui1, ui2 );
+	swap( &ui1, &ui2 );
 	sout | '\t' | ui1 | ui2 | endl;
 
 	signed long int li1 = -1, li2 = -2;
 	sout | "signed long int\t\t" | li1 | li2 | "\t\t\tswap ";
-	swap( li1, li2 );
+	swap( &li1, &li2 );
 	sout | '\t' | li1 | li2 | endl;
 
 	unsigned long int uli1 = 1, uli2 = 2;
 	sout | "unsigned long int\t" | uli1 | uli2 | "\t\t\tswap ";
-	swap( uli1, uli2 );
+	swap( &uli1, &uli2 );
 	sout | '\t' | uli1 | uli2 | endl;
 
 	signed long long int lli1 = -1, lli2 = -2;
 	sout | "signed long long int\t" | lli1 | lli2 | "\t\t\tswap ";
-	swap( lli1, lli2 );
+	swap( &lli1, &lli2 );
 	sout | '\t' | lli1 | lli2 | endl;
 
 	unsigned long long int ulli1 = 1, ulli2 = 2;
 	sout | "unsigned long long int\t" | ulli1 | ulli2 | "\t\t\tswap ";
-	swap( ulli1, ulli2 );
+	swap( &ulli1, &ulli2 );
 	sout | '\t' | ulli1 | ulli2 | endl;
 
 	float f1 = 1.5, f2 = 2.5;
 	sout | "float\t\t\t" | f1 | f2 | "\t\t\tswap ";
-	swap( f1, f2 );
+	swap( &f1, &f2 );
 	sout | '\t' | f1 | f2 | endl;
 
 	double d1 = 1.5, d2 = 2.5;
 	sout | "double\t\t\t" | d1 | d2 | "\t\t\tswap ";
-	swap( d1, d2 );
+	swap( &d1, &d2 );
 	sout | '\t' | d1 | d2 | endl;
 
 	long double ld1 = 1.5, ld2 = 2.5;
 	sout | "long double\t\t" | ld1 | ld2 | "\t\t\tswap ";
-	swap( ld1, ld2 );
+	swap( &ld1, &ld2 );
 	sout | '\t' | ld1 | ld2 | endl;
 
 	float _Complex fc1 = 1.5f+1.5if, fc2 = 2.5f+2.5if;
 	sout | "float _Complex\t\t" | fc1 | fc2 | "\tswap ";
-	swap( fc1, fc2 );
+	swap( &fc1, &fc2 );
 	sout | '\t' | fc1 | fc2 | endl;
 
 	double _Complex dc1 = 1.5d+1.5id, dc2 = 2.5d+2.5id;
 	sout | "double _Complex\t\t" | dc1 | dc2 | "\tswap ";
-	swap( dc1, dc2 );
+	swap( &dc1, &dc2 );
 	sout | '\t' | dc1 | dc2 | endl;
 
 	long double _Complex ldc1 = 1.5d+1.5il, ldc2 = 2.5d+2.5il;
 	sout | "long double _Complex\t" | ldc1 | ldc2 | "\tswap ";
-	swap( ldc1, ldc2 );
+	swap( &ldc1, &ldc2 );
 	sout | '\t' | ldc1 | ldc2 | endl;
 
@@ -86,5 +86,5 @@
 	ofstream * ?|?( ofstream * os, S s ) { return os | s.i | s.j; }
 	sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap ";
-	swap( s1, s2 );
+	swap( &s1, &s2 );
 	sout | '\t' | s1 | "," | s2 | endl;
 } // main
