Replacesorteddatarange

int Replacesorteddatarange(t_sorted *sd,void *data,int n,ulong addr0,ulong addr1);

Removes all items of sorted data sd in the range addr0..addr1 (last address is not included) and replaces them with n new data items. New data may be unsorted, but items must not overlap and must lie completely within the specified range. This procedure is usually much faster than n calls to Addsorteddata(). Does not work with autoarrangeable sorted data or with data of type SDM_NOSIZE.


Parameters:

sd
(in) Pointer to the structure of type t_sorted, descriptor of sorted data
data
(in) Pointer to array containing n new data items. They must not overlap and must lie completely within the range addr0 .. addr1
n
(in) Number of new items in data
addr0
(in) Start address of the range
addr1
(in)End address of the range (not included)


Return values:

On error, returns -1 and leaves sorted data untouched, except for the case of low memory. On success, returns 0


See also:
Sorted data, Addsorteddata(), Deletesorteddatarange()