Mercurial > projects > dwt-addons
comparison dwtx/dwtxhelper/mangoicu/ULocale.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 |
comparison
equal
deleted
inserted
replaced
90:7ffeace6c47f | 91:11e8159caf7a |
---|---|
80 All trademarks and registered trademarks mentioned herein are the | 80 All trademarks and registered trademarks mentioned herein are the |
81 property of their respective owners. | 81 property of their respective owners. |
82 | 82 |
83 *******************************************************************************/ | 83 *******************************************************************************/ |
84 | 84 |
85 module dwtx.dwthelper.mangoicu.ULocale; | 85 module dwtx.dwtxhelper.mangoicu.ULocale; |
86 | 86 |
87 private import dwtx.dwthelper.mangoicu.ICU; | 87 private import dwtx.dwtxhelper.mangoicu.ICU; |
88 | 88 |
89 /******************************************************************************* | 89 /******************************************************************************* |
90 | 90 |
91 Note that this is a struct rather than a class. This is so | 91 Note that this is a struct rather than a class. This is so |
92 that one can easily construct these on the stack, plus the | 92 that one can easily construct these on the stack, plus the |
167 | 167 |
168 ***********************************************************************/ | 168 ***********************************************************************/ |
169 | 169 |
170 static void setDefault (inout ULocale locale) | 170 static void setDefault (inout ULocale locale) |
171 { | 171 { |
172 ICU.Error e; | 172 ICU.UErrorCode e; |
173 | 173 |
174 uloc_setDefault (ICU.toString(locale.name), e); | 174 uloc_setDefault (ICU.toString(locale.name), e); |
175 | 175 |
176 if (ICU.isError (e)) | 176 if (ICU.isError (e)) |
177 ICU.exception ("invalid locale '"~locale.name~"'"); | 177 ICU.exception ("invalid locale '"~locale.name~"'"); |
194 ***********************************************************************/ | 194 ***********************************************************************/ |
195 | 195 |
196 private static extern (C) | 196 private static extern (C) |
197 { | 197 { |
198 char* function () uloc_getDefault; | 198 char* function () uloc_getDefault; |
199 void function (char*, inout ICU.Error) uloc_setDefault; | 199 void function (char*, inout ICU.UErrorCode) uloc_setDefault; |
200 } | 200 } |
201 | 201 |
202 /********************************************************************** | 202 /********************************************************************** |
203 | 203 |
204 ***********************************************************************/ | 204 ***********************************************************************/ |