Programming Guide



sm_get_bundle_data

Reads an occurrence of bundle item data

char *sm_get_bundle_data(char *bundle_name, int item_no, int occur);

bundle_name
The name of the bundle to read. Supply NULL or empty string to specify the unnamed bundle.

item_no
The bundle offset of the item whose data you want to read. Each data item is identified by its offset within the bundle, where the first data item has an offset value of 1.

occur
The occurrence to read from item_no. If the data item contains only one occurrence, supply a value of 1.

Returns

Description

sm_get_bundle_data reads an occurrence from the data item item_no and returns a pointer to the data's location. Each occurrence in a bundle item is a null-terminated string. If occur is greater than 1, sm_get_bundle_data traverses the bundle item until it finds the specified occurrence.

Because Panther reuses the memory location in which the bundle data is copied, you should read this data immediately after calling sm_get_bundle_data.

See Also

sm_append_bundle_data, sm_is_bundle