Lines Matching defs:handler
1241 * parser internals, so the default encoding handler is NULL
1260 xmlCharEncodingHandlerPtr handler;
1293 * allocate and fill-up an handler block.
1295 handler = (xmlCharEncodingHandlerPtr)
1297 if (handler == NULL) {
1302 handler->input = input;
1303 handler->output = output;
1304 handler->name = up;
1307 handler->iconv_in = NULL;
1308 handler->iconv_out = NULL;
1312 * registers and returns the handler.
1314 xmlRegisterCharEncodingHandler(handler);
1317 "Registered encoding handler for %s\n", name);
1319 return(handler);
1410 * @handler: the xmlCharEncodingHandlerPtr handler block
1412 * Register the char encoding handler, surprising, isn't it ?
1415 xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) {
1417 if (handler == NULL) {
1419 "xmlRegisterCharEncodingHandler: NULL handler !\n", NULL);
1425 "xmlRegisterCharEncodingHandler: Too many handler registered, see %s\n",
1429 handlers[nbCharEncodingHandler++] = handler;
1436 * Search in the registered set the handler able to read/write that encoding.
1438 * Returns the handler or NULL if not found
1442 xmlCharEncodingHandlerPtr handler;
1457 handler = xmlFindCharEncodingHandler("EBCDIC");
1458 if (handler != NULL) return(handler);
1459 handler = xmlFindCharEncodingHandler("ebcdic");
1460 if (handler != NULL) return(handler);
1463 handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
1464 if (handler != NULL) return(handler);
1465 handler = xmlFindCharEncodingHandler("UCS-4");
1466 if (handler != NULL) return(handler);
1467 handler = xmlFindCharEncodingHandler("UCS4");
1468 if (handler != NULL) return(handler);
1471 handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4");
1472 if (handler != NULL) return(handler);
1473 handler = xmlFindCharEncodingHandler("UCS-4");
1474 if (handler != NULL) return(handler);
1475 handler = xmlFindCharEncodingHandler("UCS4");
1476 if (handler != NULL) return(handler);
1483 handler = xmlFindCharEncodingHandler("ISO-10646-UCS-2");
1484 if (handler != NULL) return(handler);
1485 handler = xmlFindCharEncodingHandler("UCS-2");
1486 if (handler != NULL) return(handler);
1487 handler = xmlFindCharEncodingHandler("UCS2");
1488 if (handler != NULL) return(handler);
1498 handler = xmlFindCharEncodingHandler("ISO-8859-1");
1499 if (handler != NULL) return(handler);
1502 handler = xmlFindCharEncodingHandler("ISO-8859-2");
1503 if (handler != NULL) return(handler);
1506 handler = xmlFindCharEncodingHandler("ISO-8859-3");
1507 if (handler != NULL) return(handler);
1510 handler = xmlFindCharEncodingHandler("ISO-8859-4");
1511 if (handler != NULL) return(handler);
1514 handler = xmlFindCharEncodingHandler("ISO-8859-5");
1515 if (handler != NULL) return(handler);
1518 handler = xmlFindCharEncodingHandler("ISO-8859-6");
1519 if (handler != NULL) return(handler);
1522 handler = xmlFindCharEncodingHandler("ISO-8859-7");
1523 if (handler != NULL) return(handler);
1526 handler = xmlFindCharEncodingHandler("ISO-8859-8");
1527 if (handler != NULL) return(handler);
1530 handler = xmlFindCharEncodingHandler("ISO-8859-9");
1531 if (handler != NULL) return(handler);
1536 handler = xmlFindCharEncodingHandler("ISO-2022-JP");
1537 if (handler != NULL) return(handler);
1540 handler = xmlFindCharEncodingHandler("SHIFT-JIS");
1541 if (handler != NULL) return(handler);
1542 handler = xmlFindCharEncodingHandler("SHIFT_JIS");
1543 if (handler != NULL) return(handler);
1544 handler = xmlFindCharEncodingHandler("Shift_JIS");
1545 if (handler != NULL) return(handler);
1548 handler = xmlFindCharEncodingHandler("EUC-JP");
1549 if (handler != NULL) return(handler);
1557 "No handler found for encoding %d\n", enc);
1566 * Search in the registered set the handler able to read/write that encoding.
1568 * Returns the handler or NULL if not found
1607 "Found registered handler for encoding %s\n", name);
1637 "Found iconv handler for encoding %s\n", name);
1648 "No handler found for encoding %s\n", name);
1741 * @handler: char enconding transformation data structure
1745 * Front-end for the encoding handler input function, but handle only
1754 xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out,
1760 if (handler == NULL) return(-1);
1780 if (handler->input != NULL) {
1781 ret = handler->input(&out->content[out->use], &written,
1788 else if (handler->iconv_in != NULL) {
1789 ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use],
1830 * @handler: char encoding transformation data structure
1834 * Generic front-end for the encoding handler input function
1842 xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out,
1849 if (handler == NULL)
1864 if (handler->input != NULL) {
1865 ret = handler->input(&out->content[out->use], &written,
1872 else if (handler->iconv_in != NULL) {
1873 ret = xmlIconvWrapper(handler->iconv_in, &out->content[out->use],
1926 * @handler: char enconding transformation data structure
1930 * Generic front-end for the encoding handler output function
1943 xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
1951 if (handler == NULL) return(-1);
1966 if (handler->output != NULL) {
1967 ret = handler->output(&out->content[out->use], &written,
1975 else if (handler->iconv_out != NULL) {
1976 ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use],
1999 if (handler->output != NULL) {
2000 ret = handler->output(&out->content[out->use], &written,
2010 else if (handler->iconv_out != NULL) {
2011 ret = xmlIconvWrapper(handler->iconv_out, &out->content[out->use],
2107 * @handler: char enconding transformation data structure
2109 * Generic front-end for encoding handler close function
2114 xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
2116 if (handler == NULL) return(-1);
2117 if (handler->name == NULL) return(-1);
2123 if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) {
2124 if (handler->name != NULL)
2125 xmlFree(handler->name);
2126 handler->name = NULL;
2127 if (handler->iconv_out != NULL) {
2128 if (iconv_close(handler->iconv_out))
2130 handler->iconv_out = NULL;
2132 if (handler->iconv_in != NULL) {
2133 if (iconv_close(handler->iconv_in))
2135 handler->iconv_in = NULL;
2137 xmlFree(handler);
2143 "failed to close the encoding handler\n");
2146 "closed the encoding handler\n");
2175 xmlCharEncodingHandler * handler = in->buf->encoder;
2188 if (handler->output != NULL) {
2192 ret = handler->output(&convbuf[0], &written,
2199 } else if (handler->iconv_out != NULL) {
2203 ret = xmlIconvWrapper(handler->iconv_out, &convbuf[0],