Deletenonconfirmedsorteddata

int Deletenonconfirmedsorteddata(t_sorted *sd);


Deletes all items of the pointed sorted data with cleared flag TY_CONFIRMED and clears TY_CONFIRMED in all remaining items.


Parameters:

sd
(in,out) Pointer to the descriptor of sorted data (structure of type t_sorted). This call will fail if sorted data contains no type (i.e. was created with flag SDM_NOSIZE)


Return values:

Returns 0 on success and -1 on error


This function is useful if one wants to delete many scattered items of sorted data at once. First call Confirmsorteddata(1) to confirm all data. Next, walk data and remove bit TY_CONFIRMED from the items that must be deleted. Finally, call Deletenonconfirmedsorteddata(). This sequence is much faster than multiple calls to Deletesorteddata().


Example:

See bookmark.c


See also:
Sorted data, Confirmsorteddata()Deletesorteddata(), Deletesorteddatarange()