| OLD | NEW | 
 | (Empty) | 
|   1 /* Copyright 2007 Google Inc. All Rights Reserved. |  | 
|   2 **/ |  | 
|   3  |  | 
|   4 #include <windows.h> |  | 
|   5 #include "unicode/udata.h" |  | 
|   6  |  | 
|   7 /* |  | 
|   8 ** This function attempts to load the ICU data tables from a DLL. |  | 
|   9 ** Returns 0 on failure, nonzero on success. |  | 
|  10 ** This a hack job of icu_utils.cc:Initialize().  It's Chrome-specific code. |  | 
|  11 */ |  | 
|  12  |  | 
|  13 #define ICU_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat" |  | 
|  14 int sqlite_shell_init_icu() { |  | 
|  15   HMODULE module; |  | 
|  16   FARPROC addr; |  | 
|  17   UErrorCode err; |  | 
|  18  |  | 
|  19   wchar_t dll_name[12]; |  | 
|  20   wsprintf(dll_name, L"icudt%2S.dll", U_ICU_VERSION_SHORT); |  | 
|  21   dll_name[11] = L'\0'; |  | 
|  22   module = LoadLibrary(dll_name); |  | 
|  23   if (!module) |  | 
|  24     return 0; |  | 
|  25  |  | 
|  26   addr = GetProcAddress(module, ICU_DATA_SYMBOL); |  | 
|  27   if (!addr) |  | 
|  28     return 0; |  | 
|  29  |  | 
|  30   err = U_ZERO_ERROR; |  | 
|  31   udata_setCommonData(addr, &err); |  | 
|  32  |  | 
|  33   return 1; |  | 
|  34 } |  | 
| OLD | NEW |