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 int digit = *cur - '0'; in xmlParse3986Port()
342 cur++; in xmlParse3986Port()
346 *str = cur; in xmlParse3986Port()
367 const char *cur; in xmlParse3986Userinfo() local
369 cur = *str; in xmlParse3986Userinfo()
370 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || in xmlParse3986Userinfo()
371 ISA_SUB_DELIM(cur) || (*cur == ':')) in xmlParse3986Userinfo()
372 NEXT(cur); in xmlParse3986Userinfo()
373 if (*cur == '@') { in xmlParse3986Userinfo()
377 uri->user = STRNDUP(*str, cur - *str); in xmlParse3986Userinfo()
379 uri->user = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986Userinfo()
381 *str = cur; in xmlParse3986Userinfo()
403 const char *cur = *str; in xmlParse3986DecOctet() local
405 if (!(ISA_DIGIT(cur))) in xmlParse3986DecOctet()
407 if (!ISA_DIGIT(cur+1)) in xmlParse3986DecOctet()
408 cur++; in xmlParse3986DecOctet()
409 else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur+2))) in xmlParse3986DecOctet()
410 cur += 2; in xmlParse3986DecOctet()
411 else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2))) in xmlParse3986DecOctet()
412 cur += 3; in xmlParse3986DecOctet()
413 else if ((*cur == '2') && (*(cur + 1) >= '0') && in xmlParse3986DecOctet()
414 (*(cur + 1) <= '4') && (ISA_DIGIT(cur + 2))) in xmlParse3986DecOctet()
415 cur += 3; in xmlParse3986DecOctet()
416 else if ((*cur == '2') && (*(cur + 1) == '5') && in xmlParse3986DecOctet()
417 (*(cur + 2) >= '0') && (*(cur + 1) <= '5')) in xmlParse3986DecOctet()
418 cur += 3; in xmlParse3986DecOctet()
421 *str = cur; in xmlParse3986DecOctet()
442 const char *cur = *str; in xmlParse3986Host() local
445 host = cur; in xmlParse3986Host()
449 if (*cur == '[') { in xmlParse3986Host()
450 cur++; in xmlParse3986Host()
451 while ((*cur != ']') && (*cur != 0)) in xmlParse3986Host()
452 cur++; in xmlParse3986Host()
453 if (*cur != ']') in xmlParse3986Host()
455 cur++; in xmlParse3986Host()
461 if (ISA_DIGIT(cur)) { in xmlParse3986Host()
462 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
464 if (*cur != '.') in xmlParse3986Host()
466 cur++; in xmlParse3986Host()
467 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
469 if (*cur != '.') in xmlParse3986Host()
471 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
473 if (*cur != '.') in xmlParse3986Host()
475 if (xmlParse3986DecOctet(&cur) != 0) in xmlParse3986Host()
479 cur = *str; in xmlParse3986Host()
484 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || ISA_SUB_DELIM(cur)) in xmlParse3986Host()
485 NEXT(cur); in xmlParse3986Host()
491 if (cur != host) { in xmlParse3986Host()
493 uri->server = STRNDUP(host, cur - host); in xmlParse3986Host()
495 uri->server = xmlURIUnescapeString(host, cur - host, NULL); in xmlParse3986Host()
499 *str = cur; in xmlParse3986Host()
518 const char *cur; in xmlParse3986Authority() local
521 cur = *str; in xmlParse3986Authority()
525 ret = xmlParse3986Userinfo(uri, &cur); in xmlParse3986Authority()
526 if ((ret != 0) || (*cur != '@')) in xmlParse3986Authority()
527 cur = *str; in xmlParse3986Authority()
529 cur++; in xmlParse3986Authority()
530 ret = xmlParse3986Host(uri, &cur); in xmlParse3986Authority()
532 if (*cur == ':') { in xmlParse3986Authority()
533 cur++; in xmlParse3986Authority()
534 ret = xmlParse3986Port(uri, &cur); in xmlParse3986Authority()
537 *str = cur; in xmlParse3986Authority()
560 const char *cur; in xmlParse3986Segment() local
562 cur = *str; in xmlParse3986Segment()
563 if (!ISA_PCHAR(cur)) { in xmlParse3986Segment()
568 while (ISA_PCHAR(cur) && (*cur != forbid)) in xmlParse3986Segment()
569 NEXT(cur); in xmlParse3986Segment()
570 *str = cur; in xmlParse3986Segment()
589 const char *cur; in xmlParse3986PathAbEmpty() local
592 cur = *str; in xmlParse3986PathAbEmpty()
594 while (*cur == '/') { in xmlParse3986PathAbEmpty()
595 cur++; in xmlParse3986PathAbEmpty()
596 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathAbEmpty()
601 if (*str != cur) { in xmlParse3986PathAbEmpty()
603 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbEmpty()
605 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbEmpty()
610 *str = cur; in xmlParse3986PathAbEmpty()
629 const char *cur; in xmlParse3986PathAbsolute() local
632 cur = *str; in xmlParse3986PathAbsolute()
634 if (*cur != '/') in xmlParse3986PathAbsolute()
636 cur++; in xmlParse3986PathAbsolute()
637 ret = xmlParse3986Segment(&cur, 0, 0); in xmlParse3986PathAbsolute()
639 while (*cur == '/') { in xmlParse3986PathAbsolute()
640 cur++; in xmlParse3986PathAbsolute()
641 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathAbsolute()
647 if (cur != *str) { in xmlParse3986PathAbsolute()
649 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathAbsolute()
651 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathAbsolute()
656 *str = cur; in xmlParse3986PathAbsolute()
675 const char *cur; in xmlParse3986PathRootless() local
678 cur = *str; in xmlParse3986PathRootless()
680 ret = xmlParse3986Segment(&cur, 0, 0); in xmlParse3986PathRootless()
682 while (*cur == '/') { in xmlParse3986PathRootless()
683 cur++; in xmlParse3986PathRootless()
684 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathRootless()
689 if (cur != *str) { in xmlParse3986PathRootless()
691 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathRootless()
693 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathRootless()
698 *str = cur; in xmlParse3986PathRootless()
717 const char *cur; in xmlParse3986PathNoScheme() local
720 cur = *str; in xmlParse3986PathNoScheme()
722 ret = xmlParse3986Segment(&cur, ':', 0); in xmlParse3986PathNoScheme()
724 while (*cur == '/') { in xmlParse3986PathNoScheme()
725 cur++; in xmlParse3986PathNoScheme()
726 ret = xmlParse3986Segment(&cur, 0, 1); in xmlParse3986PathNoScheme()
731 if (cur != *str) { in xmlParse3986PathNoScheme()
733 uri->path = STRNDUP(*str, cur - *str); in xmlParse3986PathNoScheme()
735 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL); in xmlParse3986PathNoScheme()
740 *str = cur; in xmlParse3986PathNoScheme()
762 const char *cur; in xmlParse3986HierPart() local
765 cur = *str; in xmlParse3986HierPart()
767 if ((*cur == '/') && (*(cur + 1) == '/')) { in xmlParse3986HierPart()
768 cur += 2; in xmlParse3986HierPart()
769 ret = xmlParse3986Authority(uri, &cur); in xmlParse3986HierPart()
773 ret = xmlParse3986PathAbEmpty(uri, &cur); in xmlParse3986HierPart()
775 *str = cur; in xmlParse3986HierPart()
777 } else if (*cur == '/') { in xmlParse3986HierPart()
778 ret = xmlParse3986PathAbsolute(uri, &cur); in xmlParse3986HierPart()
780 } else if (ISA_PCHAR(cur)) { in xmlParse3986HierPart()
781 ret = xmlParse3986PathRootless(uri, &cur); in xmlParse3986HierPart()
790 *str = cur; in xmlParse3986HierPart()
1421 char *cur, *out; in xmlNormalizeURIPath() local
1429 cur = path; in xmlNormalizeURIPath()
1430 while (cur[0] == '/') in xmlNormalizeURIPath()
1431 ++cur; in xmlNormalizeURIPath()
1432 if (cur[0] == '\0') in xmlNormalizeURIPath()
1436 out = cur; in xmlNormalizeURIPath()
1441 while (cur[0] != '\0') { in xmlNormalizeURIPath()
1446 if ((cur[0] == '.') && (cur[1] == '/')) { in xmlNormalizeURIPath()
1447 cur += 2; in xmlNormalizeURIPath()
1449 while (cur[0] == '/') in xmlNormalizeURIPath()
1450 cur++; in xmlNormalizeURIPath()
1458 if ((cur[0] == '.') && (cur[1] == '\0')) in xmlNormalizeURIPath()
1462 while (cur[0] != '/') { in xmlNormalizeURIPath()
1463 if (cur[0] == '\0') in xmlNormalizeURIPath()
1465 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1468 while ((cur[0] == '/') && (cur[1] == '/')) in xmlNormalizeURIPath()
1469 cur++; in xmlNormalizeURIPath()
1471 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1477 cur = path; in xmlNormalizeURIPath()
1478 while (cur[0] == '/') in xmlNormalizeURIPath()
1479 ++cur; in xmlNormalizeURIPath()
1480 if (cur[0] == '\0') in xmlNormalizeURIPath()
1509 segp = cur; in xmlNormalizeURIPath()
1523 if (((cur[0] == '.') && (cur[1] == '.') && (segp == cur+3)) in xmlNormalizeURIPath()
1526 cur = segp; in xmlNormalizeURIPath()
1539 cur[0] = '\0'; in xmlNormalizeURIPath()
1544 tmp = cur; in xmlNormalizeURIPath()
1550 segp = cur; in xmlNormalizeURIPath()
1563 cur = segp; in xmlNormalizeURIPath()
1564 while ((cur > path) && (cur[-1] != '/')) in xmlNormalizeURIPath()
1565 --cur; in xmlNormalizeURIPath()
1581 cur = path; in xmlNormalizeURIPath()
1582 while ((cur[0] == '/') && (cur[1] == '.') && (cur[2] == '.') in xmlNormalizeURIPath()
1583 && ((cur[3] == '/') || (cur[3] == '\0'))) in xmlNormalizeURIPath()
1584 cur += 3; in xmlNormalizeURIPath()
1586 if (cur != path) { in xmlNormalizeURIPath()
1588 while (cur[0] != '\0') in xmlNormalizeURIPath()
1589 (out++)[0] = (cur++)[0]; in xmlNormalizeURIPath()
1894 int ret, len, indx, cur, out; in xmlBuildURI() local
2081 cur = 0; in xmlBuildURI()
2084 while (bas->path[cur] != 0) { in xmlBuildURI()
2085 while ((bas->path[cur] != 0) && (bas->path[cur] != '/')) in xmlBuildURI()
2086 cur++; in xmlBuildURI()
2087 if (bas->path[cur] == 0) in xmlBuildURI()
2090 cur++; in xmlBuildURI()
2091 while (out < cur) { in xmlBuildURI()