Mercurial > projects > dwt2
comparison com.ibm.icu/src/com/ibm/icu/mangoicu/USet.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 |
comparison
equal
deleted
inserted
replaced
119:d00e8db0a568 | 120:536e43f63c81 |
---|---|
208 | 208 |
209 ***********************************************************************/ | 209 ***********************************************************************/ |
210 | 210 |
211 void toPattern (UString dst, bool escape) | 211 void toPattern (UString dst, bool escape) |
212 { | 212 { |
213 uint fmt (wchar* p, uint len, inout UErrorCode e) | 213 uint fmt (wchar* p, uint len, ref UErrorCode e) |
214 { | 214 { |
215 return uset_toPattern (handle, p, len, escape, e); | 215 return uset_toPattern (handle, p, len, escape, e); |
216 } | 216 } |
217 | 217 |
218 dst.format (&fmt, "failed to convert charset to a pattern"); | 218 dst.format (&fmt, "failed to convert charset to a pattern"); |
393 complicated by the issues regarding D and DLLs on the | 393 complicated by the issues regarding D and DLLs on the |
394 Windows platform | 394 Windows platform |
395 | 395 |
396 ***********************************************************************/ | 396 ***********************************************************************/ |
397 | 397 |
398 private static void* library; | 398 mixin(genICUNative!("uc" |
399 | 399 ,"Handle function (wchar start, wchar end)", "uset_open" |
400 /*********************************************************************** | 400 ,"void function (Handle)", "uset_close" |
401 | 401 ,"Handle function (wchar* pattern, uint patternLength, uint options, ref UErrorCode e)", "uset_openPatternOptions" |
402 ***********************************************************************/ | 402 ,"uint function (Handle, wchar* pattern, uint patternLength, uint options, ref UErrorCode e)", "uset_applyPattern" |
403 | 403 ,"uint function (Handle, wchar* result, uint resultCapacity, byte escapeUnprintable, ref UErrorCode e)", "uset_toPattern" |
404 private static extern (C) | 404 ,"void function (Handle, wchar c)", "uset_add" |
405 { | 405 ,"void function (Handle, Handle additionalSet)", "uset_addAll" |
406 Handle function (wchar start, wchar end) uset_open; | 406 ,"void function (Handle, wchar start, wchar end)", "uset_addRange" |
407 void function (Handle) uset_close; | 407 ,"void function (Handle, wchar* str, uint strLen)", "uset_addString" |
408 Handle function (wchar* pattern, uint patternLength, uint options, inout UErrorCode e) uset_openPatternOptions; | 408 ,"void function (Handle, wchar c)", "uset_remove" |
409 uint function (Handle, wchar* pattern, uint patternLength, uint options, inout UErrorCode e) uset_applyPattern; | 409 ,"void function (Handle, wchar start, wchar end)", "uset_removeRange" |
410 uint function (Handle, wchar* result, uint resultCapacity, byte escapeUnprintable, inout UErrorCode e) uset_toPattern; | 410 ,"void function (Handle, wchar* str, uint strLen)", "uset_removeString" |
411 void function (Handle, wchar c) uset_add; | 411 ,"void function (Handle)", "uset_complement" |
412 void function (Handle, Handle additionalSet) uset_addAll; | 412 ,"void function (Handle)", "uset_clear" |
413 void function (Handle, wchar start, wchar end) uset_addRange; | 413 ,"byte function (Handle)", "uset_isEmpty" |
414 void function (Handle, wchar* str, uint strLen) uset_addString; | 414 ,"byte function (Handle, wchar c)", "uset_contains" |
415 void function (Handle, wchar c) uset_remove; | 415 ,"byte function (Handle, wchar start, wchar end)", "uset_containsRange" |
416 void function (Handle, wchar start, wchar end) uset_removeRange; | 416 ,"byte function (Handle, wchar* str, uint strLen)", "uset_containsString" |
417 void function (Handle, wchar* str, uint strLen) uset_removeString; | 417 ,"uint function (Handle)", "uset_size" |
418 void function (Handle) uset_complement; | 418 )); |
419 void function (Handle) uset_clear; | |
420 byte function (Handle) uset_isEmpty; | |
421 byte function (Handle, wchar c) uset_contains; | |
422 byte function (Handle, wchar start, wchar end) uset_containsRange; | |
423 byte function (Handle, wchar* str, uint strLen) uset_containsString; | |
424 uint function (Handle) uset_size; | |
425 } | |
426 | |
427 /*********************************************************************** | |
428 | |
429 ***********************************************************************/ | |
430 | |
431 static FunctionLoader.Bind[] targets = | |
432 [ | |
433 {cast(void**) &uset_open, "uset_open"}, | |
434 {cast(void**) &uset_close, "uset_close"}, | |
435 {cast(void**) &uset_openPatternOptions, "uset_openPatternOptions"}, | |
436 {cast(void**) &uset_applyPattern, "uset_applyPattern"}, | |
437 {cast(void**) &uset_toPattern, "uset_toPattern"}, | |
438 {cast(void**) &uset_add, "uset_add"}, | |
439 {cast(void**) &uset_addAll, "uset_addAll"}, | |
440 {cast(void**) &uset_addRange, "uset_addRange"}, | |
441 {cast(void**) &uset_addString, "uset_addString"}, | |
442 {cast(void**) &uset_remove, "uset_remove"}, | |
443 {cast(void**) &uset_removeRange, "uset_removeRange"}, | |
444 {cast(void**) &uset_removeString, "uset_removeString"}, | |
445 {cast(void**) &uset_complement, "uset_complement"}, | |
446 {cast(void**) &uset_clear, "uset_clear"}, | |
447 {cast(void**) &uset_isEmpty, "uset_isEmpty"}, | |
448 {cast(void**) &uset_contains, "uset_contains"}, | |
449 {cast(void**) &uset_containsRange, "uset_containsRange"}, | |
450 {cast(void**) &uset_containsString, "uset_containsString"}, | |
451 {cast(void**) &uset_size, "uset_size"}, | |
452 ]; | |
453 | |
454 /*********************************************************************** | |
455 | |
456 ***********************************************************************/ | |
457 | |
458 static this () | |
459 { | |
460 library = FunctionLoader.bind (icuuc, targets); | |
461 } | |
462 | |
463 /*********************************************************************** | |
464 | |
465 ***********************************************************************/ | |
466 | |
467 static ~this () | |
468 { | |
469 FunctionLoader.unbind (library); | |
470 } | |
471 } | 419 } |
472 | 420 |