commit | 74ab227b58ee3eae152c1142eb9144ee5332a7d9 | [log] [tgz] |
---|---|---|
author | Thomas Martitz <kugel@rockbox.org> | Mon Jul 18 18:55:20 2011 +0000 |
committer | Thomas Martitz <kugel@rockbox.org> | Mon Jul 18 18:55:20 2011 +0000 |
tree | 0a3b90bc96169a3ed00fc51120d5009d443bd8c0 | |
parent | e0970817b0d8b426f4b26090017868067d0f516e [diff] |
Introduce bsearch() and use it in tagtree.c. bsearch() is a general purpose binary search function for arrays. It's supposedly faster than looping over arrays. The array needs to be sorted in ascending order under the provided comparison function. If the key and array element are of the same kind, then the same compare function can be used for qsort() and bsearch(). Code taken from glibc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30155 a1c6a512-1295-4272-9138-f99709370657