Lines Matching refs:cur
210 const char *cur; in xmlParse3986Scheme() local
215 cur = *str; in xmlParse3986Scheme()
216 if (!ISA_ALPHA(cur)) in xmlParse3986Scheme()
218 cur++; in xmlParse3986Scheme()
219 while (ISA_ALPHA(cur) || ISA_DIGIT(cur) || in xmlParse3986Scheme()
220 (*cur == '+') || (*cur == '-') || (*cur == '.')) cur++; in xmlParse3986Scheme()
223 uri->scheme = STRNDUP(*str, cur - *str); in xmlParse3986Scheme()
225 *str = cur; in xmlParse3986Scheme()
247 const char *cur; in xmlParse3986Fragment() local
252 cur = *str; in xmlParse3986Fragment()
254 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') || in xmlParse3986Fragment()
255 (*cur == '[') || (*cur == ']') || in xmlParse3986Fragment()
256 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) in xmlParse3986Fragment()
257 NEXT(cur); in xmlParse3986Fragment()
262 uri->fragment = STRNDUP(*str, cur - *str); in xmlParse3986Fragment()
264 uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Fragment()
266 *str = cur; in xmlParse3986Fragment()
284 const char *cur; in xmlParse3986Query() local
289 cur = *str; in xmlParse3986Query()
291 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') || in xmlParse3986Query()
292 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) in xmlParse3986Query()
293 NEXT(cur); in xmlParse3986Query()
298 uri->query = STRNDUP(*str, cur - *str); in xmlParse3986Query()
300 uri->query = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Query()
307 uri->query_raw = STRNDUP (*str, cur - *str); in xmlParse3986Query()
309 *str = cur; in xmlParse3986Query()
328 const char *cur = *str; in xmlParse3986Port() local
331 if (ISA_DIGIT(cur)) { in xmlParse3986Port()
332 while (ISA_DIGIT(cur)) { in xmlParse3986Port()
333 port = port * 10 + (*cur - '0'); in xmlParse3986Port()
335 cur++; in xmlParse3986Port()
339 *str = cur; in xmlParse3986Port()
360 const char *cur; in xmlParse3986Userinfo() local
362 cur = *str; in xmlParse3986Userinfo()
363 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || in xmlParse3986Userinfo()
364 ISA_SUB_DELIM(cur) || (*cur == ':')) in xmlParse3986Userinfo()
365 NEXT(cur); in xmlParse3986Userinfo()
366 if (*cur == '@') { in xmlParse3986Userinfo()
370 uri->user = STRNDUP(*str, cur - *str); in xmlParse3986Userinfo()
372 uri->user = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Userinfo()
374 *str = cur; in xmlParse3986Userinfo()
396 const char *cur = *str; in xmlParse3986DecOctet() local
398 if (!(ISA_DIGIT(cur))) in xmlParse3986DecOctet()
400 if (!ISA_DIGIT(cur+1)) in xmlParse3986DecOctet()
401 cur++; in xmlParse3986DecOctet()
402 else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur+2))) in xmlParse3986DecOctet()
403 cur += 2; in xmlParse3986DecOctet()
404 else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2))) in xmlParse3986DecOctet()
405 cur += 3; in xmlParse3986DecOctet()
406 else if ((*cur == '2') && (*(cur + 1) >= '0') && in xmlParse3986DecOctet()
407 (*(cur + 1) <= '4') && (ISA_DIGIT(cur + 2))) in xmlParse3986DecOctet()
408 cur += 3; in xmlParse3986DecOctet()
409 else if ((*cur == '2') && (*(cur + 1) == '5') && in xmlParse3986DecOctet()
410 (*(cur + 2) >= '0') && (*(cur + 1) <= '5')) in xmlParse3986DecOctet()
411 cur += 3; in xmlParse3986DecOctet()
414 *str = cur; in xmlParse3986DecOctet()
435 const char *cur = *str; in xmlParse3986Host() local
438 host = cur; in xmlParse3986Host()
442 if (*cur == '[') { in xmlParse3986Host()
443 cur++; in xmlParse3986Host()
444 while ((*cur != ']') && (*cur != 0)) in xmlParse3986Host()
445 cur++; in xmlParse3986Host()
446 if (*cur != ']') in xmlParse3986Host()
448 cur++; in xmlParse3986Host()
454 if (ISA_DIGIT(cur)) { in xmlParse3986Host()
455 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
457 if (*cur != '.') in xmlParse3986Host()
459 cur++; in xmlParse3986Host()
460 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
462 if (*cur != '.') in xmlParse3986Host()
464 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
466 if (*cur != '.') in xmlParse3986Host()
468 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
472 cur = *str; in xmlParse3986Host()
477 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || ISA_SUB_DELIM(cur)) in xmlParse3986Host()
478 NEXT(cur); in xmlParse3986Host()
484 if (cur != host) { in xmlParse3986Host()
486 uri->server = STRNDUP(host, cur - host); in xmlParse3986Host()
488 uri->server = xmlURIUnescapeString(host, cur - host, NULL); in xmlParse3986Host()
492 *str = cur; in xmlParse3986Host()
511 const char *cur; in xmlParse3986Authority() local
514 cur = *str; in xmlParse3986Authority()
518 ret = xmlParse3986Userinfo(uri, &cur); in xmlParse3986Authority()
519 if ((ret != 0) || (*cur != '@')) in xmlParse3986Authority()
520 cur = *str; in xmlParse3986Authority()
522 cur++; in xmlParse3986Authority()
523 ret = xmlParse3986Host(uri, &cur); in xmlParse3986Authority()
525 if (*cur == ':') { in xmlParse3986Authority()
526 cur++; in xmlParse3986Authority()
527 ret = xmlParse3986Port(uri, &cur); in xmlParse3986Authority()
530 *str = cur; in xmlParse3986Authority()
553 const char *cur; in xmlParse3986Segment() local
555 cur = *str; in xmlParse3986Segment()
556 if (!ISA_PCHAR(cur)) { in xmlParse3986Segment()
561 while (ISA_PCHAR(cur) && (*cur != forbid)) in xmlParse3986Segment()
562 NEXT(cur); in xmlParse3986Segment()
563 *str = cur; in xmlParse3986Segment()
582 const char *cur; in xmlParse3986PathAbEmpty() local
585 cur = *str; in xmlParse3986PathAbEmpty()
587 while (*cur == '/') { in xmlParse3986PathAbEmpty()
588 cur++; in xmlParse3986PathAbEmpty()
589 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathAbEmpty()
594 if (*str != cur) { in xmlParse3986PathAbEmpty()
596 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbEmpty()
598 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbEmpty()
603 *str = cur; in xmlParse3986PathAbEmpty()
622 const char *cur; in xmlParse3986PathAbsolute() local
625 cur = *str; in xmlParse3986PathAbsolute()
627 if (*cur != '/') in xmlParse3986PathAbsolute()
629 cur++; in xmlParse3986PathAbsolute()
630 ret = xmlParse3986Segment(&cur, 0, 0); in xmlParse3986PathAbsolute()
632 while (*cur == '/') { in xmlParse3986PathAbsolute()
633 cur++; in xmlParse3986PathAbsolute()
634 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathAbsolute()
640 if (cur != *str) { in xmlParse3986PathAbsolute()
642 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbsolute()
644 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbsolute()
649 *str = cur; in xmlParse3986PathAbsolute()
668 const char *cur; in xmlParse3986PathRootless() local
671 cur = *str; in xmlParse3986PathRootless()
673 ret = xmlParse3986Segment(&cur, 0, 0); in xmlParse3986PathRootless()
675 while (*cur == '/') { in xmlParse3986PathRootless()
676 cur++; in xmlParse3986PathRootless()
677 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathRootless()
682 if (cur != *str) { in xmlParse3986PathRootless()
684 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathRootless()
686 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathRootless()
691 *str = cur; in xmlParse3986PathRootless()
710 const char *cur; in xmlParse3986PathNoScheme() local
713 cur = *str; in xmlParse3986PathNoScheme()
715 ret = xmlParse3986Segment(&cur, ':', 0); in xmlParse3986PathNoScheme()
717 while (*cur == '/') { in xmlParse3986PathNoScheme()
718 cur++; in xmlParse3986PathNoScheme()
719 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathNoScheme()
724 if (cur != *str) { in xmlParse3986PathNoScheme()
726 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathNoScheme()
728 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathNoScheme()
733 *str = cur; in xmlParse3986PathNoScheme()
755 const char *cur; in xmlParse3986HierPart() local
758 cur = *str; in xmlParse3986HierPart()
760 if ((*cur == '/') && (*(cur + 1) == '/')) { in xmlParse3986HierPart()
761 cur += 2; in xmlParse3986HierPart()
762 ret = xmlParse3986Authority(uri, &cur); in xmlParse3986HierPart()
766 ret = xmlParse3986PathAbEmpty(uri, &cur); in xmlParse3986HierPart()
768 *str = cur; in xmlParse3986HierPart()
770 } else if (*cur == '/') { in xmlParse3986HierPart()
771 ret = xmlParse3986PathAbsolute(uri, &cur); in xmlParse3986HierPart()
773 } else if (ISA_PCHAR(cur)) { in xmlParse3986HierPart()
774 ret = xmlParse3986PathRootless(uri, &cur); in xmlParse3986HierPart()
783 *str = cur; in xmlParse3986HierPart()
1414 char *cur, *out; in xmlNormalizeURIPath() local
1422 cur = path; in xmlNormalizeURIPath()
1423 while (cur[0] == '/') in xmlNormalizeURIPath()
1424 ++cur; in xmlNormalizeURIPath()
1425 if (cur[0] == '\0') in xmlNormalizeURIPath()
1429 out = cur; in xmlNormalizeURIPath()
1434 while (cur[0] != '\0') { in xmlNormalizeURIPath()
1439 if ((cur[0] == '.') && (cur[1] == '/')) { in xmlNormalizeURIPath()
1440 cur += 2; in xmlNormalizeURIPath()
1442 while (cur[0] == '/') in xmlNormalizeURIPath()
1443 cur++; in xmlNormalizeURIPath()
1451 if ((cur[0] == '.') && (cur[1] == '\0')) in xmlNormalizeURIPath()
1455 while (cur[0] != '/') { in xmlNormalizeURIPath()
1456 if (cur[0] == '\0') in xmlNormalizeURIPath()
1458 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1461 while ((cur[0] == '/') && (cur[1] == '/')) in xmlNormalizeURIPath()
1462 cur++; in xmlNormalizeURIPath()
1464 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1470 cur = path; in xmlNormalizeURIPath()
1471 while (cur[0] == '/') in xmlNormalizeURIPath()
1472 ++cur; in xmlNormalizeURIPath()
1473 if (cur[0] == '\0') in xmlNormalizeURIPath()
1502 segp = cur; in xmlNormalizeURIPath()
1516 if (((cur[0] == '.') && (cur[1] == '.') && (segp == cur+3)) in xmlNormalizeURIPath()
1519 cur = segp; in xmlNormalizeURIPath()
1532 cur[0] = '\0'; in xmlNormalizeURIPath()
1537 tmp = cur; in xmlNormalizeURIPath()
1543 segp = cur; in xmlNormalizeURIPath()
1556 cur = segp; in xmlNormalizeURIPath()
1557 while ((cur > path) && (cur[-1] != '/')) in xmlNormalizeURIPath()
1558 --cur; in xmlNormalizeURIPath()
1574 cur = path; in xmlNormalizeURIPath()
1575 while ((cur[0] == '/') && (cur[1] == '.') && (cur[2] == '.') in xmlNormalizeURIPath()
1576 && ((cur[3] == '/') || (cur[3] == '\0'))) in xmlNormalizeURIPath()
1577 cur += 3; in xmlNormalizeURIPath()
1579 if (cur != path) { in xmlNormalizeURIPath()
1581 while (cur[0] != '\0') in xmlNormalizeURIPath()
1582 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1885 int ret, len, indx, cur, out; in xmlBuildURI() local
2072 cur = 0; in xmlBuildURI()
2075 while (bas->path[cur] != 0) { in xmlBuildURI()
2076 while ((bas->path[cur] != 0) && (bas->path[cur] != '/')) in xmlBuildURI()
2077 cur++; in xmlBuildURI()
2078 if (bas->path[cur] == 0) in xmlBuildURI()
2081 cur++; in xmlBuildURI()
2082 while (out < cur) { in xmlBuildURI()