Lines Matching refs:cur

542     xmlEntityPtr cur;  in xmlGetDocEntity()  local
548 cur = xmlGetEntityFromTable(table, name); in xmlGetDocEntity()
549 if (cur != NULL) in xmlGetDocEntity()
550 return(cur); in xmlGetDocEntity()
556 cur = xmlGetEntityFromTable(table, name); in xmlGetDocEntity()
557 if (cur != NULL) in xmlGetDocEntity()
558 return(cur); in xmlGetDocEntity()
593 const xmlChar *cur = input; in xmlEncodeEntitiesInternal() local
614 while (*cur != '\0') { in xmlEncodeEntitiesInternal()
625 if (*cur == '<') { in xmlEncodeEntitiesInternal()
632 (cur[1] == '!') && (cur[2] == '-') && (cur[3] == '-') && in xmlEncodeEntitiesInternal()
633 ((end = xmlStrstr(cur, BAD_CAST "-->")) != NULL)) { in xmlEncodeEntitiesInternal()
634 while (cur != end) { in xmlEncodeEntitiesInternal()
635 *out++ = *cur++; in xmlEncodeEntitiesInternal()
642 *out++ = *cur++; in xmlEncodeEntitiesInternal()
643 *out++ = *cur++; in xmlEncodeEntitiesInternal()
644 *out++ = *cur++; in xmlEncodeEntitiesInternal()
651 } else if (*cur == '>') { in xmlEncodeEntitiesInternal()
656 } else if (*cur == '&') { in xmlEncodeEntitiesInternal()
661 if (html && attr && (cur[1] == '{') && in xmlEncodeEntitiesInternal()
662 (strchr((const char *) cur, '}'))) { in xmlEncodeEntitiesInternal()
663 while (*cur != '}') { in xmlEncodeEntitiesInternal()
664 *out++ = *cur++; in xmlEncodeEntitiesInternal()
671 *out++ = *cur++; in xmlEncodeEntitiesInternal()
679 } else if (((*cur >= 0x20) && (*cur < 0x80)) || in xmlEncodeEntitiesInternal()
680 (*cur == '\n') || (*cur == '\t') || ((html) && (*cur == '\r'))) { in xmlEncodeEntitiesInternal()
684 *out++ = *cur; in xmlEncodeEntitiesInternal()
685 } else if (*cur >= 0x80) { in xmlEncodeEntitiesInternal()
696 *out++ = *cur; in xmlEncodeEntitiesInternal()
714 if (((cur[0] & 0xC0) != 0xC0) || in xmlEncodeEntitiesInternal()
715 ((cur[1] & 0xC0) != 0x80) || in xmlEncodeEntitiesInternal()
716 (((cur[0] & 0xE0) == 0xE0) && ((cur[2] & 0xC0) != 0x80)) || in xmlEncodeEntitiesInternal()
717 (((cur[0] & 0xF0) == 0xF0) && ((cur[3] & 0xC0) != 0x80)) || in xmlEncodeEntitiesInternal()
718 (((cur[0] & 0xF8) == 0xF8))) { in xmlEncodeEntitiesInternal()
723 snprintf(buf, sizeof(buf), "&#%d;", *cur); in xmlEncodeEntitiesInternal()
727 cur++; in xmlEncodeEntitiesInternal()
729 } else if (*cur < 0xE0) { in xmlEncodeEntitiesInternal()
730 val = (cur[0]) & 0x1F; in xmlEncodeEntitiesInternal()
732 val |= (cur[1]) & 0x3F; in xmlEncodeEntitiesInternal()
734 } else if (*cur < 0xF0) { in xmlEncodeEntitiesInternal()
735 val = (cur[0]) & 0x0F; in xmlEncodeEntitiesInternal()
737 val |= (cur[1]) & 0x3F; in xmlEncodeEntitiesInternal()
739 val |= (cur[2]) & 0x3F; in xmlEncodeEntitiesInternal()
741 } else if (*cur < 0xF8) { in xmlEncodeEntitiesInternal()
742 val = (cur[0]) & 0x07; in xmlEncodeEntitiesInternal()
744 val |= (cur[1]) & 0x3F; in xmlEncodeEntitiesInternal()
746 val |= (cur[2]) & 0x3F; in xmlEncodeEntitiesInternal()
748 val |= (cur[3]) & 0x3F; in xmlEncodeEntitiesInternal()
756 snprintf(buf, sizeof(buf), "&#%d;", *cur); in xmlEncodeEntitiesInternal()
760 cur++; in xmlEncodeEntitiesInternal()
770 cur += l; in xmlEncodeEntitiesInternal()
773 } else if (IS_BYTE_CHAR(*cur)) { in xmlEncodeEntitiesInternal()
776 snprintf(buf, sizeof(buf), "&#%d;", *cur); in xmlEncodeEntitiesInternal()
781 cur++; in xmlEncodeEntitiesInternal()
837 const xmlChar *cur = input; in xmlEncodeSpecialChars() local
854 while (*cur != '\0') { in xmlEncodeSpecialChars()
865 if (*cur == '<') { in xmlEncodeSpecialChars()
870 } else if (*cur == '>') { in xmlEncodeSpecialChars()
875 } else if (*cur == '&') { in xmlEncodeSpecialChars()
881 } else if (*cur == '"') { in xmlEncodeSpecialChars()
888 } else if (*cur == '\r') { in xmlEncodeSpecialChars()
899 *out++ = *cur; in xmlEncodeSpecialChars()
901 cur++; in xmlEncodeSpecialChars()
961 xmlEntityPtr cur; in xmlCopyEntity() local
963 cur = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity)); in xmlCopyEntity()
964 if (cur == NULL) { in xmlCopyEntity()
968 memset(cur, 0, sizeof(xmlEntity)); in xmlCopyEntity()
969 cur->type = XML_ENTITY_DECL; in xmlCopyEntity()
971 cur->etype = ent->etype; in xmlCopyEntity()
973 cur->name = xmlStrdup(ent->name); in xmlCopyEntity()
975 cur->ExternalID = xmlStrdup(ent->ExternalID); in xmlCopyEntity()
977 cur->SystemID = xmlStrdup(ent->SystemID); in xmlCopyEntity()
979 cur->content = xmlStrdup(ent->content); in xmlCopyEntity()
981 cur->orig = xmlStrdup(ent->orig); in xmlCopyEntity()
983 cur->URI = xmlStrdup(ent->URI); in xmlCopyEntity()
984 return(cur); in xmlCopyEntity()
1015 const xmlChar * base, *cur; in xmlDumpEntityContent() local
1018 base = cur = content; in xmlDumpEntityContent()
1019 while (*cur != 0) { in xmlDumpEntityContent()
1020 if (*cur == '"') { in xmlDumpEntityContent()
1021 if (base != cur) in xmlDumpEntityContent()
1022 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
1024 cur++; in xmlDumpEntityContent()
1025 base = cur; in xmlDumpEntityContent()
1026 } else if (*cur == '%') { in xmlDumpEntityContent()
1027 if (base != cur) in xmlDumpEntityContent()
1028 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
1030 cur++; in xmlDumpEntityContent()
1031 base = cur; in xmlDumpEntityContent()
1033 cur++; in xmlDumpEntityContent()
1036 if (base != cur) in xmlDumpEntityContent()
1037 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()