diff dwtx/dwtxhelper/mangoicu/UTransform.d @ 91:11e8159caf7a

make the mango icu fork work.
author Frank Benoit <benoit@tionex.de>
date Mon, 07 Jul 2008 15:53:07 +0200
parents 040da1cb0d76
children f05207c07a98
line wrap: on
line diff
--- a/dwtx/dwtxhelper/mangoicu/UTransform.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UTransform.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,10 +82,10 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UTransform;
+module dwtx.dwtxhelper.mangoicu.UTransform;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
 /*******************************************************************************
 
@@ -109,9 +109,9 @@
 
         ***********************************************************************/
 
-        this (UText id)
+        this (UStringView id)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = utrans_openU (id.get.ptr, id.len, 0, null, 0, null, e);
                 testError (e, "failed to open ID transform");
@@ -121,9 +121,9 @@
 
         ***********************************************************************/
 
-        this (UText rule, Direction dir)
+        this (UStringView rule, Direction dir)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = utrans_openU (null, 0, dir, rule.get.ptr, rule.len, null, e);
                 testError (e, "failed to open rule-based transform");
@@ -142,20 +142,20 @@
 
         ***********************************************************************/
 
-        UText getID ()
+        UStringView getID ()
         {
                 uint len;
                 wchar *s = utrans_getUnicodeID (handle, len);
-                return new UText (s[0..len]);
+                return new UStringView (s[0..len]);
         }
 
         /***********************************************************************
 
         ***********************************************************************/
 
-        UTransform setFilter (UText filter)
+        UTransform setFilter (UStringView filter)
         {
-                Error e;
+                UErrorCode e;
 
                 if (filter.length)
                     utrans_setFilter (handle, filter.get.ptr, filter.len, e);
@@ -172,7 +172,7 @@
 
         UTransform execute (UString text)
         {
-                Error   e;
+                UErrorCode   e;
                 uint    textLen = text.len;
 
                 utrans_transUChars (handle, text.get.ptr, &textLen, text.content.length, 0, &text.len, e);
@@ -198,11 +198,11 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, uint, wchar*, uint, void*, inout Error) utrans_openU;
+                Handle  function (wchar*, uint, uint, wchar*, uint, void*, inout UErrorCode) utrans_openU;
                 void    function (Handle) utrans_close;
                 wchar*  function (Handle, inout uint) utrans_getUnicodeID;
-                void    function (Handle, wchar*, uint, inout Error) utrans_setFilter;
-                void    function (Handle, wchar*, uint*, uint, uint, uint*, inout Error) utrans_transUChars;
+                void    function (Handle, wchar*, uint, inout UErrorCode) utrans_setFilter;
+                void    function (Handle, wchar*, uint*, uint, uint, uint*, inout UErrorCode) utrans_transUChars;
         }
 
         /***********************************************************************