cql_sortby_to_sortkeys: handle modifiers.
[yaz-moved-to-github.git] / include / yaz / icu_I18N.h
index f50b60a..09b30e6 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data.
+ * Copyright (C) 1995-2011 Index Data.
  * All rights reserved.
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -102,6 +102,8 @@ struct icu_casemap;
 
 struct icu_casemap * icu_casemap_create(char action, UErrorCode *status);
 
+struct icu_casemap *icu_casemap_clone(struct icu_casemap *old);
+
 void icu_casemap_destroy(struct icu_casemap * casemap);
 
 int icu_casemap_casemap(struct icu_casemap * casemap,
@@ -120,28 +122,11 @@ void icu_sortkey8_from_utf16(UCollator *coll,
                              struct icu_buf_utf16 * src16,
                              UErrorCode * status);
 
-struct icu_tokenizer
-{
-    char action;
-    UBreakIterator* bi;
-    struct icu_buf_utf16 * buf16;
-    int32_t token_count;
-    int32_t token_id;
-    int32_t token_start;
-    int32_t token_end;
-/*
-  keep always invariant
-  0 <= token_start 
-  <= token_end 
-  <= buf16->utf16_len
-  and invariant
-  0 <= token_id <= token_count
-*/
-};
-
+struct icu_tokenizer;
 struct icu_tokenizer * icu_tokenizer_create(const char *locale, char action,
                                             UErrorCode *status);
 
+struct icu_tokenizer *icu_tokenizer_clone(struct icu_tokenizer *old);
 void icu_tokenizer_destroy(struct icu_tokenizer * tokenizer);
 
 int icu_tokenizer_attach(struct icu_tokenizer * tokenizer, 
@@ -158,12 +143,12 @@ struct icu_transform;
 struct icu_transform * icu_transform_create(const char *id, char action,
                                             const char *rules,
                                             UErrorCode *status);
-
+struct icu_transform *icu_transform_clone(struct icu_transform *old);
 void icu_transform_destroy(struct icu_transform * transform);
 
 int icu_transform_trans(struct icu_transform * transform,
                         struct icu_buf_utf16 * dest16,
-                        struct icu_buf_utf16 * src16,
+                        const struct icu_buf_utf16 * src16,
                         UErrorCode *status);
 
 struct icu_chain_step;
@@ -174,7 +159,6 @@ yaz_icu_chain_t icu_chain_create(const char * locale,
                                  int sort,
                                  UErrorCode * status);
 
-
 #endif /* ICU_I18NL_H */
 
 /*