Addnesteddata

void *Addnesteddata(t_nested *nd,void *item);

Inserts range into the nested data nd. On success (range is correctly added), returns pointer to the item in nested data. On error (invalid input parameters, low memory or new range partially intersects with existing range) returns NULL.


Parameters:

nd
Input parameter, pointer to the descriptor of nested data (structure of type t_nested)
item
Input parameter, pointer to the item that will be added to the nested data. Must begin with the structure t_nesthdr. All items in the header must be initialized, aprev must be set to 0


Return values:

Pointer to the item in nested data on success and NULL on error. Note that returned pointer is valid only till the next call to Addnesteddata(), Deletenesteddatarange() or any other function that modifies nested data


See also:
Nested data, t_nested, t_nesthdr, Createnesteddata(), Deletenestedrange(), Destroynesteddata(), Findnesteddata(), Getnestingdepth(), Getnestingpattern(), Nesteddatatoudd(), Uddtonesteddata()