-/*
- ____ _ _ _
-/ ___| ___ _ __| |_ ___ __| | / \ _ __ _ __ __ _ _ _ ___
-\___ \ / _ \| '__| __/ _ \/ _` | / _ \ | '__| '__/ _` | | | / __|
- ___) | (_) | | | || __/ (_| | / ___ \| | | | | (_| | |_| \__ \
-|____/ \___/|_| \__\___|\__,_| /_/ \_\_| |_| \__,_|\__, |___/
- |___/
-*/
-
-typedef int (ir_arr_cmp_func_t)(const void *a, const void *b);
-
-/**
- * Do a binary search in an array.
- * @param arr The array.
- * @param elm_size The size of an array element.
- * @param cmp A comparison function for two array elements (see qsort(3) for example).
- * @param elm A pointer to the element we are looking for.
- * @return This is somewhat tricky. Let <code>res</code> be the return value.
- * If the return value is negative, then <code>elm</code> was not in the array
- * but <code>-res - 1</code> gives the proper location where it should be inserted.
- * If <code>res >= 0</code> then the element is in the array and <code>res</code>
- * represents its index.
- * That allows for testing membership and finding proper insertion indices.
- * @note The differences to bsearch(3) which does not give proper insert locations
- * in the case that the element is not conatined in the array.
- */
-static inline int ir_arr_bsearch(const void *arr, size_t elm_size, ir_arr_cmp_func_t *cmp, const void *elm)