예제 #1
0
static int
erim_xml_init()
{

	/* Initialize the global known lists. */
	if (init_known_lists() != 0)
		return (-1);

	if (xmlMemSetup(driver_free, driver_alloc,
			driver_realloc, erim_strdup) != 0) {
		return (-1);
	}

	/* Initialize and check LibXML2. */
	LIBXML_TEST_VERSION; /* be safe, plus calls xmlInitParser */

	/* Initialize SAX callbacks. */
	sax_handler.initialized = XML_SAX2_MAGIC;
	sax_handler.startElementNs = libxml2_cb_start_element;
	sax_handler.endElementNs = libxml2_cb_end_element;
	sax_handler.getEntity = libxml2_cb_get_entity;
	sax_handler.characters = libxml2_cb_character_data;

	return (0);
}
예제 #2
0
static int
exmpp_xml_init()
{

	/* Initialize the global known lists. */
	if (init_known_lists() != 0)
		return (-1);

	return (0);
}
예제 #3
0
static int
exmpp_xml_init()
{

	/* Initialize the global known lists. */
	if (init_known_lists() != 0)
		return (-1);

	/* Initialize and check LibXML2. */
	LIBXML_TEST_VERSION; /* be safe, plus calls xmlInitParser */

	return (0);
}
예제 #4
0
static int
exmpp_xml_init()
{

	/* Initialize the global known lists. */
	if (init_known_lists() != 0)
		return (-1);

	memory_suite.malloc_fcn = driver_alloc;
	memory_suite.realloc_fcn = driver_realloc;
	memory_suite.free_fcn = driver_free;

	return (0);
}