/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
#include <pthread.h>
#endif
+#if YAZ_HAVE_XML2
+#include <libxml/xmlmemory.h>
+#endif
+
#include <string.h>
#include <stdlib.h>
struct icu_buf_utf16 *tkn16 = icu_buf_utf16_create(0);
struct icu_buf_utf8 *tkn8 = icu_buf_utf8_create(0);
struct icu_tokenizer *tokenizer = 0;
+ size_t org_start, org_len;
/* transforming to UTF16 */
icu_utf16_from_utf8_cstr(src16, src8cstr, &status);
icu_check_status(status);
/* perform work on tokens */
- while (icu_tokenizer_next_token(tokenizer, tkn16, &status))
+ while (icu_tokenizer_next_token(tokenizer, tkn16, &status,
+ &org_start, &org_len))
{
icu_check_status(status);
check_bug_1140();
u_cleanup();
+#if YAZ_HAVE_XML2
+ xmlCleanupParser();
+#endif
+
#else /* YAZ_HAVE_ICU */
yaz_log(YLOG_LOG, "ICU unit tests omitted");