Mercurial > projects > dwt2
diff com.ibm.icu/src/com/ibm/icu/mangoicu/UBreakIterator.d @ 120:536e43f63c81
Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
===D2===
* added [Try]Immutable/Const/Shared templates to work with differenses in D1/D2 instead of version statements
used these templates to work with strict type storage rules of dmd-2.053
* com.ibm.icu now also compilable with D2, but not tested yet
* small fixes
Snippet288 - shared data is in TLS
===Phobos===
* fixed critical bugs in Phobos implemention
completely incorrect segfault prone fromStringz (Linux's port ruthless killer)
terrible, incorrect StringBuffer realization (StyledText killer)
* fixed small bugs as well
Snippet72 - misprint in the snippet
* implemented missed functionality for Phobos
ByteArrayOutputStream implemented (image loading available)
formatting correctly works for all DWT's cases
As a result, folowing snippets now works with Phobos (Snippet### - what is fixed):
Snippet24, 42, 111, 115, 130, 235, 276 - bad string formatting
Snippet48, 282 - crash on image loading
Snippet163, 189, 211, 213, 217, 218, 222 - crash on copy/cut in StyledText
Snippet244 - hang-up
===Tango===
* few changes for the latest Tango trunc-r5661
* few small performance improvments
===General===
* implMissing-s for only one version changed to implMissingInTango/InPhobos
* incorrect calls to Format in toString-s fixed
* fixed loading \uXXXX characters in ResourceBundle
* added good UTF-8 support for StyledText, TextLayout (Win32) and friends
UTF functions revised and tested. It is now in java.nonstandard.*Utf modules
StyledText and TextLayout (Win32) modules revised for UTF-8 support
* removed small diferences in most identical files in *.swt.* folders
*.swt.internal.image, *.swt.events and *.swt.custom are identical in Win32/Linux32
now 179 of 576 (~31%) files in *.swt.* folders are fully identical
* Win32: snippets now have right subsystem, pretty icons and native system style controls
* small fixes in snippets
Snippet44 - it's not Snippet44
Snippet212 - functions work with different images and offsets arrays
Win32: Snippet282 - crash on close if the button has an image
Snippet293 - setGrayed is commented
and others
Win32: As a result, folowing snippets now works
Snippet68 - color doesn't change
Snippet163, 189, 211, 213, 217, 218, 222 - UTF-8 issues (see above)
Snippet193 - no tabel headers
author | Denis Shelomovskij <verylonglogin.reg@gmail.com> |
---|---|
date | Sat, 09 Jul 2011 15:50:20 +0300 |
parents | ebefa5c2eab4 |
children |
line wrap: on
line diff
--- a/com.ibm.icu/src/com/ibm/icu/mangoicu/UBreakIterator.d Sun Apr 17 17:58:36 2011 +0200 +++ b/com.ibm.icu/src/com/ibm/icu/mangoicu/UBreakIterator.d Sat Jul 09 15:50:20 2011 +0300 @@ -102,7 +102,7 @@ // // ***********************************************************************/ // -// this (inout ULocale locale, UStringView text = null) +// this (ref ULocale locale, UStringView text = null) // { // super (Type.Character, locale, text); // } @@ -133,7 +133,7 @@ // // ***********************************************************************/ // -// this (inout ULocale locale, UStringView text = null) +// this (ref ULocale locale, UStringView text = null) // { // super (Type.Word, locale, text); // } @@ -145,7 +145,7 @@ // // ***********************************************************************/ // -// void getStatus (inout Break b) +// void getStatus (ref Break b) // { // b = cast(Break) super.getStatus(); // } @@ -170,7 +170,7 @@ // // ***********************************************************************/ // -// this (inout ULocale locale, UStringView text = null) +// this (ref ULocale locale, UStringView text = null) // { // super (Type.Line, locale, text); // } @@ -182,7 +182,7 @@ // // ***********************************************************************/ // -// void getStatus (inout Break b) +// void getStatus (ref Break b) // { // b = cast(Break) super.getStatus(); // } @@ -207,7 +207,7 @@ // // ***********************************************************************/ // -// this (inout ULocale locale, UStringView text = null) +// this (ref ULocale locale, UStringView text = null) // { // super (Type.Sentence, locale, text); // } @@ -219,7 +219,7 @@ // // ***********************************************************************/ // -// void getStatus (inout Break b) +// void getStatus (ref Break b) // { // b = cast(Break) super.getStatus(); // } @@ -236,7 +236,7 @@ // // ***********************************************************************/ // -// this (inout ULocale locale, UStringView text = null) +// this (ref ULocale locale, UStringView text = null) // { // super (Type.Title, locale, text); // } @@ -520,7 +520,7 @@ ***********************************************************************/ - void getStatus (inout uint s) + void getStatus (ref uint s) { s = getStatus (); } @@ -553,69 +553,21 @@ ***********************************************************************/ - private static void* library; - - /*********************************************************************** - - ***********************************************************************/ - - private static extern (C) - { - Handle function (uint, char*, wchar*, uint, inout ICU.UErrorCode) ubrk_open; - Handle function (wchar*, uint, wchar*, uint, void*, inout ICU.UErrorCode) ubrk_openRules; - void function (Handle) ubrk_close; - void function (Handle, wchar*, uint, inout ICU.UErrorCode) ubrk_setText; - uint function (Handle) ubrk_current; - uint function (Handle) ubrk_next; - uint function (Handle) ubrk_previous; - uint function (Handle) ubrk_first; - uint function (Handle) ubrk_last; - uint function (Handle, uint) ubrk_preceding; - uint function (Handle, uint) ubrk_following; - byte function (Handle, uint) ubrk_isBoundary; - uint function (Handle) ubrk_getRuleStatus; - Handle function (Handle, void *, int *, inout ICU.UErrorCode) ubrk_safeClone; - void function (Handle, UText*, inout ICU.UErrorCode) ubrk_setUText; - } - - /*********************************************************************** - - ***********************************************************************/ - - static FunctionLoader.Bind[] targets = - [ - {cast(void**) &ubrk_open, "ubrk_open"}, - {cast(void**) &ubrk_close, "ubrk_close"}, - {cast(void**) &ubrk_openRules, "ubrk_openRules"}, - {cast(void**) &ubrk_setText, "ubrk_setText"}, - {cast(void**) &ubrk_current, "ubrk_current"}, - {cast(void**) &ubrk_next, "ubrk_next"}, - {cast(void**) &ubrk_previous, "ubrk_previous"}, - {cast(void**) &ubrk_first, "ubrk_first"}, - {cast(void**) &ubrk_last, "ubrk_last"}, - {cast(void**) &ubrk_preceding, "ubrk_preceding"}, - {cast(void**) &ubrk_following, "ubrk_following"}, - {cast(void**) &ubrk_isBoundary, "ubrk_isBoundary"}, - {cast(void**) &ubrk_getRuleStatus, "ubrk_getRuleStatus"}, - {cast(void**) &ubrk_setUText, "ubrk_setUText"}, - {cast(void**) &ubrk_safeClone, "ubrk_safeClone"}, - ]; - - /********************************************************************** - - **********************************************************************/ - - static this () - { - library = FunctionLoader.bind (ICU.icuuc, targets); - } - - /********************************************************************** - - **********************************************************************/ - - static ~this () - { - FunctionLoader.unbind (library); - } + mixin(/*ICU.*/genICUNative!("uc" + ,"Handle function (uint, char*, wchar*, uint, ref ICU.UErrorCode)", "ubrk_open" + ,"Handle function (wchar*, uint, wchar*, uint, void*, ref ICU.UErrorCode)", "ubrk_openRules" + ,"void function (Handle)", "ubrk_close" + ,"void function (Handle, wchar*, uint, ref ICU.UErrorCode)", "ubrk_setText" + ,"uint function (Handle)", "ubrk_current" + ,"uint function (Handle)", "ubrk_next" + ,"uint function (Handle)", "ubrk_previous" + ,"uint function (Handle)", "ubrk_first" + ,"uint function (Handle)", "ubrk_last" + ,"uint function (Handle, uint)", "ubrk_preceding" + ,"uint function (Handle, uint)", "ubrk_following" + ,"byte function (Handle, uint)", "ubrk_isBoundary" + ,"uint function (Handle)", "ubrk_getRuleStatus" + ,"Handle function (Handle, void *, int *, ref ICU.UErrorCode)", "ubrk_safeClone" + ,"void function (Handle, UText*, ref ICU.UErrorCode)", "ubrk_setUText" + )); }