Mercurial > projects > dwt-addons
diff dwtx/dwtxhelper/mangoicu/UConverter.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/UConverter.d Sun Jul 06 23:30:07 2008 +0200 +++ b/dwtx/dwtxhelper/mangoicu/UConverter.d Mon Jul 07 15:53:07 2008 +0200 @@ -82,9 +82,9 @@ *******************************************************************************/ -module dwtx.dwthelper.mangoicu.UConverter; +module dwtx.dwtxhelper.mangoicu.UConverter; -private import dwtx.dwthelper.mangoicu.ICU; +private import dwtx.dwtxhelper.mangoicu.ICU; /******************************************************************************* @@ -158,7 +158,7 @@ this (char[] name) { - Error e; + UErrorCode e; handle = ucnv_open (toString (name), e); if (isError (e)) @@ -317,7 +317,7 @@ char[] getName () { - Error e; + UErrorCode e; char[] name = toArray (ucnv_getName (handle, e)); testError (e, "failed to get converter name"); @@ -352,7 +352,7 @@ static final char[] detectSignature (void[] input) { - Error e; + UErrorCode e; uint len; char* name; @@ -440,7 +440,7 @@ bool encode (wchar[] input, void[] output, inout UAdjust x, bool flush) { - Error e; + UErrorCode e; wchar* src = input.ptr; void* dst = output.ptr; wchar* srcLimit = src + input.length; @@ -471,7 +471,7 @@ uint encode (wchar[] input, void[] output) { - Error e; + UErrorCode e; uint len; len = ucnv_fromUChars (handle, output.ptr, output.length, input.ptr, input.length, e); @@ -551,7 +551,7 @@ bool decode (void[] input, wchar[] output, inout UAdjust x, bool flush) { - Error e; + UErrorCode e; void* src = input.ptr; wchar* dst = output.ptr; void* srcLimit = src + input.length; @@ -582,7 +582,7 @@ uint decode (void[] input, wchar[] output) { - Error e; + UErrorCode e; uint len; len = ucnv_toUChars (handle, output.ptr, output.length, input.ptr, input.length, e); @@ -656,7 +656,7 @@ bool convert (void[] input, void[] output, inout UAdjust x, bool flush) { - Error e; + UErrorCode e; void* src = input.ptr; void* dst = output.ptr; void* srcLimit = src + input.length; @@ -695,20 +695,20 @@ private static extern (C) { int function (char*, char*) ucnv_compareNames; - Handle function (char*, inout Error) ucnv_open; - char* function (void*, uint, inout uint, inout Error) ucnv_detectUnicodeSignature; + Handle function (char*, inout UErrorCode) ucnv_open; + char* function (void*, uint, inout uint, inout UErrorCode) ucnv_detectUnicodeSignature; void function (Handle) ucnv_close; void function (Handle) ucnv_reset; int function (Handle) ucnv_resetToUnicode; int function (Handle) ucnv_resetFromUnicode; ubyte function (Handle) ucnv_getMaxCharSize; ubyte function (Handle) ucnv_getMinCharSize; - char* function (Handle, inout Error) ucnv_getName; - uint function (Handle, wchar*, uint, void*, uint, inout Error) ucnv_toUChars; - uint function (Handle, void*, uint, wchar*, uint, inout Error) ucnv_fromUChars; - void function (Handle, void**, void*, wchar**, wchar*, int*, ubyte, inout Error) ucnv_fromUnicode; - void function (Handle, wchar**, wchar*, void**, void*, int*, ubyte, inout Error) ucnv_toUnicode; - void function (Handle, Handle, void**, void*, void**, void*, wchar*, wchar*, wchar*, wchar*, ubyte, ubyte, inout Error) ucnv_convertEx; + char* function (Handle, inout UErrorCode) ucnv_getName; + uint function (Handle, wchar*, uint, void*, uint, inout UErrorCode) ucnv_toUChars; + uint function (Handle, void*, uint, wchar*, uint, inout UErrorCode) ucnv_fromUChars; + void function (Handle, void**, void*, wchar**, wchar*, int*, ubyte, inout UErrorCode) ucnv_fromUnicode; + void function (Handle, wchar**, wchar*, void**, void*, int*, ubyte, inout UErrorCode) ucnv_toUnicode; + void function (Handle, Handle, void**, void*, void**, void*, wchar*, wchar*, wchar*, wchar*, ubyte, ubyte, inout UErrorCode) ucnv_convertEx; ubyte function (Handle) ucnv_isAmbiguous; char* function (uint) ucnv_getAvailableName; uint function () ucnv_countAvailable;