Lines Matching +full:out +full:- +full:null
11 #pragma convert("ISO8859-1")
37 NULL, XML_ENTITY_DECL, BAD_CAST "lt",
38 NULL, NULL, NULL, NULL, NULL, NULL,
41 NULL, NULL, NULL, NULL, 0, 0, 0
44 NULL, XML_ENTITY_DECL, BAD_CAST "gt",
45 NULL, NULL, NULL, NULL, NULL, NULL,
48 NULL, NULL, NULL, NULL, 0, 0, 0
51 NULL, XML_ENTITY_DECL, BAD_CAST "amp",
52 NULL, NULL, NULL, NULL, NULL, NULL,
55 NULL, NULL, NULL, NULL, 0, 0, 0
58 NULL, XML_ENTITY_DECL, BAD_CAST "quot",
59 NULL, NULL, NULL, NULL, NULL, NULL,
62 NULL, NULL, NULL, NULL, 0, 0, 0
65 NULL, XML_ENTITY_DECL, BAD_CAST "apos",
66 NULL, NULL, NULL, NULL, NULL, NULL,
69 NULL, NULL, NULL, NULL, 0, 0, 0
81 xmlDictPtr dict = NULL; in xmlFreeEntity()
83 if (entity == NULL) in xmlFreeEntity()
86 if (entity->doc != NULL) in xmlFreeEntity()
87 dict = entity->doc->dict; in xmlFreeEntity()
90 if ((entity->children) && in xmlFreeEntity()
91 (entity == (xmlEntityPtr) entity->children->parent)) in xmlFreeEntity()
92 xmlFreeNodeList(entity->children); in xmlFreeEntity()
93 if ((entity->name != NULL) && in xmlFreeEntity()
94 ((dict == NULL) || (!xmlDictOwns(dict, entity->name)))) in xmlFreeEntity()
95 xmlFree((char *) entity->name); in xmlFreeEntity()
96 if (entity->ExternalID != NULL) in xmlFreeEntity()
97 xmlFree((char *) entity->ExternalID); in xmlFreeEntity()
98 if (entity->SystemID != NULL) in xmlFreeEntity()
99 xmlFree((char *) entity->SystemID); in xmlFreeEntity()
100 if (entity->URI != NULL) in xmlFreeEntity()
101 xmlFree((char *) entity->URI); in xmlFreeEntity()
102 if (entity->content != NULL) in xmlFreeEntity()
103 xmlFree((char *) entity->content); in xmlFreeEntity()
104 if (entity->orig != NULL) in xmlFreeEntity()
105 xmlFree((char *) entity->orig); in xmlFreeEntity()
121 if (ret == NULL) in xmlCreateEntity()
122 return(NULL); in xmlCreateEntity()
124 ret->doc = doc; in xmlCreateEntity()
125 ret->type = XML_ENTITY_DECL; in xmlCreateEntity()
130 ret->etype = (xmlEntityType) type; in xmlCreateEntity()
131 if ((doc == NULL) || (doc->dict == NULL)) in xmlCreateEntity()
132 ret->name = xmlStrdup(name); in xmlCreateEntity()
134 ret->name = xmlDictLookup(doc->dict, name, -1); in xmlCreateEntity()
135 if (ret->name == NULL) in xmlCreateEntity()
137 if (ExternalID != NULL) { in xmlCreateEntity()
138 ret->ExternalID = xmlStrdup(ExternalID); in xmlCreateEntity()
139 if (ret->ExternalID == NULL) in xmlCreateEntity()
142 if (SystemID != NULL) { in xmlCreateEntity()
143 ret->SystemID = xmlStrdup(SystemID); in xmlCreateEntity()
144 if (ret->SystemID == NULL) in xmlCreateEntity()
147 if (content != NULL) { in xmlCreateEntity()
148 ret->length = xmlStrlen(content); in xmlCreateEntity()
149 ret->content = xmlStrndup(content, ret->length); in xmlCreateEntity()
150 if (ret->content == NULL) in xmlCreateEntity()
153 ret->length = 0; in xmlCreateEntity()
154 ret->content = NULL; in xmlCreateEntity()
156 ret->URI = NULL; /* to be computed by the layer knowing in xmlCreateEntity()
158 ret->orig = NULL; in xmlCreateEntity()
164 return(NULL); in xmlCreateEntity()
176 * @out: pointer to resulting entity (optional)
187 const xmlChar *content, xmlEntityPtr *out) { in xmlAddEntity() argument
189 xmlDictPtr dict = NULL; in xmlAddEntity()
190 xmlEntitiesTablePtr table = NULL; in xmlAddEntity()
194 if (out != NULL) in xmlAddEntity()
195 *out = NULL; in xmlAddEntity()
196 if ((doc == NULL) || (name == NULL)) in xmlAddEntity()
198 dict = doc->dict; in xmlAddEntity()
201 dtd = doc->extSubset; in xmlAddEntity()
203 dtd = doc->intSubset; in xmlAddEntity()
204 if (dtd == NULL) in xmlAddEntity()
212 if (predef != NULL) { in xmlAddEntity()
217 (content != NULL)) { in xmlAddEntity()
218 int c = predef->content[0]; in xmlAddEntity()
245 if (dtd->entities == NULL) { in xmlAddEntity()
246 dtd->entities = xmlHashCreateDict(0, dict); in xmlAddEntity()
247 if (dtd->entities == NULL) in xmlAddEntity()
250 table = dtd->entities; in xmlAddEntity()
254 if (dtd->pentities == NULL) { in xmlAddEntity()
255 dtd->pentities = xmlHashCreateDict(0, dict); in xmlAddEntity()
256 if (dtd->pentities == NULL) in xmlAddEntity()
259 table = dtd->pentities; in xmlAddEntity()
264 ret = xmlCreateEntity(dtd->doc, name, type, ExternalID, SystemID, content); in xmlAddEntity()
265 if (ret == NULL) in xmlAddEntity()
283 ret->parent = dtd; in xmlAddEntity()
284 ret->doc = dtd->doc; in xmlAddEntity()
285 if (dtd->last == NULL) { in xmlAddEntity()
286 dtd->children = dtd->last = (xmlNodePtr) ret; in xmlAddEntity()
288 dtd->last->next = (xmlNodePtr) ret; in xmlAddEntity()
289 ret->prev = dtd->last; in xmlAddEntity()
290 dtd->last = (xmlNodePtr) ret; in xmlAddEntity()
293 if (out != NULL) in xmlAddEntity()
294 *out = ret; in xmlAddEntity()
304 * Returns NULL if not, otherwise the entity
308 if (name == NULL) return(NULL); in xmlGetPredefinedEntity()
331 return(NULL); in xmlGetPredefinedEntity()
345 * Returns a pointer to the entity or NULL in case of error
368 * Returns a pointer to the entity or NULL in case of error
390 * the document is NULL or has no internal subset defined, then an
395 * Returns a pointer to the entity or NULL in case of error
401 if ((doc != NULL) && (doc->intSubset != NULL)) { in xmlNewEntity()
404 if (name == NULL) in xmlNewEntity()
405 return(NULL); in xmlNewEntity()
418 * Returns A pointer to the entity structure or NULL if not found.
433 * Returns A pointer to the entity structure or NULL if not found.
440 if (doc == NULL) in xmlGetParameterEntity()
441 return(NULL); in xmlGetParameterEntity()
442 if ((doc->intSubset != NULL) && (doc->intSubset->pentities != NULL)) { in xmlGetParameterEntity()
443 table = (xmlEntitiesTablePtr) doc->intSubset->pentities; in xmlGetParameterEntity()
445 if (ret != NULL) in xmlGetParameterEntity()
448 if ((doc->extSubset != NULL) && (doc->extSubset->pentities != NULL)) { in xmlGetParameterEntity()
449 table = (xmlEntitiesTablePtr) doc->extSubset->pentities; in xmlGetParameterEntity()
452 return(NULL); in xmlGetParameterEntity()
464 * Returns A pointer to the entity structure or NULL if not found.
470 if (doc == NULL) in xmlGetDtdEntity()
471 return(NULL); in xmlGetDtdEntity()
472 if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { in xmlGetDtdEntity()
473 table = (xmlEntitiesTablePtr) doc->extSubset->entities; in xmlGetDtdEntity()
476 return(NULL); in xmlGetDtdEntity()
488 * Returns A pointer to the entity structure or NULL if not found.
495 if (doc != NULL) { in xmlGetDocEntity()
496 if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) { in xmlGetDocEntity()
497 table = (xmlEntitiesTablePtr) doc->intSubset->entities; in xmlGetDocEntity()
499 if (cur != NULL) in xmlGetDocEntity()
502 if (doc->standalone != 1) { in xmlGetDocEntity()
503 if ((doc->extSubset != NULL) && in xmlGetDocEntity()
504 (doc->extSubset->entities != NULL)) { in xmlGetDocEntity()
505 table = (xmlEntitiesTablePtr) doc->extSubset->entities; in xmlGetDocEntity()
507 if (cur != NULL) in xmlGetDocEntity()
523 if (tmp == NULL) goto mem_error; \
544 xmlChar *buffer = NULL; in xmlEncodeEntitiesInternal()
545 xmlChar *out = NULL; in xmlEncodeEntitiesInternal() local
549 if (input == NULL) return(NULL); in xmlEncodeEntitiesInternal()
550 if (doc != NULL) in xmlEncodeEntitiesInternal()
551 html = (doc->type == XML_HTML_DOCUMENT_NODE); in xmlEncodeEntitiesInternal()
558 if (buffer == NULL) in xmlEncodeEntitiesInternal()
559 return(NULL); in xmlEncodeEntitiesInternal()
560 out = buffer; in xmlEncodeEntitiesInternal()
563 size_t indx = out - buffer; in xmlEncodeEntitiesInternal()
567 out = &buffer[indx]; in xmlEncodeEntitiesInternal()
580 (cur[1] == '!') && (cur[2] == '-') && (cur[3] == '-') && in xmlEncodeEntitiesInternal()
581 ((end = xmlStrstr(cur, BAD_CAST "-->")) != NULL)) { in xmlEncodeEntitiesInternal()
583 *out++ = *cur++; in xmlEncodeEntitiesInternal()
584 indx = out - buffer; in xmlEncodeEntitiesInternal()
587 out = &buffer[indx]; in xmlEncodeEntitiesInternal()
590 *out++ = *cur++; in xmlEncodeEntitiesInternal()
591 *out++ = *cur++; in xmlEncodeEntitiesInternal()
592 *out++ = *cur++; in xmlEncodeEntitiesInternal()
595 *out++ = '&'; in xmlEncodeEntitiesInternal()
596 *out++ = 'l'; in xmlEncodeEntitiesInternal()
597 *out++ = 't'; in xmlEncodeEntitiesInternal()
598 *out++ = ';'; in xmlEncodeEntitiesInternal()
600 *out++ = '&'; in xmlEncodeEntitiesInternal()
601 *out++ = 'g'; in xmlEncodeEntitiesInternal()
602 *out++ = 't'; in xmlEncodeEntitiesInternal()
603 *out++ = ';'; in xmlEncodeEntitiesInternal()
607 * http://www.w3.org/TR/html401/appendix/notes.html#h-B.7.1 in xmlEncodeEntitiesInternal()
612 *out++ = *cur++; in xmlEncodeEntitiesInternal()
613 indx = out - buffer; in xmlEncodeEntitiesInternal()
616 out = &buffer[indx]; in xmlEncodeEntitiesInternal()
619 *out++ = *cur++; in xmlEncodeEntitiesInternal()
622 *out++ = '&'; in xmlEncodeEntitiesInternal()
623 *out++ = 'a'; in xmlEncodeEntitiesInternal()
624 *out++ = 'm'; in xmlEncodeEntitiesInternal()
625 *out++ = 'p'; in xmlEncodeEntitiesInternal()
626 *out++ = ';'; in xmlEncodeEntitiesInternal()
632 *out++ = *cur; in xmlEncodeEntitiesInternal()
634 if (((doc != NULL) && (doc->encoding != NULL)) || (html)) { in xmlEncodeEntitiesInternal()
641 *out++ = xc; in xmlEncodeEntitiesInternal()
644 *out++ = *cur; in xmlEncodeEntitiesInternal()
647 * We assume we have UTF-8 input. in xmlEncodeEntitiesInternal()
676 buf[sizeof(buf) - 1] = 0; in xmlEncodeEntitiesInternal()
678 while (*ptr != 0) *out++ = *ptr++; in xmlEncodeEntitiesInternal()
685 buf[sizeof(buf) - 1] = 0; in xmlEncodeEntitiesInternal()
687 while (*ptr != 0) *out++ = *ptr++; in xmlEncodeEntitiesInternal()
691 *out = 0; in xmlEncodeEntitiesInternal()
696 return(NULL); in xmlEncodeEntitiesInternal()
745 xmlChar *buffer = NULL; in xmlEncodeSpecialChars()
746 xmlChar *out = NULL; in xmlEncodeSpecialChars() local
748 if (input == NULL) return(NULL); in xmlEncodeSpecialChars()
755 if (buffer == NULL) in xmlEncodeSpecialChars()
756 return(NULL); in xmlEncodeSpecialChars()
757 out = buffer; in xmlEncodeSpecialChars()
760 size_t indx = out - buffer; in xmlEncodeSpecialChars()
764 out = &buffer[indx]; in xmlEncodeSpecialChars()
771 *out++ = '&'; in xmlEncodeSpecialChars()
772 *out++ = 'l'; in xmlEncodeSpecialChars()
773 *out++ = 't'; in xmlEncodeSpecialChars()
774 *out++ = ';'; in xmlEncodeSpecialChars()
776 *out++ = '&'; in xmlEncodeSpecialChars()
777 *out++ = 'g'; in xmlEncodeSpecialChars()
778 *out++ = 't'; in xmlEncodeSpecialChars()
779 *out++ = ';'; in xmlEncodeSpecialChars()
781 *out++ = '&'; in xmlEncodeSpecialChars()
782 *out++ = 'a'; in xmlEncodeSpecialChars()
783 *out++ = 'm'; in xmlEncodeSpecialChars()
784 *out++ = 'p'; in xmlEncodeSpecialChars()
785 *out++ = ';'; in xmlEncodeSpecialChars()
787 *out++ = '&'; in xmlEncodeSpecialChars()
788 *out++ = 'q'; in xmlEncodeSpecialChars()
789 *out++ = 'u'; in xmlEncodeSpecialChars()
790 *out++ = 'o'; in xmlEncodeSpecialChars()
791 *out++ = 't'; in xmlEncodeSpecialChars()
792 *out++ = ';'; in xmlEncodeSpecialChars()
794 *out++ = '&'; in xmlEncodeSpecialChars()
795 *out++ = '#'; in xmlEncodeSpecialChars()
796 *out++ = '1'; in xmlEncodeSpecialChars()
797 *out++ = '3'; in xmlEncodeSpecialChars()
798 *out++ = ';'; in xmlEncodeSpecialChars()
801 * Works because on UTF-8, all extended sequences cannot in xmlEncodeSpecialChars()
804 *out++ = *cur; in xmlEncodeSpecialChars()
808 *out = 0; in xmlEncodeSpecialChars()
813 return(NULL); in xmlEncodeSpecialChars()
822 * Returns the xmlEntitiesTablePtr just created or NULL in case of error.
838 if (entity != NULL) in xmlFreeEntityWrapper()
860 * Returns the new xmlEntitiesPtr or NULL in case of error.
868 if (cur == NULL) in xmlCopyEntity()
869 return(NULL); in xmlCopyEntity()
871 cur->type = XML_ENTITY_DECL; in xmlCopyEntity()
873 cur->etype = ent->etype; in xmlCopyEntity()
874 if (ent->name != NULL) { in xmlCopyEntity()
875 cur->name = xmlStrdup(ent->name); in xmlCopyEntity()
876 if (cur->name == NULL) in xmlCopyEntity()
879 if (ent->ExternalID != NULL) { in xmlCopyEntity()
880 cur->ExternalID = xmlStrdup(ent->ExternalID); in xmlCopyEntity()
881 if (cur->ExternalID == NULL) in xmlCopyEntity()
884 if (ent->SystemID != NULL) { in xmlCopyEntity()
885 cur->SystemID = xmlStrdup(ent->SystemID); in xmlCopyEntity()
886 if (cur->SystemID == NULL) in xmlCopyEntity()
889 if (ent->content != NULL) { in xmlCopyEntity()
890 cur->content = xmlStrdup(ent->content); in xmlCopyEntity()
891 if (cur->content == NULL) in xmlCopyEntity()
894 if (ent->orig != NULL) { in xmlCopyEntity()
895 cur->orig = xmlStrdup(ent->orig); in xmlCopyEntity()
896 if (cur->orig == NULL) in xmlCopyEntity()
899 if (ent->URI != NULL) { in xmlCopyEntity()
900 cur->URI = xmlStrdup(ent->URI); in xmlCopyEntity()
901 if (cur->URI == NULL) in xmlCopyEntity()
908 return(NULL); in xmlCopyEntity()
917 * Returns the new xmlEntitiesTablePtr or NULL in case of error.
938 if ((buf == NULL) || (ent == NULL)) in xmlDumpEntityDecl()
941 save = xmlSaveToBuffer(buf, NULL, 0); in xmlDumpEntityDecl()
971 if ((buf == NULL) || (table == NULL)) in xmlDumpEntitiesTable()
974 save = xmlSaveToBuffer(buf, NULL, 0); in xmlDumpEntitiesTable()