Home | History | Annotate | Download | only in libxml2

Lines Matching defs:cur

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