Lines Matching defs:elem
710 struct sdp_xml_data *elem;
712 elem = malloc(sizeof(struct sdp_xml_data));
713 if (!elem)
716 memset(elem, 0, sizeof(struct sdp_xml_data));
719 elem->size = DEFAULT_XML_DATA_SIZE;
720 elem->text = malloc(DEFAULT_XML_DATA_SIZE);
721 elem->text[0] = '\0';
723 return elem;
726 void sdp_xml_data_free(struct sdp_xml_data *elem)
728 if (elem->data)
729 sdp_data_free(elem->data);
731 free(elem->name);
732 free(elem->text);
733 free(elem);
736 struct sdp_xml_data *sdp_xml_data_expand(struct sdp_xml_data *elem)
740 newbuf = malloc(elem->size * 2);
744 memcpy(newbuf, elem->text, elem->size);
745 elem->size *= 2;
746 free(elem->text);
748 elem->text = newbuf;
750 return elem;
753 sdp_data_t *sdp_xml_parse_datatype(const char *el, struct sdp_xml_data *elem,
756 const char *data = elem->text;
785 return sdp_xml_parse_text(data, elem->type);