• Home
  • Raw
  • Download

Lines Matching +full:out +full:- +full:null

11 #pragma convert("ISO8859-1")
36 NULL, XML_ENTITY_DECL, BAD_CAST "lt",
37 NULL, NULL, NULL, NULL, NULL, NULL,
40 NULL, NULL, NULL, NULL, 0, 0, 0
43 NULL, XML_ENTITY_DECL, BAD_CAST "gt",
44 NULL, NULL, NULL, NULL, NULL, NULL,
47 NULL, NULL, NULL, NULL, 0, 0, 0
50 NULL, XML_ENTITY_DECL, BAD_CAST "amp",
51 NULL, NULL, NULL, NULL, NULL, NULL,
54 NULL, NULL, NULL, NULL, 0, 0, 0
57 NULL, XML_ENTITY_DECL, BAD_CAST "quot",
58 NULL, NULL, NULL, NULL, NULL, NULL,
61 NULL, NULL, NULL, NULL, 0, 0, 0
64 NULL, XML_ENTITY_DECL, BAD_CAST "apos",
65 NULL, NULL, NULL, NULL, NULL, NULL,
68 NULL, NULL, NULL, NULL, 0, 0, 0
75 * Handle an out of memory condition
80 __xmlSimpleError(XML_FROM_TREE, XML_ERR_NO_MEMORY, NULL, NULL, extra); in xmlEntitiesErrMemory()
93 __xmlSimpleError(XML_FROM_TREE, code, NULL, msg, NULL); in xmlEntitiesErr()
106 __xmlRaiseError(NULL, NULL, NULL, in xmlEntitiesWarn()
107 NULL, NULL, XML_FROM_TREE, code, in xmlEntitiesWarn()
108 XML_ERR_WARNING, NULL, 0, in xmlEntitiesWarn()
109 (const char *)str1, NULL, NULL, 0, 0, in xmlEntitiesWarn()
110 msg, (const char *)str1, NULL); in xmlEntitiesWarn()
114 * xmlFreeEntity : clean-up an entity record.
119 xmlDictPtr dict = NULL; in xmlFreeEntity()
121 if (entity == NULL) in xmlFreeEntity()
124 if (entity->doc != NULL) in xmlFreeEntity()
125 dict = entity->doc->dict; in xmlFreeEntity()
128 if ((entity->children) && (entity->owner == 1) && in xmlFreeEntity()
129 (entity == (xmlEntityPtr) entity->children->parent)) in xmlFreeEntity()
130 xmlFreeNodeList(entity->children); in xmlFreeEntity()
131 if ((entity->name != NULL) && in xmlFreeEntity()
132 ((dict == NULL) || (!xmlDictOwns(dict, entity->name)))) in xmlFreeEntity()
133 xmlFree((char *) entity->name); in xmlFreeEntity()
134 if (entity->ExternalID != NULL) in xmlFreeEntity()
135 xmlFree((char *) entity->ExternalID); in xmlFreeEntity()
136 if (entity->SystemID != NULL) in xmlFreeEntity()
137 xmlFree((char *) entity->SystemID); in xmlFreeEntity()
138 if (entity->URI != NULL) in xmlFreeEntity()
139 xmlFree((char *) entity->URI); in xmlFreeEntity()
140 if (entity->content != NULL) in xmlFreeEntity()
141 xmlFree((char *) entity->content); in xmlFreeEntity()
142 if (entity->orig != NULL) in xmlFreeEntity()
143 xmlFree((char *) entity->orig); in xmlFreeEntity()
159 if (ret == NULL) { in xmlCreateEntity()
161 return(NULL); in xmlCreateEntity()
164 ret->type = XML_ENTITY_DECL; in xmlCreateEntity()
169 ret->etype = (xmlEntityType) type; in xmlCreateEntity()
170 if (dict == NULL) { in xmlCreateEntity()
171 ret->name = xmlStrdup(name); in xmlCreateEntity()
172 if (ExternalID != NULL) in xmlCreateEntity()
173 ret->ExternalID = xmlStrdup(ExternalID); in xmlCreateEntity()
174 if (SystemID != NULL) in xmlCreateEntity()
175 ret->SystemID = xmlStrdup(SystemID); in xmlCreateEntity()
177 ret->name = xmlDictLookup(dict, name, -1); in xmlCreateEntity()
178 ret->ExternalID = xmlStrdup(ExternalID); in xmlCreateEntity()
179 ret->SystemID = xmlStrdup(SystemID); in xmlCreateEntity()
181 if (content != NULL) { in xmlCreateEntity()
182 ret->length = xmlStrlen(content); in xmlCreateEntity()
183 ret->content = xmlStrndup(content, ret->length); in xmlCreateEntity()
185 ret->length = 0; in xmlCreateEntity()
186 ret->content = NULL; in xmlCreateEntity()
188 ret->URI = NULL; /* to be computed by the layer knowing in xmlCreateEntity()
190 ret->orig = NULL; in xmlCreateEntity()
191 ret->owner = 0; in xmlCreateEntity()
203 xmlDictPtr dict = NULL; in xmlAddEntity()
204 xmlEntitiesTablePtr table = NULL; in xmlAddEntity()
207 if (name == NULL) in xmlAddEntity()
208 return(NULL); in xmlAddEntity()
209 if (dtd == NULL) in xmlAddEntity()
210 return(NULL); in xmlAddEntity()
211 if (dtd->doc != NULL) in xmlAddEntity()
212 dict = dtd->doc->dict; in xmlAddEntity()
219 if (predef != NULL) { in xmlAddEntity()
224 (content != NULL)) { in xmlAddEntity()
225 int c = predef->content[0]; in xmlAddEntity()
253 return(NULL); in xmlAddEntity()
256 if (dtd->entities == NULL) in xmlAddEntity()
257 dtd->entities = xmlHashCreateDict(0, dict); in xmlAddEntity()
258 table = dtd->entities; in xmlAddEntity()
262 if (dtd->pentities == NULL) in xmlAddEntity()
263 dtd->pentities = xmlHashCreateDict(0, dict); in xmlAddEntity()
264 table = dtd->pentities; in xmlAddEntity()
267 return(NULL); in xmlAddEntity()
269 if (table == NULL) in xmlAddEntity()
270 return(NULL); in xmlAddEntity()
272 if (ret == NULL) in xmlAddEntity()
273 return(NULL); in xmlAddEntity()
274 ret->doc = dtd->doc; in xmlAddEntity()
281 return(NULL); in xmlAddEntity()
292 * Returns NULL if not, otherwise the entity
296 if (name == NULL) return(NULL); in xmlGetPredefinedEntity()
319 return(NULL); in xmlGetPredefinedEntity()
333 * Returns a pointer to the entity or NULL in case of error
342 if (doc == NULL) { in xmlAddDtdEntity()
344 "xmlAddDtdEntity: document is NULL"); in xmlAddDtdEntity()
345 return(NULL); in xmlAddDtdEntity()
347 if (doc->extSubset == NULL) { in xmlAddDtdEntity()
350 return(NULL); in xmlAddDtdEntity()
352 dtd = doc->extSubset; in xmlAddDtdEntity()
354 if (ret == NULL) return(NULL); in xmlAddDtdEntity()
359 ret->parent = dtd; in xmlAddDtdEntity()
360 ret->doc = dtd->doc; in xmlAddDtdEntity()
361 if (dtd->last == NULL) { in xmlAddDtdEntity()
362 dtd->children = dtd->last = (xmlNodePtr) ret; in xmlAddDtdEntity()
364 dtd->last->next = (xmlNodePtr) ret; in xmlAddDtdEntity()
365 ret->prev = dtd->last; in xmlAddDtdEntity()
366 dtd->last = (xmlNodePtr) ret; in xmlAddDtdEntity()
382 * Returns a pointer to the entity or NULL in case of error
391 if (doc == NULL) { in xmlAddDocEntity()
393 "xmlAddDocEntity: document is NULL"); in xmlAddDocEntity()
394 return(NULL); in xmlAddDocEntity()
396 if (doc->intSubset == NULL) { in xmlAddDocEntity()
399 return(NULL); in xmlAddDocEntity()
401 dtd = doc->intSubset; in xmlAddDocEntity()
403 if (ret == NULL) return(NULL); in xmlAddDocEntity()
408 ret->parent = dtd; in xmlAddDocEntity()
409 ret->doc = dtd->doc; in xmlAddDocEntity()
410 if (dtd->last == NULL) { in xmlAddDocEntity()
411 dtd->children = dtd->last = (xmlNodePtr) ret; in xmlAddDocEntity()
413 dtd->last->next = (xmlNodePtr) ret; in xmlAddDocEntity()
414 ret->prev = dtd->last; in xmlAddDocEntity()
415 dtd->last = (xmlNodePtr) ret; in xmlAddDocEntity()
430 * the document is NULL or has no internal subset defined, then an
435 * Returns a pointer to the entity or NULL in case of error
444 if ((doc != NULL) && (doc->intSubset != NULL)) { in xmlNewEntity()
447 if (doc != NULL) in xmlNewEntity()
448 dict = doc->dict; in xmlNewEntity()
450 dict = NULL; in xmlNewEntity()
452 if (ret == NULL) in xmlNewEntity()
453 return(NULL); in xmlNewEntity()
454 ret->doc = doc; in xmlNewEntity()
467 * Returns A pointer to the entity structure or NULL if not found.
482 * Returns A pointer to the entity structure or NULL if not found.
489 if (doc == NULL) in xmlGetParameterEntity()
490 return(NULL); in xmlGetParameterEntity()
491 if ((doc->intSubset != NULL) && (doc->intSubset->pentities != NULL)) { in xmlGetParameterEntity()
492 table = (xmlEntitiesTablePtr) doc->intSubset->pentities; in xmlGetParameterEntity()
494 if (ret != NULL) in xmlGetParameterEntity()
497 if ((doc->extSubset != NULL) && (doc->extSubset->pentities != NULL)) { in xmlGetParameterEntity()
498 table = (xmlEntitiesTablePtr) doc->extSubset->pentities; in xmlGetParameterEntity()
501 return(NULL); in xmlGetParameterEntity()
513 * Returns A pointer to the entity structure or NULL if not found.
519 if (doc == NULL) in xmlGetDtdEntity()
520 return(NULL); in xmlGetDtdEntity()
521 if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { in xmlGetDtdEntity()
522 table = (xmlEntitiesTablePtr) doc->extSubset->entities; in xmlGetDtdEntity()
525 return(NULL); in xmlGetDtdEntity()
537 * Returns A pointer to the entity structure or NULL if not found.
544 if (doc != NULL) { in xmlGetDocEntity()
545 if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) { in xmlGetDocEntity()
546 table = (xmlEntitiesTablePtr) doc->intSubset->entities; in xmlGetDocEntity()
548 if (cur != NULL) in xmlGetDocEntity()
551 if (doc->standalone != 1) { in xmlGetDocEntity()
552 if ((doc->extSubset != NULL) && in xmlGetDocEntity()
553 (doc->extSubset->entities != NULL)) { in xmlGetDocEntity()
554 table = (xmlEntitiesTablePtr) doc->extSubset->entities; in xmlGetDocEntity()
556 if (cur != NULL) in xmlGetDocEntity()
572 if (tmp == NULL) goto mem_error; \
593 xmlChar *buffer = NULL; in xmlEncodeEntitiesInternal()
594 xmlChar *out = NULL; in xmlEncodeEntitiesInternal() local
598 if (input == NULL) return(NULL); in xmlEncodeEntitiesInternal()
599 if (doc != NULL) in xmlEncodeEntitiesInternal()
600 html = (doc->type == XML_HTML_DOCUMENT_NODE); in xmlEncodeEntitiesInternal()
607 if (buffer == NULL) { in xmlEncodeEntitiesInternal()
609 return(NULL); in xmlEncodeEntitiesInternal()
611 out = buffer; in xmlEncodeEntitiesInternal()
614 size_t indx = out - buffer; in xmlEncodeEntitiesInternal()
618 out = &buffer[indx]; in xmlEncodeEntitiesInternal()
631 (cur[1] == '!') && (cur[2] == '-') && (cur[3] == '-') && in xmlEncodeEntitiesInternal()
632 ((end = xmlStrstr(cur, BAD_CAST "-->")) != NULL)) { in xmlEncodeEntitiesInternal()
634 *out++ = *cur++; in xmlEncodeEntitiesInternal()
635 indx = out - buffer; in xmlEncodeEntitiesInternal()
638 out = &buffer[indx]; in xmlEncodeEntitiesInternal()
641 *out++ = *cur++; in xmlEncodeEntitiesInternal()
642 *out++ = *cur++; in xmlEncodeEntitiesInternal()
643 *out++ = *cur++; in xmlEncodeEntitiesInternal()
646 *out++ = '&'; in xmlEncodeEntitiesInternal()
647 *out++ = 'l'; in xmlEncodeEntitiesInternal()
648 *out++ = 't'; in xmlEncodeEntitiesInternal()
649 *out++ = ';'; in xmlEncodeEntitiesInternal()
651 *out++ = '&'; in xmlEncodeEntitiesInternal()
652 *out++ = 'g'; in xmlEncodeEntitiesInternal()
653 *out++ = 't'; in xmlEncodeEntitiesInternal()
654 *out++ = ';'; in xmlEncodeEntitiesInternal()
658 * http://www.w3.org/TR/html401/appendix/notes.html#h-B.7.1 in xmlEncodeEntitiesInternal()
663 *out++ = *cur++; in xmlEncodeEntitiesInternal()
664 indx = out - buffer; in xmlEncodeEntitiesInternal()
667 out = &buffer[indx]; in xmlEncodeEntitiesInternal()
670 *out++ = *cur++; in xmlEncodeEntitiesInternal()
673 *out++ = '&'; in xmlEncodeEntitiesInternal()
674 *out++ = 'a'; in xmlEncodeEntitiesInternal()
675 *out++ = 'm'; in xmlEncodeEntitiesInternal()
676 *out++ = 'p'; in xmlEncodeEntitiesInternal()
677 *out++ = ';'; in xmlEncodeEntitiesInternal()
683 *out++ = *cur; in xmlEncodeEntitiesInternal()
685 if (((doc != NULL) && (doc->encoding != NULL)) || (html)) { in xmlEncodeEntitiesInternal()
692 *out++ = xc; in xmlEncodeEntitiesInternal()
695 *out++ = *cur; in xmlEncodeEntitiesInternal()
698 * We assume we have UTF-8 input. in xmlEncodeEntitiesInternal()
719 "xmlEncodeEntities: input not UTF-8"); in xmlEncodeEntitiesInternal()
721 buf[sizeof(buf) - 1] = 0; in xmlEncodeEntitiesInternal()
723 while (*ptr != 0) *out++ = *ptr++; in xmlEncodeEntitiesInternal()
750 "xmlEncodeEntities: char out of range\n"); in xmlEncodeEntitiesInternal()
752 buf[sizeof(buf) - 1] = 0; in xmlEncodeEntitiesInternal()
754 while (*ptr != 0) *out++ = *ptr++; in xmlEncodeEntitiesInternal()
762 buf[sizeof(buf) - 1] = 0; in xmlEncodeEntitiesInternal()
764 while (*ptr != 0) *out++ = *ptr++; in xmlEncodeEntitiesInternal()
772 buf[sizeof(buf) - 1] = 0; in xmlEncodeEntitiesInternal()
774 while (*ptr != 0) *out++ = *ptr++; in xmlEncodeEntitiesInternal()
778 *out = 0; in xmlEncodeEntitiesInternal()
784 return(NULL); in xmlEncodeEntitiesInternal()
833 xmlChar *buffer = NULL; in xmlEncodeSpecialChars()
834 xmlChar *out = NULL; in xmlEncodeSpecialChars() local
836 if (input == NULL) return(NULL); in xmlEncodeSpecialChars()
843 if (buffer == NULL) { in xmlEncodeSpecialChars()
845 return(NULL); in xmlEncodeSpecialChars()
847 out = buffer; in xmlEncodeSpecialChars()
850 size_t indx = out - buffer; in xmlEncodeSpecialChars()
854 out = &buffer[indx]; in xmlEncodeSpecialChars()
861 *out++ = '&'; in xmlEncodeSpecialChars()
862 *out++ = 'l'; in xmlEncodeSpecialChars()
863 *out++ = 't'; in xmlEncodeSpecialChars()
864 *out++ = ';'; in xmlEncodeSpecialChars()
866 *out++ = '&'; in xmlEncodeSpecialChars()
867 *out++ = 'g'; in xmlEncodeSpecialChars()
868 *out++ = 't'; in xmlEncodeSpecialChars()
869 *out++ = ';'; in xmlEncodeSpecialChars()
871 *out++ = '&'; in xmlEncodeSpecialChars()
872 *out++ = 'a'; in xmlEncodeSpecialChars()
873 *out++ = 'm'; in xmlEncodeSpecialChars()
874 *out++ = 'p'; in xmlEncodeSpecialChars()
875 *out++ = ';'; in xmlEncodeSpecialChars()
877 *out++ = '&'; in xmlEncodeSpecialChars()
878 *out++ = 'q'; in xmlEncodeSpecialChars()
879 *out++ = 'u'; in xmlEncodeSpecialChars()
880 *out++ = 'o'; in xmlEncodeSpecialChars()
881 *out++ = 't'; in xmlEncodeSpecialChars()
882 *out++ = ';'; in xmlEncodeSpecialChars()
884 *out++ = '&'; in xmlEncodeSpecialChars()
885 *out++ = '#'; in xmlEncodeSpecialChars()
886 *out++ = '1'; in xmlEncodeSpecialChars()
887 *out++ = '3'; in xmlEncodeSpecialChars()
888 *out++ = ';'; in xmlEncodeSpecialChars()
891 * Works because on UTF-8, all extended sequences cannot in xmlEncodeSpecialChars()
894 *out++ = *cur; in xmlEncodeSpecialChars()
898 *out = 0; in xmlEncodeSpecialChars()
904 return(NULL); in xmlEncodeSpecialChars()
913 * Returns the xmlEntitiesTablePtr just created or NULL in case of error.
929 if (entity != NULL) in xmlFreeEntityWrapper()
951 * Returns the new xmlEntitiesPtr or NULL in case of error.
959 if (cur == NULL) { in xmlCopyEntity()
961 return(NULL); in xmlCopyEntity()
964 cur->type = XML_ENTITY_DECL; in xmlCopyEntity()
966 cur->etype = ent->etype; in xmlCopyEntity()
967 if (ent->name != NULL) in xmlCopyEntity()
968 cur->name = xmlStrdup(ent->name); in xmlCopyEntity()
969 if (ent->ExternalID != NULL) in xmlCopyEntity()
970 cur->ExternalID = xmlStrdup(ent->ExternalID); in xmlCopyEntity()
971 if (ent->SystemID != NULL) in xmlCopyEntity()
972 cur->SystemID = xmlStrdup(ent->SystemID); in xmlCopyEntity()
973 if (ent->content != NULL) in xmlCopyEntity()
974 cur->content = xmlStrdup(ent->content); in xmlCopyEntity()
975 if (ent->orig != NULL) in xmlCopyEntity()
976 cur->orig = xmlStrdup(ent->orig); in xmlCopyEntity()
977 if (ent->URI != NULL) in xmlCopyEntity()
978 cur->URI = xmlStrdup(ent->URI); in xmlCopyEntity()
988 * Returns the new xmlEntitiesTablePtr or NULL in case of error.
1016 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
1022 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
1031 xmlBufferAdd(buf, base, cur - base); in xmlDumpEntityContent()
1047 if ((buf == NULL) || (ent == NULL)) return; in xmlDumpEntityDecl()
1048 switch (ent->etype) { in xmlDumpEntityDecl()
1051 xmlBufferWriteCHAR(buf, ent->name); in xmlDumpEntityDecl()
1053 if (ent->orig != NULL) in xmlDumpEntityDecl()
1054 xmlBufferWriteQuotedString(buf, ent->orig); in xmlDumpEntityDecl()
1056 xmlDumpEntityContent(buf, ent->content); in xmlDumpEntityDecl()
1061 xmlBufferWriteCHAR(buf, ent->name); in xmlDumpEntityDecl()
1062 if (ent->ExternalID != NULL) { in xmlDumpEntityDecl()
1064 xmlBufferWriteQuotedString(buf, ent->ExternalID); in xmlDumpEntityDecl()
1066 xmlBufferWriteQuotedString(buf, ent->SystemID); in xmlDumpEntityDecl()
1069 xmlBufferWriteQuotedString(buf, ent->SystemID); in xmlDumpEntityDecl()
1075 xmlBufferWriteCHAR(buf, ent->name); in xmlDumpEntityDecl()
1076 if (ent->ExternalID != NULL) { in xmlDumpEntityDecl()
1078 xmlBufferWriteQuotedString(buf, ent->ExternalID); in xmlDumpEntityDecl()
1080 xmlBufferWriteQuotedString(buf, ent->SystemID); in xmlDumpEntityDecl()
1083 xmlBufferWriteQuotedString(buf, ent->SystemID); in xmlDumpEntityDecl()
1085 if (ent->content != NULL) { /* Should be true ! */ in xmlDumpEntityDecl()
1087 if (ent->orig != NULL) in xmlDumpEntityDecl()
1088 xmlBufferWriteCHAR(buf, ent->orig); in xmlDumpEntityDecl()
1090 xmlBufferWriteCHAR(buf, ent->content); in xmlDumpEntityDecl()
1096 xmlBufferWriteCHAR(buf, ent->name); in xmlDumpEntityDecl()
1098 if (ent->orig == NULL) in xmlDumpEntityDecl()
1099 xmlDumpEntityContent(buf, ent->content); in xmlDumpEntityDecl()
1101 xmlBufferWriteQuotedString(buf, ent->orig); in xmlDumpEntityDecl()
1106 xmlBufferWriteCHAR(buf, ent->name); in xmlDumpEntityDecl()
1107 if (ent->ExternalID != NULL) { in xmlDumpEntityDecl()
1109 xmlBufferWriteQuotedString(buf, ent->ExternalID); in xmlDumpEntityDecl()
1111 xmlBufferWriteQuotedString(buf, ent->SystemID); in xmlDumpEntityDecl()
1114 xmlBufferWriteQuotedString(buf, ent->SystemID); in xmlDumpEntityDecl()