MCPcopy Create free account
hub / github.com/Kitware/VTK / htmlCtxtUseOptions

Function htmlCtxtUseOptions

ThirdParty/libxml2/vtklibxml2/HTMLparser.c:6246–6306  ·  view source on GitHub ↗

* htmlCtxtUseOptions: * @ctxt: an HTML parser context * @options: a combination of htmlParserOption(s) * * Applies the options to the parser context * * Returns 0 in case of success, the set of unknown or unimplemented options * in case of error. */

Source from the content-addressed store, hash-verified

6244 * in case of error.
6245 */
6246int
6247htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
6248{
6249 if (ctxt == NULL)
6250 return(-1);
6251
6252 if (options & HTML_PARSE_NOWARNING) {
6253 ctxt->sax->warning = NULL;
6254 ctxt->vctxt.warning = NULL;
6255 options -= XML_PARSE_NOWARNING;
6256 ctxt->options |= XML_PARSE_NOWARNING;
6257 }
6258 if (options & HTML_PARSE_NOERROR) {
6259 ctxt->sax->error = NULL;
6260 ctxt->vctxt.error = NULL;
6261 ctxt->sax->fatalError = NULL;
6262 options -= XML_PARSE_NOERROR;
6263 ctxt->options |= XML_PARSE_NOERROR;
6264 }
6265 if (options & HTML_PARSE_PEDANTIC) {
6266 ctxt->pedantic = 1;
6267 options -= XML_PARSE_PEDANTIC;
6268 ctxt->options |= XML_PARSE_PEDANTIC;
6269 } else
6270 ctxt->pedantic = 0;
6271 if (options & XML_PARSE_NOBLANKS) {
6272 ctxt->keepBlanks = 0;
6273 ctxt->sax->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
6274 options -= XML_PARSE_NOBLANKS;
6275 ctxt->options |= XML_PARSE_NOBLANKS;
6276 } else
6277 ctxt->keepBlanks = 1;
6278 if (options & HTML_PARSE_RECOVER) {
6279 ctxt->recovery = 1;
6280 options -= HTML_PARSE_RECOVER;
6281 } else
6282 ctxt->recovery = 0;
6283 if (options & HTML_PARSE_COMPACT) {
6284 ctxt->options |= HTML_PARSE_COMPACT;
6285 options -= HTML_PARSE_COMPACT;
6286 }
6287 if (options & XML_PARSE_HUGE) {
6288 ctxt->options |= XML_PARSE_HUGE;
6289 options -= XML_PARSE_HUGE;
6290 }
6291 if (options & HTML_PARSE_NODEFDTD) {
6292 ctxt->options |= HTML_PARSE_NODEFDTD;
6293 options -= HTML_PARSE_NODEFDTD;
6294 }
6295 if (options & HTML_PARSE_IGNORE_ENC) {
6296 ctxt->options |= HTML_PARSE_IGNORE_ENC;
6297 options -= HTML_PARSE_IGNORE_ENC;
6298 }
6299 if (options & HTML_PARSE_NOIMPLIED) {
6300 ctxt->options |= HTML_PARSE_NOIMPLIED;
6301 options -= HTML_PARSE_NOIMPLIED;
6302 }
6303 ctxt->dictNames = 0;

Callers 11

parseFileFunction · 0.85
htmlReadDocFunction · 0.85
htmlReadFileFunction · 0.85
htmlReadMemoryFunction · 0.85
htmlReadFdFunction · 0.85
htmlReadIOFunction · 0.85
htmlCtxtReadDocFunction · 0.85
htmlCtxtReadFileFunction · 0.85
htmlCtxtReadMemoryFunction · 0.85
htmlCtxtReadFdFunction · 0.85
htmlCtxtReadIOFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected