Home | History | Annotate | Download | only in libxml2

Lines Matching refs:cur

178     const char *cur;
183 cur = *str;
184 if (!ISA_ALPHA(cur))
186 cur++;
187 while (ISA_ALPHA(cur) || ISA_DIGIT(cur) ||
188 (*cur == '+') || (*cur == '-') || (*cur == '.')) cur++;
191 uri->scheme = STRNDUP(*str, cur - *str);
193 *str = cur;
215 const char *cur;
220 cur = *str;
222 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') ||
223 (*cur == '[') || (*cur == ']') ||
224 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
225 NEXT(cur);
230 uri->fragment = STRNDUP(*str, cur - *str);
232 uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL);
234 *str = cur;
252 const char *cur;
257 cur = *str;
259 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') ||
260 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
261 NEXT(cur);
266 uri->query = STRNDUP(*str, cur - *str);
268 uri->query = xmlURIUnescapeString(*str, cur - *str, NULL);
275 uri->query_raw = STRNDUP (*str, cur - *str);
277 *str = cur;
296 const char *cur = *str;
298 if (ISA_DIGIT(cur)) {
301 while (ISA_DIGIT(cur)) {
303 uri->port = uri->port * 10 + (*cur - '0');
304 cur++;
306 *str = cur;
327 const char *cur;
329 cur = *str;
330 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) ||
331 ISA_SUB_DELIM(cur) || (*cur == ':'))
332 NEXT(cur);
333 if (*cur == '@') {
337 uri->user = STRNDUP(*str, cur - *str);
339 uri->user = xmlURIUnescapeString(*str, cur - *str, NULL);
341 *str = cur;
363 const char *cur = *str;
365 if (!(ISA_DIGIT(cur)))
367 if (!ISA_DIGIT(cur+1))
368 cur++;
369 else if ((*cur != '0') && (ISA_DIGIT(cur + 1)) && (!ISA_DIGIT(cur+2)))
370 cur += 2;
371 else if ((*cur == '1') && (ISA_DIGIT(cur + 1)) && (ISA_DIGIT(cur + 2)))
372 cur += 3;
373 else if ((*cur == '2') && (*(cur + 1) >= '0') &&
374 (*(cur + 1) <= '4') && (ISA_DIGIT(cur + 2)))
375 cur += 3;
376 else if ((*cur == '2') && (*(cur + 1) == '5') &&
377 (*(cur + 2) >= '0') && (*(cur + 1) <= '5'))
378 cur += 3;
381 *str = cur;
402 const char *cur = *str;
405 host = cur;
409 if (*cur == '[') {
410 cur++;
411 while ((*cur != ']') && (*cur != 0))
412 cur++;
413 if (*cur != ']')
415 cur++;
421 if (ISA_DIGIT(cur)) {
422 if (xmlParse3986DecOctet(&cur) != 0)
424 if (*cur != '.')
426 cur++;
427 if (xmlParse3986DecOctet(&cur) != 0)
429 if (*cur != '.')
431 if (xmlParse3986DecOctet(&cur) != 0)
433 if (*cur != '.')
435 if (xmlParse3986DecOctet(&cur) != 0)
439 cur = *str;
444 while (ISA_UNRESERVED(cur) || ISA_PCT_ENCODED(cur) || ISA_SUB_DELIM(cur))
445 NEXT(cur);
451 if (cur != host) {
453 uri->server = STRNDUP(host, cur - host);
455 uri->server = xmlURIUnescapeString(host, cur - host, NULL);
459 *str = cur;
478 const char *cur;
481 cur = *str;
485 ret = xmlParse3986Userinfo(uri, &cur);
486 if ((ret != 0) || (*cur != '@'))
487 cur = *str;
489 cur++;
490 ret = xmlParse3986Host(uri, &cur);
492 if (*cur == ':') {
493 cur++;
494 ret = xmlParse3986Port(uri, &cur);
497 *str = cur;
520 const char *cur;
522 cur = *str;
523 if (!ISA_PCHAR(cur)) {
528 while (ISA_PCHAR(cur) && (*cur != forbid))
529 NEXT(cur);
530 *str = cur;
549 const char *cur;
552 cur = *str;
554 while (*cur == '/') {
555 cur++;
556 ret = xmlParse3986Segment(&cur, 0, 1);
562 uri->path = STRNDUP(*str, cur - *str);
564 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
566 *str = cur;
585 const char *cur;
588 cur = *str;
590 if (*cur != '/')
592 cur++;
593 ret = xmlParse3986Segment(&cur, 0, 0);
595 while (*cur == '/') {
596 cur++;
597 ret = xmlParse3986Segment(&cur, 0, 1);
604 uri->path = STRNDUP(*str, cur - *str);
606 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
608 *str = cur;
627 const char *cur;
630 cur = *str;
632 ret = xmlParse3986Segment(&cur, 0, 0);
634 while (*cur == '/') {
635 cur++;
636 ret = xmlParse3986Segment(&cur, 0, 1);
642 uri->path = STRNDUP(*str, cur - *str);
644 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
646 *str = cur;
665 const char *cur;
668 cur = *str;
670 ret = xmlParse3986Segment(&cur, ':', 0);
672 while (*cur == '/') {
673 cur++;
674 ret = xmlParse3986Segment(&cur
680 uri->path = STRNDUP(*str, cur - *str);
682 uri->path = xmlURIUnescapeString(*str, cur - *str, NULL);
684 *str = cur;
706 const char *cur;
709 cur = *str;
711 if ((*cur == '/') && (*(cur + 1) == '/')) {
712 cur += 2;
713 ret = xmlParse3986Authority(uri, &cur);
715 ret = xmlParse3986PathAbEmpty(uri, &cur);
717 *str = cur;
719 } else if (*cur == '/') {
720 ret = xmlParse3986PathAbsolute(uri, &cur);
722 } else if (ISA_PCHAR(cur)) {
723 ret = xmlParse3986PathRootless(uri, &cur);
732 *str = cur;
1469 char *cur, *out;
1477 cur = path;
1478 while (cur[0] == '/')
1479 ++cur;
1480 if (cur[0] == '\0')
1484 out = cur;
1489 while (cur[0] != '\0') {
1494 if ((cur[0] == '.') && (cur[1] == '/')) {
1495 cur += 2;
1497 while (cur[0] == '/')
1498 cur++;
1506 if ((cur[0] == '.') && (cur[1] == '\0'))
1510 while (cur[0] != '/') {
1511 if (cur[0] == '\0')
1513 (out++)[0] = (cur++)[0];
1516 while ((cur[0] == '/') && (cur[1] == '/'))
1517 cur++;
1519 (out++)[0] = (cur++)[0];
1525 cur = path;
1526 while (cur[0] == '/')
1527 ++cur;
1528 if (cur[0] == '\0')
1552 /* At the beginning of each iteration of this loop, "cur" points to
1557 segp = cur;
1571 if (((cur[0] == '.') && (cur[1] == '.') && (segp == cur+3))
1574 cur = segp;
1587 cur[0] = '\0';
1590 /* Valgrind complained, strcpy(cur, segp + 3); */
1592 tmp = cur;
1597 segp = cur;
1610 cur = segp;
1611 while ((cur > path) && (cur[-1] != '/'))
1612 --cur;
1628 cur = path;
1629 while ((cur[0] == '/') && (cur[1] == '.') && (cur[2] == '.')
1630 && ((cur[3] == '/') || (cur[3] == '\0')))
1631 cur += 3;
1633 if (cur != path) {
1635 while (cur[0] != '\0')
1636 (out++)[0] = (cur++)[0];
1945 int ret, len, indx, cur, out;
2131 cur = 0;
2134 while (bas->path[cur] != 0) {
2135 while ((bas->path[cur] != 0) && (bas->path[cur] != '/'))
2136 cur++;
2137 if (bas->path[cur] == 0)
2140 cur++;
2141 while (out < cur) {