Lines Matching refs:cur
506 xmlEntityPtr cur; in xmlGetDocEntity() local
512 cur = xmlGetEntityFromTable(table, name); in xmlGetDocEntity()
513 if (cur != NULL) in xmlGetDocEntity()
514 return(cur); in xmlGetDocEntity()
520 cur = xmlGetEntityFromTable(table, name); in xmlGetDocEntity()
521 if (cur != NULL) in xmlGetDocEntity()
522 return(cur); in xmlGetDocEntity()
557 const xmlChar *cur = input; in xmlEncodeEntitiesInternal() local
578 while (*cur != '\0') { in xmlEncodeEntitiesInternal()
589 if (*cur == '<') { in xmlEncodeEntitiesInternal()
596 (cur[1] == '!') && (cur[2] == '-') && (cur[3] == '-') && in xmlEncodeEntitiesInternal()
597 ((end = xmlStrstr(cur, BAD_CAST "-->")) != NULL)) { in xmlEncodeEntitiesInternal()
598 while (cur != end) { in xmlEncodeEntitiesInternal()
599 *out++ = *cur++; in xmlEncodeEntitiesInternal()
606 *out++ = *cur++; in xmlEncodeEntitiesInternal()
607 *out++ = *cur++; in xmlEncodeEntitiesInternal()
608 *out++ = *cur++; in xmlEncodeEntitiesInternal()
615 } else if (*cur == '>') { in xmlEncodeEntitiesInternal()
620 } else if (*cur == '&') { in xmlEncodeEntitiesInternal()
625 if (html && attr && (cur[1] == '{') && in xmlEncodeEntitiesInternal()
626 (strchr((const char *) cur, '}'))) { in xmlEncodeEntitiesInternal()
627 while (*cur != '}') { in xmlEncodeEntitiesInternal()
628 *out++ = *cur++; in xmlEncodeEntitiesInternal()
635 *out++ = *cur++; in xmlEncodeEntitiesInternal()
643 } else if (((*cur >= 0x20) && (*cur < 0x80)) || in xmlEncodeEntitiesInternal()
644 (*cur == '\n') || (*cur == '\t') || ((html) && (*cur == '\r'))) { in xmlEncodeEntitiesInternal()
648 *out++ = *cur; in xmlEncodeEntitiesInternal()
649 } else if (*cur >= 0x80) { in xmlEncodeEntitiesInternal()
660 *out++ = *cur; in xmlEncodeEntitiesInternal()
668 if (*cur < 0xC0) { in xmlEncodeEntitiesInternal()
673 snprintf(buf, sizeof(buf), "&#%d;", *cur); in xmlEncodeEntitiesInternal()
677 cur++; in xmlEncodeEntitiesInternal()
679 } else if (*cur < 0xE0) { in xmlEncodeEntitiesInternal()
680 val = (cur[0]) & 0x1F; in xmlEncodeEntitiesInternal()
682 val |= (cur[1]) & 0x3F; in xmlEncodeEntitiesInternal()
684 } else if (*cur < 0xF0) { in xmlEncodeEntitiesInternal()
685 val = (cur[0]) & 0x0F; in xmlEncodeEntitiesInternal()
687 val |= (cur[1]) & 0x3F; in xmlEncodeEntitiesInternal()
689 val |= (cur[2]) & 0x3F; in xmlEncodeEntitiesInternal()
691 } else if (*cur < 0xF8) { in xmlEncodeEntitiesInternal()
692 val = (cur[0]) & 0x07; in xmlEncodeEntitiesInternal()
694 val |= (cur[1]) & 0x3F; in xmlEncodeEntitiesInternal()
696 val |= (cur[2]) & 0x3F; in xmlEncodeEntitiesInternal()
698 val |= (cur[3]) & 0x3F; in xmlEncodeEntitiesInternal()
706 snprintf(buf, sizeof(buf), "&#%d;", *cur); in xmlEncodeEntitiesInternal()
710 cur++; in xmlEncodeEntitiesInternal()
720 cur += l; in xmlEncodeEntitiesInternal()
723 } else if (IS_BYTE_CHAR(*cur)) { in xmlEncodeEntitiesInternal()
726 snprintf(buf, sizeof(buf), "&#%d;", *cur); in xmlEncodeEntitiesInternal()
731 cur++; in xmlEncodeEntitiesInternal()
787 const xmlChar *cur = input; in xmlEncodeSpecialChars() local
804 while (*cur != '\0') { in xmlEncodeSpecialChars()
815 if (*cur == '<') { in xmlEncodeSpecialChars()
820 } else if (*cur == '>') { in xmlEncodeSpecialChars()
825 } else if (*cur == '&') { in xmlEncodeSpecialChars()
831 } else if (*cur == '"') { in xmlEncodeSpecialChars()
838 } else if (*cur == '\r') { in xmlEncodeSpecialChars()
849 *out++ = *cur; in xmlEncodeSpecialChars()
851 cur++; in xmlEncodeSpecialChars()
911 xmlEntityPtr cur; in xmlCopyEntity() local
913 cur = (xmlEntityPtr) xmlMalloc(sizeof(xmlEntity)); in xmlCopyEntity()
914 if (cur == NULL) { in xmlCopyEntity()
918 memset(cur, 0, sizeof(xmlEntity)); in xmlCopyEntity()
919 cur->type = XML_ENTITY_DECL; in xmlCopyEntity()
921 cur->etype = ent->etype; in xmlCopyEntity()
923 cur->name = xmlStrdup(ent->name); in xmlCopyEntity()
925 cur->ExternalID = xmlStrdup(ent->ExternalID); in xmlCopyEntity()
927 cur->SystemID = xmlStrdup(ent->SystemID); in xmlCopyEntity()
929 cur->content = xmlStrdup(ent->content); in xmlCopyEntity()
931 cur->orig = xmlStrdup(ent->orig); in xmlCopyEntity()
933 cur->URI = xmlStrdup(ent->URI); in xmlCopyEntity()
934 return(cur); in xmlCopyEntity()
965 const xmlChar * base, *cur; in xmlDumpEntityContent() local
968 base = cur = content; in xmlDumpEntityContent()
969 while (*cur != 0) { in xmlDumpEntityContent()
970 if (*cur == '"') { in xmlDumpEntityContent()
971 if (base != cur) in xmlDumpEntityContent()
972 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
974 cur++; in xmlDumpEntityContent()
975 base = cur; in xmlDumpEntityContent()
976 } else if (*cur == '%') { in xmlDumpEntityContent()
977 if (base != cur) in xmlDumpEntityContent()
978 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
980 cur++; in xmlDumpEntityContent()
981 base = cur; in xmlDumpEntityContent()
983 cur++; in xmlDumpEntityContent()
986 if (base != cur) in xmlDumpEntityContent()
987 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()