diff dwtx/dwtxhelper/mangoicu/UMessageFormat.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/UMessageFormat.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UMessageFormat.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,12 +82,12 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UMessageFormat;
+module dwtx.dwtxhelper.mangoicu.UMessageFormat;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString;
 
-public  import  dwtx.dwthelper.mangoicu.ULocale;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale;
 
 /*******************************************************************************
 
@@ -114,7 +114,7 @@
 
         this (wchar[] pattern, inout ULocale locale = ULocale.Default)
         {       
-                Error e;
+                UErrorCode e;
 
                 handle = umsg_open (pattern.ptr, pattern.length, toString(locale.name), null, e);
                 testError (e, "failed to open message formatter");
@@ -127,7 +127,7 @@
 
         ***********************************************************************/
 
-        this (UText pattern, inout ULocale locale = ULocale.Default)
+        this (UStringView pattern, inout ULocale locale = ULocale.Default)
         {
                 this (pattern.get, locale);
         }
@@ -175,9 +175,9 @@
 
         ***********************************************************************/
 
-        UMessageFormat setPattern (UText pattern)
+        UMessageFormat setPattern (UStringView pattern)
         {
-                Error e;
+                UErrorCode e;
 
                 umsg_applyPattern (handle, pattern.get.ptr, pattern.len, null, e);
                 testError (e, "failed to set formatter pattern");
@@ -192,7 +192,7 @@
 
         UMessageFormat getPattern (UString s)
         {
-                uint fmt (wchar* dst, uint length, inout Error e)
+                uint fmt (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return umsg_toPattern (handle, dst, length, e);
                 }
@@ -212,7 +212,7 @@
 
         UMessageFormat format (UString s, Args* list)
         {
-                uint fmt (wchar* dst, uint length, inout Error e)
+                uint fmt (wchar* dst, uint length, inout UErrorCode e)
                 {
                         return umsg_vformat (handle, dst, length, list.args.ptr, e);
                 }
@@ -274,7 +274,7 @@
 
                 ***************************************************************/
 
-                Args* add (UText x)
+                Args* add (UStringView x)
                 {
                         args[index] = cast(uint) cast(wchar*) x.get();
                         ++index;
@@ -332,13 +332,13 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, char*, void*, inout Error) umsg_open;
+                Handle  function (wchar*, uint, char*, void*, inout UErrorCode) umsg_open;
                 void    function (Handle) umsg_close;
                 void    function (Handle, char*) umsg_setLocale;
                 char*   function (Handle) umsg_getLocale;
-                uint    function (Handle, wchar*, uint, inout Error) umsg_toPattern;
-                void    function (Handle, wchar*, uint, void*, inout Error) umsg_applyPattern;
-                uint    function (Handle, wchar*, uint, void*, inout Error) umsg_vformat;
+                uint    function (Handle, wchar*, uint, inout UErrorCode) umsg_toPattern;
+                void    function (Handle, wchar*, uint, void*, inout UErrorCode) umsg_applyPattern;
+                uint    function (Handle, wchar*, uint, void*, inout UErrorCode) umsg_vformat;
         }
 
         /***********************************************************************