Changeset 1045
- Timestamp:
- 11/10/07 00:17:49 (10 months ago)
- Files:
-
- trunk/mango/icu/ICU.d (modified) (3 diffs)
- trunk/mango/icu/UDateFormat.d (modified) (2 diffs)
- trunk/mango/icu/UNumberFormat.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/mango/icu/ICU.d
r1036 r1045 54 54 private static const final char[] ICUSig = "_3_0\0"; 55 55 } 56 else 56 version (ICU32) 57 57 { 58 58 private static const final char[] ICULib = "32"; 59 59 private static const final char[] ICUSig = "_3_2\0"; 60 60 } 61 version (ICU34) 62 { 63 private static const final char[] ICULib = "34"; 64 private static const final char[] ICUSig = "_3_4\0"; 65 } 66 version (ICU36) 67 { 68 private static const final char[] ICULib = "36"; 69 private static const final char[] ICUSig = "_3_6\0"; 70 } 71 else 72 { 73 private static const final char[] ICULib = "38"; 74 private static const final char[] ICUSig = "_3_8\0"; 75 } 61 76 62 77 /******************************************************************************* … … 82 97 ***********************************************************************/ 83 98 84 version(Win32) 85 { 86 protected static char[] icuuc = "icuuc"~ICULib~".dll"; 87 protected static char[] icuin = "icuin"~ICULib~".dll"; 88 } 89 else 90 version (linux) 91 { 92 protected static char[] icuuc = "libicuuc.so."~ICULib; 93 protected static char[] icuin = "libicui18n.so."~ICULib; 99 version (Win32) 100 { 101 protected static char[] icuuc = "icuuc"~ICULib~".dll"; 102 protected static char[] icuin = "icuin"~ICULib~".dll"; 103 } 104 else 105 version (linux) 106 { 107 protected static char[] icuuc = "libicuuc.so."~ICULib; 108 protected static char[] icuin = "libicui18n.so."~ICULib; 109 } 110 else 111 version (darwin) 112 { 113 protected static char[] icuuc = "libicuuc.dylib."~ICULib; 114 protected static char[] icuin = "libicui18n.dylib."~ICULib; 115 } 116 else 117 { 118 static assert (false); 94 119 } 95 else96 version (darwin)97 {98 protected static char[] icuuc = "libicuuc.dylib."~ICULib;99 protected static char[] icuin = "libicui18n.dylib."~ICULib;100 }101 else102 {103 static assert (false);104 }105 120 106 121 /*********************************************************************** … … 671 686 else static assert(0); // need an implementation of FunctionLoader for this OS 672 687 688 trunk/mango/icu/UDateFormat.d
r939 r1045 174 174 175 175 Open a new UDateFormat for formatting and parsing dates 176 and time. 177 178 ***********************************************************************/ 179 180 this (Style time, Style date, inout ULocale locale, inout UTimeZone tz, UText pattern) 176 and time. If a pattern is not specified, an appropriate 177 one for the given locale will be used. 178 179 ***********************************************************************/ 180 181 this (Style time, Style date, inout ULocale locale, inout UTimeZone tz, UText pattern=null) 181 182 { 182 183 Error e; 183 184 handle = udat_open (time, date, toString(locale.name), tz.name.ptr, tz.name.length, pattern.get.ptr, pattern.length, e); 184 char* p; 185 uint c; 186 187 if (pattern) 188 p = pattern.get.ptr, c = pattern.length; 189 handle = udat_open (time, date, toString(locale.name), tz.name.ptr, tz.name.length, p, c, e); 185 190 testError (e, "failed to create DateFormat"); 186 191 } … … 419 424 420 425 426 trunk/mango/icu/UNumberFormat.d
r939 r1045 704 704 }; 705 705 706 p rivateenum Style706 public enum Style 707 707 { 708 708 PatternDecimal, … … 932 932 933 933 934
