Findsortedindexrange
int
Findsortedindexrange(t_sorted *sd,ulong addr0,ulong addr1) {
Searches
for the first item in the table of sorted data
that lies within the range addr0
.. addr1 (addr1 is not
included). Returns index of the item in the data sorted by address, or
-1 if there is no such item. This function is very fast. Note that
returned index is volatile, any access to sd other than plain
search may reorder or move data. That is, you may make as many calls to
Findsorted...()
or Getsortedbyindex()
as you want, but any
call to Addsorteddata(),
Deletesorteddata()
etc. on the same sorted data descriptor invalidates all
obtained data indices and pointers!
Parameters:
sd
addr0
(in)
Initial address of the data range
addr1
(in)
Address that immediately follows the data range
Return
values:
On
success, returns index of the item in the data sorted
by address, or -1 if there is no such item
See
also: