| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * xmlwriter.c: XML text writer implementation | 3 * xmlwriter.c: XML text writer implementation |
| 4 * | 4 * |
| 5 * For license and disclaimer see the license and disclaimer of | 5 * For license and disclaimer see the license and disclaimer of |
| 6 * libxml2. | 6 * libxml2. |
| 7 * | 7 * |
| 8 * alfred@mickautsch.de | 8 * alfred@mickautsch.de |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 static int xmlCmpTextWriterStackEntry(const void *data0, | 106 static int xmlCmpTextWriterStackEntry(const void *data0, |
| 107 const void *data1); | 107 const void *data1); |
| 108 static int xmlTextWriterOutputNSDecl(xmlTextWriterPtr writer); | 108 static int xmlTextWriterOutputNSDecl(xmlTextWriterPtr writer); |
| 109 static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk); | 109 static void xmlFreeTextWriterNsStackEntry(xmlLinkPtr lk); |
| 110 static int xmlCmpTextWriterNsStackEntry(const void *data0, | 110 static int xmlCmpTextWriterNsStackEntry(const void *data0, |
| 111 const void *data1); | 111 const void *data1); |
| 112 static int xmlTextWriterWriteDocCallback(void *context, | 112 static int xmlTextWriterWriteDocCallback(void *context, |
| 113 const xmlChar * str, int len); | 113 const xmlChar * str, int len); |
| 114 static int xmlTextWriterCloseDocCallback(void *context); | 114 static int xmlTextWriterCloseDocCallback(void *context); |
| 115 | 115 |
| 116 static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr); | 116 static xmlChar *xmlTextWriterVSprintf(const char *format, va_list argptr) LIBXML
_ATTR_FORMAT(1,0); |
| 117 static int xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len, | 117 static int xmlOutputBufferWriteBase64(xmlOutputBufferPtr out, int len, |
| 118 const unsigned char *data); | 118 const unsigned char *data); |
| 119 static void xmlTextWriterStartDocumentCallback(void *ctx); | 119 static void xmlTextWriterStartDocumentCallback(void *ctx); |
| 120 static int xmlTextWriterWriteIndent(xmlTextWriterPtr writer); | 120 static int xmlTextWriterWriteIndent(xmlTextWriterPtr writer); |
| 121 static int | 121 static int |
| 122 xmlTextWriterHandleStateDependencies(xmlTextWriterPtr writer, | 122 xmlTextWriterHandleStateDependencies(xmlTextWriterPtr writer, |
| 123 xmlTextWriterStackEntry * p); | 123 xmlTextWriterStackEntry * p); |
| 124 | 124 |
| 125 /** | 125 /** |
| 126 * xmlWriterErrMsg: | 126 * xmlWriterErrMsg: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 146 | 146 |
| 147 /** | 147 /** |
| 148 * xmlWriterErrMsgInt: | 148 * xmlWriterErrMsgInt: |
| 149 * @ctxt: a writer context | 149 * @ctxt: a writer context |
| 150 * @error: the error number | 150 * @error: the error number |
| 151 * @msg: the error message | 151 * @msg: the error message |
| 152 * @val: an int | 152 * @val: an int |
| 153 * | 153 * |
| 154 * Handle a writer error | 154 * Handle a writer error |
| 155 */ | 155 */ |
| 156 static void | 156 static void LIBXML_ATTR_FORMAT(3,0) |
| 157 xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error, | 157 xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error, |
| 158 const char *msg, int val) | 158 const char *msg, int val) |
| 159 { | 159 { |
| 160 if (ctxt != NULL) { | 160 if (ctxt != NULL) { |
| 161 __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt, | 161 __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt, |
| 162 NULL, XML_FROM_WRITER, error, XML_ERR_FATAL, | 162 NULL, XML_FROM_WRITER, error, XML_ERR_FATAL, |
| 163 NULL, 0, NULL, NULL, NULL, val, 0, msg, val); | 163 NULL, 0, NULL, NULL, NULL, val, 0, msg, val); |
| 164 } else { | 164 } else { |
| 165 __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error, | 165 __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error, |
| 166 XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, val, 0, msg, val); | 166 XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, val, 0, msg, val); |
| (...skipping 4567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4734 return -1; | 4734 return -1; |
| 4735 sum += count; | 4735 sum += count; |
| 4736 } | 4736 } |
| 4737 | 4737 |
| 4738 return sum; | 4738 return sum; |
| 4739 } | 4739 } |
| 4740 | 4740 |
| 4741 #define bottom_xmlwriter | 4741 #define bottom_xmlwriter |
| 4742 #include "elfgcchack.h" | 4742 #include "elfgcchack.h" |
| 4743 #endif | 4743 #endif |
| OLD | NEW |