Lines Matching refs:cur

209     const char *cur;  in xmlParse3986Scheme()  local
214 cur = *str; in xmlParse3986Scheme()
215 if (!ISA_ALPHA(cur)) in xmlParse3986Scheme()
217 cur++; in xmlParse3986Scheme()
218 while (ISA_ALPHA(cur) || ISA_DIGIT(cur) || in xmlParse3986Scheme()
219 (*cur == '+') || (*cur == '-') || (*cur == '.')) cur++; in xmlParse3986Scheme()
222 uri->scheme = STRNDUP(*str, cur - *str); in xmlParse3986Scheme()
224 *str = cur; in xmlParse3986Scheme()
246 const char *cur; in xmlParse3986Fragment() local
251 cur = *str; in xmlParse3986Fragment()
253 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') || in xmlParse3986Fragment()
254 (*cur == '[') || (*cur == ']') || in xmlParse3986Fragment()
255 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) in xmlParse3986Fragment()
256 NEXT(cur); in xmlParse3986Fragment()
261 uri->fragment = STRNDUP(*str, cur - *str); in xmlParse3986Fragment()
263 uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Fragment()
265 *str = cur; in xmlParse3986Fragment()
283 const char *cur; in xmlParse3986Query() local
288 cur = *str; in xmlParse3986Query()
290 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') || in xmlParse3986Query()
291 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) in xmlParse3986Query()
292 NEXT(cur); in xmlParse3986Query()
297 uri->query = STRNDUP(*str, cur - *str); in xmlParse3986Query()
299 uri->query = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Query()
306 uri->query_raw = STRNDUP (*str, cur - *str); in xmlParse3986Query()
308 *str = cur; in xmlParse3986Query()
327 const char *cur = *str; in xmlParse3986Port() local
329 if (ISA_DIGIT(cur)) { in xmlParse3986Port()
332 while (ISA_DIGIT(cur)) { in xmlParse3986Port()
334 uri->port = uri->port * 10 + (*cur - '0'); in xmlParse3986Port()
335 cur++; in xmlParse3986Port()
337 *str = cur; in xmlParse3986Port()
358 const char *cur; in xmlParse3986Userinfo() local
360 cur = *str; in xmlParse3986Userinfo()
361 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || in xmlParse3986Userinfo()
362 ISA_SUB_DELIM(cur) || (*cur == ':')) in xmlParse3986Userinfo()
363 NEXT(cur); in xmlParse3986Userinfo()
364 if (*cur == '@') { in xmlParse3986Userinfo()
368 uri->user = STRNDUP(*str, cur - *str); in xmlParse3986Userinfo()
370 uri->user = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Userinfo()
372 *str = cur; in xmlParse3986Userinfo()
394 const char *cur = *str; in xmlParse3986DecOctet() local
396 if (!(ISA_DIGIT(cur))) in xmlParse3986DecOctet()
398 if (!ISA_DIGIT(cur+1)) in xmlParse3986DecOctet()
399 cur++; in xmlParse3986DecOctet()
400 else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur+2))) in xmlParse3986DecOctet()
401 cur += 2; in xmlParse3986DecOctet()
402 else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2))) in xmlParse3986DecOctet()
403 cur += 3; in xmlParse3986DecOctet()
404 else if ((*cur == '2') && (*(cur + 1) >= '0') && in xmlParse3986DecOctet()
405 (*(cur + 1) <= '4') && (ISA_DIGIT(cur + 2))) in xmlParse3986DecOctet()
406 cur += 3; in xmlParse3986DecOctet()
407 else if ((*cur == '2') && (*(cur + 1) == '5') && in xmlParse3986DecOctet()
408 (*(cur + 2) >= '0') && (*(cur + 1) <= '5')) in xmlParse3986DecOctet()
409 cur += 3; in xmlParse3986DecOctet()
412 *str = cur; in xmlParse3986DecOctet()
433 const char *cur = *str; in xmlParse3986Host() local
436 host = cur; in xmlParse3986Host()
440 if (*cur == '[') { in xmlParse3986Host()
441 cur++; in xmlParse3986Host()
442 while ((*cur != ']') && (*cur != 0)) in xmlParse3986Host()
443 cur++; in xmlParse3986Host()
444 if (*cur != ']') in xmlParse3986Host()
446 cur++; in xmlParse3986Host()
452 if (ISA_DIGIT(cur)) { in xmlParse3986Host()
453 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
455 if (*cur != '.') in xmlParse3986Host()
457 cur++; in xmlParse3986Host()
458 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
460 if (*cur != '.') in xmlParse3986Host()
462 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
464 if (*cur != '.') in xmlParse3986Host()
466 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
470 cur = *str; in xmlParse3986Host()
475 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || ISA_SUB_DELIM(cur)) in xmlParse3986Host()
476 NEXT(cur); in xmlParse3986Host()
482 if (cur != host) { in xmlParse3986Host()
484 uri->server = STRNDUP(host, cur - host); in xmlParse3986Host()
486 uri->server = xmlURIUnescapeString(host, cur - host, NULL); in xmlParse3986Host()
490 *str = cur; in xmlParse3986Host()
509 const char *cur; in xmlParse3986Authority() local
512 cur = *str; in xmlParse3986Authority()
516 ret = xmlParse3986Userinfo(uri, &cur); in xmlParse3986Authority()
517 if ((ret != 0) || (*cur != '@')) in xmlParse3986Authority()
518 cur = *str; in xmlParse3986Authority()
520 cur++; in xmlParse3986Authority()
521 ret = xmlParse3986Host(uri, &cur); in xmlParse3986Authority()
523 if (*cur == ':') { in xmlParse3986Authority()
524 cur++; in xmlParse3986Authority()
525 ret = xmlParse3986Port(uri, &cur); in xmlParse3986Authority()
528 *str = cur; in xmlParse3986Authority()
551 const char *cur; in xmlParse3986Segment() local
553 cur = *str; in xmlParse3986Segment()
554 if (!ISA_PCHAR(cur)) { in xmlParse3986Segment()
559 while (ISA_PCHAR(cur) && (*cur != forbid)) in xmlParse3986Segment()
560 NEXT(cur); in xmlParse3986Segment()
561 *str = cur; in xmlParse3986Segment()
580 const char *cur; in xmlParse3986PathAbEmpty() local
583 cur = *str; in xmlParse3986PathAbEmpty()
585 while (*cur == '/') { in xmlParse3986PathAbEmpty()
586 cur++; in xmlParse3986PathAbEmpty()
587 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathAbEmpty()
592 if (*str != cur) { in xmlParse3986PathAbEmpty()
594 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbEmpty()
596 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbEmpty()
601 *str = cur; in xmlParse3986PathAbEmpty()
620 const char *cur; in xmlParse3986PathAbsolute() local
623 cur = *str; in xmlParse3986PathAbsolute()
625 if (*cur != '/') in xmlParse3986PathAbsolute()
627 cur++; in xmlParse3986PathAbsolute()
628 ret = xmlParse3986Segment(&cur, 0, 0); in xmlParse3986PathAbsolute()
630 while (*cur == '/') { in xmlParse3986PathAbsolute()
631 cur++; in xmlParse3986PathAbsolute()
632 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathAbsolute()
638 if (cur != *str) { in xmlParse3986PathAbsolute()
640 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbsolute()
642 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbsolute()
647 *str = cur; in xmlParse3986PathAbsolute()
666 const char *cur; in xmlParse3986PathRootless() local
669 cur = *str; in xmlParse3986PathRootless()
671 ret = xmlParse3986Segment(&cur, 0, 0); in xmlParse3986PathRootless()
673 while (*cur == '/') { in xmlParse3986PathRootless()
674 cur++; in xmlParse3986PathRootless()
675 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathRootless()
680 if (cur != *str) { in xmlParse3986PathRootless()
682 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathRootless()
684 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathRootless()
689 *str = cur; in xmlParse3986PathRootless()
708 const char *cur; in xmlParse3986PathNoScheme() local
711 cur = *str; in xmlParse3986PathNoScheme()
713 ret = xmlParse3986Segment(&cur, ':', 0); in xmlParse3986PathNoScheme()
715 while (*cur == '/') { in xmlParse3986PathNoScheme()
716 cur++; in xmlParse3986PathNoScheme()
717 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathNoScheme()
722 if (cur != *str) { in xmlParse3986PathNoScheme()
724 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathNoScheme()
726 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathNoScheme()
731 *str = cur; in xmlParse3986PathNoScheme()
753 const char *cur; in xmlParse3986HierPart() local
756 cur = *str; in xmlParse3986HierPart()
758 if ((*cur == '/') && (*(cur + 1) == '/')) { in xmlParse3986HierPart()
759 cur += 2; in xmlParse3986HierPart()
760 ret = xmlParse3986Authority(uri, &cur); in xmlParse3986HierPart()
764 ret = xmlParse3986PathAbEmpty(uri, &cur); in xmlParse3986HierPart()
766 *str = cur; in xmlParse3986HierPart()
768 } else if (*cur == '/') { in xmlParse3986HierPart()
769 ret = xmlParse3986PathAbsolute(uri, &cur); in xmlParse3986HierPart()
771 } else if (ISA_PCHAR(cur)) { in xmlParse3986HierPart()
772 ret = xmlParse3986PathRootless(uri, &cur); in xmlParse3986HierPart()
781 *str = cur; in xmlParse3986HierPart()
1412 char *cur, *out; in xmlNormalizeURIPath() local
1420 cur = path; in xmlNormalizeURIPath()
1421 while (cur[0] == '/') in xmlNormalizeURIPath()
1422 ++cur; in xmlNormalizeURIPath()
1423 if (cur[0] == '\0') in xmlNormalizeURIPath()
1427 out = cur; in xmlNormalizeURIPath()
1432 while (cur[0] != '\0') { in xmlNormalizeURIPath()
1437 if ((cur[0] == '.') && (cur[1] == '/')) { in xmlNormalizeURIPath()
1438 cur += 2; in xmlNormalizeURIPath()
1440 while (cur[0] == '/') in xmlNormalizeURIPath()
1441 cur++; in xmlNormalizeURIPath()
1449 if ((cur[0] == '.') && (cur[1] == '\0')) in xmlNormalizeURIPath()
1453 while (cur[0] != '/') { in xmlNormalizeURIPath()
1454 if (cur[0] == '\0') in xmlNormalizeURIPath()
1456 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1459 while ((cur[0] == '/') && (cur[1] == '/')) in xmlNormalizeURIPath()
1460 cur++; in xmlNormalizeURIPath()
1462 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1468 cur = path; in xmlNormalizeURIPath()
1469 while (cur[0] == '/') in xmlNormalizeURIPath()
1470 ++cur; in xmlNormalizeURIPath()
1471 if (cur[0] == '\0') in xmlNormalizeURIPath()
1500 segp = cur; in xmlNormalizeURIPath()
1514 if (((cur[0] == '.') && (cur[1] == '.') && (segp == cur+3)) in xmlNormalizeURIPath()
1517 cur = segp; in xmlNormalizeURIPath()
1530 cur[0] = '\0'; in xmlNormalizeURIPath()
1535 tmp = cur; in xmlNormalizeURIPath()
1541 segp = cur; in xmlNormalizeURIPath()
1554 cur = segp; in xmlNormalizeURIPath()
1555 while ((cur > path) && (cur[-1] != '/')) in xmlNormalizeURIPath()
1556 --cur; in xmlNormalizeURIPath()
1572 cur = path; in xmlNormalizeURIPath()
1573 while ((cur[0] == '/') && (cur[1] == '.') && (cur[2] == '.') in xmlNormalizeURIPath()
1574 && ((cur[3] == '/') || (cur[3] == '\0'))) in xmlNormalizeURIPath()
1575 cur += 3; in xmlNormalizeURIPath()
1577 if (cur != path) { in xmlNormalizeURIPath()
1579 while (cur[0] != '\0') in xmlNormalizeURIPath()
1580 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1883 int ret, len, indx, cur, out; in xmlBuildURI() local
2068 cur = 0; in xmlBuildURI()
2071 while (bas->path[cur] != 0) { in xmlBuildURI()
2072 while ((bas->path[cur] != 0) && (bas->path[cur] != '/')) in xmlBuildURI()
2073 cur++; in xmlBuildURI()
2074 if (bas->path[cur] == 0) in xmlBuildURI()
2077 cur++; in xmlBuildURI()
2078 while (out < cur) { in xmlBuildURI()