| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #ifndef ICU_UTIL_DATA_IMPL | 27 #ifndef ICU_UTIL_DATA_IMPL |
| 28 | 28 |
| 29 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
| 30 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_SHARED | 30 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_SHARED |
| 31 #elif defined(OS_MACOSX) | 31 #elif defined(OS_MACOSX) |
| 32 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_STATIC | 32 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_STATIC |
| 33 #elif defined(OS_LINUX) | 33 #elif defined(OS_LINUX) |
| 34 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_FILE | 34 #define ICU_UTIL_DATA_IMPL ICU_UTIL_DATA_FILE |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 #endif» // ICU_UTIL_DATA_IMPL | 37 #endif // ICU_UTIL_DATA_IMPL |
| 38 | 38 |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 #define ICU_UTIL_DATA_SYMBOL» » » "icudt38_dat" | 40 #define ICU_UTIL_DATA_SYMBOL "icudt38_dat" |
| 41 #define ICU_UTIL_DATA_SHARED_MODULE_NAME» L"icudt38.dll" | 41 #define ICU_UTIL_DATA_SHARED_MODULE_NAME L"icudt38.dll" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace icu_util { | 44 namespace icu_util { |
| 45 | 45 |
| 46 bool Initialize() { | 46 bool Initialize() { |
| 47 #ifndef NDEBUG | 47 #ifndef NDEBUG |
| 48 // Assert that we are not called more than once. Even though calling this | 48 // Assert that we are not called more than once. Even though calling this |
| 49 // function isn't harmful (ICU can handle it), being called twice probably | 49 // function isn't harmful (ICU can handle it), being called twice probably |
| 50 // indicates a programming error. | 50 // indicates a programming error. |
| 51 static bool called_once = false; | 51 static bool called_once = false; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Only look for the packaged data file; | 84 // Only look for the packaged data file; |
| 85 // the default behavior is to look for individual files. | 85 // the default behavior is to look for individual files. |
| 86 UErrorCode err = U_ZERO_ERROR; | 86 UErrorCode err = U_ZERO_ERROR; |
| 87 udata_setFileAccess(UDATA_ONLY_PACKAGES, &err); | 87 udata_setFileAccess(UDATA_ONLY_PACKAGES, &err); |
| 88 return err == U_ZERO_ERROR; | 88 return err == U_ZERO_ERROR; |
| 89 #endif | 89 #endif |
| 90 } | 90 } |
| 91 | 91 |
| 92 } // namespace icu_util | 92 } // namespace icu_util |
| 93 | 93 |
| OLD | NEW |