Lines Matching defs:begin

48 sdp_parse_version(int *version, const char *begin, const char *end,
51 if (*begin++ != COMMP_EQUALS || commp_atoi(begin, end, version) != 0)
63 sdp_parse_name(char **name, const char *begin, const char *end,
68 if (*begin++ != COMMP_EQUALS) {
75 len = end - begin;
79 COMMP_COPY_STR(*name, begin, len);
95 sdp_parse_info(char **info, const char *begin, const char *end,
100 if (*begin++ != COMMP_EQUALS) {
107 len = end - begin;
111 COMMP_COPY_STR(*info, begin, len);
125 sdp_parse_uri(char **uri, const char *begin, const char *end, uint_t *p_error)
129 if (*begin++ != COMMP_EQUALS) {
136 len = end - begin;
137 if (len < 1 || isspace(*begin) || isspace (*(end - 1))) {
140 COMMP_COPY_STR(*uri, begin, len);
154 sdp_parse_phone(sdp_list_t **phone, const char *begin, const char *end,
161 if (*begin++ != COMMP_EQUALS) {
165 len = end - begin;
166 if (len < 1 || isspace(*begin) || isspace(*(end - 1))) {
174 COMMP_COPY_STR(new_phone->value, begin, len);
197 sdp_parse_email(sdp_list_t **email, const char *begin, const char *end,
204 if (*begin++ != COMMP_EQUALS) {
208 len = end - begin;
209 if (len < 1 || isspace(*begin) || isspace(*(end - 1))) {
217 COMMP_COPY_STR(new_email->value, begin, len);
249 sdp_parse_origin(sdp_origin_t **origin, const char *begin, const char *end,
255 if (*begin++ != COMMP_EQUALS) {
268 current = begin;
269 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
272 COMMP_COPY_STR(new_origin->o_username, begin, current - begin);
280 begin = ++current;
281 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0)
283 if (commp_strtoull(begin, current, &new_origin->o_id) != 0)
286 begin = ++current;
287 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0)
289 if (commp_strtoull(begin, current, &new_origin->o_version) != 0)
292 begin = ++current;
293 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
296 COMMP_COPY_STR(new_origin->o_nettype, begin, current - begin);
304 begin = ++current;
305 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
308 COMMP_COPY_STR(new_origin->o_addrtype, begin, current - begin);
316 begin = ++current;
317 if (commp_find_token(&begin, &current, end, COMMP_SP, B_TRUE) != 0)
319 COMMP_COPY_STR(new_origin->o_address, begin, current - begin);
341 sdp_parse_time(sdp_time_t **time, const char *begin, const char *end,
348 if (*begin++ != COMMP_EQUALS) {
358 current = begin;
359 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0)
361 if (commp_strtoull(begin, current, &new_time->t_start) != 0)
364 begin = ++current;
365 if (commp_find_token(&begin, &current, end, COMMP_SP, B_TRUE) != 0)
367 if (commp_strtoull(begin, current, &new_time->t_stop) != 0)
394 sdp_parse_connection(sdp_conn_t **conn, const char *begin, const char *end,
405 if (*begin++ != COMMP_EQUALS) {
415 current = begin;
416 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
419 COMMP_COPY_STR(new_conn->c_nettype, begin, current - begin);
427 begin = ++current;
428 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
431 COMMP_COPY_STR(new_conn->c_addrtype, begin, current - begin);
448 begin = ++current;
450 if (commp_find_token(&begin, &current, end, COMMP_SP,
455 if (commp_find_token(&begin, &current, end, COMMP_SLASH,
497 COMMP_COPY_STR(new_conn->c_address, begin, current - begin);
524 sdp_parse_bandwidth(sdp_bandwidth_t **bw, const char *begin, const char *end,
531 if (*begin++ != COMMP_EQUALS) {
540 current = begin;
541 if (commp_find_token(&begin, &current, end, COMMP_COLON,
545 COMMP_COPY_STR(new_bw->b_type, begin, current - begin);
554 begin = ++current;
555 if (commp_find_token(&begin, &current, end, COMMP_SP, B_TRUE) != 0)
557 if (commp_strtoull(begin, current, &new_bw->b_value) != 0)
582 sdp_parse_repeat(sdp_time_t *time, const char *begin, const char *end,
590 if (*begin++ != COMMP_EQUALS) {
628 current = begin;
629 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0)
631 if (commp_time_to_secs(begin, current, &new_repeat->r_interval) != 0)
634 begin = ++current;
635 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0)
637 if (commp_time_to_secs(begin, current, &new_repeat->r_duration) != 0)
644 begin = current;
645 if (commp_find_token(&begin, &current, end, COMMP_SP,
649 if ((ret = add_value_to_list(&new_repeat->r_offset, begin,
650 current - begin, B_FALSE)) != 0) {
678 sdp_parse_zone(sdp_zone_t **zone, const char *begin, const char *end,
685 if (*begin++ != COMMP_EQUALS) {
693 current = begin;
707 begin = current;
708 if (commp_find_token(&begin, &current, end, COMMP_SP,
712 if (commp_strtoull(begin, current, &new_zone->z_time) != 0)
714 begin = ++current;
715 if (commp_find_token(&begin, &current, end, COMMP_SP,
719 COMMP_COPY_STR(new_zone->z_offset, begin, current -
720 begin);
747 sdp_parse_key(sdp_key_t **key, const char *begin, const char *end,
753 if (*begin++ != COMMP_EQUALS) {
766 current = begin;
767 if (commp_find_token(&begin, &current, end, COMMP_COLON,
771 COMMP_COPY_STR(new_key->k_method, begin, current - begin);
805 sdp_parse_attribute(sdp_attr_t **attr, const char *begin, const char *end,
812 if (*begin++ != COMMP_EQUALS) {
822 current = begin;
823 if (commp_find_token(&begin, &current, end, COMMP_COLON,
827 COMMP_COPY_STR(new_attr->a_name, begin, current - begin);
865 sdp_parse_media(sdp_session_t *session, const char *begin, const char *end,
873 if (*begin++ != COMMP_EQUALS) {
885 current = begin;
886 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
889 COMMP_COPY_STR(new_media->m_name, begin, current - begin);
897 begin = ++current;
898 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0)
901 current = begin;
902 if (commp_find_token(&begin, &current, fake_end, COMMP_SLASH,
906 if (commp_atoui(begin, current, &new_media->m_port) != 0)
910 begin = ++current;
911 if (commp_find_token(&begin, &current, fake_end, COMMP_SP,
915 if (commp_atoi(begin, current, &new_media->m_portcount) != 0)
921 begin = ++current;
922 if (commp_find_token(&begin, &current, end, COMMP_SP, B_FALSE) != 0) {
925 COMMP_COPY_STR(new_media->m_proto, begin, current - begin);
937 begin = current;
938 if (commp_find_token(&begin, &current, end, COMMP_SP,
942 if (add_value_to_list(&new_media->m_format, begin,
943 current - begin, B_TRUE) != 0) {
991 const char *begin, const char *end)
998 switch (*begin) {
1002 sdp_parse_version(&_session->s_version, begin + 1, end,
1008 sdp_parse_origin(&_session->s_origin, begin + 1, end,
1014 sdp_parse_name(&_session->s_name, begin + 1, end,
1024 m_info), begin + 1, end, &description->
1028 sdp_parse_info(&_session->s_info, begin + 1,
1034 sdp_parse_uri(&_session->s_uri, begin + 1, end,
1039 sdp_parse_email(&_session->s_email, begin + 1, end,
1044 sdp_parse_phone(&_session->s_phone, begin + 1, end,
1055 m_conn), begin + 1, end,
1068 begin + 1, end, &description->d_perror);
1077 m_bw), begin + 1, end,
1082 begin + 1, end, &description->d_perror);
1092 s_time, begin + 1, end, &description->d_perror);
1099 sdp_parse_repeat(description->d_ltime, begin + 1, end,
1104 sdp_parse_zone(&_session->s_zone, begin + 1, end,
1114 begin + 1, end, &description->d_perror);
1117 sdp_parse_key(&_session->s_key, begin + 1, end,
1128 m_attr), begin + 1, end,
1133 begin + 1, end, &description->d_perror);
1147 begin + 1, end, &description->d_perror);
1158 description->d_prev = *begin;
1160 description->d_mprev = *begin;