diff dwtx/dwtxhelper/mangoicu/UCalendar.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/UCalendar.d	Sun Jul 06 23:30:07 2008 +0200
+++ b/dwtx/dwtxhelper/mangoicu/UCalendar.d	Mon Jul 07 15:53:07 2008 +0200
@@ -82,13 +82,13 @@
 
 *******************************************************************************/
 
-module dwtx.dwthelper.mangoicu.UCalendar;
+module dwtx.dwtxhelper.mangoicu.UCalendar;
 
-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,
-                dwtx.dwthelper.mangoicu.UTimeZone;
+public  import  dwtx.dwtxhelper.mangoicu.ULocale,
+                dwtx.dwtxhelper.mangoicu.UTimeZone;
 
 /*******************************************************************************
 
@@ -244,7 +244,7 @@
 
         this (inout UTimeZone zone, inout ULocale locale, Type type = Type.Traditional)
         {
-                Error e;
+                UErrorCode e;
 
                 handle = ucal_open (zone.name.ptr, zone.name.length, toString(locale.name), type, e);
                 testError (e, "failed to open calendar");
@@ -280,7 +280,7 @@
 
         void setTimeZone (inout UTimeZone zone)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setTimeZone (handle, zone.name.ptr, zone.name.length, e);
                 testError (e, "failed to set calendar time zone");
@@ -294,7 +294,7 @@
 
         void getTimeZoneName (UString s, inout ULocale locale, DisplayNameType type=DisplayNameType.Standard)
         {       
-                uint format (wchar* dst, uint length, inout ICU.Error e)
+                uint format (wchar* dst, uint length, inout ICU.UErrorCode e)
                 {
                         return ucal_getTimeZoneDisplayName (handle, type, toString(locale.name), dst, length, e);
                 }
@@ -311,7 +311,7 @@
 
         bool inDaylightTime ()
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_inDaylightTime (handle, e);
                 testError (e, "failed to test calendar daylight time");
@@ -338,7 +338,7 @@
 
         UDate getMillis ()
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_getMillis (handle, e);
                 testError (e, "failed to get time");
@@ -354,7 +354,7 @@
 
         void setMillis (UDate date)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setMillis (handle, date, e);
                 testError (e, "failed to set time");
@@ -368,7 +368,7 @@
 
         void setDate (uint year, Months month, uint date)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setDate (handle, year, month, date, e);
                 testError (e, "failed to set date");
@@ -382,7 +382,7 @@
 
         void setDateTime (uint year, Months month, uint date, uint hour, uint minute, uint second)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_setDateTime (handle, year, month, date, hour, minute, second, e);
                 testError (e, "failed to set date/time");
@@ -444,7 +444,7 @@
 
         void add (DateFields field, uint amount)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_add (handle, field, amount, e);
                 testError (e, "failed to add to calendar");
@@ -459,7 +459,7 @@
 
         void roll (DateFields field, uint amount)
         {
-                Error e;
+                UErrorCode e;
 
                 ucal_roll (handle, field, amount, e);
                 testError (e, "failed to roll calendar");
@@ -473,7 +473,7 @@
 
         uint get (DateFields field)
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_get (handle, field, e);
                 testError (e, "failed to get calendar field");
@@ -533,7 +533,7 @@
 
         uint getLimit (DateFields field, Limit type)
         {
-                Error e;
+                UErrorCode e;
 
                 auto x = ucal_getLimit (handle, field, type, e);
                 testError (e, "failed to get calendar limit");
@@ -593,27 +593,27 @@
 
         private static extern (C) 
         {
-                Handle  function (wchar*, uint, char*, Type, inout Error) ucal_open;
+                Handle  function (wchar*, uint, char*, Type, inout UErrorCode) ucal_open;
                 void    function (Handle) ucal_close;
                 UDate   function () ucal_getNow;
-                UDate   function (Handle, inout Error) ucal_getMillis;
-                void    function (Handle, UDate, inout Error) ucal_setMillis;
-                void    function (Handle, uint, uint, uint, inout Error) ucal_setDate;
-                void    function (Handle, uint, uint, uint, uint, uint, uint, inout Error) ucal_setDateTime;
+                UDate   function (Handle, inout UErrorCode) ucal_getMillis;
+                void    function (Handle, UDate, inout UErrorCode) ucal_setMillis;
+                void    function (Handle, uint, uint, uint, inout UErrorCode) ucal_setDate;
+                void    function (Handle, uint, uint, uint, uint, uint, uint, inout UErrorCode) ucal_setDateTime;
                 byte    function (Handle, Handle) ucal_equivalentTo;
-                void    function (Handle, uint, uint, inout Error) ucal_add;
-                void    function (Handle, uint, uint, inout Error) ucal_roll;
-                uint    function (Handle, uint, inout Error) ucal_get;
+                void    function (Handle, uint, uint, inout UErrorCode) ucal_add;
+                void    function (Handle, uint, uint, inout UErrorCode) ucal_roll;
+                uint    function (Handle, uint, inout UErrorCode) ucal_get;
                 void    function (Handle, uint, uint) ucal_set;
                 byte    function (Handle, uint) ucal_isSet;
                 void    function (Handle, uint) ucal_clearField;
                 void    function (Handle) ucal_clear;
-                uint    function (Handle, uint, uint, inout Error) ucal_getLimit;
-                void    function (Handle, wchar*, uint, inout Error) ucal_setTimeZone;
+                uint    function (Handle, uint, uint, inout UErrorCode) ucal_getLimit;
+                void    function (Handle, wchar*, uint, inout UErrorCode) ucal_setTimeZone;
                 byte    function (Handle, uint) ucal_inDaylightTime;
                 uint    function (Handle, uint) ucal_getAttribute;
                 void    function (Handle, uint, uint) ucal_setAttribute;
-                uint    function (Handle, uint, char*, wchar*, uint, inout Error) ucal_getTimeZoneDisplayName;
+                uint    function (Handle, uint, char*, wchar*, uint, inout UErrorCode) ucal_getTimeZoneDisplayName;
         }
 
         /***********************************************************************