diff options
author | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-30 01:36:02 +0000 |
---|---|---|
committer | aa@google.com <aa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-30 01:36:02 +0000 |
commit | 0daa4fc8d2809bb42f93f1a348e43924608ff7fe (patch) | |
tree | 9aae73bbe8dd7589669b539710380cf8facbdb76 /third_party/sqlite/shell_icu.c | |
parent | 0d5e0eb4b86a87924db2317a869971cdad53c4f6 (diff) | |
download | chromium_src-0daa4fc8d2809bb42f93f1a348e43924608ff7fe.zip chromium_src-0daa4fc8d2809bb42f93f1a348e43924608ff7fe.tar.gz chromium_src-0daa4fc8d2809bb42f93f1a348e43924608ff7fe.tar.bz2 |
Move SQLite from src/chrome/third_party to src/third_party
since it will be shared with WebCore and Gears in the
future.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/shell_icu.c')
-rw-r--r-- | third_party/sqlite/shell_icu.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/sqlite/shell_icu.c b/third_party/sqlite/shell_icu.c new file mode 100644 index 0000000..b4eb142 --- /dev/null +++ b/third_party/sqlite/shell_icu.c @@ -0,0 +1,26 @@ +// Copyright 2007 Google Inc. All Rights Reserved. + +#include <windows.h> +#include "unicode/udata.h" + +// This function attempts to load the ICU data tables from a DLL. +// Returns 0 on failure, nonzero on success. +// This a hack job of icu_utils.cc:Initialize(). It's Chrome-specific code. +int sqlite_shell_init_icu() { + HMODULE module; + FARPROC addr; + UErrorCode err; + + module = LoadLibrary(L"icudt38.dll"); + if (!module) + return 0; + + addr = GetProcAddress(module, "icudt38_dat"); + if (!addr) + return 0; + + err = U_ZERO_ERROR; + udata_setCommonData(addr, &err); + + return 1; +} |