mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Update Runtime ICU binder for Windows
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
db0badf787
commit
f00b8128a9
5 changed files with 295 additions and 266 deletions
14
.github/workflows/es-actions.yml
vendored
14
.github/workflows/es-actions.yml
vendored
|
|
@ -180,7 +180,7 @@ jobs:
|
|||
platform: ${{ matrix.arch.cpu }}
|
||||
- name: Build ${{ matrix.arch.cpu }} Release
|
||||
run: |
|
||||
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch.cpu }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=release -DCMAKE_C_FLAGS="${{ matrix.arch.flag }}" -DCMAKE_CXX_FLAGS="${{ matrix.arch.flag }}"
|
||||
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch.cpu }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=release -DCMAKE_C_FLAGS="${{ matrix.arch.flag }}" -DCMAKE_CXX_FLAGS="${{ matrix.arch.flag }}"
|
||||
CMake --build out/ --config Release
|
||||
- name: Run octane
|
||||
run: |
|
||||
|
|
@ -233,7 +233,7 @@ jobs:
|
|||
sdk: "10.0.20348.0"
|
||||
- name: Build ${{ matrix.arch }} Release
|
||||
run: |
|
||||
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -DESCARGOT_ARCH=${{ matrix.arch }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_WASM=ON -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
|
||||
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -DESCARGOT_ARCH=${{ matrix.arch }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_WASM=ON -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
|
||||
CMake --build out/ --config Release
|
||||
# windows internal ICU doesn't support Temporal and intl402 well
|
||||
# github action windows runner only have 2 CPUs. that's why I disable Atomics(timeout occured with some tests)
|
||||
|
|
@ -275,7 +275,7 @@ jobs:
|
|||
uwp: true
|
||||
- name: Build x64 UWP Release
|
||||
run: |
|
||||
CMake -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=x64 -Bout/win64_release_uwp/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_TEST=ON
|
||||
CMake -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=x64 -Bout/win64_release_uwp/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_TEST=ON
|
||||
CMake --build out\win64_release_uwp --config Release
|
||||
shell: cmd
|
||||
- uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
|
|
@ -284,7 +284,7 @@ jobs:
|
|||
sdk: "10.0.20348.0"
|
||||
- name: Build x86 DLL Release
|
||||
run: |
|
||||
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=x86 -Bout/win32_release_shared/ -DESCARGOT_OUTPUT=shared_lib -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
|
||||
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=x86 -Bout/win32_release_shared/ -DESCARGOT_OUTPUT=shared_lib -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=release
|
||||
CMake --build out/win32_release_shared --config Release
|
||||
shell: cmd
|
||||
- if: ${{ failure() }}
|
||||
|
|
@ -309,10 +309,12 @@ jobs:
|
|||
- name: Install ICU
|
||||
run: |
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu-dev_70.1-2ubuntu1_i386.deb
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu70_70.1-2ubuntu1_i386.deb
|
||||
dpkg -X libicu-dev_70.1-2ubuntu1_i386.deb $GITHUB_WORKSPACE/icu32
|
||||
dpkg -X libicu70_70.1-2ubuntu1_i386.deb $GITHUB_WORKSPACE/icu32
|
||||
- name: Build x86
|
||||
env:
|
||||
BUILD_OPTIONS: -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=x86 -DESCARGOT_THREADING=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TLS_ACCESS_BY_ADDRESS=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
|
||||
BUILD_OPTIONS: -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=x86 -DESCARGOT_THREADING=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TLS_ACCESS_BY_ADDRESS=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
|
||||
run: |
|
||||
export CXXFLAGS="-I$GITHUB_WORKSPACE/icu32/usr/include"
|
||||
export LDFLAGS="-L$GITHUB_WORKSPACE/icu32/usr/lib/i386-linux-gnu -Wl,-rpath=$GITHUB_WORKSPACE/icu32/usr/lib/i386-linux-gnu"
|
||||
|
|
@ -322,7 +324,7 @@ jobs:
|
|||
- name: Run release-x86 test
|
||||
env:
|
||||
GC_FREE_SPACE_DIVISOR: 1
|
||||
run: $RUNNER --arch=x86 --engine="$GITHUB_WORKSPACE/out/release/x86/escargot" ${{ matrix.tc }}
|
||||
run: LD_LIBRARY_PATH=$GITHUB_WORKSPACE/icu32/usr/lib/i386-linux-gnu $RUNNER --arch=x86 --engine="$GITHUB_WORKSPACE/out/release/x86/escargot" ${{ matrix.tc }}
|
||||
- if: ${{ failure() }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
timeout-minutes: 15
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Escargot is an open-source project that allows developers to contribute to its d
|
|||
|-|-|
|
||||
| **Linux(Ubuntu)** | x86/x64/arm/aarch64 |
|
||||
| macOS | x64/aarch64 |
|
||||
| Windows | x86 |
|
||||
| Windows | Win32/x64 |
|
||||
| Android | x86/x64/arm/aarch64 |
|
||||
|
||||
### Build Options
|
||||
|
|
@ -128,7 +128,7 @@ Open [ x86 Native Tools Command Prompt for VS 2022 | x64 Native Tools Command Pr
|
|||
```sh
|
||||
git submodule update --init third_party # update submodules
|
||||
|
||||
CMake -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=[ Windows | WindowsStore ] -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=[ x86 | x64 ] -DCMAKE_GENERATOR_PLATFORM=[ Win32 | x64 ],version=10.0.18362.0 -DESCARGOT_ARCH=[ x86 | x64 ] -DESCARGOT_MODE=release -Bout -DESCARGOT_HOST=windows -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=OFF -DESCARGOT_THREADING=ON
|
||||
CMake -G "Visual Studio 17 2022" -DCMAKE_SYSTEM_NAME=[ Windows | WindowsStore ] -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=[ x86 | x64 ] -DCMAKE_GENERATOR_PLATFORM=[ Win32 | x64 ],version=10.0.18362.0 -DESCARGOT_ARCH=[ x86 | x64 ] -DESCARGOT_MODE=release -Bout -DESCARGOT_HOST=windows -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_THREADING=ON
|
||||
cd out
|
||||
msbuild ESCARGOT.sln /property:Configuration=Release /p:platform=[ Win32 | x64 ]
|
||||
```
|
||||
|
|
|
|||
|
|
@ -14,6 +14,13 @@ IF (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti")
|
||||
|
||||
link_libraries(-ldl)
|
||||
ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
|
||||
IF (${RIB_MODE} STREQUAL "debug")
|
||||
SET (RIB_CFLAGS_INTERNAL ${RIB_CFLAGS_INTERNAL} /O0)
|
||||
ELSEIF (${RIB_MODE} STREQUAL "release")
|
||||
SET (RIB_CFLAGS_INTERNAL ${RIB_CFLAGS_INTERNAL} /O2)
|
||||
ENDIF()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /fp:strict /Zc:__cplusplus /EHs /source-charset:utf-8 /MP /D_CRT_SECURE_NO_WARNINGS /D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /wd4244 /wd4267 /wd4805 /wd4018 /wd4172 /wd4146")
|
||||
ELSE()
|
||||
MESSAGE (FATAL_ERROR "unsupported target")
|
||||
ENDIF()
|
||||
|
|
@ -25,6 +32,4 @@ SEPARATE_ARGUMENTS(RIB_CFLAGS_FROM_ENV)
|
|||
# add ${RIB_CFLAGS_FROM_EXTERNAL} at the end
|
||||
add_compile_options(${RIB_CFLAGS_FROM_ENV} ${RIB_CFLAGS_FROM_EXTERNAL})
|
||||
|
||||
link_libraries(-ldl)
|
||||
|
||||
ADD_LIBRARY(runtime-icu-binder-static STATIC ${RIB_SRC})
|
||||
|
|
|
|||
|
|
@ -16,14 +16,6 @@
|
|||
|
||||
#include "RuntimeICUBinder.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define OS_WINDOWS 1
|
||||
#elif _WIN64
|
||||
|
|
@ -49,11 +41,21 @@
|
|||
#error "failed to detect target OS"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
#include <string>
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
#include <dlfcn.h>
|
||||
#elif defined(OS_WINDOWS)
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace RuntimeICUBinder {
|
||||
|
|
@ -73,7 +75,8 @@ static void die(const char *message)
|
|||
static constexpr int s_icuMinVersion = 49; // icu 4.9 was released on 2012-06-06
|
||||
static constexpr int s_icuMaxVersion = 2048;
|
||||
|
||||
static void* findSo(ICU::Soname name)
|
||||
#if defined(OS_POSIX)
|
||||
static void *findSo(ICU::Soname name)
|
||||
{
|
||||
std::string soPath;
|
||||
switch (name) {
|
||||
|
|
@ -90,14 +93,14 @@ static void* findSo(ICU::Soname name)
|
|||
die("invalid soname");
|
||||
}
|
||||
|
||||
void* handle = dlopen(soPath.data(), RTLD_LAZY);
|
||||
void *handle = dlopen(soPath.data(), RTLD_LAZY);
|
||||
if (handle) {
|
||||
return handle;
|
||||
}
|
||||
|
||||
// try to find with version name
|
||||
for (int i = s_icuMinVersion; i < s_icuMaxVersion; i ++) {
|
||||
void* handle = dlopen((soPath + "." + std::to_string(i)).data(), RTLD_LAZY);
|
||||
for (int i = s_icuMinVersion; i < s_icuMaxVersion; i++) {
|
||||
void *handle = dlopen((soPath + "." + std::to_string(i)).data(), RTLD_LAZY);
|
||||
if (handle) {
|
||||
return handle;
|
||||
}
|
||||
|
|
@ -107,12 +110,14 @@ static void* findSo(ICU::Soname name)
|
|||
dlopen(soPath.data(), RTLD_LAZY);
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ICU::loadSo(ICU::Soname name)
|
||||
{
|
||||
assert(m_soHandles[name] == nullptr);
|
||||
void *handle = findSo(name);
|
||||
|
||||
void *handle;
|
||||
#if defined(OS_POSIX)
|
||||
handle = findSo(name);
|
||||
if (!handle) {
|
||||
char *error = dlerror();
|
||||
if (error) {
|
||||
|
|
@ -120,6 +125,9 @@ void ICU::loadSo(ICU::Soname name)
|
|||
}
|
||||
die("failed to open so");
|
||||
}
|
||||
#else
|
||||
handle = LoadLibraryA("icu.dll");
|
||||
#endif
|
||||
m_soHandles[name] = handle;
|
||||
}
|
||||
|
||||
|
|
@ -127,8 +135,6 @@ void *ICU::loadFunction(Soname soname, Function kind)
|
|||
{
|
||||
assert(m_functions[kind] == nullptr);
|
||||
const char *name = "";
|
||||
char nameBuffer[256];
|
||||
|
||||
switch (kind) {
|
||||
#define DECLARE_CASE(fnName, fnType, fnReturnType) \
|
||||
case function##fnName: \
|
||||
|
|
@ -151,6 +157,8 @@ void *ICU::loadFunction(Soname soname, Function kind)
|
|||
}
|
||||
|
||||
void *fn;
|
||||
#if defined(OS_POSIX)
|
||||
char nameBuffer[256];
|
||||
if (m_icuVersion == -1) {
|
||||
fn = dlsym(ensureLoadSo(soname), name);
|
||||
} else {
|
||||
|
|
@ -164,8 +172,20 @@ void *ICU::loadFunction(Soname soname, Function kind)
|
|||
if (error) {
|
||||
fputs(error, stderr);
|
||||
}
|
||||
die(nameBuffer);
|
||||
if (m_icuVersion == -1) {
|
||||
die(name);
|
||||
} else {
|
||||
die(nameBuffer);
|
||||
}
|
||||
}
|
||||
#else
|
||||
fn = GetProcAddress((HMODULE)ensureLoadSo(soname), name);
|
||||
|
||||
if (!fn) {
|
||||
fputs("failed to load", stderr);
|
||||
die(name);
|
||||
}
|
||||
#endif
|
||||
|
||||
m_functions[kind] = fn;
|
||||
return fn;
|
||||
|
|
@ -309,7 +329,7 @@ std::string ICU::findSystemTimezoneName()
|
|||
}
|
||||
#endif
|
||||
#if defined(ANDROID)
|
||||
FILE* fp = popen("getprop persist.sys.timezone", "r");
|
||||
FILE *fp = popen("getprop persist.sys.timezone", "r");
|
||||
if (fp) {
|
||||
char buffer[512];
|
||||
fgets(buffer, sizeof(buffer), fp);
|
||||
|
|
@ -329,25 +349,19 @@ std::string ICU::findSystemTimezoneName()
|
|||
int32_t len = ICU::instance().ucal_getDefaultTimeZone(result, sizeof(result) / sizeof(UChar), &status);
|
||||
if (U_SUCCESS(status)) {
|
||||
std::string u8Result;
|
||||
for (int32_t i = 0; i < len; i ++) {
|
||||
for (int32_t i = 0; i < len; i++) {
|
||||
u8Result.push_back(result[i]);
|
||||
}
|
||||
return u8Result;
|
||||
}
|
||||
|
||||
// fallback
|
||||
time_t t;
|
||||
tm lt;
|
||||
t = time(NULL);
|
||||
localtime_r(&t, <);
|
||||
return lt.tm_zone;
|
||||
return "";
|
||||
}
|
||||
|
||||
ICU::ICU()
|
||||
{
|
||||
memset(m_soHandles, 0, sizeof(void *) * ICU::Soname::SonameMax);
|
||||
memset(m_functions, 0, sizeof(void *) * ICU::Function::FunctionMax);
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
// load first so
|
||||
ensureLoadSo(Soname::uc);
|
||||
|
||||
|
|
@ -375,5 +389,6 @@ ICU::ICU()
|
|||
die("failed to read version from so");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} // namespace RuntimeICUBinder
|
||||
|
|
|
|||
459
third_party/runtime_icu_binder/RuntimeICUBinder.h
vendored
459
third_party/runtime_icu_binder/RuntimeICUBinder.h
vendored
|
|
@ -29,232 +29,237 @@
|
|||
|
||||
namespace RuntimeICUBinder {
|
||||
|
||||
// TODO define calling convention
|
||||
#define FOR_EACH_UC_OP(F) \
|
||||
F(u_tolower, UChar32 (*)(UChar32), UChar32) \
|
||||
F(u_toupper, UChar32 (*)(UChar32), UChar32) \
|
||||
F(u_islower, UBool (*)(UChar32), UBool) \
|
||||
F(u_isupper, UBool (*)(UChar32), UBool) \
|
||||
F(u_totitle, UChar32 (*)(UChar32), UChar32) \
|
||||
F(u_charMirror, UChar32 (*)(UChar32), UChar32) \
|
||||
F(u_countChar32, int32_t (*)(const UChar* s, int32_t length), int32_t) \
|
||||
F(u_strToLower, int32_t (*)(UChar * dest, int32_t destCapacity, const UChar* src, int32_t srcLength, const char* locale, UErrorCode* pErrorCode), int32_t) \
|
||||
F(u_strToUpper, int32_t (*)(UChar * dest, int32_t destCapacity, const UChar* src, int32_t srcLength, const char* locale, UErrorCode* pErrorCode), int32_t) \
|
||||
F(unorm2_getNFCInstance, const UNormalizer2* (*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_getNFDInstance, const UNormalizer2* (*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_getNFKCInstance, const UNormalizer2* (*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_getNFKDInstance, const UNormalizer2* (*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_normalize, int32_t (*)(const UNormalizer2*, const UChar*, int32_t, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(unorm2_composePair, UChar32 (*)(const UNormalizer2* norm2, UChar32 a, UChar32 b), UChar32) \
|
||||
F(unorm2_getRawDecomposition, int32_t (*)(const UNormalizer2* norm2, UChar32 c, UChar* decomposition, int32_t capacity, UErrorCode* pErrorCode), int32_t) \
|
||||
F(u_getIntPropertyValue, int32_t (*)(UChar32, UProperty), int32_t) \
|
||||
F(u_getIntPropertyMaxValue, int32_t (*)(UProperty), int32_t) \
|
||||
F(u_getIntPropertyMinValue, int32_t (*)(UProperty), int32_t) \
|
||||
F(u_getCombiningClass, uint8_t (*)(UChar32), uint8_t) \
|
||||
F(u_charType, int8_t (*)(UChar32 c), int8_t) \
|
||||
F(u_charDirection, UCharDirection (*)(UChar32 c), UCharDirection) \
|
||||
F(u_isblank, UBool (*)(UChar32 c), UBool) \
|
||||
F(uloc_getDefault, const char* (*)(), const char*) \
|
||||
F(uloc_getName, int32_t (*)(const char* localeID, char* name, int32_t nameCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_canonicalize, int32_t (*)(const char* localeID, char* name, int32_t nameCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getBaseName, int32_t (*)(const char* localeID, char* name, int32_t nameCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_forLanguageTag, int32_t (*)(const char* langtag, char* localeID, int32_t localeIDCapacity, int32_t* parsedLength, UErrorCode* err), int32_t) \
|
||||
F(uloc_getLanguage, int32_t (*)(const char* localeID, char* language, int32_t languageCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getScript, int32_t (*)(const char* localeID, char* script, int32_t scriptCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getCountry, int32_t (*)(const char* localeID, char* country, int32_t countryCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getVariant, int32_t (*)(const char* localeID, char* variant, int32_t variantCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_toLegacyKey, const char* (*)(const char* keyword), const char*) \
|
||||
F(uloc_toLegacyType, const char* (*)(const char* keyword, const char* value), const char*) \
|
||||
F(uloc_toLanguageTag, int32_t (*)(const char* localeID, char* langtag, int32_t langtagCapacity, UBool strict, UErrorCode* err), int32_t) \
|
||||
F(uloc_addLikelySubtags, int32_t (*)(const char* localeID, char* maximizedLocaleID, int32_t maximizedLocaleIDCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_minimizeSubtags, int32_t (*)(const char* localeID, char* minimizedLocaleID, int32_t minimizedLocaleIDCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getCharacterOrientation, ULayoutType (*)(const char* localeID, UErrorCode* err), ULayoutType) \
|
||||
F(uloc_countAvailable, int32_t (*)(), int32_t) \
|
||||
F(uloc_getAvailable, const char* (*)(int32_t n), const char*) \
|
||||
F(uloc_toUnicodeLocaleType, const char* (*)(const char*, const char*), const char*) \
|
||||
F(ucnv_open, UConverter* (*)(const char* converterName, UErrorCode* err), UConverter*) \
|
||||
F(ucnv_compareNames, int (*)(const char* name1, const char* name2), int) \
|
||||
F(ucnv_getDisplayName, int32_t (*)(const UConverter* converter, const char* displayLocale, UChar* displayName, int32_t displayNameCapacity, UErrorCode* err), int32_t) \
|
||||
F(ucnv_getName, const char* (*)(const UConverter* converter, UErrorCode* err), const char*) \
|
||||
F(ubidi_open, UBiDi* (*)(), UBiDi*) \
|
||||
F(ubidi_getBaseDirection, UBiDiDirection (*)(const UChar* text, int32_t length), UBiDiDirection) \
|
||||
F(ubidi_countRuns, int32_t (*)(UBiDi * pBiDi, UErrorCode * pErrorCode), int32_t) \
|
||||
F(ublock_getCode, UBlockCode (*)(UChar32 c), UBlockCode) \
|
||||
F(uscript_getScript, UScriptCode (*)(UChar32 codepoint, UErrorCode * err), UScriptCode) \
|
||||
F(uscript_hasScript, UBool (*)(UChar32 c, UScriptCode sc), UBool) \
|
||||
F(uscript_getShortName, const char* (*)(UScriptCode scriptCode), const char*) \
|
||||
F(uldn_open, ULocaleDisplayNames* (*)(const char* locale, UDialectHandling dialectHandling, UErrorCode* pErrorCode), ULocaleDisplayNames*) \
|
||||
F(uldn_openForContext, ULocaleDisplayNames* (*)(const char* locale, UDisplayContext* contexts, int32_t length, UErrorCode* pErrorCode), ULocaleDisplayNames*) \
|
||||
F(uldn_localeDisplayName, int32_t (*)(const ULocaleDisplayNames* ldn, const char* locale, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_languageDisplayName, int32_t (*)(const ULocaleDisplayNames* ldn, const char* lang, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_regionDisplayName, int32_t (*)(const ULocaleDisplayNames* ldn, const char* region, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_scriptDisplayName, int32_t (*)(const ULocaleDisplayNames* ldn, const char* lang, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_keyValueDisplayName, int32_t (*)(const ULocaleDisplayNames* ldn, const char* key, const char* value, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t)
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define CALLCONV __cdecl
|
||||
#else
|
||||
#define CALLCONV
|
||||
#endif
|
||||
|
||||
#define FOR_EACH_UC_VOID_OP(F) \
|
||||
F(u_getVersion, void (*)(UVersionInfo versionArray), void) \
|
||||
F(uiter_setString, void (*)(UCharIterator * iter, const UChar* s, int32_t length), void) \
|
||||
F(ucnv_close, void (*)(UConverter * converter), void) \
|
||||
F(ucnv_toUnicode, void (*)(UConverter * converter, UChar * *target, const UChar* targetLimit, const char** source, const char* sourceLimit, int32_t* offsets, UBool flush, UErrorCode* err), void) \
|
||||
F(ucnv_fromUnicode, void (*)(UConverter * converter, char** target, const char* targetLimit, const UChar** source, const UChar* sourceLimit, int32_t* offsets, UBool flush, UErrorCode* err), void) \
|
||||
F(ubidi_close, void (*)(UBiDi * pBiDi), void) \
|
||||
F(ubidi_setPara, void (*)(UBiDi * pBiDi, const UChar* text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel* embeddingLevels, UErrorCode* pErrorCode), void) \
|
||||
F(ubidi_getLogicalRun, void (*)(const UBiDi* pBiDi, int32_t logicalPosition, int32_t* pLogicalLimit, UBiDiLevel* pLevel), void) \
|
||||
F(uldn_close, void (*)(ULocaleDisplayNames * ldn), void)
|
||||
#define FOR_EACH_UC_OP(F) \
|
||||
F(u_tolower, UChar32(CALLCONV*)(UChar32), UChar32) \
|
||||
F(u_toupper, UChar32(CALLCONV*)(UChar32), UChar32) \
|
||||
F(u_islower, UBool(CALLCONV*)(UChar32), UBool) \
|
||||
F(u_isupper, UBool(CALLCONV*)(UChar32), UBool) \
|
||||
F(u_totitle, UChar32(CALLCONV*)(UChar32), UChar32) \
|
||||
F(u_charMirror, UChar32(CALLCONV*)(UChar32), UChar32) \
|
||||
F(u_countChar32, int32_t(CALLCONV*)(const UChar* s, int32_t length), int32_t) \
|
||||
F(u_strToLower, int32_t(CALLCONV*)(UChar * dest, int32_t destCapacity, const UChar* src, int32_t srcLength, const char* locale, UErrorCode* pErrorCode), int32_t) \
|
||||
F(u_strToUpper, int32_t(CALLCONV*)(UChar * dest, int32_t destCapacity, const UChar* src, int32_t srcLength, const char* locale, UErrorCode* pErrorCode), int32_t) \
|
||||
F(unorm2_getNFCInstance, const UNormalizer2*(CALLCONV*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_getNFDInstance, const UNormalizer2*(CALLCONV*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_getNFKCInstance, const UNormalizer2*(CALLCONV*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_getNFKDInstance, const UNormalizer2*(CALLCONV*)(UErrorCode*), const UNormalizer2*) \
|
||||
F(unorm2_normalize, int32_t(CALLCONV*)(const UNormalizer2*, const UChar*, int32_t, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(unorm2_composePair, UChar32(CALLCONV*)(const UNormalizer2* norm2, UChar32 a, UChar32 b), UChar32) \
|
||||
F(unorm2_getRawDecomposition, int32_t(CALLCONV*)(const UNormalizer2* norm2, UChar32 c, UChar* decomposition, int32_t capacity, UErrorCode* pErrorCode), int32_t) \
|
||||
F(u_getIntPropertyValue, int32_t(CALLCONV*)(UChar32, UProperty), int32_t) \
|
||||
F(u_getIntPropertyMaxValue, int32_t(CALLCONV*)(UProperty), int32_t) \
|
||||
F(u_getIntPropertyMinValue, int32_t(CALLCONV*)(UProperty), int32_t) \
|
||||
F(u_getCombiningClass, uint8_t(CALLCONV*)(UChar32), uint8_t) \
|
||||
F(u_charType, int8_t(CALLCONV*)(UChar32 c), int8_t) \
|
||||
F(u_charDirection, UCharDirection(CALLCONV*)(UChar32 c), UCharDirection) \
|
||||
F(u_isblank, UBool(CALLCONV*)(UChar32 c), UBool) \
|
||||
F(uloc_getDefault, const char*(CALLCONV*)(), const char*) \
|
||||
F(uloc_getName, int32_t(CALLCONV*)(const char* localeID, char* name, int32_t nameCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_canonicalize, int32_t(CALLCONV*)(const char* localeID, char* name, int32_t nameCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getBaseName, int32_t(CALLCONV*)(const char* localeID, char* name, int32_t nameCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_forLanguageTag, int32_t(CALLCONV*)(const char* langtag, char* localeID, int32_t localeIDCapacity, int32_t* parsedLength, UErrorCode* err), int32_t) \
|
||||
F(uloc_getLanguage, int32_t(CALLCONV*)(const char* localeID, char* language, int32_t languageCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getScript, int32_t(CALLCONV*)(const char* localeID, char* script, int32_t scriptCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getCountry, int32_t(CALLCONV*)(const char* localeID, char* country, int32_t countryCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getVariant, int32_t(CALLCONV*)(const char* localeID, char* variant, int32_t variantCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_toLegacyKey, const char*(CALLCONV*)(const char* keyword), const char*) \
|
||||
F(uloc_toLegacyType, const char*(CALLCONV*)(const char* keyword, const char* value), const char*) \
|
||||
F(uloc_toLanguageTag, int32_t(CALLCONV*)(const char* localeID, char* langtag, int32_t langtagCapacity, UBool strict, UErrorCode* err), int32_t) \
|
||||
F(uloc_addLikelySubtags, int32_t(CALLCONV*)(const char* localeID, char* maximizedLocaleID, int32_t maximizedLocaleIDCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_minimizeSubtags, int32_t(CALLCONV*)(const char* localeID, char* minimizedLocaleID, int32_t minimizedLocaleIDCapacity, UErrorCode* err), int32_t) \
|
||||
F(uloc_getCharacterOrientation, ULayoutType(CALLCONV*)(const char* localeID, UErrorCode* err), ULayoutType) \
|
||||
F(uloc_countAvailable, int32_t(CALLCONV*)(), int32_t) \
|
||||
F(uloc_getAvailable, const char*(CALLCONV*)(int32_t n), const char*) \
|
||||
F(uloc_toUnicodeLocaleType, const char*(CALLCONV*)(const char*, const char*), const char*) \
|
||||
F(ucnv_open, UConverter*(CALLCONV*)(const char* converterName, UErrorCode* err), UConverter*) \
|
||||
F(ucnv_compareNames, int(CALLCONV*)(const char* name1, const char* name2), int) \
|
||||
F(ucnv_getDisplayName, int32_t(CALLCONV*)(const UConverter* converter, const char* displayLocale, UChar* displayName, int32_t displayNameCapacity, UErrorCode* err), int32_t) \
|
||||
F(ucnv_getName, const char*(CALLCONV*)(const UConverter* converter, UErrorCode* err), const char*) \
|
||||
F(ubidi_open, UBiDi*(CALLCONV*)(), UBiDi*) \
|
||||
F(ubidi_getBaseDirection, UBiDiDirection(CALLCONV*)(const UChar* text, int32_t length), UBiDiDirection) \
|
||||
F(ubidi_countRuns, int32_t(CALLCONV*)(UBiDi * pBiDi, UErrorCode * pErrorCode), int32_t) \
|
||||
F(ublock_getCode, UBlockCode(CALLCONV*)(UChar32 c), UBlockCode) \
|
||||
F(uscript_getScript, UScriptCode(CALLCONV*)(UChar32 codepoint, UErrorCode * err), UScriptCode) \
|
||||
F(uscript_hasScript, UBool(CALLCONV*)(UChar32 c, UScriptCode sc), UBool) \
|
||||
F(uscript_getShortName, const char*(CALLCONV*)(UScriptCode scriptCode), const char*) \
|
||||
F(uldn_open, ULocaleDisplayNames*(CALLCONV*)(const char* locale, UDialectHandling dialectHandling, UErrorCode* pErrorCode), ULocaleDisplayNames*) \
|
||||
F(uldn_openForContext, ULocaleDisplayNames*(CALLCONV*)(const char* locale, UDisplayContext* contexts, int32_t length, UErrorCode* pErrorCode), ULocaleDisplayNames*) \
|
||||
F(uldn_localeDisplayName, int32_t(CALLCONV*)(const ULocaleDisplayNames* ldn, const char* locale, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_languageDisplayName, int32_t(CALLCONV*)(const ULocaleDisplayNames* ldn, const char* lang, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_regionDisplayName, int32_t(CALLCONV*)(const ULocaleDisplayNames* ldn, const char* region, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_scriptDisplayName, int32_t(CALLCONV*)(const ULocaleDisplayNames* ldn, const char* lang, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t) \
|
||||
F(uldn_keyValueDisplayName, int32_t(CALLCONV*)(const ULocaleDisplayNames* ldn, const char* key, const char* value, UChar* result, int32_t maxResultSize, UErrorCode* pErrorCode), int32_t)
|
||||
|
||||
#define FOR_EACH_I18N_OP(F) \
|
||||
F(vzone_openID, VZone* (*)(const UChar*, int32_t), VZone*) \
|
||||
F(vzone_getRawOffset, int32_t (*)(VZone*), int32_t) \
|
||||
F(ucol_countAvailable, int32_t (*)(), int32_t) \
|
||||
F(ucol_getAvailable, const char* (*)(int32_t), const char*) \
|
||||
F(ucol_getKeywordValues, UEnumeration* (*)(const char* key, UErrorCode* status), UEnumeration*) \
|
||||
F(ucol_getKeywordValuesForLocale, UEnumeration* (*)(const char* key, const char* locale, UBool commonlyUsed, UErrorCode* status), UEnumeration*) \
|
||||
F(ucol_getAttribute, UColAttributeValue (*)(const UCollator *coll, UColAttribute attr, UErrorCode *status), UColAttributeValue) \
|
||||
F(ucol_open, UCollator* (*)(const char* loc, UErrorCode* status), UCollator*) \
|
||||
F(ucol_strcollIter, UCollationResult (*)(const UCollator* coll, UCharIterator* sIter, UCharIterator* tIter, UErrorCode* status), UCollationResult) \
|
||||
F(ucol_strcoll, UCollationResult (*)(const UCollator* coll, const UChar* source, int32_t sourceLength, const UChar* target, int32_t targetLength), UCollationResult) \
|
||||
F(udat_countAvailable, int32_t (*)(), int32_t) \
|
||||
F(udat_getAvailable, const char* (*)(int32_t), const char*) \
|
||||
F(udat_open, UDateFormat* (*)(UDateFormatStyle, UDateFormatStyle, const char*, const UChar*, int32_t, const UChar*, int32_t, UErrorCode*), UDateFormat*) \
|
||||
F(udat_format, int32_t (*)(const UDateFormat*, UDate, UChar*, int32_t, UFieldPosition*, UErrorCode*), int32_t) \
|
||||
F(udat_formatForFields, int32_t (*)(const UDateFormat* format, UDate, UChar*, int32_t, UFieldPositionIterator*, UErrorCode*), int32_t) \
|
||||
F(udat_getCalendar, const UCalendar* (*)(const UDateFormat* fmt), const UCalendar*) \
|
||||
F(udat_toPattern, int32_t (*)(const UDateFormat* fmt, UBool localized, UChar* result, int32_t resultLength, UErrorCode* status), int32_t) \
|
||||
F(udat_parse, UDate (*)(const UDateFormat*, const UChar*, int32_t, int32_t*, UErrorCode*), UDate) \
|
||||
F(uenum_count, int32_t (*)(UEnumeration * en, UErrorCode * status), int32_t) \
|
||||
F(uenum_unext, const UChar* (*)(UEnumeration * en, int32_t * resultLength, UErrorCode * status), const UChar*) \
|
||||
F(uenum_next, const char* (*)(UEnumeration * en, int32_t * resultLength, UErrorCode * status), const char*) \
|
||||
F(unumsys_openAvailableNames, UEnumeration* (*)(UErrorCode * status), UEnumeration*) \
|
||||
F(unumsys_openByName, UNumberingSystem* (*)(const char* name, UErrorCode* status), UNumberingSystem*) \
|
||||
F(unumsys_isAlgorithmic, UBool (*)(const UNumberingSystem* unumsys), UBool) \
|
||||
F(unumsys_getName, const char* (*)(const UNumberingSystem* unumsys), const char*) \
|
||||
F(unumsys_open, UNumberingSystem* (*)(const char* locale, UErrorCode* status), UNumberingSystem*) \
|
||||
F(ucal_open, UCalendar* (*)(const UChar* zoneID, int32_t len, const char* locale, UCalendarType type, UErrorCode* status), UCalendar*) \
|
||||
F(ucal_getDefaultTimeZone, int32_t (*)(UChar* result, int32_t resultCapacity, UErrorCode* ec), int32_t) \
|
||||
F(ucal_getTimeZoneDisplayName, int32_t (*)(const UCalendar* cal, UCalendarDisplayNameType type, const char* locale, UChar* result, int32_t resultLength, UErrorCode* status), int32_t) \
|
||||
F(ucal_getKeywordValuesForLocale, UEnumeration* (*)(const char* key, const char* locale, UBool commonlyUsed, UErrorCode* status), UEnumeration*) \
|
||||
F(ucal_openTimeZoneIDEnumeration, UEnumeration* (*)(USystemTimeZoneType zoneType, const char* region, const int32_t* rawOffset, UErrorCode* ec), UEnumeration*) \
|
||||
F(ucal_openTimeZones, UEnumeration* (*)(UErrorCode * ec), UEnumeration*) \
|
||||
F(ucal_getCanonicalTimeZoneID, int32_t (*)(const UChar* id, int32_t len, UChar* result, int32_t resultCapacity, UBool* isSystemID, UErrorCode* status), int32_t) \
|
||||
F(ucal_get, int32_t (*)(const UCalendar* cal, UCalendarDateFields field, UErrorCode* status), int32_t) \
|
||||
F(ucal_getType, const char* (*)(const UCalendar* cal, UErrorCode* status), const char*) \
|
||||
F(ucal_getAttribute, int32_t (*)(const UCalendar* cal, UCalendarAttribute attr), int32_t) \
|
||||
F(ucal_getDayOfWeekType, UCalendarWeekdayType (*)(const UCalendar* cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status), UCalendarWeekdayType) \
|
||||
F(ucal_clone, UCalendar* (*)(const UCalendar *cal, UErrorCode *status), UCalendar*) \
|
||||
F(udatpg_open, UDateTimePatternGenerator* (*)(const char* locale, UErrorCode* pErrorCode), UDateTimePatternGenerator*) \
|
||||
F(udatpg_getBestPattern, int32_t (*)(UDateTimePatternGenerator * dtpg, const UChar* skeleton, int32_t length, UChar* bestPattern, int32_t capacity, UErrorCode* pErrorCode), int32_t) \
|
||||
F(udatpg_getBestPatternWithOptions, int32_t (*)(UDateTimePatternGenerator*, const UChar*, int32_t, UDateTimePatternMatchOptions, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(udatpg_getSkeleton, int32_t (*)(UDateTimePatternGenerator * unusedDtpg, const UChar* pattern, int32_t length, UChar* skeleton, int32_t capacity, UErrorCode* pErrorCode), int32_t) \
|
||||
F(udatpg_getFieldDisplayName, int32_t (*)(const UDateTimePatternGenerator*, UDateTimePatternField, UDateTimePGDisplayWidth, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(unum_countAvailable, int32_t (*)(), int32_t) \
|
||||
F(unum_getAvailable, const char* (*)(int32_t), const char*) \
|
||||
F(unum_open, UNumberFormat* (*)(UNumberFormatStyle style, const UChar* pattern, int32_t patternLength, const char* locale, UParseError* parseErr, UErrorCode* status), UNumberFormat*) \
|
||||
F(unum_formatDouble, int32_t (*)(const UNumberFormat* fmt, double number, UChar* result, int32_t resultLength, UFieldPosition* pos, UErrorCode* status), int32_t) \
|
||||
F(unum_formatDoubleForFields, int32_t (*)(const UNumberFormat* format, double number, UChar* result, int32_t resultLength, UFieldPositionIterator* fpositer, UErrorCode* status), int32_t) \
|
||||
F(ubrk_open, UBreakIterator* (*)(UBreakIteratorType type, const char* locale, const UChar* text, int32_t textLength, UErrorCode* status), UBreakIterator*) \
|
||||
F(ubrk_openRules, UBreakIterator* (*)(const UChar* rules, int32_t rulesLength, const UChar* text, int32_t textLength, UParseError* parseErr, UErrorCode* status), UBreakIterator*) \
|
||||
F(ubrk_next, int32_t (*)(UBreakIterator * bi), int32_t) \
|
||||
F(ucsdet_open, UCharsetDetector* (*)(UErrorCode * status), UCharsetDetector*) \
|
||||
F(ucsdet_detectAll, const UCharsetMatch** (*)(UCharsetDetector * ucsd, int32_t * matchesFound, UErrorCode * status), const UCharsetMatch**) \
|
||||
F(ucsdet_detect, const UCharsetMatch* (*)(UCharsetDetector * ucsd, UErrorCode * status), const UCharsetMatch*) \
|
||||
F(ucsdet_getName, const char* (*)(const UCharsetMatch* ucsm, UErrorCode* status), const char*) \
|
||||
F(ucsdet_getConfidence, int32_t (*)(const UCharsetMatch* ucsm, UErrorCode* status), int32_t) \
|
||||
F(ures_openDirect, UResourceBundle* (*)(const char* packageName, const char* locale, UErrorCode* status), UResourceBundle*) \
|
||||
F(ures_getByKey, UResourceBundle* (*)(const UResourceBundle* resourceBundle, const char* key, UResourceBundle* fillIn, UErrorCode* status), UResourceBundle*) \
|
||||
F(ures_getKey, const char* (*)(const UResourceBundle* resourceBundle), const char*) \
|
||||
F(ures_getNextResource, UResourceBundle* (*)(UResourceBundle * resourceBundle, UResourceBundle * fillIn, UErrorCode * status), UResourceBundle*) \
|
||||
F(ures_hasNext, UBool (*)(const UResourceBundle* resourceBundle), UBool) \
|
||||
F(ures_getSize, int32_t (*)(const UResourceBundle* resourceBundle), int32_t) \
|
||||
F(ures_getStringByIndex, const UChar* (*)(const UResourceBundle *resourceBundle, int32_t indexS, int32_t* len, UErrorCode *status), const UChar*) \
|
||||
F(uplrules_select, int32_t (*)(const UPluralRules* uplrules, double number, UChar* keyword, int32_t capacity, UErrorCode* status), int32_t) \
|
||||
F(uplrules_getKeywords, UEnumeration* (*)(const UPluralRules* uplrules, UErrorCode* status), UEnumeration*) \
|
||||
F(uplrules_open, UPluralRules* (*)(const char* locale, UErrorCode* status), UPluralRules*) \
|
||||
F(uplrules_openForType, UPluralRules* (*)(const char* locale, UPluralType type, UErrorCode* status), UPluralRules*) \
|
||||
F(uplrules_selectWithFormat, int32_t (*)(const UPluralRules* uplrules, double number, const UNumberFormat* fmt, UChar* keyword, int32_t capacity, UErrorCode* status), int32_t) \
|
||||
F(uplrules_selectFormatted, int32_t (*)(const UPluralRules *uplrules, const struct UFormattedNumber* , UChar *, int32_t , UErrorCode *), int32_t) \
|
||||
F(uplrules_selectForRange, int32_t (*)(const UPluralRules *, const struct UFormattedNumberRange *, UChar *, int32_t, UErrorCode *), int32_t) \
|
||||
F(unumf_openForSkeletonAndLocale, UNumberFormatter* (*)(const UChar* skeleton, int32_t skeletonLen, const char* locale, UErrorCode* ec), UNumberFormatter*) \
|
||||
F(unumf_openForSkeletonAndLocaleWithError, UNumberFormatter* (*)(const UChar* skeleton, int32_t skeletonLen, const char* locale, UParseError* perror, UErrorCode* ec), UNumberFormatter*) \
|
||||
F(unumf_openResult, UFormattedNumber* (*)(UErrorCode * ec), UFormattedNumber*) \
|
||||
F(unumf_resultToString, int32_t (*)(const UFormattedNumber* uresult, UChar* buffer, int32_t bufferCapacity, UErrorCode* ec), int32_t) \
|
||||
F(unumrf_openForSkeletonWithCollapseAndIdentityFallback, UNumberRangeFormatter* (*)(const UChar*, int32_t, UNumberRangeCollapse, UNumberRangeIdentityFallback, const char*, UParseError*, UErrorCode*), UNumberRangeFormatter*)\
|
||||
F(unumrf_resultAsValue, const UFormattedValue* (*)(const UFormattedNumberRange* uresult, UErrorCode* ec), const UFormattedValue*) \
|
||||
F(unumrf_openResult, UFormattedNumberRange* (*)(UErrorCode* ec), UFormattedNumberRange*) \
|
||||
F(ufieldpositer_open, UFieldPositionIterator* (*)(UErrorCode * status), UFieldPositionIterator*) \
|
||||
F(ufieldpositer_next, int32_t (*)(UFieldPositionIterator * fpositer, int32_t * beginIndex, int32_t * endIndex), int32_t) \
|
||||
F(ucurr_getName, const UChar* (*)(const UChar* currency, const char* locale, UCurrNameStyle nameStyle, UBool* isChoiceFormat, int32_t* len, UErrorCode* ec), const UChar*) \
|
||||
F(ucurr_getDefaultFractionDigits, int32_t (*)(const UChar* currency, UErrorCode* ec), int32_t) \
|
||||
F(ucurr_getDefaultFractionDigitsForUsage, int32_t (*)(const UChar* currency, const UCurrencyUsage usage, UErrorCode* ec), int32_t) \
|
||||
F(ucurr_openISOCurrencies, UEnumeration* (*)(uint32_t currType, UErrorCode *pErrorCode), UEnumeration*) \
|
||||
F(ucurr_getKeywordValuesForLocale, UEnumeration* (*)(const char *key, const char *locale, UBool commonlyUsed, UErrorCode *status), UEnumeration*) \
|
||||
F(ureldatefmt_open, URelativeDateTimeFormatter* (*)(const char*, UNumberFormat*, UDateRelativeDateTimeFormatterStyle, UDisplayContext, UErrorCode*), URelativeDateTimeFormatter*) \
|
||||
F(ureldatefmt_openResult, UFormattedRelativeDateTime* (*)(UErrorCode * ec), UFormattedRelativeDateTime*) \
|
||||
F(ureldatefmt_resultAsValue, const UFormattedValue* (*)(const UFormattedRelativeDateTime* ufrdt, UErrorCode* ec), const UFormattedValue*) \
|
||||
F(ureldatefmt_format, int32_t (*)(const URelativeDateTimeFormatter* reldatefmt, double, URelativeDateTimeUnit, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(ureldatefmt_formatNumeric, int32_t (*)(const URelativeDateTimeFormatter* reldatefmt, double, URelativeDateTimeUnit, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(ucfpos_open, UConstrainedFieldPosition* (*)(UErrorCode * ec), UConstrainedFieldPosition*) \
|
||||
F(ucfpos_getCategory, int32_t (*)(const UConstrainedFieldPosition* ucfpos, UErrorCode* ec), int32_t) \
|
||||
F(ucfpos_getField, int32_t (*)(const UConstrainedFieldPosition* ucfpos, UErrorCode* ec), int32_t) \
|
||||
F(ufmtval_getString, const UChar* (*)(const UFormattedValue* ufmtval, int32_t* pLength, UErrorCode* ec), const UChar*) \
|
||||
F(ufmtval_nextPosition, UBool (*)(const UFormattedValue* ufmtval, UConstrainedFieldPosition* ucfpos, UErrorCode* ec), UBool) \
|
||||
F(ulistfmt_openForType, UListFormatter* (*)(const char* locale, UListFormatterType type, UListFormatterWidth width, UErrorCode* status), UListFormatter*) \
|
||||
F(ulistfmt_format, int32_t (*)(const UListFormatter* listfmt, const UChar* const strings[], const int32_t*, int32_t, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(ulistfmt_openResult, UFormattedList* (*)(UErrorCode * ec), UFormattedList*) \
|
||||
F(ulistfmt_resultAsValue, const UFormattedValue* (*)(const UFormattedList* uresult, UErrorCode* ec), const UFormattedValue*) \
|
||||
F(udtitvfmt_open, UDateIntervalFormat* (*)(const char*, const UChar*, int32_t, const UChar*, int32_t, UErrorCode*), UDateIntervalFormat*) \
|
||||
F(udtitvfmt_openResult, UFormattedDateInterval* (*)(UErrorCode* ec), UFormattedDateInterval*) \
|
||||
F(udtitvfmt_resultAsValue, const UFormattedValue* (*)(const UFormattedDateInterval*, UErrorCode* ec), const UFormattedValue*)
|
||||
#define FOR_EACH_UC_VOID_OP(F) \
|
||||
F(u_getVersion, void(CALLCONV*)(UVersionInfo versionArray), void) \
|
||||
F(uiter_setString, void(CALLCONV*)(UCharIterator * iter, const UChar* s, int32_t length), void) \
|
||||
F(ucnv_close, void(CALLCONV*)(UConverter * converter), void) \
|
||||
F(ucnv_toUnicode, void(CALLCONV*)(UConverter * converter, UChar * *target, const UChar* targetLimit, const char** source, const char* sourceLimit, int32_t* offsets, UBool flush, UErrorCode* err), void) \
|
||||
F(ucnv_fromUnicode, void(CALLCONV*)(UConverter * converter, char** target, const char* targetLimit, const UChar** source, const UChar* sourceLimit, int32_t* offsets, UBool flush, UErrorCode* err), void) \
|
||||
F(ubidi_close, void(CALLCONV*)(UBiDi * pBiDi), void) \
|
||||
F(ubidi_setPara, void(CALLCONV*)(UBiDi * pBiDi, const UChar* text, int32_t length, UBiDiLevel paraLevel, UBiDiLevel* embeddingLevels, UErrorCode* pErrorCode), void) \
|
||||
F(ubidi_getLogicalRun, void(CALLCONV*)(const UBiDi* pBiDi, int32_t logicalPosition, int32_t* pLogicalLimit, UBiDiLevel* pLevel), void) \
|
||||
F(uldn_close, void(CALLCONV*)(ULocaleDisplayNames * ldn), void)
|
||||
|
||||
#define FOR_EACH_I18N_VOID_OP(F) \
|
||||
F(udat_close, void (*)(UDateFormat * format), void) \
|
||||
F(vzone_close, void (*)(VZone * zone), void) \
|
||||
F(uenum_close, void (*)(UEnumeration * zone), void) \
|
||||
F(uenum_reset, void (*)(UEnumeration * en, UErrorCode * status), void) \
|
||||
F(ucol_setAttribute, void (*)(UCollator * coll, UColAttribute attr, UColAttributeValue value, UErrorCode * status), void) \
|
||||
F(ucol_close, void (*)(UCollator * coll), void) \
|
||||
F(unumsys_close, void (*)(UNumberingSystem*), void) \
|
||||
F(ucal_close, void (*)(UCalendar * cal), void) \
|
||||
F(ucal_setGregorianChange, void (*)(UCalendar * cal, UDate date, UErrorCode * pErrorCode), void) \
|
||||
F(ucal_setMillis, void (*)(UCalendar * cal, UDate date, UErrorCode* status), void) \
|
||||
F(udatpg_close, void (*)(UDateTimePatternGenerator * zone), void) \
|
||||
F(unum_close, void (*)(UNumberFormat*), void) \
|
||||
F(unum_setTextAttribute, void (*)(UNumberFormat * fmt, UNumberFormatTextAttribute tag, const UChar* newValue, int32_t newValueLength, UErrorCode* status), void) \
|
||||
F(unum_setAttribute, void (*)(UNumberFormat * fmt, UNumberFormatAttribute attr, int32_t newValue), void) \
|
||||
F(ubrk_setText, void (*)(UBreakIterator * bi, const UChar* text, int32_t textLength, UErrorCode* status), void) \
|
||||
F(ubrk_setUText, void (*)(UBreakIterator * bi, UText * text, UErrorCode * status), void) \
|
||||
F(ubrk_close, void (*)(UBreakIterator * format), void) \
|
||||
F(ucsdet_setText, void (*)(UCharsetDetector * ucsd, const char* textIn, int32_t len, UErrorCode* status), void) \
|
||||
F(ucsdet_close, void (*)(UCharsetDetector * ucsd), void) \
|
||||
F(uplrules_close, void (*)(UPluralRules * uplrules), void) \
|
||||
F(ures_close, void (*)(UResourceBundle * resourceBundle), void) \
|
||||
F(ures_resetIterator, void (*)(UResourceBundle * resourceBundle), void) \
|
||||
F(unumf_formatInt, void (*)(const UNumberFormatter* uformatter, int64_t value, UFormattedNumber* uresult, UErrorCode* ec), void) \
|
||||
F(unumf_formatDecimal, void (*)(const UNumberFormatter* uformatter, const char* value, int32_t valueLen, UFormattedNumber* uresult, UErrorCode* ec), void) \
|
||||
F(unumf_formatDouble, void (*)(const UNumberFormatter* uformatter, double value, UFormattedNumber* uresult, UErrorCode* ec), void) \
|
||||
F(unumf_resultGetAllFieldPositions, void (*)(const UFormattedNumber* uresult, UFieldPositionIterator* ufpositer, UErrorCode* ec), void) \
|
||||
F(unumf_close, void (*)(UNumberFormatter * uformatter), void) \
|
||||
F(unumf_closeResult, void (*)(UFormattedNumber * uresult), void) \
|
||||
F(unumrf_formatDoubleRange, void (*)(const UNumberRangeFormatter*, double, double, UFormattedNumberRange*, UErrorCode*), void) \
|
||||
F(unumrf_formatDecimalRange, void (*)(const UNumberRangeFormatter*, const char*, int32_t, const char*, int32_t, UFormattedNumberRange*, UErrorCode*), void) \
|
||||
F(unumrf_close, void (*)(UNumberRangeFormatter*), void) \
|
||||
F(unumrf_closeResult, void (*)(UFormattedNumberRange*), void) \
|
||||
F(ufieldpositer_close, void (*)(UFieldPositionIterator * fpositer), void) \
|
||||
F(ureldatefmt_formatNumericToResult, void (*)(const URelativeDateTimeFormatter*, double, URelativeDateTimeUnit, UFormattedRelativeDateTime*, UErrorCode*), void) \
|
||||
F(ureldatefmt_formatToResult, void (*)(const URelativeDateTimeFormatter*, double, URelativeDateTimeUnit, UFormattedRelativeDateTime*, UErrorCode*), void) \
|
||||
F(ureldatefmt_close, void (*)(URelativeDateTimeFormatter * reldatefmt), void) \
|
||||
F(ureldatefmt_closeResult, void (*)(UFormattedRelativeDateTime * ufrdt), void) \
|
||||
F(ucfpos_reset, void (*)(UConstrainedFieldPosition * ucfpos, UErrorCode * ec), void) \
|
||||
F(ucfpos_close, void (*)(UConstrainedFieldPosition * ucfpos), void) \
|
||||
F(ucfpos_constrainCategory, void (*)(UConstrainedFieldPosition * ucfpos, int32_t category, UErrorCode * ec), void) \
|
||||
F(ucfpos_constrainField, void (*)(UConstrainedFieldPosition * ucfpos, int32_t category, int32_t field, UErrorCode * ec), void) \
|
||||
F(ucfpos_getIndexes, void (*)(const UConstrainedFieldPosition* ucfpos, int32_t* pStart, int32_t* pLimit, UErrorCode* ec), void) \
|
||||
F(ulistfmt_close, void (*)(UListFormatter * listfmt), void) \
|
||||
F(ulistfmt_formatStringsToResult, void (*)(const UListFormatter*, const UChar* const[], const int32_t*, int32_t, UFormattedList*, UErrorCode*), void) \
|
||||
F(ulistfmt_closeResult, void (*)(UFormattedList * uresult), void) \
|
||||
F(udtitvfmt_close, void (*)(UDateIntervalFormat *formatter), void) \
|
||||
F(udtitvfmt_closeResult, void (*)(UFormattedDateInterval* uresult), void) \
|
||||
F(udtitvfmt_formatToResult, void (*)(const UDateIntervalFormat*, UDate, UDate, UFormattedDateInterval*, UErrorCode*), void) \
|
||||
F(udtitvfmt_formatCalendarToResult, void (*)(const UDateIntervalFormat*, UCalendar*, UCalendar*, UFormattedDateInterval*, UErrorCode*), void)
|
||||
#define FOR_EACH_I18N_OP(F) \
|
||||
F(vzone_openID, VZone*(CALLCONV*)(const UChar*, int32_t), VZone*) \
|
||||
F(vzone_getRawOffset, int32_t(CALLCONV*)(VZone*), int32_t) \
|
||||
F(ucol_countAvailable, int32_t(CALLCONV*)(), int32_t) \
|
||||
F(ucol_getAvailable, const char*(CALLCONV*)(int32_t), const char*) \
|
||||
F(ucol_getKeywordValues, UEnumeration*(CALLCONV*)(const char* key, UErrorCode* status), UEnumeration*) \
|
||||
F(ucol_getKeywordValuesForLocale, UEnumeration*(CALLCONV*)(const char* key, const char* locale, UBool commonlyUsed, UErrorCode* status), UEnumeration*) \
|
||||
F(ucol_getAttribute, UColAttributeValue(CALLCONV*)(const UCollator* coll, UColAttribute attr, UErrorCode* status), UColAttributeValue) \
|
||||
F(ucol_open, UCollator*(CALLCONV*)(const char* loc, UErrorCode* status), UCollator*) \
|
||||
F(ucol_strcollIter, UCollationResult(CALLCONV*)(const UCollator* coll, UCharIterator* sIter, UCharIterator* tIter, UErrorCode* status), UCollationResult) \
|
||||
F(ucol_strcoll, UCollationResult(CALLCONV*)(const UCollator* coll, const UChar* source, int32_t sourceLength, const UChar* target, int32_t targetLength), UCollationResult) \
|
||||
F(udat_countAvailable, int32_t(CALLCONV*)(), int32_t) \
|
||||
F(udat_getAvailable, const char*(CALLCONV*)(int32_t), const char*) \
|
||||
F(udat_open, UDateFormat*(CALLCONV*)(UDateFormatStyle, UDateFormatStyle, const char*, const UChar*, int32_t, const UChar*, int32_t, UErrorCode*), UDateFormat*) \
|
||||
F(udat_format, int32_t(CALLCONV*)(const UDateFormat*, UDate, UChar*, int32_t, UFieldPosition*, UErrorCode*), int32_t) \
|
||||
F(udat_formatForFields, int32_t(CALLCONV*)(const UDateFormat* format, UDate, UChar*, int32_t, UFieldPositionIterator*, UErrorCode*), int32_t) \
|
||||
F(udat_getCalendar, const UCalendar*(CALLCONV*)(const UDateFormat* fmt), const UCalendar*) \
|
||||
F(udat_toPattern, int32_t(CALLCONV*)(const UDateFormat* fmt, UBool localized, UChar* result, int32_t resultLength, UErrorCode* status), int32_t) \
|
||||
F(udat_parse, UDate(CALLCONV*)(const UDateFormat*, const UChar*, int32_t, int32_t*, UErrorCode*), UDate) \
|
||||
F(uenum_count, int32_t(CALLCONV*)(UEnumeration * en, UErrorCode * status), int32_t) \
|
||||
F(uenum_unext, const UChar*(CALLCONV*)(UEnumeration * en, int32_t* resultLength, UErrorCode* status), const UChar*) \
|
||||
F(uenum_next, const char*(CALLCONV*)(UEnumeration * en, int32_t* resultLength, UErrorCode* status), const char*) \
|
||||
F(unumsys_openAvailableNames, UEnumeration*(CALLCONV*)(UErrorCode * status), UEnumeration*) \
|
||||
F(unumsys_openByName, UNumberingSystem*(CALLCONV*)(const char* name, UErrorCode* status), UNumberingSystem*) \
|
||||
F(unumsys_isAlgorithmic, UBool(CALLCONV*)(const UNumberingSystem* unumsys), UBool) \
|
||||
F(unumsys_getName, const char*(CALLCONV*)(const UNumberingSystem* unumsys), const char*) \
|
||||
F(unumsys_open, UNumberingSystem*(CALLCONV*)(const char* locale, UErrorCode* status), UNumberingSystem*) \
|
||||
F(ucal_open, UCalendar*(CALLCONV*)(const UChar* zoneID, int32_t len, const char* locale, UCalendarType type, UErrorCode* status), UCalendar*) \
|
||||
F(ucal_getDefaultTimeZone, int32_t(CALLCONV*)(UChar * result, int32_t resultCapacity, UErrorCode* ec), int32_t) \
|
||||
F(ucal_getTimeZoneDisplayName, int32_t(CALLCONV*)(const UCalendar* cal, UCalendarDisplayNameType type, const char* locale, UChar* result, int32_t resultLength, UErrorCode* status), int32_t) \
|
||||
F(ucal_getKeywordValuesForLocale, UEnumeration*(CALLCONV*)(const char* key, const char* locale, UBool commonlyUsed, UErrorCode* status), UEnumeration*) \
|
||||
F(ucal_openTimeZoneIDEnumeration, UEnumeration*(CALLCONV*)(USystemTimeZoneType zoneType, const char* region, const int32_t* rawOffset, UErrorCode* ec), UEnumeration*) \
|
||||
F(ucal_openTimeZones, UEnumeration*(CALLCONV*)(UErrorCode * ec), UEnumeration*) \
|
||||
F(ucal_getCanonicalTimeZoneID, int32_t(CALLCONV*)(const UChar* id, int32_t len, UChar* result, int32_t resultCapacity, UBool* isSystemID, UErrorCode* status), int32_t) \
|
||||
F(ucal_get, int32_t(CALLCONV*)(const UCalendar* cal, UCalendarDateFields field, UErrorCode* status), int32_t) \
|
||||
F(ucal_getType, const char*(CALLCONV*)(const UCalendar* cal, UErrorCode* status), const char*) \
|
||||
F(ucal_getAttribute, int32_t(CALLCONV*)(const UCalendar* cal, UCalendarAttribute attr), int32_t) \
|
||||
F(ucal_getDayOfWeekType, UCalendarWeekdayType(CALLCONV*)(const UCalendar* cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status), UCalendarWeekdayType) \
|
||||
F(ucal_clone, UCalendar*(CALLCONV*)(const UCalendar* cal, UErrorCode* status), UCalendar*) \
|
||||
F(udatpg_open, UDateTimePatternGenerator*(CALLCONV*)(const char* locale, UErrorCode* pErrorCode), UDateTimePatternGenerator*) \
|
||||
F(udatpg_getBestPattern, int32_t(CALLCONV*)(UDateTimePatternGenerator * dtpg, const UChar* skeleton, int32_t length, UChar* bestPattern, int32_t capacity, UErrorCode* pErrorCode), int32_t) \
|
||||
F(udatpg_getBestPatternWithOptions, int32_t(CALLCONV*)(UDateTimePatternGenerator*, const UChar*, int32_t, UDateTimePatternMatchOptions, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(udatpg_getSkeleton, int32_t(CALLCONV*)(UDateTimePatternGenerator * unusedDtpg, const UChar* pattern, int32_t length, UChar* skeleton, int32_t capacity, UErrorCode* pErrorCode), int32_t) \
|
||||
F(udatpg_getFieldDisplayName, int32_t(CALLCONV*)(const UDateTimePatternGenerator*, UDateTimePatternField, UDateTimePGDisplayWidth, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(unum_countAvailable, int32_t(CALLCONV*)(), int32_t) \
|
||||
F(unum_getAvailable, const char*(CALLCONV*)(int32_t), const char*) \
|
||||
F(unum_open, UNumberFormat*(CALLCONV*)(UNumberFormatStyle style, const UChar* pattern, int32_t patternLength, const char* locale, UParseError* parseErr, UErrorCode* status), UNumberFormat*) \
|
||||
F(unum_formatDouble, int32_t(CALLCONV*)(const UNumberFormat* fmt, double number, UChar* result, int32_t resultLength, UFieldPosition* pos, UErrorCode* status), int32_t) \
|
||||
F(unum_formatDoubleForFields, int32_t(CALLCONV*)(const UNumberFormat* format, double number, UChar* result, int32_t resultLength, UFieldPositionIterator* fpositer, UErrorCode* status), int32_t) \
|
||||
F(ubrk_open, UBreakIterator*(CALLCONV*)(UBreakIteratorType type, const char* locale, const UChar* text, int32_t textLength, UErrorCode* status), UBreakIterator*) \
|
||||
F(ubrk_openRules, UBreakIterator*(CALLCONV*)(const UChar* rules, int32_t rulesLength, const UChar* text, int32_t textLength, UParseError* parseErr, UErrorCode* status), UBreakIterator*) \
|
||||
F(ubrk_next, int32_t(CALLCONV*)(UBreakIterator * bi), int32_t) \
|
||||
F(ucsdet_open, UCharsetDetector*(CALLCONV*)(UErrorCode * status), UCharsetDetector*) \
|
||||
F(ucsdet_detectAll, const UCharsetMatch**(CALLCONV*)(UCharsetDetector * ucsd, int32_t* matchesFound, UErrorCode* status), const UCharsetMatch**) \
|
||||
F(ucsdet_detect, const UCharsetMatch*(CALLCONV*)(UCharsetDetector * ucsd, UErrorCode * status), const UCharsetMatch*) \
|
||||
F(ucsdet_getName, const char*(CALLCONV*)(const UCharsetMatch* ucsm, UErrorCode* status), const char*) \
|
||||
F(ucsdet_getConfidence, int32_t(CALLCONV*)(const UCharsetMatch* ucsm, UErrorCode* status), int32_t) \
|
||||
F(ures_openDirect, UResourceBundle*(CALLCONV*)(const char* packageName, const char* locale, UErrorCode* status), UResourceBundle*) \
|
||||
F(ures_getByKey, UResourceBundle*(CALLCONV*)(const UResourceBundle* resourceBundle, const char* key, UResourceBundle* fillIn, UErrorCode* status), UResourceBundle*) \
|
||||
F(ures_getKey, const char*(CALLCONV*)(const UResourceBundle* resourceBundle), const char*) \
|
||||
F(ures_getNextResource, UResourceBundle*(CALLCONV*)(UResourceBundle * resourceBundle, UResourceBundle * fillIn, UErrorCode * status), UResourceBundle*) \
|
||||
F(ures_hasNext, UBool(CALLCONV*)(const UResourceBundle* resourceBundle), UBool) \
|
||||
F(ures_getSize, int32_t(CALLCONV*)(const UResourceBundle* resourceBundle), int32_t) \
|
||||
F(ures_getStringByIndex, const UChar*(CALLCONV*)(const UResourceBundle* resourceBundle, int32_t indexS, int32_t* len, UErrorCode* status), const UChar*) \
|
||||
F(uplrules_select, int32_t(CALLCONV*)(const UPluralRules* uplrules, double number, UChar* keyword, int32_t capacity, UErrorCode* status), int32_t) \
|
||||
F(uplrules_getKeywords, UEnumeration*(CALLCONV*)(const UPluralRules* uplrules, UErrorCode* status), UEnumeration*) \
|
||||
F(uplrules_open, UPluralRules*(CALLCONV*)(const char* locale, UErrorCode* status), UPluralRules*) \
|
||||
F(uplrules_openForType, UPluralRules*(CALLCONV*)(const char* locale, UPluralType type, UErrorCode* status), UPluralRules*) \
|
||||
F(uplrules_selectWithFormat, int32_t(CALLCONV*)(const UPluralRules* uplrules, double number, const UNumberFormat* fmt, UChar* keyword, int32_t capacity, UErrorCode* status), int32_t) \
|
||||
F(uplrules_selectFormatted, int32_t(CALLCONV*)(const UPluralRules* uplrules, const struct UFormattedNumber*, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(uplrules_selectForRange, int32_t(CALLCONV*)(const UPluralRules*, const struct UFormattedNumberRange*, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(unumf_openForSkeletonAndLocale, UNumberFormatter*(CALLCONV*)(const UChar* skeleton, int32_t skeletonLen, const char* locale, UErrorCode* ec), UNumberFormatter*) \
|
||||
F(unumf_openForSkeletonAndLocaleWithError, UNumberFormatter*(CALLCONV*)(const UChar* skeleton, int32_t skeletonLen, const char* locale, UParseError* perror, UErrorCode* ec), UNumberFormatter*) \
|
||||
F(unumf_openResult, UFormattedNumber*(CALLCONV*)(UErrorCode * ec), UFormattedNumber*) \
|
||||
F(unumf_resultToString, int32_t(CALLCONV*)(const UFormattedNumber* uresult, UChar* buffer, int32_t bufferCapacity, UErrorCode* ec), int32_t) \
|
||||
F(unumrf_openForSkeletonWithCollapseAndIdentityFallback, UNumberRangeFormatter*(CALLCONV*)(const UChar*, int32_t, UNumberRangeCollapse, UNumberRangeIdentityFallback, const char*, UParseError*, UErrorCode*), UNumberRangeFormatter*) \
|
||||
F(unumrf_resultAsValue, const UFormattedValue*(CALLCONV*)(const UFormattedNumberRange* uresult, UErrorCode* ec), const UFormattedValue*) \
|
||||
F(unumrf_openResult, UFormattedNumberRange*(CALLCONV*)(UErrorCode * ec), UFormattedNumberRange*) \
|
||||
F(ufieldpositer_open, UFieldPositionIterator*(CALLCONV*)(UErrorCode * status), UFieldPositionIterator*) \
|
||||
F(ufieldpositer_next, int32_t(CALLCONV*)(UFieldPositionIterator * fpositer, int32_t* beginIndex, int32_t* endIndex), int32_t) \
|
||||
F(ucurr_getName, const UChar*(CALLCONV*)(const UChar* currency, const char* locale, UCurrNameStyle nameStyle, UBool* isChoiceFormat, int32_t* len, UErrorCode* ec), const UChar*) \
|
||||
F(ucurr_getDefaultFractionDigits, int32_t(CALLCONV*)(const UChar* currency, UErrorCode* ec), int32_t) \
|
||||
F(ucurr_getDefaultFractionDigitsForUsage, int32_t(CALLCONV*)(const UChar* currency, const UCurrencyUsage usage, UErrorCode* ec), int32_t) \
|
||||
F(ucurr_openISOCurrencies, UEnumeration*(CALLCONV*)(uint32_t currType, UErrorCode* pErrorCode), UEnumeration*) \
|
||||
F(ucurr_getKeywordValuesForLocale, UEnumeration*(CALLCONV*)(const char* key, const char* locale, UBool commonlyUsed, UErrorCode* status), UEnumeration*) \
|
||||
F(ureldatefmt_open, URelativeDateTimeFormatter*(CALLCONV*)(const char*, UNumberFormat*, UDateRelativeDateTimeFormatterStyle, UDisplayContext, UErrorCode*), URelativeDateTimeFormatter*) \
|
||||
F(ureldatefmt_openResult, UFormattedRelativeDateTime*(CALLCONV*)(UErrorCode * ec), UFormattedRelativeDateTime*) \
|
||||
F(ureldatefmt_resultAsValue, const UFormattedValue*(CALLCONV*)(const UFormattedRelativeDateTime* ufrdt, UErrorCode* ec), const UFormattedValue*) \
|
||||
F(ureldatefmt_format, int32_t(CALLCONV*)(const URelativeDateTimeFormatter* reldatefmt, double, URelativeDateTimeUnit, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(ureldatefmt_formatNumeric, int32_t(CALLCONV*)(const URelativeDateTimeFormatter* reldatefmt, double, URelativeDateTimeUnit, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(ucfpos_open, UConstrainedFieldPosition*(CALLCONV*)(UErrorCode * ec), UConstrainedFieldPosition*) \
|
||||
F(ucfpos_getCategory, int32_t(CALLCONV*)(const UConstrainedFieldPosition* ucfpos, UErrorCode* ec), int32_t) \
|
||||
F(ucfpos_getField, int32_t(CALLCONV*)(const UConstrainedFieldPosition* ucfpos, UErrorCode* ec), int32_t) \
|
||||
F(ufmtval_getString, const UChar*(CALLCONV*)(const UFormattedValue* ufmtval, int32_t* pLength, UErrorCode* ec), const UChar*) \
|
||||
F(ufmtval_nextPosition, UBool(CALLCONV*)(const UFormattedValue* ufmtval, UConstrainedFieldPosition* ucfpos, UErrorCode* ec), UBool) \
|
||||
F(ulistfmt_openForType, UListFormatter*(CALLCONV*)(const char* locale, UListFormatterType type, UListFormatterWidth width, UErrorCode* status), UListFormatter*) \
|
||||
F(ulistfmt_format, int32_t(CALLCONV*)(const UListFormatter* listfmt, const UChar* const strings[], const int32_t*, int32_t, UChar*, int32_t, UErrorCode*), int32_t) \
|
||||
F(ulistfmt_openResult, UFormattedList*(CALLCONV*)(UErrorCode * ec), UFormattedList*) \
|
||||
F(ulistfmt_resultAsValue, const UFormattedValue*(CALLCONV*)(const UFormattedList* uresult, UErrorCode* ec), const UFormattedValue*) \
|
||||
F(udtitvfmt_open, UDateIntervalFormat*(CALLCONV*)(const char*, const UChar*, int32_t, const UChar*, int32_t, UErrorCode*), UDateIntervalFormat*) \
|
||||
F(udtitvfmt_openResult, UFormattedDateInterval*(CALLCONV*)(UErrorCode * ec), UFormattedDateInterval*) \
|
||||
F(udtitvfmt_resultAsValue, const UFormattedValue*(CALLCONV*)(const UFormattedDateInterval*, UErrorCode* ec), const UFormattedValue*)
|
||||
|
||||
#define FOR_EACH_I18N_VOID_OP(F) \
|
||||
F(udat_close, void(CALLCONV*)(UDateFormat * format), void) \
|
||||
F(vzone_close, void(CALLCONV*)(VZone * zone), void) \
|
||||
F(uenum_close, void(CALLCONV*)(UEnumeration * zone), void) \
|
||||
F(uenum_reset, void(CALLCONV*)(UEnumeration * en, UErrorCode * status), void) \
|
||||
F(ucol_setAttribute, void(CALLCONV*)(UCollator * coll, UColAttribute attr, UColAttributeValue value, UErrorCode * status), void) \
|
||||
F(ucol_close, void(CALLCONV*)(UCollator * coll), void) \
|
||||
F(unumsys_close, void(CALLCONV*)(UNumberingSystem*), void) \
|
||||
F(ucal_close, void(CALLCONV*)(UCalendar * cal), void) \
|
||||
F(ucal_setGregorianChange, void(CALLCONV*)(UCalendar * cal, UDate date, UErrorCode * pErrorCode), void) \
|
||||
F(ucal_setMillis, void(CALLCONV*)(UCalendar * cal, UDate date, UErrorCode * status), void) \
|
||||
F(udatpg_close, void(CALLCONV*)(UDateTimePatternGenerator * zone), void) \
|
||||
F(unum_close, void(CALLCONV*)(UNumberFormat*), void) \
|
||||
F(unum_setTextAttribute, void(CALLCONV*)(UNumberFormat * fmt, UNumberFormatTextAttribute tag, const UChar* newValue, int32_t newValueLength, UErrorCode* status), void) \
|
||||
F(unum_setAttribute, void(CALLCONV*)(UNumberFormat * fmt, UNumberFormatAttribute attr, int32_t newValue), void) \
|
||||
F(ubrk_setText, void(CALLCONV*)(UBreakIterator * bi, const UChar* text, int32_t textLength, UErrorCode* status), void) \
|
||||
F(ubrk_setUText, void(CALLCONV*)(UBreakIterator * bi, UText * text, UErrorCode * status), void) \
|
||||
F(ubrk_close, void(CALLCONV*)(UBreakIterator * format), void) \
|
||||
F(ucsdet_setText, void(CALLCONV*)(UCharsetDetector * ucsd, const char* textIn, int32_t len, UErrorCode* status), void) \
|
||||
F(ucsdet_close, void(CALLCONV*)(UCharsetDetector * ucsd), void) \
|
||||
F(uplrules_close, void(CALLCONV*)(UPluralRules * uplrules), void) \
|
||||
F(ures_close, void(CALLCONV*)(UResourceBundle * resourceBundle), void) \
|
||||
F(ures_resetIterator, void(CALLCONV*)(UResourceBundle * resourceBundle), void) \
|
||||
F(unumf_formatInt, void(CALLCONV*)(const UNumberFormatter* uformatter, int64_t value, UFormattedNumber* uresult, UErrorCode* ec), void) \
|
||||
F(unumf_formatDecimal, void(CALLCONV*)(const UNumberFormatter* uformatter, const char* value, int32_t valueLen, UFormattedNumber* uresult, UErrorCode* ec), void) \
|
||||
F(unumf_formatDouble, void(CALLCONV*)(const UNumberFormatter* uformatter, double value, UFormattedNumber* uresult, UErrorCode* ec), void) \
|
||||
F(unumf_resultGetAllFieldPositions, void(CALLCONV*)(const UFormattedNumber* uresult, UFieldPositionIterator* ufpositer, UErrorCode* ec), void) \
|
||||
F(unumf_close, void(CALLCONV*)(UNumberFormatter * uformatter), void) \
|
||||
F(unumf_closeResult, void(CALLCONV*)(UFormattedNumber * uresult), void) \
|
||||
F(unumrf_formatDoubleRange, void(CALLCONV*)(const UNumberRangeFormatter*, double, double, UFormattedNumberRange*, UErrorCode*), void) \
|
||||
F(unumrf_formatDecimalRange, void(CALLCONV*)(const UNumberRangeFormatter*, const char*, int32_t, const char*, int32_t, UFormattedNumberRange*, UErrorCode*), void) \
|
||||
F(unumrf_close, void(CALLCONV*)(UNumberRangeFormatter*), void) \
|
||||
F(unumrf_closeResult, void(CALLCONV*)(UFormattedNumberRange*), void) \
|
||||
F(ufieldpositer_close, void(CALLCONV*)(UFieldPositionIterator * fpositer), void) \
|
||||
F(ureldatefmt_formatNumericToResult, void(CALLCONV*)(const URelativeDateTimeFormatter*, double, URelativeDateTimeUnit, UFormattedRelativeDateTime*, UErrorCode*), void) \
|
||||
F(ureldatefmt_formatToResult, void(CALLCONV*)(const URelativeDateTimeFormatter*, double, URelativeDateTimeUnit, UFormattedRelativeDateTime*, UErrorCode*), void) \
|
||||
F(ureldatefmt_close, void(CALLCONV*)(URelativeDateTimeFormatter * reldatefmt), void) \
|
||||
F(ureldatefmt_closeResult, void(CALLCONV*)(UFormattedRelativeDateTime * ufrdt), void) \
|
||||
F(ucfpos_reset, void(CALLCONV*)(UConstrainedFieldPosition * ucfpos, UErrorCode * ec), void) \
|
||||
F(ucfpos_close, void(CALLCONV*)(UConstrainedFieldPosition * ucfpos), void) \
|
||||
F(ucfpos_constrainCategory, void(CALLCONV*)(UConstrainedFieldPosition * ucfpos, int32_t category, UErrorCode* ec), void) \
|
||||
F(ucfpos_constrainField, void(CALLCONV*)(UConstrainedFieldPosition * ucfpos, int32_t category, int32_t field, UErrorCode* ec), void) \
|
||||
F(ucfpos_getIndexes, void(CALLCONV*)(const UConstrainedFieldPosition* ucfpos, int32_t* pStart, int32_t* pLimit, UErrorCode* ec), void) \
|
||||
F(ulistfmt_close, void(CALLCONV*)(UListFormatter * listfmt), void) \
|
||||
F(ulistfmt_formatStringsToResult, void(CALLCONV*)(const UListFormatter*, const UChar* const[], const int32_t*, int32_t, UFormattedList*, UErrorCode*), void) \
|
||||
F(ulistfmt_closeResult, void(CALLCONV*)(UFormattedList * uresult), void) \
|
||||
F(udtitvfmt_close, void(CALLCONV*)(UDateIntervalFormat * formatter), void) \
|
||||
F(udtitvfmt_closeResult, void(CALLCONV*)(UFormattedDateInterval * uresult), void) \
|
||||
F(udtitvfmt_formatToResult, void(CALLCONV*)(const UDateIntervalFormat*, UDate, UDate, UFormattedDateInterval*, UErrorCode*), void) \
|
||||
F(udtitvfmt_formatCalendarToResult, void(CALLCONV*)(const UDateIntervalFormat*, UCalendar*, UCalendar*, UFormattedDateInterval*, UErrorCode*), void)
|
||||
|
||||
#define FOR_EACH_I18N_STICKY_OP(F) \
|
||||
F(vzone_getOffset3)
|
||||
|
|
@ -262,7 +267,7 @@ namespace RuntimeICUBinder {
|
|||
class ICU {
|
||||
private:
|
||||
enum Function {
|
||||
// clang-format off
|
||||
// clang-format off
|
||||
#define DECLARE_ENUM(name, fnType, fnReturnType) function##name,
|
||||
FOR_EACH_UC_OP(DECLARE_ENUM)
|
||||
#undef DECLARE_ENUM
|
||||
|
|
@ -361,8 +366,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
typedef void (*FP)(VZone * zone, UDate date, UBool local, int32_t & rawOffset,
|
||||
int32_t & dstOffset, UErrorCode & ec);
|
||||
typedef void(CALLCONV * FP)(VZone * zone, UDate date, UBool local, int32_t& rawOffset,
|
||||
int32_t& dstOffset, UErrorCode& ec);
|
||||
FP fp = (FP)m_functions[functionvzone_getOffset3];
|
||||
|
||||
return (*fp)(zone, date, local, rawOffset, dstOffset, ec);
|
||||
|
|
@ -412,4 +417,6 @@ private:
|
|||
};
|
||||
} // namespace RuntimeICUBinder
|
||||
|
||||
#undef CALLCONV
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue