diff dwtx/dwtxhelper/mangoicu/UDateFormat.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
line wrap: on
line diff
--- a/dwtx/dwtxhelper/mangoicu/UDateFormat.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UDateFormat.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,12 +82,12 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UDateFormat;
+module dwtx.dwtxhelper.mangoicu.UDateFormat;
 
-private import  dwtx.dwthelper.mangoicu.ICU,
-                dwtx.dwthelper.mangoicu.UString,
-                dwtx.dwthelper.mangoicu.UCalendar,
-                dwtx.dwthelper.mangoicu.UNumberFormat;
+private import  dwtx.dwtxhelper.mangoicu.ICU,
+                dwtx.dwtxhelper.mangoicu.UString,
+                dwtx.dwtxhelper.mangoicu.UCalendar,
+                dwtx.dwtxhelper.mangoicu.UNumberFormat;
 
 /*******************************************************************************
 
@@ -178,9 +178,9 @@
 
         ***********************************************************************/
 
-        this (Style time, Style date, inout ULocale locale, inout UTimeZone tz, UText pattern=null)
+        this (Style time, Style date, inout ULocale locale, inout UTimeZone tz, UStringView pattern=null)
         {
-                Error  e;
+                UErrorCode  e;
                 wchar* p;
                 uint   c;
 
@@ -209,7 +209,7 @@
 
         void format (UString dst, UDate date, UFieldPos p = null)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return udat_format (handle, date, result, len, p, e);
                 }
@@ -223,9 +223,9 @@
 
         ***********************************************************************/
 
-        UDate parse (UText src, uint* index=null)
+        UDate parse (UStringView src, uint* index=null)
         {
-                Error e;
+                UErrorCode e;
 
                 UDate x = udat_parse (handle, src.content.ptr, src.len, index, e); 
                 testError (e, "failed to parse date");
@@ -279,7 +279,7 @@
 
         UDate getTwoDigitYearStart ()
         {
-                Error e;
+                UErrorCode e;
 
                 UDate x = udat_get2DigitYearStart (handle, e); 
                 testError (e, "failed to get two digit year start");
@@ -295,7 +295,7 @@
 
         void setTwoDigitYearStart (UDate start)
         {
-                Error e;
+                UErrorCode e;
 
                 udat_set2DigitYearStart (handle, start, e); 
                 testError (e, "failed to set two digit year start");
@@ -309,7 +309,7 @@
 
         void getPattern (UString dst, bool localize)
         {
-                uint fmat (wchar* result, uint len, inout Error e)
+                uint fmat (wchar* result, uint len, inout UErrorCode e)
                 {
                         return udat_toPattern (handle, localize, result, len, e);
                 }
@@ -323,7 +323,7 @@
 
         ***********************************************************************/
 
-        void setPattern (UText pattern, bool localized)
+        void setPattern (UStringView pattern, bool localized)
         {
                 udat_applyPattern (handle, localized, pattern.get.ptr, pattern.length);        
         }
@@ -367,15 +367,15 @@
 
         private static extern (C) 
         {
-                Handle function (uint, uint, char*, wchar*, uint, wchar*, uint, inout Error) udat_open;
+                Handle function (uint, uint, char*, wchar*, uint, wchar*, uint, inout UErrorCode) udat_open;
                 void   function (Handle) udat_close;
-                uint   function (Handle, UDate, wchar*, uint, UFieldPos, inout Error) udat_format;
-                UDate  function (Handle, wchar*, uint, uint*, inout Error) udat_parse;
+                uint   function (Handle, UDate, wchar*, uint, UFieldPos, inout UErrorCode) udat_format;
+                UDate  function (Handle, wchar*, uint, uint*, inout UErrorCode) udat_parse;
                 void   function (Handle, Handle) udat_setCalendar;
                 void   function (Handle, Handle) udat_setNumberFormat;
-                UDate  function (Handle, inout Error) udat_get2DigitYearStart;
-                void   function (Handle, UDate, inout Error) udat_set2DigitYearStart;
-                uint   function (Handle, byte, wchar*, uint, inout Error) udat_toPattern;
+                UDate  function (Handle, inout UErrorCode) udat_get2DigitYearStart;
+                void   function (Handle, UDate, inout UErrorCode) udat_set2DigitYearStart;
+                uint   function (Handle, byte, wchar*, uint, inout UErrorCode) udat_toPattern;
                 void   function (Handle, byte, wchar*, uint) udat_applyPattern;
                 void   function (Handle, byte) udat_setLenient;
                 byte   function (Handle) udat_isLenient;