Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision 24c18ea22e5f52a4b5005d87964607d0a35a0cf0)
+++ src/libcfa/stdlib	(revision 0788c03dd6a2a501d475937283c5663e118eb288)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Mar  4 22:03:54 2017
-// Update Count     : 102
+// Last Modified On : Sat Apr  1 17:35:24 2017
+// Update Count     : 104
 //
 
@@ -84,4 +84,6 @@
 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 ); } )
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision 24c18ea22e5f52a4b5005d87964607d0a35a0cf0)
+++ src/libcfa/stdlib.c	(revision 0788c03dd6a2a501d475937283c5663e118eb288)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Mar  4 22:02:22 2017
-// Update Count     : 172
+// Last Modified On : Sat Apr  1 18:31:26 2017
+// Update Count     : 181
 //
 
@@ -228,4 +228,11 @@
 
 forall( otype T | { int ?<?( T, T ); } )
+unsigned int bsearch( 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; }
+	T *result = (T *)bsearch( &key, arr, dimension, sizeof(T), comp );
+	return result ? result - arr : dimension;			// pointer subtraction includes sizeof(T)
+} // bsearch
+
+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; }
