/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
#include <yaz/log.h>
+#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
UTransliterator * trans;
};
+struct icu_transform *icu_transform_clone(struct icu_transform *old)
+{
+ struct icu_transform *transform
+ = (struct icu_transform *) xmalloc(sizeof(struct icu_transform));
+ UErrorCode status;
+ assert(old);
+ transform->action = old->action;
+ assert(old->trans);
+ transform->trans = utrans_clone(old->trans, &status);
+ assert(transform->trans);
+ return transform;
+}
+
struct icu_transform * icu_transform_create(const char *id, char action,
const char *rules,
UErrorCode *status)