diff --git a/Test/Resource.cs b/Test/Resource.cs index c1293b5..4d2f491 100644 --- a/Test/Resource.cs +++ b/Test/Resource.cs @@ -1,18 +1,34 @@ using System; +using System.Collections.Generic; using MultiTheftAuto; using MultiTheftAuto.Native; namespace Test { - public class Resource - { - public Resource() - { - Debug.Error( "{0}", new Color( 255, 128, 0 ).ToARGB().ToString( "X" ) ); - - Vehicle vehicle = Vehicle.Create( 562, new Vector3( 192.0f, 168.0f, 0.0f ), new Vector3( 0.0f, 0.0f, 0.0f ) ); + public class Resource + { + public Resource() + { + var vehicles = new List( 10 ); - //Debug.Log( "{0}", Element.GetPosition( vehicle ) ); - } - } + for( int i = 0; i < vehicles.Capacity; i++ ) + { + UInt32 vehicle = Vehicle.Create( 562, new Vector3( 192.0f, 168.0f, 10.0f ) * i, new Vector3( 0.0f, 0.0f, 0.0f ) ); + + if( vehicle != 0 ) + { + vehicles.Add( vehicle ); + } + else + { + Debug.Error( "Failed to create vehicle" ); + } + } + + foreach( UInt32 vehicle in vehicles ) + { + Debug.Log( "{0} {1}", vehicle, Element.GetPosition( vehicle ) ); + } + } + } } diff --git a/Test/Test.csproj b/Test/Test.csproj index be6aee5..4ba67ba 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -32,6 +32,7 @@ prompt 4 false + true diff --git a/mta-mono.sln b/mta-mono.sln index 0589f6f..33d3d0d 100644 --- a/mta-mono.sln +++ b/mta-mono.sln @@ -5,6 +5,9 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{AC4FC54A-60A7-4EB0-A40D-14768DD633F1}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mta-mono", "mta-mono\mta-mono.vcxproj", "{5E5C7A85-A869-4D86-88FF-05DCEFC07AC3}" + ProjectSection(ProjectDependencies) = postProject + {E2629417-52DF-854E-B510-C15A87AB4BE3} = {E2629417-52DF-854E-B510-C15A87AB4BE3} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua51", "mta-mono\vendor\lua51\lua51.vcxproj", "{E2629417-52DF-854E-B510-C15A87AB4BE3}" EndProject @@ -63,6 +66,7 @@ Global {2E5D4B1E-405E-453F-BEED-25735E25ACD8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {2E5D4B1E-405E-453F-BEED-25735E25ACD8}.Release|Mixed Platforms.Build.0 = Release|Any CPU {2E5D4B1E-405E-453F-BEED-25735E25ACD8}.Release|Win32.ActiveCfg = Release|Any CPU + {2E5D4B1E-405E-453F-BEED-25735E25ACD8}.Release|Win32.Build.0 = Release|Any CPU {2E5D4B1E-405E-453F-BEED-25735E25ACD8}.Release|x64.ActiveCfg = Release|Any CPU {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -75,6 +79,7 @@ Global {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Release|Mixed Platforms.Build.0 = Release|Any CPU {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Release|Win32.ActiveCfg = Release|Any CPU + {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Release|Win32.Build.0 = Release|Any CPU {CBD7F8D5-39F2-4AA5-9FFF-2D3185533DDD}.Release|x64.ActiveCfg = Release|Any CPU {63CBE79D-C717-4797-860B-174FABF780A0}.Debug|Any CPU.ActiveCfg = Debug|Win32 {63CBE79D-C717-4797-860B-174FABF780A0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 @@ -99,6 +104,7 @@ Global {DC461F17-D2EC-4B7C-8CDB-AE81BEDEBD0F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {DC461F17-D2EC-4B7C-8CDB-AE81BEDEBD0F}.Release|Mixed Platforms.Build.0 = Release|Any CPU {DC461F17-D2EC-4B7C-8CDB-AE81BEDEBD0F}.Release|Win32.ActiveCfg = Release|Any CPU + {DC461F17-D2EC-4B7C-8CDB-AE81BEDEBD0F}.Release|Win32.Build.0 = Release|Any CPU {DC461F17-D2EC-4B7C-8CDB-AE81BEDEBD0F}.Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution @@ -108,9 +114,9 @@ Global {E2629417-52DF-854E-B510-C15A87AB4BE3} = {AC4FC54A-60A7-4EB0-A40D-14768DD633F1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw - AMDCaPersistentStartup = mono AMDCaPersistentConfig = Debug|Win32 + AMDCaPersistentStartup = mono + AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/mta-mono/lib/eglib.lib b/mta-mono/lib/eglib.lib new file mode 100644 index 0000000..35fe5c8 Binary files /dev/null and b/mta-mono/lib/eglib.lib differ diff --git a/mta-mono/mta-mono.vcxproj b/mta-mono/mta-mono.vcxproj index 205a273..5759963 100644 --- a/mta-mono/mta-mono.vcxproj +++ b/mta-mono/mta-mono.vcxproj @@ -11,6 +11,7 @@ + @@ -23,6 +24,7 @@ + @@ -38,6 +40,7 @@ + @@ -92,7 +95,7 @@ Disabled - .\src\include;.\vendor;.\vendor\lua51\src;.\vendor\mono;.\vendor\mysql + .\src\include;.\vendor;.\vendor\lua51\src;.\vendor\mono;.\vendor\mysql;.\vendor\eglib WIN32;_WINDOWS;_DEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks @@ -109,7 +112,7 @@ $(IntDir);%(AdditionalIncludeDirectories) - lib/lua51.lib;lib/mono.lib;%(AdditionalDependencies) + %(AdditionalDependencies) $(OutDir)$(TargetName)$(TargetExt) MSVCRT;%(IgnoreSpecificDefaultLibraries) @@ -129,7 +132,7 @@ false - .\src\include;.\vendor;.\vendor\lua51\src;.\vendor\mono;.\vendor\mysql + .\src\include;.\vendor;.\vendor\lua51\src;.\vendor\mono;.\vendor\mysql;.\vendor\eglib WIN32;_WINDOWS;NDEBUG;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreadedDebug true diff --git a/mta-mono/src/CMonoClass.cpp b/mta-mono/src/CMonoClass.cpp new file mode 100644 index 0000000..df2f3e7 --- /dev/null +++ b/mta-mono/src/CMonoClass.cpp @@ -0,0 +1,83 @@ +#include "CMonoClass.h" + +CMonoClass::CMonoClass( MonoClass* pMonoClass ) +{ + this->m_pMonoClass = pMonoClass; +} + + +CMonoClass::~CMonoClass() +{ +} + +CMonoObject* CMonoClass::New( MonoDomain* pMonoDomain ) +{ + MonoObject* pObject = mono_object_new( pMonoDomain, this->m_pMonoClass ); + + if( !pObject ) + { + g_pModuleManager->ErrorPrintf( "%s:%d: Failed to create mono object for %s::%s\n", this->GetNameSpace(), this->GetName(), __FILE__, __LINE__ ); + + return NULL; + } + + mono_runtime_object_init( pObject ); + + return new CMonoObject( pObject ); +} + +CMonoObject* CMonoClass::New( MonoDomain* pMonoDomain, void** args, int argc ) +{ + MonoObject* pObject = mono_object_new( pMonoDomain, this->m_pMonoClass ); + + if( !pObject ) + { + g_pModuleManager->ErrorPrintf( "%s:%d: Failed to create mono object for %s::%s\n", this->GetNameSpace(), this->GetName(), __FILE__, __LINE__ ); + + return NULL; + } + + MonoMethod* pMonoMethod = mono_class_get_method_from_name( this->m_pMonoClass, ".ctor", argc ); + + if( !pMonoMethod ) + { + g_pModuleManager->ErrorPrintf( "%s:%d: Could not lookup constructor for class %s::%s\n", this->GetNameSpace(), this->GetName(), __FILE__, __LINE__ ); + + return NULL; + } + + mono_runtime_invoke( pMonoMethod, pObject, args, NULL ); + + return new CMonoObject( pObject ); +} + +const char* CMonoClass::GetName() +{ + return mono_class_get_name( this->m_pMonoClass ); +} + +const char* CMonoClass::GetNameSpace() +{ + return mono_class_get_namespace( this->m_pMonoClass ); +} + +MonoMethod* CMonoClass::GetMethod( const char* szMethodName, int iParamCount ) +{ + return mono_class_get_method_from_name( this->m_pMonoClass, szMethodName, iParamCount ); +} + +MonoMethod* CMonoClass::GetMethod( const char* szMethodName ) +{ + MonoMethodDesc* pMonoMethodDesc = mono_method_desc_new( szMethodName, false ); + + if( pMonoMethodDesc ) + { + MonoMethod* pMethod = mono_method_desc_search_in_class( pMonoMethodDesc, this->m_pMonoClass ); + + mono_method_desc_free( pMonoMethodDesc ); + + return pMethod; + } + + return NULL; +} \ No newline at end of file diff --git a/mta-mono/src/CMonoClass.h b/mta-mono/src/CMonoClass.h new file mode 100644 index 0000000..5c269c0 --- /dev/null +++ b/mta-mono/src/CMonoClass.h @@ -0,0 +1,37 @@ +class CMonoClass; + +#ifndef _C_MONO_CLASS +#define _C_MONO_CLASS + +#include "Common.h" +#include "CMonoObject.h" + +extern ILuaModuleManager10 *g_pModuleManager; + +class CMonoClass +{ +private: + MonoClass* m_pMonoClass; + +public: + CMonoClass( MonoClass* pMonoClass ); + ~CMonoClass(); + + CMonoObject* New( MonoDomain* pMonoDomain ); + CMonoObject* New( MonoDomain* pMonoDomain, void** args, int argc ); + + const char* GetName(); + const char* GetNameSpace(); + + MonoMethod* GetMethod( const char* szMethodName, int iParamCount ); + MonoMethod* GetMethod( const char* szMethodName ); + + MonoClass* GetMonoClass() { return this->m_pMonoClass; }; + + MonoClass* GetClass() + { + return this->m_pMonoClass; + } +}; + +#endif \ No newline at end of file diff --git a/mta-mono/src/CMonoFunctions.cpp b/mta-mono/src/CMonoFunctions.cpp index beb6792..c372c22 100644 --- a/mta-mono/src/CMonoFunctions.cpp +++ b/mta-mono/src/CMonoFunctions.cpp @@ -23,12 +23,13 @@ extern CResourceManager *g_pResourceManager; void CMonoFunctions::AddInternals( void ) { - mono_add_internal_call( "MultiTheftAuto.Debug::Log", CMonoFunctions::Debug::Log ); - mono_add_internal_call( "MultiTheftAuto.Debug::Info", CMonoFunctions::Debug::Info ); - mono_add_internal_call( "MultiTheftAuto.Debug::Error", CMonoFunctions::Debug::Error ); - mono_add_internal_call( "MultiTheftAuto.Native.Config::Get", CMonoFunctions::Config::Get ); - mono_add_internal_call( "MultiTheftAuto.Native.Config::Set", CMonoFunctions::Config::Set ); - mono_add_internal_call( "MultiTheftAuto.Native.Vehicle::Create", CMonoFunctions::Vehicle::Create ); + mono_add_internal_call( "MultiTheftAuto.Debug::Log", CMonoFunctions::Debug::Log ); + mono_add_internal_call( "MultiTheftAuto.Debug::Info", CMonoFunctions::Debug::Info ); + mono_add_internal_call( "MultiTheftAuto.Debug::Error", CMonoFunctions::Debug::Error ); + mono_add_internal_call( "MultiTheftAuto.Native.Config::Get", CMonoFunctions::Config::Get ); + mono_add_internal_call( "MultiTheftAuto.Native.Config::Set", CMonoFunctions::Config::Set ); + mono_add_internal_call( "MultiTheftAuto.Native.Element::GetPosition", CMonoFunctions::Element::GetPosition ); + mono_add_internal_call( "MultiTheftAuto.Native.Vehicle::Create", CMonoFunctions::Vehicle::Create ); } void CMonoFunctions::Debug::Log( MonoString *string ) @@ -83,7 +84,45 @@ bool CMonoFunctions::Config::Set( MonoString *msKey, MonoString *msValue ) return false; } -MonoObject* CMonoFunctions::Vehicle::Create( int model, MonoObject* position, MonoObject* rotation, string &numberplate, bool direction, int variant1, int variant2 ) +MonoObject* CMonoFunctions::Element::GetPosition( unsigned int element ) +{ + if( RESOURCE ) + { + float + fX = 0.0f, + fY = 0.0f, + fZ = 0.0f; + + if( CLuaFunctionDefinitions::GetPosition( RESOURCE->GetLua(), (void*)element, fX, fY, fZ ) ) + { + CMonoClass* pClass = RESOURCE->GetClassFromName( "MultiTheftAuto", "Vector3" ); + + if( pClass ) + { + void *args[] = { &fX, &fY, &fZ }; + + CMonoObject* pObject = pClass->New( mono_domain_get(), args, 3 ); + + if( pObject ) + { + return pObject->GetObject(); + } + else + { + g_pModuleManager->ErrorPrintf( "%s:%d: failed to create instance of 'MultiTheftAuto::Vector3'\n", __FILE__, __LINE__ ); + } + } + else + { + g_pModuleManager->ErrorPrintf( "%s:%d: class 'MultiTheftAuto::Vector3' not found\n", __FILE__, __LINE__ ); + } + } + } + + return NULL; +} + +unsigned int CMonoFunctions::Vehicle::Create( int model, MonoObject* position, MonoObject* rotation, MonoString* numberplate, bool direction, int variant1, int variant2 ) { if( RESOURCE ) { @@ -99,11 +138,19 @@ MonoObject* CMonoFunctions::Vehicle::Create( int model, MonoObject* position, Mo float fRY = pRotation.GetPropertyValue( "Y" ); float fRZ = pRotation.GetPropertyValue( "Z" ); - void* pVehicle = CLuaFunctionDefinitions::CreateVehicle( RESOURCE->GetLua(), model, fX, fY, fZ, fRX, fRY, fRZ, numberplate, direction, variant1, variant2 ); + string sNumberplate = ""; + + if( numberplate && mono_string_length( numberplate ) > 0 ) + { + sNumberplate = mono_string_to_utf8( numberplate ); + } + + void* pVehicle = CLuaFunctionDefinitions::CreateVehicle( RESOURCE->GetLua(), model, fX, fY, fZ, fRX, fRY, fRZ, sNumberplate, direction, variant1, variant2 ); if( pVehicle ) { - + return (unsigned int)pVehicle; + //return 0x1337; } } diff --git a/mta-mono/src/CMonoFunctions.h b/mta-mono/src/CMonoFunctions.h index ea8de5d..a40d07a 100644 --- a/mta-mono/src/CMonoFunctions.h +++ b/mta-mono/src/CMonoFunctions.h @@ -38,10 +38,16 @@ public: static bool Set ( MonoString *msKey, MonoString *msValue ); }; + class Element + { + public: + static MonoObject* GetPosition ( unsigned int element ); + }; + class Vehicle { public: - static MonoObject* Create ( int model, MonoObject* position, MonoObject* rotation, string &numberplate, bool direction = false, int variant1 = 255, int variant2 = 255 ); + static unsigned int Create ( int model, MonoObject* position, MonoObject* rotation, MonoString* numberplate, bool direction = false, int variant1 = 255, int variant2 = 255 ); }; }; diff --git a/mta-mono/src/CMonoObject.cpp b/mta-mono/src/CMonoObject.cpp index 853727b..38ba559 100644 --- a/mta-mono/src/CMonoObject.cpp +++ b/mta-mono/src/CMonoObject.cpp @@ -1,6 +1,5 @@ #include "CMonoObject.h" - CMonoObject::CMonoObject( MonoObject* pMonoObject ) { this->m_pMonoObject = pMonoObject; @@ -11,9 +10,16 @@ CMonoObject::~CMonoObject() { } -MonoClass* CMonoObject::GetClass() +CMonoClass* CMonoObject::GetClass() { - return mono_object_get_class( this->m_pMonoObject ); + MonoClass* pMonoClass = mono_object_get_class( this->m_pMonoObject ); + + if( pMonoClass ) + { + return new CMonoClass( pMonoClass ); + } + + return NULL; } MonoObject* CMonoObject::GetPropertyValue( const char* szPropertyName ) @@ -28,4 +34,37 @@ MonoObject* CMonoObject::GetPropertyValue( const char* szPropertyName ) } return mono_property_get_value( pMonoProperty, this->m_pMonoObject, NULL, NULL ); +} + +bool CMonoObject::SetPropertyValue( const char* szPropertyName, int iValue ) +{ + return this->SetPropertyValue( szPropertyName, (void*)&iValue ); +} + +bool CMonoObject::SetPropertyValue( const char* szPropertyName, float fValue ) +{ + return this->SetPropertyValue( szPropertyName, (void*)&fValue ); +} + +bool CMonoObject::SetPropertyValue( const char* szPropertyName, char* szValue ) +{ + return this->SetPropertyValue( szPropertyName, mono_string_new( mono_domain_get(), szValue ) ); +} + +bool CMonoObject::SetPropertyValue( const char* szPropertyName, gpointer gValue ) +{ + MonoClass* pMonoClass = mono_object_get_class( this->m_pMonoObject ); + + MonoProperty* pMonoProperty = mono_class_get_property_from_name( pMonoClass, szPropertyName ); + + if( !pMonoProperty ) + { + return false; + } + + gpointer args[ 1 ] = { gValue }; + + mono_property_set_value( pMonoProperty, this->m_pMonoObject, args, NULL ); + + return true; } \ No newline at end of file diff --git a/mta-mono/src/CMonoObject.h b/mta-mono/src/CMonoObject.h index 02f9af0..92b5a01 100644 --- a/mta-mono/src/CMonoObject.h +++ b/mta-mono/src/CMonoObject.h @@ -4,6 +4,7 @@ class CMonoObject; #define _C_MONO_OBJECT #include "Common.h" +#include "CMonoClass.h" class CMonoObject { @@ -14,14 +15,34 @@ public: CMonoObject( MonoObject* pMonoObject ); ~CMonoObject(); - MonoClass* GetClass(); + CMonoClass* GetClass(); + + bool SetPropertyValue( const char* szPropertyName, int iValue ); + bool SetPropertyValue( const char* szPropertyName, float fValue ); + bool SetPropertyValue( const char* szPropertyName, char* szValue ); + bool SetPropertyValue( const char* szPropertyName, gpointer gValue ); MonoObject* GetPropertyValue( const char* szPropertyName ); - + template T GetPropertyValue( char* szPropertyName ) { return *( reinterpret_cast( mono_object_unbox( this->GetPropertyValue( szPropertyName ) ) ) ); } + + void* GetValue() + { + return mono_object_unbox( this->m_pMonoObject ); + } + + template T GetValue() + { + return *( reinterpret_cast( mono_object_unbox( this->m_pMonoObject ) ) ); + } + + MonoObject *GetObject() + { + return this->m_pMonoObject; + } }; #endif \ No newline at end of file diff --git a/mta-mono/src/CResource.cpp b/mta-mono/src/CResource.cpp index 47f6a10..fe8bf00 100644 --- a/mta-mono/src/CResource.cpp +++ b/mta-mono/src/CResource.cpp @@ -24,9 +24,11 @@ CResource::CResource( lua_State *pLuaVM, string sName ) this->m_sName = sName; this->m_pMonoAssembly = NULL; + this->m_pMonoAssemblyLib = NULL; this->m_pMonoGCHandle = NULL; this->m_pMonoDomain = NULL; this->m_pMonoImage = NULL; + this->m_pMonoImageLib = NULL; this->m_pMonoClass = NULL; } @@ -49,7 +51,8 @@ bool CResource::Init( void ) { if( this->m_pLuaVM ) { - string sPath ( "mods/deathmatch/mono/resources/" + this->m_sName + ".dll" ); + string sDirectory ( "mods/deathmatch/mono/resources/" ); + string sPath ( sDirectory + this->m_sName + ".dll" ); string sNamespace ( this->m_sName ); string sClass ( "Resource" ); @@ -64,6 +67,13 @@ bool CResource::Init( void ) mono_domain_set( this->m_pMonoDomain, false ); + this->m_pMonoAssemblyLib = mono_domain_assembly_open( this->m_pMonoDomain, ( sDirectory + "MultiTheftAuto.dll" ).c_str() ); + + if( this->m_pMonoAssemblyLib ) + { + this->m_pMonoImageLib = mono_assembly_get_image( this->m_pMonoAssemblyLib ); + } + this->m_pMonoAssembly = mono_domain_assembly_open( this->m_pMonoDomain, sPath.c_str() ); if( !this->m_pMonoAssembly ) @@ -88,16 +98,6 @@ bool CResource::Init( void ) return false; } -string CResource::GetName( void ) -{ - return this->m_sName; -} - -lua_State *CResource::GetLua( void ) -{ - return this->m_pLuaVM; -} - void CResource::OnStopping( void ) { } @@ -116,4 +116,21 @@ bool CResource::RegisterFunction( const char *szFunctionName, lua_CFunction Func } return true; +} + +CMonoClass* CResource::GetClassFromName( const char* szNamespace, const char* szName ) +{ + MonoClass* pMonoClass = mono_class_from_name( this->m_pMonoImage, szNamespace, szName ); + + if( !pMonoClass ) + { + pMonoClass = mono_class_from_name( this->m_pMonoImageLib, szNamespace, szName ); + } + + if( pMonoClass ) + { + return new CMonoClass( pMonoClass ); + } + + return NULL; } \ No newline at end of file diff --git a/mta-mono/src/CResource.h b/mta-mono/src/CResource.h index 36fb770..5806bc5 100644 --- a/mta-mono/src/CResource.h +++ b/mta-mono/src/CResource.h @@ -16,6 +16,7 @@ class CResource; #define __CRESOURCE_H #include "Common.h" +#include "CMonoClass.h" class CResource { @@ -23,7 +24,9 @@ private: string m_sName; MonoAssembly *m_pMonoAssembly; + MonoAssembly *m_pMonoAssemblyLib; MonoImage *m_pMonoImage; + MonoImage *m_pMonoImageLib; MonoClass *m_pMonoClass; uint32_t m_pMonoGCHandle; @@ -39,10 +42,10 @@ public: void DoPulse ( void ); bool RegisterFunction ( const char *szFunctionName, lua_CFunction Func ); - string GetName ( void ); - lua_State *GetLua ( void ); + CMonoClass* GetClassFromName( const char* szNamespace, const char* szName ); - const void Test( void ); + string GetName ( void ) { return this->m_sName; } + lua_State *GetLua ( void ) { return this->m_pLuaVM; } }; #endif \ No newline at end of file diff --git a/mta-mono/src/Common.h b/mta-mono/src/Common.h index c7df924..6245599 100644 --- a/mta-mono/src/Common.h +++ b/mta-mono/src/Common.h @@ -35,6 +35,8 @@ extern "C" #include #include +#include + #include #include #include diff --git a/mta-mono/src/lua/CLuaFunctionDefinitions.cpp b/mta-mono/src/lua/CLuaFunctionDefinitions.cpp index f195155..e064a11 100644 --- a/mta-mono/src/lua/CLuaFunctionDefinitions.cpp +++ b/mta-mono/src/lua/CLuaFunctionDefinitions.cpp @@ -162,7 +162,25 @@ bool CLuaFunctionDefinitions::SetRuleValue( lua_State *pLuaVM, const string &sKe return false; } -void* CLuaFunctionDefinitions::CreateVehicle( lua_State* pLuaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string &numberplate, bool direction, int variant1, int variant2 ) +bool CLuaFunctionDefinitions::GetPosition( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ ) +{ + CLuaArguments pLuaArguments; + + pLuaArguments.PushUserData( pUserData ); + + if( pLuaArguments.Call( pLuaVM, "getElementPosition", 3 ) ) + { + fX = static_cast< float >( ( new CLuaArgument( pLuaVM, -3 ) )->GetNumber() ); + fY = static_cast< float >( ( new CLuaArgument( pLuaVM, -2 ) )->GetNumber() ); + fZ = static_cast< float >( ( new CLuaArgument( pLuaVM, -1 ) )->GetNumber() ); + + return true; + } + + return false; +} + +void* CLuaFunctionDefinitions::CreateVehicle( lua_State* pLuaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string numberplate, bool direction, int variant1, int variant2 ) { CLuaArguments pLuaArguments; @@ -173,10 +191,14 @@ void* CLuaFunctionDefinitions::CreateVehicle( lua_State* pLuaVM, int model, floa pLuaArguments.PushNumber( fRX ); pLuaArguments.PushNumber( fRY ); pLuaArguments.PushNumber( fRZ ); - pLuaArguments.PushString( numberplate.c_str() ); - pLuaArguments.PushBoolean( direction ); - pLuaArguments.PushNumber( variant1 ); - pLuaArguments.PushNumber( variant2 ); + + if( numberplate.length() > 0 ) + { + pLuaArguments.PushString( numberplate.c_str() ); + pLuaArguments.PushBoolean( direction ); + pLuaArguments.PushNumber( variant1 ); + pLuaArguments.PushNumber( variant2 ); + } if( pLuaArguments.Call( pLuaVM, "createVehicle", 1 ) ) { diff --git a/mta-mono/src/lua/CLuaFunctionDefinitions.h b/mta-mono/src/lua/CLuaFunctionDefinitions.h index a31a906..47e74d7 100644 --- a/mta-mono/src/lua/CLuaFunctionDefinitions.h +++ b/mta-mono/src/lua/CLuaFunctionDefinitions.h @@ -31,7 +31,9 @@ public: static bool SetMapName ( lua_State* pLuaVM, const string &sName ); static bool SetRuleValue ( lua_State* pLuaVM, const string &sKey, const string &sValue ); - static void* CreateVehicle ( lua_State* luaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string &numberplate, bool direction = false, int variant1 = 255, int variant2 = 255 ); + static bool GetPosition ( lua_State* pLuaVM, void* pUserData, float &fX, float &fY, float &fZ ); + + static void* CreateVehicle ( lua_State* luaVM, int model, float fX, float fY, float fZ, float fRX, float fRY, float fRZ, string numberplate, bool direction = false, int variant1 = 255, int variant2 = 255 ); /* static int CallRemote ( lua_State* luaVM ); static int FetchRemote ( lua_State* luaVM ); diff --git a/mta-mono/vendor/eglib/eglib-config.h.in b/mta-mono/vendor/eglib/eglib-config.h.in new file mode 100644 index 0000000..ba0f93f --- /dev/null +++ b/mta-mono/vendor/eglib/eglib-config.h.in @@ -0,0 +1,46 @@ +#ifndef __EGLIB_CONFIG_H +#define __EGLIB_CONFIG_H + +/* + * System-dependent settings + */ +#define G_GNUC_PRETTY_FUNCTION @GNUC_PRETTY@ +#define G_GNUC_UNUSED @GNUC_UNUSED@ +#define G_BYTE_ORDER @ORDER@ +#define G_GNUC_NORETURN @GNUC_NORETURN@ +#define G_SEARCHPATH_SEPARATOR_S "@SEARCHSEP@" +#define G_SEARCHPATH_SEPARATOR '@SEARCHSEP@' +#define G_DIR_SEPARATOR '@PATHSEP@' +#define G_DIR_SEPARATOR_S "@PATHSEP@" +#define G_BREAKPOINT() @BREAKPOINT@ +#define G_OS_@OS@ +#define GPOINTER_TO_INT(ptr) @GPOINTER_TO_INT@ +#define GPOINTER_TO_UINT(ptr) @GPOINTER_TO_UINT@ +#define GINT_TO_POINTER(v) @GINT_TO_POINTER@ +#define GUINT_TO_POINTER(v) @GUINT_TO_POINTER@ + +#if @HAVE_ALLOCA_H@ == 1 +#define G_HAVE_ALLOCA_H +#endif + +typedef unsigned @GSIZE@ gsize; +typedef signed @GSIZE@ gssize; + +#define G_GSIZE_FORMAT @GSIZE_FORMAT@ +#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@ +#define G_GINT64_FORMAT @G_GINT64_FORMAT@ +#define G_GUINT32_FORMAT @G_GUINT32_FORMAT@ +#define G_GINT32_FORMAT @G_GINT32_FORMAT@ + +#if @G_HAVE_ISO_VARARGS@ == 1 +#define G_HAVE_ISO_VARARGS +#endif + +#if defined (__native_client__) +#undef G_BREAKPOINT +#define G_BREAKPOINT() +#endif + +typedef @PIDTYPE@ GPid; + +#endif diff --git a/mta-mono/vendor/eglib/eglib-config.hw b/mta-mono/vendor/eglib/eglib-config.hw new file mode 100644 index 0000000..192d393 --- /dev/null +++ b/mta-mono/vendor/eglib/eglib-config.hw @@ -0,0 +1,76 @@ +#ifndef __EGLIB_CONFIG_H +#define __EGLIB_CONFIG_H + +/* + * System-dependent settings + */ +#define G_OS_WIN32 1 + +#ifdef _MSC_VER + +#include + +#define G_GNUC_PRETTY_FUNCTION __FUNCTION__ +#define G_GNUC_UNUSED +#define G_BYTE_ORDER 1234 +#define G_GNUC_NORETURN +#define G_BREAKPOINT() __debugbreak() +#define MAXPATHLEN 242 + +typedef uintptr_t gsize; +typedef intptr_t gssize; +typedef int pid_t; + +#define G_DIR_SEPARATOR '\\' +#define G_DIR_SEPARATOR_S "\\" +#define G_SEARCHPATH_SEPARATOR_S ";" +#define G_SEARCHPATH_SEPARATOR ';' +#define G_GSIZE_FORMAT "d" +#define G_GUINT64_FORMAT "d" +#define G_GINT64_FORMAT "d" +#define GPOINTER_TO_INT(ptr) ((gint)(intptr_t) (ptr)) +#define GPOINTER_TO_UINT(ptr) ((guint)(intptr_t) (ptr)) +#define GINT_TO_POINTER(v) ((gpointer)(intptr_t) (v)) +#define GUINT_TO_POINTER(v) ((gpointer)(intptr_t) (v)) + +/* VS 2010 and later have stdint.h */ +#if defined(_MSC_VER) && _MSC_VER < 1600 +#define INT32_MAX 2147483647 +#define INT32_MIN (~ INT32_MAX) +#define INT64_MAX 9223372036854775807i64 +#define INT64_MIN (~INT64_MAX) +#define UINT32_MAX 0xffffffffU +#define UINT64_MAX 0xffffffffffffffffULL +#endif + +#define STDOUT_FILENO (int)(intptr_t)stdout +#define STDERR_FILENO (int)(intptr_t)stderr + + +/* FIXME: what should this be ?*/ +#define X_OK 4 /* This is really read */ +#define WNOHANG 1 +#define F_SETFD 1 +#define FD_CLOEXEC 1 + +#undef inline +#define inline __inline + +#define strtok_r strtok_s + +#undef G_HAVE_UNISTD_H +#undef G_HAVE_SYS_TIME_H +#undef G_HAVE_SYS_WAIT_H +#undef G_HAVE_PWD_H +#undef G_HAVE_STRNDUP +#define G_HAVE_GETOPT_H 1 + +/* disable the following warnings + * C4100: The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored. + * C4127: conditional expression is constant +*/ +#pragma warning(disable:4100 4127) +#endif + +typedef void * GPid; +#endif diff --git a/mta-mono/vendor/eglib/eglib-remap.h b/mta-mono/vendor/eglib/eglib-remap.h new file mode 100644 index 0000000..5c918d2 --- /dev/null +++ b/mta-mono/vendor/eglib/eglib-remap.h @@ -0,0 +1,281 @@ +#define g_array_append monoeg_g_array_append +#define g_array_append_vals monoeg_g_array_append_vals +#define g_array_free monoeg_g_array_free +#define g_array_insert_vals monoeg_g_array_insert_vals +#define g_array_new monoeg_g_array_new +#define g_array_remove_index monoeg_g_array_remove_index +#define g_array_remove_index_fast monoeg_g_array_remove_index_fast +#define g_array_set_size monoeg_g_array_set_size +#define g_array_sized_new monoeg_g_array_sized_new +#define g_ascii_strdown monoeg_g_ascii_strdown +#define g_ascii_strncasecmp monoeg_g_ascii_strncasecmp +#define g_ascii_tolower monoeg_g_ascii_tolower +#define g_ascii_xdigit_value monoeg_g_ascii_xdigit_value +#define g_build_path monoeg_g_build_path +#define g_byte_array_append monoeg_g_byte_array_append +#define g_byte_array_free monoeg_g_byte_array_free +#define g_byte_array_new monoeg_g_byte_array_new +#define g_clear_error monoeg_g_clear_error +#define g_convert monoeg_g_convert +#define g_convert_error_quark monoeg_g_convert_error_quark +#define g_dir_close monoeg_g_dir_close +#define g_dir_open monoeg_g_dir_open +#define g_dir_read_name monoeg_g_dir_read_name +#define g_dir_rewind monoeg_g_dir_rewind +#define g_mkdir_with_parents monoeg_g_mkdir_with_parents +#define g_direct_equal monoeg_g_direct_equal +#define g_direct_hash monoeg_g_direct_hash +#define g_error_free monoeg_g_error_free +#define g_error_new monoeg_g_error_new +#define g_error_vnew monoeg_g_error_vnew +#define g_file_error_quark monoeg_g_file_error_quark +#define g_file_error_from_errno monoeg_g_file_error_from_errno +#define g_file_get_contents monoeg_g_file_get_contents +#define g_file_set_contents monoeg_g_file_set_contents +#define g_file_open_tmp monoeg_g_file_open_tmp +#define g_file_test monoeg_g_file_test +#define g_filename_from_uri monoeg_g_filename_from_uri +#define g_filename_from_utf8 monoeg_g_filename_from_utf8 +#define g_filename_to_uri monoeg_g_filename_to_uri +#define g_find_program_in_path monoeg_g_find_program_in_path +#define g_fprintf monoeg_g_fprintf +#define g_free monoeg_g_free +#define g_get_charset monoeg_g_get_charset +#define g_get_current_dir monoeg_g_get_current_dir +#define g_get_current_time monoeg_g_get_current_time +#define g_get_home_dir monoeg_g_get_home_dir +#define g_get_prgname monoeg_g_get_prgname +#define g_get_tmp_dir monoeg_g_get_tmp_dir +#define g_get_user_name monoeg_g_get_user_name +#define g_getenv monoeg_g_getenv +#define g_hash_table_destroy monoeg_g_hash_table_destroy +#define g_hash_table_find monoeg_g_hash_table_find +#define g_hash_table_foreach monoeg_g_hash_table_foreach +#define g_hash_table_foreach_remove monoeg_g_hash_table_foreach_remove +#define g_hash_table_foreach_steal monoeg_g_hash_table_foreach_steal +#define g_hash_table_get_keys monoeg_g_hash_table_get_keys +#define g_hash_table_get_values monoeg_g_hash_table_get_values +#define g_hash_table_insert_replace monoeg_g_hash_table_insert_replace +#define g_hash_table_lookup monoeg_g_hash_table_lookup +#define g_hash_table_lookup_extended monoeg_g_hash_table_lookup_extended +#define g_hash_table_new monoeg_g_hash_table_new +#define g_hash_table_new_full monoeg_g_hash_table_new_full +#define g_hash_table_remove monoeg_g_hash_table_remove +#define g_hash_table_steal monoeg_g_hash_table_steal +#define g_hash_table_size monoeg_g_hash_table_size +#define g_hash_table_print_stats monoeg_g_hash_table_print_stats +#define g_hash_table_remove_all monoeg_g_hash_table_remove_all +#define g_hash_table_iter_init monoeg_g_hash_table_iter_init +#define g_hash_table_iter_next monoeg_g_hash_table_iter_next +#define g_iconv monoeg_g_iconv +#define g_iconv_close monoeg_g_iconv_close +#define g_iconv_open monoeg_g_iconv_open +#define g_int_equal monoeg_g_int_equal +#define g_int_hash monoeg_g_int_hash +#define g_list_alloc monoeg_g_list_alloc +#define g_list_append monoeg_g_list_append +#define g_list_concat monoeg_g_list_concat +#define g_list_copy monoeg_g_list_copy +#define g_list_delete_link monoeg_g_list_delete_link +#define g_list_find monoeg_g_list_find +#define g_list_find_custom monoeg_g_list_find_custom +#define g_list_first monoeg_g_list_first +#define g_list_foreach monoeg_g_list_foreach +#define g_list_free monoeg_g_list_free +#define g_list_free_1 monoeg_g_list_free_1 +#define g_list_index monoeg_g_list_index +#define g_list_insert_before monoeg_g_list_insert_before +#define g_list_insert_sorted monoeg_g_list_insert_sorted +#define g_list_last monoeg_g_list_last +#define g_list_length monoeg_g_list_length +#define g_list_nth monoeg_g_list_nth +#define g_list_nth_data monoeg_g_list_nth_data +#define g_list_prepend monoeg_g_list_prepend +#define g_list_remove monoeg_g_list_remove +#define g_list_remove_all monoeg_g_list_remove_all +#define g_list_remove_link monoeg_g_list_remove_link +#define g_list_reverse monoeg_g_list_reverse +#define g_list_sort monoeg_g_list_sort +#define g_locale_from_utf8 monoeg_g_locale_from_utf8 +#define g_locale_to_utf8 monoeg_g_locale_to_utf8 +#define g_log monoeg_g_log +#define g_log_set_always_fatal monoeg_g_log_set_always_fatal +#define g_log_set_fatal_mask monoeg_g_log_set_fatal_mask +#define g_logv monoeg_g_logv +#define g_markup_parse_context_end_parse monoeg_g_markup_parse_context_end_parse +#define g_markup_parse_context_free monoeg_g_markup_parse_context_free +#define g_markup_parse_context_new monoeg_g_markup_parse_context_new +#define g_markup_parse_context_parse monoeg_g_markup_parse_context_parse +#define g_memdup monoeg_g_memdup +#define g_module_build_path monoeg_g_module_build_path +#define g_module_close monoeg_g_module_close +#define g_module_error monoeg_g_module_error +#define g_module_open monoeg_g_module_open +#define g_module_symbol monoeg_g_module_symbol +#define g_path_get_basename monoeg_g_path_get_basename +#define g_path_get_dirname monoeg_g_path_get_dirname +#define g_path_is_absolute monoeg_g_path_is_absolute +#define g_pattern_match_string monoeg_g_pattern_match_string +#define g_pattern_spec_free monoeg_g_pattern_spec_free +#define g_pattern_spec_new monoeg_g_pattern_spec_new +#define g_print monoeg_g_print +#define g_printf monoeg_g_printf +#define g_printerr monoeg_g_printerr +#define g_propagate_error monoeg_g_propagate_error +#define g_ptr_array_add monoeg_g_ptr_array_add +#define g_ptr_array_foreach monoeg_g_ptr_array_foreach +#define g_ptr_array_free monoeg_g_ptr_array_free +#define g_ptr_array_new monoeg_g_ptr_array_new +#define g_ptr_array_remove monoeg_g_ptr_array_remove +#define g_ptr_array_remove_fast monoeg_g_ptr_array_remove_fast +#define g_ptr_array_remove_index monoeg_g_ptr_array_remove_index +#define g_ptr_array_remove_index_fast monoeg_g_ptr_array_remove_index_fast +#define g_ptr_array_set_size monoeg_g_ptr_array_set_size +#define g_ptr_array_sized_new monoeg_g_ptr_array_sized_new +#define g_ptr_array_sort monoeg_g_ptr_array_sort +#define g_ptr_array_sort_with_data monoeg_g_ptr_array_sort_with_data +#define g_qsort_with_data monoeg_g_qsort_with_data +#define g_queue_free monoeg_g_queue_free +#define g_queue_is_empty monoeg_g_queue_is_empty +#define g_queue_foreach monoeg_g_queue_foreach +#define g_queue_new monoeg_g_queue_new +#define g_queue_pop_head monoeg_g_queue_pop_head +#define g_queue_push_head monoeg_g_queue_push_head +#define g_queue_push_tail monoeg_g_queue_push_tail +#define g_set_error monoeg_g_set_error +#define g_set_prgname monoeg_g_set_prgname +#define g_setenv monoeg_g_setenv +#define g_shell_parse_argv monoeg_g_shell_parse_argv +#define g_shell_quote monoeg_g_shell_quote +#define g_shell_unquote monoeg_g_shell_unquote +#define g_slist_alloc monoeg_g_slist_alloc +#define g_slist_append monoeg_g_slist_append +#define g_slist_concat monoeg_g_slist_concat +#define g_slist_copy monoeg_g_slist_copy +#define g_slist_delete_link monoeg_g_slist_delete_link +#define g_slist_find monoeg_g_slist_find +#define g_slist_find_custom monoeg_g_slist_find_custom +#define g_slist_foreach monoeg_g_slist_foreach +#define g_slist_free monoeg_g_slist_free +#define g_slist_free_1 monoeg_g_slist_free_1 +#define g_slist_index monoeg_g_slist_index +#define g_slist_insert_before monoeg_g_slist_insert_before +#define g_slist_insert_sorted monoeg_g_slist_insert_sorted +#define g_slist_last monoeg_g_slist_last +#define g_slist_length monoeg_g_slist_length +#define g_slist_nth monoeg_g_slist_nth +#define g_slist_nth_data monoeg_g_slist_nth_data +#define g_slist_prepend monoeg_g_slist_prepend +#define g_slist_remove monoeg_g_slist_remove +#define g_slist_remove_all monoeg_g_slist_remove_all +#define g_slist_remove_link monoeg_g_slist_remove_link +#define g_slist_reverse monoeg_g_slist_reverse +#define g_slist_sort monoeg_g_slist_sort +#define g_snprintf monoeg_g_snprintf +#define g_spaced_primes_closest monoeg_g_spaced_primes_closest +#define g_spawn_async_with_pipes monoeg_g_spawn_async_with_pipes +#define g_spawn_command_line_sync monoeg_g_spawn_command_line_sync +#define g_sprintf monoeg_g_sprintf +#define g_stpcpy monoeg_g_stpcpy +#define g_str_equal monoeg_g_str_equal +#define g_str_has_prefix monoeg_g_str_has_prefix +#define g_str_has_suffix monoeg_g_str_has_suffix +#define g_str_hash monoeg_g_str_hash +#define g_strchomp monoeg_g_strchomp +#define g_strchug monoeg_g_strchug +#define g_strconcat monoeg_g_strconcat +#define g_strdelimit monoeg_g_strdelimit +#define g_strdown monoeg_g_strdown +#define g_strdup_printf monoeg_g_strdup_printf +#define g_strdup_vprintf monoeg_g_strdup_vprintf +#define g_strerror monoeg_g_strerror +#define g_strescape monoeg_g_strescape +#define g_strfreev monoeg_g_strfreev +#define g_strdupv monoeg_g_strdupv +#define g_string_append monoeg_g_string_append +#define g_string_append_c monoeg_g_string_append_c +#define g_string_append_len monoeg_g_string_append_len +#define g_string_append_unichar monoeg_g_string_append_unichar +#define g_string_append_printf monoeg_g_string_append_printf +#define g_string_append_vprintf monoeg_g_string_append_vprintf +#define g_string_erase monoeg_g_string_erase +#define g_string_free monoeg_g_string_free +#define g_string_insert monoeg_g_string_insert +#define g_string_new monoeg_g_string_new +#define g_string_new_len monoeg_g_string_new_len +#define g_string_prepend monoeg_g_string_prepend +#define g_string_printf monoeg_g_string_printf +#define g_string_set_size monoeg_g_string_set_size +#define g_string_sized_new monoeg_g_string_sized_new +#define g_string_truncate monoeg_g_string_truncate +#define g_strjoin monoeg_g_strjoin +#define g_strjoinv monoeg_g_strjoinv +#define g_strlcpy monoeg_g_strlcpy +#define g_strndup monoeg_g_strndup +#define g_strnfill monoeg_g_strnfill +#define g_strreverse monoeg_g_strreverse +#define g_strsplit monoeg_g_strsplit +#define g_strsplit_set monoeg_g_strsplit_set +#define g_strv_length monoeg_g_strv_length +#define g_timer_destroy monoeg_g_timer_destroy +#define g_timer_elapsed monoeg_g_timer_elapsed +#define g_timer_new monoeg_g_timer_new +#define g_timer_start monoeg_g_timer_start +#define g_timer_stop monoeg_g_timer_stop +#define g_trailingBytesForUTF8 monoeg_g_trailingBytesForUTF8 +#define g_ucs4_to_utf8 monoeg_g_ucs4_to_utf8 +#define g_ucs4_to_utf16 monoeg_g_ucs4_to_utf16 +#define g_unichar_case monoeg_g_unichar_case +#define g_unichar_isxdigit monoeg_g_unichar_isxdigit +#define g_unichar_tolower monoeg_g_unichar_tolower +#define g_unichar_totitle monoeg_g_unichar_totitle +#define g_unichar_toupper monoeg_g_unichar_toupper +#define g_unichar_type monoeg_g_unichar_type +#define g_unichar_xdigit_value monoeg_g_unichar_xdigit_value +#define g_unsetenv monoeg_g_unsetenv +#define g_usleep monoeg_g_usleep +#define g_utf16_to_ucs4 monoeg_g_utf16_to_ucs4 +#define g_utf16_to_utf8 monoeg_g_utf16_to_utf8 +#define g_utf8_get_char monoeg_g_utf8_get_char +#define g_utf8_offset_to_pointer monoeg_g_utf8_offset_to_pointer +#define g_utf8_pointer_to_offset monoeg_g_utf8_pointer_to_offset +#define g_utf8_strdown monoeg_g_utf8_strdown +#define g_utf8_strlen monoeg_g_utf8_strlen +#define g_utf8_strup monoeg_g_utf8_strup +#define g_utf8_to_ucs4_fast monoeg_g_utf8_to_ucs4_fast +#define g_utf8_to_utf16 monoeg_g_utf8_to_utf16 +#define g_utf8_validate monoeg_g_utf8_validate +#define g_unichar_to_utf8 monoeg_g_unichar_to_utf8 +#define g_unichar_is_space monoeg_g_unichar_is_space +#define g_unicode_break_type monoeg_g_unicode_break_type +#define g_utf8_offset_to_pointer monoeg_g_utf8_offset_to_pointer +#define g_utf8_pointer_to_offset monoeg_g_utf8_pointer_to_offset +#define g_utf8_to_ucs4_fast monoeg_g_utf8_to_ucs4_fast +#define g_win32_getlocale monoeg_g_win32_getlocale +#define g_assertion_message monoeg_assertion_message +#define g_malloc monoeg_malloc +#define g_malloc0 monoeg_malloc0 +#define g_ptr_array_grow monoeg_ptr_array_grow +#define g_realloc monoeg_realloc +#define g_try_malloc monoeg_try_malloc +#define g_try_realloc monoeg_try_realloc +#define g_strdup monoeg_strdup +#define g_ucs4_to_utf16_len monoeg_ucs4_to_utf16_len +#define g_utf16_to_ucs4_len monoeg_utf16_to_ucs4_len + +#define g_ascii_strcasecmp monoeg_ascii_strcasecmp +#define g_ascii_strup monoeg_ascii_strup +#define g_ascii_toupper monoeg_ascii_toupper +#define g_unichar_break_type monoeg_unichar_break_type +#define g_unichar_isspace monoeg_unichar_isspace +#define g_unichar_to_utf16 monoeg_unichar_to_utf16 +#define g_utf8_find_prev_char monoeg_utf8_find_prev_char +#define g_utf8_get_char_validated monoeg_utf8_get_char_validated +#define g_utf8_prev_char monoeg_utf8_prev_char +#define g_utf8_to_ucs4 monoeg_utf8_to_ucs4 + + +#define g_log_default_handler monoeg_log_default_handler +#define g_log_set_default_handler monoeg_log_set_default_handler +#define g_set_print_handler monoeg_set_print_handler +#define g_set_printerr_handler monoeg_set_printerr_handler diff --git a/mta-mono/vendor/eglib/glib.h b/mta-mono/vendor/eglib/glib.h new file mode 100644 index 0000000..533c841 --- /dev/null +++ b/mta-mono/vendor/eglib/glib.h @@ -0,0 +1,1085 @@ +#ifndef __GLIB_H +#define __GLIB_H + +#include +#include +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma include_alias(, ) +#endif + +/* VS 2010 and later have stdint.h */ +#if defined(_MSC_VER) && _MSC_VER < 1600 +#else +#include +#endif + +#include +#ifndef EGLIB_NO_REMAP +#include +#endif + +#ifdef G_HAVE_ALLOCA_H +#include +#endif + +#ifdef WIN32 +/* For alloca */ +#include +#endif + +#ifndef offsetof +# define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name) +#endif + +#define __EGLIB_X11 1 + +#ifdef __cplusplus +#define G_BEGIN_DECLS extern "C" { +#define G_END_DECLS } +#else +#define G_BEGIN_DECLS +#define G_END_DECLS +#endif + +G_BEGIN_DECLS + +/* + * Basic data types + */ +typedef int gint; +typedef unsigned int guint; +typedef short gshort; +typedef unsigned short gushort; +typedef long glong; +typedef unsigned long gulong; +typedef void * gpointer; +typedef const void * gconstpointer; +typedef char gchar; +typedef unsigned char guchar; + +#if !G_TYPES_DEFINED +/* VS 2010 and later have stdint.h */ +#if defined(_MSC_VER) && _MSC_VER < 1600 +typedef __int8 gint8; +typedef unsigned __int8 guint8; +typedef __int16 gint16; +typedef unsigned __int16 guint16; +typedef __int32 gint32; +typedef unsigned __int32 guint32; +typedef __int64 gint64; +typedef unsigned __int64 guint64; +typedef float gfloat; +typedef double gdouble; +typedef int gboolean; +#else +/* Types defined in terms of the stdint.h */ +typedef int8_t gint8; +typedef uint8_t guint8; +typedef int16_t gint16; +typedef uint16_t guint16; +typedef int32_t gint32; +typedef uint32_t guint32; +typedef int64_t gint64; +typedef uint64_t guint64; +typedef float gfloat; +typedef double gdouble; +typedef int32_t gboolean; +#endif +#endif + +typedef guint16 gunichar2; +typedef guint32 gunichar; + +/* + * Macros + */ +#define G_N_ELEMENTS(s) (sizeof(s) / sizeof ((s) [0])) + +#define FALSE 0 +#define TRUE 1 + +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MAXUSHORT USHRT_MAX +#define G_MAXINT INT_MAX +#define G_MININT INT_MIN +#define G_MAXINT32 INT32_MAX +#define G_MAXUINT32 UINT32_MAX +#define G_MININT32 INT32_MIN +#define G_MININT64 INT64_MIN +#define G_MAXINT64 INT64_MAX +#define G_MAXUINT64 UINT64_MAX + +#define G_LITTLE_ENDIAN 1234 +#define G_BIG_ENDIAN 4321 +#define G_STMT_START do +#define G_STMT_END while (0) + +#define G_USEC_PER_SEC 1000000 + +#ifndef ABS +#define ABS(a) ((a) > 0 ? (a) : -(a)) +#endif + +#define G_STRUCT_OFFSET(p_type,field) offsetof(p_type,field) + +#define EGLIB_STRINGIFY(x) #x +#define EGLIB_TOSTRING(x) EGLIB_STRINGIFY(x) +#define G_STRLOC __FILE__ ":" EGLIB_TOSTRING(__LINE__) ":" + +#define G_CONST_RETURN const + +/* + * Allocation + */ +void g_free (void *ptr); +gpointer g_realloc (gpointer obj, gsize size); +gpointer g_malloc (gsize x); +gpointer g_malloc0 (gsize x); +gpointer g_try_malloc (gsize x); +gpointer g_try_realloc (gpointer obj, gsize size); + +#define g_new(type,size) ((type *) g_malloc (sizeof (type) * (size))) +#define g_new0(type,size) ((type *) g_malloc0 (sizeof (type)* (size))) +#define g_newa(type,size) ((type *) alloca (sizeof (type) * (size))) + +#define g_memmove(dest,src,len) memmove (dest, src, len) +#define g_renew(struct_type, mem, n_structs) g_realloc (mem, sizeof (struct_type) * n_structs) +#define g_alloca(size) alloca (size) + +gpointer g_memdup (gconstpointer mem, guint byte_size); +static inline gchar *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; } +gchar **g_strdupv (gchar **str_array); + +typedef struct { + gpointer (*malloc) (gsize n_bytes); + gpointer (*realloc) (gpointer mem, gsize n_bytes); + void (*free) (gpointer mem); + gpointer (*calloc) (gsize n_blocks, gsize n_block_bytes); + gpointer (*try_malloc) (gsize n_bytes); + gpointer (*try_realloc) (gpointer mem, gsize n_bytes); +} GMemVTable; + +#define g_mem_set_vtable(x) + +struct _GMemChunk { + guint alloc_size; +}; + +typedef struct _GMemChunk GMemChunk; +/* + * Misc. + */ +#define g_atexit(func) ((void) atexit (func)) + +const gchar * g_getenv(const gchar *variable); +gboolean g_setenv(const gchar *variable, const gchar *value, gboolean overwrite); +void g_unsetenv(const gchar *variable); + +gchar* g_win32_getlocale(void); + +/* + * Precondition macros + */ +#define g_warn_if_fail(x) G_STMT_START { if (!(x)) { g_warning ("%s:%d: assertion '%s' failed", __FILE__, __LINE__, #x); } } G_STMT_END +#define g_return_if_fail(x) G_STMT_START { if (!(x)) { g_critical ("%s:%d: assertion '%s' failed", __FILE__, __LINE__, #x); return; } } G_STMT_END +#define g_return_val_if_fail(x,e) G_STMT_START { if (!(x)) { g_critical ("%s:%d: assertion '%s' failed", __FILE__, __LINE__, #x); return (e); } } G_STMT_END + +/* + * Errors + */ +typedef struct { + /* In the real glib, this is a GQuark, but we dont use/need that */ + gpointer domain; + gint code; + gchar *message; +} GError; + +void g_clear_error (GError **error); +void g_error_free (GError *error); +GError *g_error_new (gpointer domain, gint code, const char *format, ...); +void g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...); +void g_propagate_error (GError **dest, GError *src); + +/* + * Strings utility + */ +gchar *g_strdup_printf (const gchar *format, ...); +gchar *g_strdup_vprintf (const gchar *format, va_list args); +gchar *g_strndup (const gchar *str, gsize n); +const gchar *g_strerror (gint errnum); +gchar *g_strndup (const gchar *str, gsize n); +void g_strfreev (gchar **str_array); +gchar *g_strconcat (const gchar *first, ...); +gchar **g_strsplit (const gchar *string, const gchar *delimiter, gint max_tokens); +gchar **g_strsplit_set (const gchar *string, const gchar *delimiter, gint max_tokens); +gchar *g_strreverse (gchar *str); +gboolean g_str_has_prefix (const gchar *str, const gchar *prefix); +gboolean g_str_has_suffix (const gchar *str, const gchar *suffix); +guint g_strv_length (gchar **str_array); +gchar *g_strjoin (const gchar *separator, ...); +gchar *g_strjoinv (const gchar *separator, gchar **str_array); +gchar *g_strchug (gchar *str); +gchar *g_strchomp (gchar *str); +void g_strdown (gchar *string); +gchar *g_strnfill (gsize length, gchar fill_char); + +gchar *g_strdelimit (gchar *string, const gchar *delimiters, gchar new_delimiter); +gchar *g_strescape (const gchar *source, const gchar *exceptions); + +gchar *g_filename_to_uri (const gchar *filename, const gchar *hostname, GError **error); +gchar *g_filename_from_uri (const gchar *uri, gchar **hostname, GError **error); + +gint g_printf (gchar const *format, ...); +gint g_fprintf (FILE *file, gchar const *format, ...); +gint g_sprintf (gchar *string, gchar const *format, ...); +gint g_snprintf (gchar *string, gulong n, gchar const *format, ...); +#define g_vprintf vprintf +#define g_vfprintf vfprintf +#define g_vsprintf vsprintf +#define g_vsnprintf vsnprintf +#define g_vasprintf vasprintf + +gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size); +gchar *g_stpcpy (gchar *dest, const char *src); + + +gchar g_ascii_tolower (gchar c); +gchar g_ascii_toupper (gchar c); +gchar *g_ascii_strdown (const gchar *str, gssize len); +gchar *g_ascii_strup (const gchar *str, gssize len); +gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, gsize n); +gint g_ascii_strcasecmp (const gchar *s1, const gchar *s2); +gint g_ascii_xdigit_value (gchar c); +#define g_ascii_isspace(c) (isspace (c) != 0) +#define g_ascii_isalpha(c) (isalpha (c) != 0) +#define g_ascii_isprint(c) (isprint (c) != 0) +#define g_ascii_isxdigit(c) (isxdigit (c) != 0) + +/* FIXME: g_strcasecmp supports utf8 unicode stuff */ +#ifdef _MSC_VER +#define g_strcasecmp stricmp +#define g_strncasecmp strnicmp +#define g_strstrip(a) g_strchug (g_strchomp (a)) +#else +#define g_strcasecmp strcasecmp +#define g_ascii_strtoull strtoull +#define g_strncasecmp strncasecmp +#define g_strstrip(a) g_strchug (g_strchomp (a)) +#endif +#define g_ascii_strdup strdup + + +#define G_STR_DELIMITERS "_-|> <." + +/* + * String type + */ +typedef struct { + char *str; + gsize len; + gsize allocated_len; +} GString; + +GString *g_string_new (const gchar *init); +GString *g_string_new_len (const gchar *init, gssize len); +GString *g_string_sized_new (gsize default_size); +gchar *g_string_free (GString *string, gboolean free_segment); +GString *g_string_append (GString *string, const gchar *val); +void g_string_printf (GString *string, const gchar *format, ...); +void g_string_append_printf (GString *string, const gchar *format, ...); +void g_string_append_vprintf (GString *string, const gchar *format, va_list args); +GString *g_string_append_unichar (GString *string, gunichar c); +GString *g_string_append_c (GString *string, gchar c); +GString *g_string_append (GString *string, const gchar *val); +GString *g_string_append_len (GString *string, const gchar *val, gssize len); +GString *g_string_truncate (GString *string, gsize len); +GString *g_string_prepend (GString *string, const gchar *val); +GString *g_string_insert (GString *string, gssize pos, const gchar *val); +GString *g_string_set_size (GString *string, gsize len); +GString *g_string_erase (GString *string, gssize pos, gssize len); + +#define g_string_sprintfa g_string_append_printf + +typedef void (*GFunc) (gpointer data, gpointer user_data); +typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data); +typedef void (*GHFunc) (gpointer key, gpointer value, gpointer user_data); +typedef gboolean (*GHRFunc) (gpointer key, gpointer value, gpointer user_data); +typedef void (*GDestroyNotify) (gpointer data); +typedef guint (*GHashFunc) (gconstpointer key); +typedef gboolean (*GEqualFunc) (gconstpointer a, gconstpointer b); +typedef void (*GFreeFunc) (gpointer data); + +/* + * Lists + */ +typedef struct _GSList GSList; +struct _GSList { + gpointer data; + GSList *next; +}; + +GSList *g_slist_alloc (void); +GSList *g_slist_append (GSList *list, + gpointer data); +GSList *g_slist_prepend (GSList *list, + gpointer data); +void g_slist_free (GSList *list); +void g_slist_free_1 (GSList *list); +GSList *g_slist_copy (GSList *list); +GSList *g_slist_concat (GSList *list1, + GSList *list2); +void g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); +GSList *g_slist_last (GSList *list); +GSList *g_slist_find (GSList *list, + gconstpointer data); +GSList *g_slist_find_custom (GSList *list, + gconstpointer data, + GCompareFunc func); +GSList *g_slist_remove (GSList *list, + gconstpointer data); +GSList *g_slist_remove_all (GSList *list, + gconstpointer data); +GSList *g_slist_reverse (GSList *list); +guint g_slist_length (GSList *list); +GSList *g_slist_remove_link (GSList *list, + GSList *link); +GSList *g_slist_delete_link (GSList *list, + GSList *link); +GSList *g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func); +GSList *g_slist_insert_before (GSList *list, + GSList *sibling, + gpointer data); +GSList *g_slist_sort (GSList *list, + GCompareFunc func); +gint g_slist_index (GSList *list, + gconstpointer data); +GSList *g_slist_nth (GSList *list, + guint n); +gpointer g_slist_nth_data (GSList *list, + guint n); + +#define g_slist_next(slist) ((slist) ? (((GSList *) (slist))->next) : NULL) + + +typedef struct _GList GList; +struct _GList { + gpointer data; + GList *next; + GList *prev; +}; + +#define g_list_next(list) ((list) ? (((GList *) (list))->next) : NULL) +#define g_list_previous(list) ((list) ? (((GList *) (list))->prev) : NULL) + +GList *g_list_alloc (void); +GList *g_list_append (GList *list, + gpointer data); +GList *g_list_prepend (GList *list, + gpointer data); +void g_list_free (GList *list); +void g_list_free_1 (GList *list); +GList *g_list_copy (GList *list); +guint g_list_length (GList *list); +gint g_list_index (GList *list, + gconstpointer data); +GList *g_list_nth (GList *list, + guint n); +gpointer g_list_nth_data (GList *list, + guint n); +GList *g_list_last (GList *list); +GList *g_list_concat (GList *list1, + GList *list2); +void g_list_foreach (GList *list, + GFunc func, + gpointer user_data); +GList *g_list_first (GList *list); +GList *g_list_find (GList *list, + gconstpointer data); +GList *g_list_find_custom (GList *list, + gconstpointer data, + GCompareFunc func); +GList *g_list_remove (GList *list, + gconstpointer data); +GList *g_list_remove_all (GList *list, + gconstpointer data); +GList *g_list_reverse (GList *list); +GList *g_list_remove_link (GList *list, + GList *link); +GList *g_list_delete_link (GList *list, + GList *link); +GList *g_list_insert_sorted (GList *list, + gpointer data, + GCompareFunc func); +GList *g_list_insert_before (GList *list, + GList *sibling, + gpointer data); +GList *g_list_sort (GList *sort, + GCompareFunc func); + +/* + * Hashtables + */ +typedef struct _GHashTable GHashTable; +typedef struct _GHashTableIter GHashTableIter; + +/* Private, but needed for stack allocation */ +struct _GHashTableIter +{ + gpointer dummy [8]; +}; + +GHashTable *g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func); +GHashTable *g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func); +void g_hash_table_insert_replace (GHashTable *hash, gpointer key, gpointer value, gboolean replace); +guint g_hash_table_size (GHashTable *hash); +GList *g_hash_table_get_keys (GHashTable *hash); +GList *g_hash_table_get_values (GHashTable *hash); +gpointer g_hash_table_lookup (GHashTable *hash, gconstpointer key); +gboolean g_hash_table_lookup_extended (GHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value); +void g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data); +gpointer g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data); +gboolean g_hash_table_remove (GHashTable *hash, gconstpointer key); +gboolean g_hash_table_steal (GHashTable *hash, gconstpointer key); +void g_hash_table_remove_all (GHashTable *hash); +guint g_hash_table_foreach_remove (GHashTable *hash, GHRFunc func, gpointer user_data); +guint g_hash_table_foreach_steal (GHashTable *hash, GHRFunc func, gpointer user_data); +void g_hash_table_destroy (GHashTable *hash); +void g_hash_table_print_stats (GHashTable *table); + +void g_hash_table_iter_init (GHashTableIter *iter, GHashTable *hash_table); +gboolean g_hash_table_iter_next (GHashTableIter *iter, gpointer *key, gpointer *value); + +guint g_spaced_primes_closest (guint x); + +#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE) +#define g_hash_table_replace(h,k,v) g_hash_table_insert_replace ((h),(k),(v),TRUE) + +gboolean g_direct_equal (gconstpointer v1, gconstpointer v2); +guint g_direct_hash (gconstpointer v1); +gboolean g_int_equal (gconstpointer v1, gconstpointer v2); +guint g_int_hash (gconstpointer v1); +gboolean g_str_equal (gconstpointer v1, gconstpointer v2); +guint g_str_hash (gconstpointer v1); + +/* + * ByteArray + */ + +typedef struct _GByteArray GByteArray; +struct _GByteArray { + guint8 *data; + gint len; +}; + +GByteArray *g_byte_array_new (void); +GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, guint len); +guint8* g_byte_array_free (GByteArray *array, gboolean free_segment); + +/* + * Array + */ + +typedef struct _GArray GArray; +struct _GArray { + gchar *data; + gint len; +}; + +GArray *g_array_new (gboolean zero_terminated, gboolean clear_, guint element_size); +GArray *g_array_sized_new (gboolean zero_terminated, gboolean clear_, guint element_size, guint reserved_size); +gchar* g_array_free (GArray *array, gboolean free_segment); +GArray *g_array_append_vals (GArray *array, gconstpointer data, guint len); +GArray* g_array_insert_vals (GArray *array, guint index_, gconstpointer data, guint len); +GArray* g_array_remove_index (GArray *array, guint index_); +GArray* g_array_remove_index_fast (GArray *array, guint index_); +void g_array_set_size (GArray *array, gint length); + +#define g_array_append_val(a,v) (g_array_append_vals((a),&(v),1)) +#define g_array_insert_val(a,i,v) (g_array_insert_vals((a),(i),&(v),1)) +#define g_array_index(a,t,i) *(t*)(((a)->data) + sizeof(t) * (i)) + +/* + * QSort +*/ + +void g_qsort_with_data (gpointer base, size_t nmemb, size_t size, GCompareDataFunc compare, gpointer user_data); + +/* + * Pointer Array + */ + +typedef struct _GPtrArray GPtrArray; +struct _GPtrArray { + gpointer *pdata; + guint len; +}; + +GPtrArray *g_ptr_array_new (void); +GPtrArray *g_ptr_array_sized_new (guint reserved_size); +void g_ptr_array_add (GPtrArray *array, gpointer data); +gboolean g_ptr_array_remove (GPtrArray *array, gpointer data); +gpointer g_ptr_array_remove_index (GPtrArray *array, guint index); +gboolean g_ptr_array_remove_fast (GPtrArray *array, gpointer data); +gpointer g_ptr_array_remove_index_fast (GPtrArray *array, guint index); +void g_ptr_array_sort (GPtrArray *array, GCompareFunc compare_func); +void g_ptr_array_sort_with_data (GPtrArray *array, GCompareDataFunc compare_func, gpointer user_data); +void g_ptr_array_set_size (GPtrArray *array, gint length); +gpointer *g_ptr_array_free (GPtrArray *array, gboolean free_seg); +void g_ptr_array_foreach (GPtrArray *array, GFunc func, gpointer user_data); +#define g_ptr_array_index(array,index) (array)->pdata[(index)] + +/* + * Queues + */ +typedef struct { + GList *head; + GList *tail; + guint length; +} GQueue; + +gpointer g_queue_pop_head (GQueue *queue); +void g_queue_push_head (GQueue *queue, + gpointer data); +void g_queue_push_tail (GQueue *queue, + gpointer data); +gboolean g_queue_is_empty (GQueue *queue); +GQueue *g_queue_new (void); +void g_queue_free (GQueue *queue); +void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data); + +/* + * Messages + */ +#ifndef G_LOG_DOMAIN +#define G_LOG_DOMAIN ((gchar*) 0) +#endif + +typedef enum { + G_LOG_FLAG_RECURSION = 1 << 0, + G_LOG_FLAG_FATAL = 1 << 1, + + G_LOG_LEVEL_ERROR = 1 << 2, + G_LOG_LEVEL_CRITICAL = 1 << 3, + G_LOG_LEVEL_WARNING = 1 << 4, + G_LOG_LEVEL_MESSAGE = 1 << 5, + G_LOG_LEVEL_INFO = 1 << 6, + G_LOG_LEVEL_DEBUG = 1 << 7, + + G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) +} GLogLevelFlags; + +void g_print (const gchar *format, ...); +void g_printerr (const gchar *format, ...); +GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); +GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask); +void g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args); +void g_log (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, ...); +void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN; + +#ifdef HAVE_C99_SUPPORT +/* The for (;;) tells gc thats g_error () doesn't return, avoiding warnings */ +#define g_error(format, ...) do { g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, __VA_ARGS__); for (;;); } while (0) +#define g_critical(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, __VA_ARGS__) +#define g_warning(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, __VA_ARGS__) +#define g_message(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, __VA_ARGS__) +#define g_debug(format, ...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format, __VA_ARGS__) +#else /* HAVE_C99_SUPPORT */ +#define g_error(...) do { g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, __VA_ARGS__); for (;;); } while (0) +#define g_critical(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, __VA_ARGS__) +#define g_warning(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, __VA_ARGS__) +#define g_message(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, __VA_ARGS__) +#define g_debug(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, __VA_ARGS__) +#endif /* ndef HAVE_C99_SUPPORT */ + +typedef void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data); +typedef void (*GPrintFunc) (const gchar *string); + +void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data); +GLogFunc g_log_set_default_handler (GLogFunc log_func, gpointer user_data); +GPrintFunc g_set_print_handler (GPrintFunc func); +GPrintFunc g_set_printerr_handler (GPrintFunc func); +/* + * Conversions + */ + +gpointer g_convert_error_quark(void); + + +/* + * Unicode Manipulation: most of this is not used by Mono by default, it is + * only used if the old collation code is activated, so this is only the + * bare minimum to build. + */ + +typedef enum { + G_UNICODE_CONTROL, + G_UNICODE_FORMAT, + G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, + G_UNICODE_SURROGATE, + G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, + G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, + G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_COMBINING_MARK, + G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, + G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, + G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, + G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, + G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, + G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, + G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, + G_UNICODE_MATH_SYMBOL, + G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, + G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR +} GUnicodeType; + +typedef enum { + G_UNICODE_BREAK_MANDATORY, + G_UNICODE_BREAK_CARRIAGE_RETURN, + G_UNICODE_BREAK_LINE_FEED, + G_UNICODE_BREAK_COMBINING_MARK, + G_UNICODE_BREAK_SURROGATE, + G_UNICODE_BREAK_ZERO_WIDTH_SPACE, + G_UNICODE_BREAK_INSEPARABLE, + G_UNICODE_BREAK_NON_BREAKING_GLUE, + G_UNICODE_BREAK_CONTINGENT, + G_UNICODE_BREAK_SPACE, + G_UNICODE_BREAK_AFTER, + G_UNICODE_BREAK_BEFORE, + G_UNICODE_BREAK_BEFORE_AND_AFTER, + G_UNICODE_BREAK_HYPHEN, + G_UNICODE_BREAK_NON_STARTER, + G_UNICODE_BREAK_OPEN_PUNCTUATION, + G_UNICODE_BREAK_CLOSE_PUNCTUATION, + G_UNICODE_BREAK_QUOTATION, + G_UNICODE_BREAK_EXCLAMATION, + G_UNICODE_BREAK_IDEOGRAPHIC, + G_UNICODE_BREAK_NUMERIC, + G_UNICODE_BREAK_INFIX_SEPARATOR, + G_UNICODE_BREAK_SYMBOL, + G_UNICODE_BREAK_ALPHABETIC, + G_UNICODE_BREAK_PREFIX, + G_UNICODE_BREAK_POSTFIX, + G_UNICODE_BREAK_COMPLEX_CONTEXT, + G_UNICODE_BREAK_AMBIGUOUS, + G_UNICODE_BREAK_UNKNOWN, + G_UNICODE_BREAK_NEXT_LINE, + G_UNICODE_BREAK_WORD_JOINER, + G_UNICODE_BREAK_HANGUL_L_JAMO, + G_UNICODE_BREAK_HANGUL_V_JAMO, + G_UNICODE_BREAK_HANGUL_T_JAMO, + G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, + G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE +} GUnicodeBreakType; + +gunichar g_unichar_toupper (gunichar c); +gunichar g_unichar_tolower (gunichar c); +gunichar g_unichar_totitle (gunichar c); +GUnicodeType g_unichar_type (gunichar c); +gboolean g_unichar_isspace (gunichar c); +gboolean g_unichar_isxdigit (gunichar c); +gint g_unichar_xdigit_value (gunichar c); +GUnicodeBreakType g_unichar_break_type (gunichar c); + +#ifndef MAX +#define MAX(a,b) (((a)>(b)) ? (a) : (b)) +#endif + +#ifndef MIN +#define MIN(a,b) (((a)<(b)) ? (a) : (b)) +#endif + +#ifndef CLAMP +#define CLAMP(a,low,high) (((a) < (low)) ? (low) : (((a) > (high)) ? (high) : (a))) +#endif + +#if defined(__GNUC__) && (__GNUC__ > 2) +#define G_LIKELY(expr) (__builtin_expect ((expr) != 0, 1)) +#define G_UNLIKELY(expr) (__builtin_expect ((expr) != 0, 0)) +#else +#define G_LIKELY(x) (x) +#define G_UNLIKELY(x) (x) +#endif + +#if defined(_MSC_VER) +#define eg_unreachable() __assume(0) +#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 5))) +#define eg_unreachable() __builtin_unreachable() +#else +#define eg_unreachable() +#endif + +#define g_assert(x) G_STMT_START { if (G_UNLIKELY (!(x))) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x); } G_STMT_END +#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END + +/* + * Unicode conversion + */ + +#define G_CONVERT_ERROR g_convert_error_quark() + +typedef enum { + G_CONVERT_ERROR_NO_CONVERSION, + G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + G_CONVERT_ERROR_FAILED, + G_CONVERT_ERROR_PARTIAL_INPUT, + G_CONVERT_ERROR_BAD_URI, + G_CONVERT_ERROR_NOT_ABSOLUTE_PATH +} GConvertError; + +gchar *g_utf8_strup (const gchar *str, gssize len); +gchar *g_utf8_strdown (const gchar *str, gssize len); +gint g_unichar_to_utf8 (gunichar c, gchar *outbuf); +gunichar *g_utf8_to_ucs4_fast (const gchar *str, glong len, glong *items_written); +gunichar *g_utf8_to_ucs4 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err); +gunichar2 *g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err); +gunichar2 *eg_utf8_to_utf16_with_nuls (const gchar *str, glong len, glong *items_read, glong *items_written, GError **err); +gchar *g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err); +gunichar *g_utf16_to_ucs4 (const gunichar2 *str, glong len, glong *items_read, glong *items_written, GError **err); +gchar *g_ucs4_to_utf8 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **err); +gunichar2 *g_ucs4_to_utf16 (const gunichar *str, glong len, glong *items_read, glong *items_written, GError **err); + +#define u8to16(str) g_utf8_to_utf16(str, (glong)strlen(str), NULL, NULL, NULL) + +#ifdef G_OS_WIN32 +#define u16to8(str) g_utf16_to_utf8((gunichar2 *) (str), (glong)wcslen((wchar_t *) (str)), NULL, NULL, NULL) +#else +#define u16to8(str) g_utf16_to_utf8(str, (glong)strlen(str), NULL, NULL, NULL) +#endif + +/* + * Path + */ +gchar *g_build_path (const gchar *separator, const gchar *first_element, ...); +#define g_build_filename(x, ...) g_build_path(G_DIR_SEPARATOR_S, x, __VA_ARGS__) +gchar *g_path_get_dirname (const gchar *filename); +gchar *g_path_get_basename (const char *filename); +gchar *g_find_program_in_path (const gchar *program); +gchar *g_get_current_dir (void); +gboolean g_path_is_absolute (const char *filename); + +const gchar *g_get_home_dir (void); +const gchar *g_get_tmp_dir (void); +const gchar *g_get_user_name (void); +gchar *g_get_prgname (void); +void g_set_prgname (const gchar *prgname); + +/* + * Shell + */ + +gboolean g_shell_parse_argv (const gchar *command_line, gint *argcp, gchar ***argvp, GError **error); +gchar *g_shell_unquote (const gchar *quoted_string, GError **error); +gchar *g_shell_quote (const gchar *unquoted_string); + +/* + * Spawn + */ +typedef enum { + G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1, + G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, + G_SPAWN_SEARCH_PATH = 1 << 2, + G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, + G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, + G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, + G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 +} GSpawnFlags; + +typedef void (*GSpawnChildSetupFunc) (gpointer user_data); + +gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, gint *exit_status, GError **error); +gboolean g_spawn_async_with_pipes (const gchar *working_directory, gchar **argv, gchar **envp, GSpawnFlags flags, GSpawnChildSetupFunc child_setup, + gpointer user_data, GPid *child_pid, gint *standard_input, gint *standard_output, gint *standard_error, GError **error); + + +/* + * Timer + */ +typedef struct _GTimer GTimer; + +GTimer *g_timer_new (void); +void g_timer_destroy (GTimer *timer); +gdouble g_timer_elapsed (GTimer *timer, gulong *microseconds); +void g_timer_stop (GTimer *timer); +void g_timer_start (GTimer *timer); + +/* + * Date and time + */ +typedef struct { + glong tv_sec; + glong tv_usec; +} GTimeVal; + +void g_get_current_time (GTimeVal *result); +void g_usleep (gulong microseconds); + +/* + * File + */ + +gpointer g_file_error_quark (void); + +#define G_FILE_ERROR g_file_error_quark () + +typedef enum { + G_FILE_ERROR_EXIST, + G_FILE_ERROR_ISDIR, + G_FILE_ERROR_ACCES, + G_FILE_ERROR_NAMETOOLONG, + G_FILE_ERROR_NOENT, + G_FILE_ERROR_NOTDIR, + G_FILE_ERROR_NXIO, + G_FILE_ERROR_NODEV, + G_FILE_ERROR_ROFS, + G_FILE_ERROR_TXTBSY, + G_FILE_ERROR_FAULT, + G_FILE_ERROR_LOOP, + G_FILE_ERROR_NOSPC, + G_FILE_ERROR_NOMEM, + G_FILE_ERROR_MFILE, + G_FILE_ERROR_NFILE, + G_FILE_ERROR_BADF, + G_FILE_ERROR_INVAL, + G_FILE_ERROR_PIPE, + G_FILE_ERROR_AGAIN, + G_FILE_ERROR_INTR, + G_FILE_ERROR_IO, + G_FILE_ERROR_PERM, + G_FILE_ERROR_NOSYS, + G_FILE_ERROR_FAILED +} GFileError; + +typedef enum { + G_FILE_TEST_IS_REGULAR = 1 << 0, + G_FILE_TEST_IS_SYMLINK = 1 << 1, + G_FILE_TEST_IS_DIR = 1 << 2, + G_FILE_TEST_IS_EXECUTABLE = 1 << 3, + G_FILE_TEST_EXISTS = 1 << 4 +} GFileTest; + + +gboolean g_file_set_contents (const gchar *filename, const gchar *contents, gssize length, GError **error); +gboolean g_file_get_contents (const gchar *filename, gchar **contents, gsize *length, GError **error); +GFileError g_file_error_from_errno (gint err_no); +gint g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error); +gboolean g_file_test (const gchar *filename, GFileTest test); + +#define g_open open +#define g_rename rename +#define g_stat stat +#define g_unlink unlink +#define g_fopen fopen +#define g_lstat lstat +#define g_rmdir rmdir +#define g_mkstemp mkstemp +#define g_ascii_isdigit isdigit +#define g_ascii_strtod strtod +#define g_ascii_isalnum isalnum + +/* + * Pattern matching + */ +typedef struct _GPatternSpec GPatternSpec; +GPatternSpec * g_pattern_spec_new (const gchar *pattern); +void g_pattern_spec_free (GPatternSpec *pspec); +gboolean g_pattern_match_string (GPatternSpec *pspec, const gchar *string); + +/* + * Directory + */ +typedef struct _GDir GDir; +GDir *g_dir_open (const gchar *path, guint flags, GError **error); +const gchar *g_dir_read_name (GDir *dir); +void g_dir_rewind (GDir *dir); +void g_dir_close (GDir *dir); + +int g_mkdir_with_parents (const gchar *pathname, int mode); +#define g_mkdir mkdir + +/* + * GMarkup + */ +typedef struct _GMarkupParseContext GMarkupParseContext; + +typedef enum +{ + G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, + G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1 +} GMarkupParseFlags; + +typedef struct { + void (*start_element) (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + + void (*end_element) (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + + void (*text) (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + + void (*passthrough) (GMarkupParseContext *context, + const gchar *passthrough_text, + gsize text_len, + gpointer user_data, + GError **error); + void (*error) (GMarkupParseContext *context, + GError *error, + gpointer user_data); +} GMarkupParser; + +GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, + GDestroyNotify user_data_dnotify); +void g_markup_parse_context_free (GMarkupParseContext *context); +gboolean g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, gssize text_len, + GError **error); +gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, + GError **error); + +/* + * Character set conversion + */ +typedef struct _GIConv *GIConv; + +gsize g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft, gchar **outbytes, gsize *outbytesleft); +GIConv g_iconv_open (const gchar *to_charset, const gchar *from_charset); +int g_iconv_close (GIConv cd); + +gboolean g_get_charset (G_CONST_RETURN char **charset); +gchar *g_locale_to_utf8 (const gchar *opsysstring, gssize len, + gsize *bytes_read, gsize *bytes_written, + GError **error); +gchar *g_locale_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, + gsize *bytes_written, GError **error); +gchar *g_filename_from_utf8 (const gchar *utf8string, gssize len, gsize *bytes_read, + gsize *bytes_written, GError **error); +gchar *g_convert (const gchar *str, gssize len, + const gchar *to_codeset, const gchar *from_codeset, + gsize *bytes_read, gsize *bytes_written, GError **error); + +/* + * Unicode manipulation + */ +extern const guchar g_utf8_jump_table[256]; + +gboolean g_utf8_validate (const gchar *str, gssize max_len, const gchar **end); +gunichar g_utf8_get_char_validated (const gchar *str, gssize max_len); +gchar *g_utf8_find_prev_char (const char *str, const char *p); +gchar *g_utf8_prev_char (const char *str); +#define g_utf8_next_char(p) ((p) + g_utf8_jump_table[(guchar)(*p)]) +gunichar g_utf8_get_char (const gchar *src); +glong g_utf8_strlen (const gchar *str, gssize max); +gchar *g_utf8_offset_to_pointer (const gchar *str, glong offset); +glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos); + +/* + * priorities + */ +#define G_PRIORITY_DEFAULT 0 +#define G_PRIORITY_DEFAULT_IDLE 200 + +#define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8))) + +#define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8)) +#define GUINT32_SWAP_LE_BE(x) ((guint32) \ + ( (((guint32) (x)) << 24)| \ + ((((guint32) (x)) & 0xff0000) >> 8) | \ + ((((guint32) (x)) & 0xff00) << 8) | \ + (((guint32) (x)) >> 24)) ) + +#define GUINT64_SWAP_LE_BE(x) ((guint64) (((guint64)(GUINT32_SWAP_LE_BE(((guint64)x) & 0xffffffff))) << 32) | \ + GUINT32_SWAP_LE_BE(((guint64)x) >> 32)) + + + +#if G_BYTE_ORDER == G_LITTLE_ENDIAN +# define GUINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x) +# define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x) +# define GUINT_FROM_BE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT64_FROM_LE(x) (x) +# define GUINT32_FROM_LE(x) (x) +# define GUINT16_FROM_LE(x) (x) +# define GUINT_FROM_LE(x) (x) +# define GUINT64_TO_BE(x) GUINT64_SWAP_LE_BE(x) +# define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT16_TO_BE(x) GUINT16_SWAP_LE_BE(x) +# define GUINT_TO_BE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT64_TO_LE(x) (x) +# define GUINT32_TO_LE(x) (x) +# define GUINT16_TO_LE(x) (x) +# define GUINT_TO_LE(x) (x) +#else +# define GUINT64_FROM_BE(x) (x) +# define GUINT32_FROM_BE(x) (x) +# define GUINT16_FROM_BE(x) (x) +# define GUINT_FROM_BE(x) (x) +# define GUINT64_FROM_LE(x) GUINT64_SWAP_LE_BE(x) +# define GUINT32_FROM_LE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT16_FROM_LE(x) GUINT16_SWAP_LE_BE(x) +# define GUINT_FROM_LE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT64_TO_BE(x) (x) +# define GUINT32_TO_BE(x) (x) +# define GUINT16_TO_BE(x) (x) +# define GUINT_TO_BE(x) (x) +# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x) +# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x) +# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x) +# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x) +#endif + +#define GINT64_FROM_BE(x) (GUINT64_TO_BE (x)) +#define GINT32_FROM_BE(x) (GUINT32_TO_BE (x)) +#define GINT16_FROM_BE(x) (GUINT16_TO_BE (x)) +#define GINT64_FROM_LE(x) (GUINT64_TO_LE (x)) +#define GINT32_FROM_LE(x) (GUINT32_TO_LE (x)) +#define GINT16_FROM_LE(x) (GUINT16_TO_LE (x)) + +#define _EGLIB_MAJOR 2 +#define _EGLIB_MIDDLE 4 +#define _EGLIB_MINOR 0 + +#define GLIB_CHECK_VERSION(a,b,c) ((a < _EGLIB_MAJOR) || (a == _EGLIB_MAJOR && (b < _EGLIB_MIDDLE || (b == _EGLIB_MIDDLE && c <= _EGLIB_MINOR)))) + +G_END_DECLS + +#endif + + + diff --git a/mta-mono/vendor/eglib/gmodule.h b/mta-mono/vendor/eglib/gmodule.h new file mode 100644 index 0000000..ee89683 --- /dev/null +++ b/mta-mono/vendor/eglib/gmodule.h @@ -0,0 +1,37 @@ +#ifndef __GLIB_GMODULE_H +#define __GLIB_GMODULE_H + +#include + +#define G_MODULE_IMPORT extern +#ifdef G_OS_WIN32 +#define G_MODULE_EXPORT __declspec(dllexport) +#else +#define G_MODULE_EXPORT +#endif + +G_BEGIN_DECLS + +/* + * Modules + */ +typedef enum { + G_MODULE_BIND_LAZY = 0x01, + G_MODULE_BIND_LOCAL = 0x02, + G_MODULE_BIND_MASK = 0x03 +} GModuleFlags; +typedef struct _GModule GModule; + +GModule *g_module_open (const gchar *file, GModuleFlags flags); +gboolean g_module_symbol (GModule *module, const gchar *symbol_name, + gpointer *symbol); +const gchar *g_module_error (void); +gboolean g_module_close (GModule *module); +gchar * g_module_build_path (const gchar *directory, const gchar *module_name); + +extern char *gmodule_libprefix; +extern char *gmodule_libsuffix; + +G_END_DECLS + +#endif diff --git a/mta-mono/vendor/eglib/sort.frag.h b/mta-mono/vendor/eglib/sort.frag.h new file mode 100644 index 0000000..6dc1950 --- /dev/null +++ b/mta-mono/vendor/eglib/sort.frag.h @@ -0,0 +1,208 @@ +/* + * sort.frag.h: Common implementation of linked-list sorting + * + * Author: + * Raja R Harinath (rharinath@novell.com) + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * (C) 2006 Novell, Inc. + */ + +/* + * This code requires a typedef named 'list_node' for the list node. It + * is assumed that the list type is the type of a pointer to a list + * node, and that the node has a field named 'next' that implements to + * the linked list. No additional invariant is maintained (e.g. the + * 'prev' pointer of a doubly-linked list node is _not_ updated). Any + * invariant would require a post-processing pass to fix matters if + * necessary. + */ +typedef list_node *digit; + +/* + * The maximum possible depth of the merge tree + * = ceiling (log2 (maximum number of list nodes)) + * = ceiling (log2 (maximum possible memory size/size of each list node)) + * = number of bits in 'size_t' - floor (log2 (sizeof digit)) + * Also, each list in sort_info is at least 2 nodes long: we can reduce the depth by 1 + */ +#define FLOOR_LOG2(x) (((x)>=2) + ((x)>=4) + ((x)>=8) + ((x)>=16) + ((x)>=32) + ((x)>=64) + ((x)>=128)) +#define MAX_RANKS ((sizeof (size_t) * 8) - FLOOR_LOG2(sizeof (list_node)) - 1) + +struct sort_info +{ + int min_rank, n_ranks; + GCompareFunc func; + + /* Invariant: ranks[i] == NULL || length(ranks[i]) >= 2**(i+1) */ + list_node *ranks [MAX_RANKS]; /* ~ 128 bytes on 32bit, ~ 512 bytes on 64bit */ +}; + +static inline void +init_sort_info (struct sort_info *si, GCompareFunc func) +{ + si->min_rank = si->n_ranks = 0; + si->func = func; + /* we don't need to initialize si->ranks, since we never lookup past si->n_ranks. */ +} + +static inline list_node * +merge_lists (list_node *first, list_node *second, GCompareFunc func) +{ + /* merge the two lists */ + list_node *list = NULL; + list_node **pos = &list; + while (first && second) { + if (func (first->data, second->data) > 0) { + *pos = second; + second = second->next; + } else { + *pos = first; + first = first->next; + } + pos = &((*pos)->next); + } + *pos = first ? first : second; + return list; +} + +/* Pre-condition: upto <= si->n_ranks, list == NULL || length(list) == 1 */ +static inline list_node * +sweep_up (struct sort_info *si, list_node *list, int upto) +{ +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + + int i; + for (i = si->min_rank; i < upto; ++i) { + list = merge_lists (si->ranks [i], list, si->func); + si->ranks [i] = NULL; + } + return list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif +} + +/* + * The 'ranks' array essentially captures the recursion stack of a mergesort. + * The merge tree is built in a bottom-up manner. The control loop for + * updating the 'ranks' array is analogous to incrementing a binary integer, + * and the O(n) time for counting upto n translates to O(n) merges when + * inserting rank-0 lists. When we plug in the sizes of the lists involved in + * those merges, we get the O(n log n) time for the sort. + * + * Inserting higher-ranked lists reduce the height of the merge tree, and also + * eliminate a lot of redundant comparisons when merging two lists that would've + * been part of the same run. Adding a rank-i list is analogous to incrementing + * a binary integer by 2**i in one operation, thus sharing a similar speedup. + * + * When inserting higher-ranked lists, we choose to clear out the lower ranks + * in the interests of keeping the sort stable, but this makes analysis harder. + * Note that clearing the lower-ranked lists is O(length(list))-- thus it + * shouldn't affect the O(n log n) behaviour. IOW, inserting one rank-i list + * is equivalent to inserting 2**i rank-0 lists, thus even if we do i additional + * merges in the clearing-out (taking at most 2**i time) we are still fine. + */ + +#define stringify2(x) #x +#define stringify(x) stringify2(x) + +/* Pre-condition: 2**(rank+1) <= length(list) < 2**(rank+2) (therefore: length(list) >= 2) */ +static inline void +insert_list (struct sort_info *si, list_node* list, int rank) +{ +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + + int i; + + if (rank > si->n_ranks) { + if (rank > MAX_RANKS) { + g_warning ("Rank '%d' should not exceed " stringify (MAX_RANKS), rank); + rank = MAX_RANKS; + } + list = merge_lists (sweep_up (si, NULL, si->n_ranks), list, si->func); + for (i = si->n_ranks; i < rank; ++i) + si->ranks [i] = NULL; + } else { + if (rank) + list = merge_lists (sweep_up (si, NULL, rank), list, si->func); + for (i = rank; i < si->n_ranks && si->ranks [i]; ++i) { + list = merge_lists (si->ranks [i], list, si->func); + si->ranks [i] = NULL; + } + } + + if (i == MAX_RANKS) /* Will _never_ happen: so we can just devolve into quadratic ;-) */ + --i; + if (i >= si->n_ranks) + si->n_ranks = i + 1; + si->min_rank = i; + si->ranks [i] = list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif +} + +#undef stringify2 +#undef stringify +#undef MAX_RANKS +#undef FLOOR_LOG2 + +/* A non-recursive mergesort */ +static inline digit +do_sort (list_node* list, GCompareFunc func) +{ + struct sort_info si; + + init_sort_info (&si, func); + + while (list && list->next) { + list_node* next = list->next; + list_node* tail = next->next; + + if (func (list->data, next->data) > 0) { + next->next = list; + next = list; + list = list->next; + } + next->next = NULL; + + insert_list (&si, list, 0); + + list = tail; + } + + return sweep_up (&si, list, si.n_ranks); +} diff --git a/mta-mono/vendor/eglib/unicode-data.h b/mta-mono/vendor/eglib/unicode-data.h new file mode 100644 index 0000000..1cd75f3 --- /dev/null +++ b/mta-mono/vendor/eglib/unicode-data.h @@ -0,0 +1,2152 @@ +/* +This file is automatically generated by ucd.exe. +The source for this generator should be in Mono repository +(mcs/class/corlib/Mono.Globalization.Unicode directory). +*/ + +#ifndef __UNICODE_DATA_H +#define __UNICODE_DATA_H + +#include + + +/* ======== Structures ======== */ +typedef struct { + guint32 codepoint; + guint32 upper; + guint32 title; +} SimpleTitlecaseMapping; +typedef struct { + guint32 start; + guint32 end; +} CodePointRange; +typedef struct { + guint32 upper; + guint32 lower; +} SimpleCaseMapping; + +/* ======== Unicode Categories ======== */ +static const guint8 unicode_category_ranges_count = 11; +static const CodePointRange unicode_category_ranges [] = { +{0x000000, 0x003400}, +{0x004DC0, 0x004E00}, +{0x00A000, 0x00AA80}, +{0x00F900, 0x010000}, +{0x010000, 0x0104C0}, +{0x010800, 0x010A80}, +{0x012000, 0x012480}, +{0x01D000, 0x01D800}, +{0x01F000, 0x01F0C0}, +{0x02F800, 0x02FA40}, +{0x0E0000, 0x0E0200}, +{0, 0}}; +static const guint8 unicode_category_table0 [] = { + /* ==== 0-3400 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 29,21,21,21,23,21,21,21,22,18,21,25,21,17,21,21, + 13,13,13,13,13,13,13,13,13,13,21,21,25,25,25,21, + 21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,22,21,18,24,16, + 24,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,22,25,18,25,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 29,21,23,23,23,23,26,26,24,26,5,20,25,1,26,24, + 26,25,15,15,24,5,26,21,24,15,5,19,15,15,15,21, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,25,9,9,9,9,9,9,9,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,25,5,5,5,5,5,5,5,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,5,9,5,9,5,9,5,9, + 5,9,5,9,5,9,5,9,5,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,9,5,9,5,9,5,5, + 5,9,9,5,9,5,9,9,5,9,9,9,5,5,9,9, + 9,9,5,9,9,5,9,9,9,5,5,5,9,9,5,9, + 9,5,9,5,9,5,9,9,5,9,5,5,9,5,9,9, + 5,9,9,9,5,9,5,9,9,5,5,7,9,5,5,5, + 7,7,7,7,9,8,5,9,8,5,9,8,5,9,5,9, + 5,9,5,9,5,9,5,9,5,9,5,9,5,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 5,9,8,5,9,5,9,9,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,9,5,9,5,9,5,9,5,9,5,9,5, + 9,5,9,5,5,5,5,5,5,5,9,9,5,9,9,5, + 5,9,5,9,9,9,9,5,9,5,9,5,9,5,9,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,7,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,24,24,24,24,6,6,6,6,6,6,6,6,6,6, + 6,6,24,24,24,24,24,24,24,24,24,24,24,24,24,24, + 6,6,6,6,6,24,24,24,24,24,24,24,6,24,6,24, + 24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 9,5,9,5,6,24,9,5,0,0,6,5,5,5,21,0, + 0,0,0,0,24,24,9,21,9,9,9,0,9,0,9,9, + 5,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,0,9,9,9,9,9,9,9,9,9,5,5,5,5, + 5,5,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12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,17,12, + 21,12,12,21,12,12,21,12,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0, + 7,7,7,21,21,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,0,0,25,25,25,21,21,23,21,21,26,26, + 12,12,12,12,12,12,12,12,12,12,12,21,0,0,21,21, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 6,7,7,7,7,7,7,7,7,7,7,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0, + 13,13,13,13,13,13,13,13,13,13,21,21,21,21,7,7, + 12,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,21,7,12,12,12,12,12,12,12,1,11,12, + 12,12,12,12,12,6,6,12,12,26,12,12,12,12,7,7, + 13,13,13,13,13,13,13,13,13,13,7,7,7,26,26,7, + 21,21,21,21,21,21,21,21,21,21,21,21,21,21,0,1, + 7,12,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,0,0,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,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7,7,7,7,7,7,7,7, + 7,7,12,12,21,21,13,13,13,13,13,13,13,13,13,13, + 21,6,7,0,0,0,0,0,0,0,0,7,7,7,7,7, + 0,12,10,10,0,7,7,7,7,7,7,7,7,0,0,7, + 7,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,0,0,0,7,7,7,7,0,0,12,7,10,10, + 10,12,12,12,12,0,0,10,10,0,0,10,10,12,7,0, + 0,0,0,0,0,0,0,10,0,0,0,0,7,7,0,7, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 7,7,23,23,15,15,15,15,15,15,26,0,0,0,0,0, + 0,12,12,10,0,7,7,7,7,7,7,0,0,0,0,7, + 7,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,7,0,7,7,0,7,7,0,0,12,0,10,10, + 10,12,12,0,0,0,0,12,12,0,0,12,12,12,0,0, + 0,12,0,0,0,0,0,0,0,7,7,7,7,0,7,0, + 0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13, + 12,12,7,7,7,12,0,0,0,0,0,0,0,0,0,0, + 0,12,12,10,0,7,7,7,7,7,7,7,7,7,0,7, + 7,7,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,7,0,7,7,7,7,7,0,0,12,7,10,10, + 10,12,12,12,12,12,0,12,12,10,0,10,10,12,0,0, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 0,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,12,10,10,0,7,7,7,7,7,7,7,7,0,0,7, + 7,0,0,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,0,7,7,0,7,7,7,7,7,0,0,12,7,10,12, + 10,12,12,12,12,0,0,10,10,0,0,10,10,12,0,0, + 0,0,0,0,0,0,12,10,0,0,0,0,7,7,0,7, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 26,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,12,7,0,7,7,7,7,7,7,0,0,0,7,7, + 7,0,7,7,7,7,0,0,0,7,7,0,7,0,7,7, + 0,0,0,7,7,0,0,0,7,7,7,0,0,0,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,10,10, + 12,10,10,0,0,0,10,10,10,0,10,10,10,12,0,0, + 7,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,13,13,13,13,13,13,13,13,13,13, + 15,15,15,26,26,26,26,26,26,23,26,0,0,0,0,0, + 0,10,10,10,0,7,7,7,7,7,7,7,7,0,7,7, + 7,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,7,7,7,0,7,7,7,7,7,0,0,0,7,12,12, + 12,10,10,10,10,0,12,12,12,0,12,12,12,12,0,0, + 0,0,0,0,0,12,12,0,7,7,0,0,0,0,0,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,26, + 0,0,10,10,0,7,7,7,7,7,7,7,7,0,7,7, + 7,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,7,7,7,0,7,7,7,7,7,0,0,12,7,10,12, + 10,10,10,10,10,0,12,10,10,0,10,10,12,12,0,0, + 0,0,0,0,0,10,10,0,0,0,0,0,0,0,7,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 0,26,26,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,10,10,0,7,7,7,7,7,7,7,7,0,7,7, + 7,0,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,7,10,10, + 10,12,12,12,12,0,10,10,10,0,10,10,10,12,0,0, + 0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0, + 7,7,12,12,0,0,13,13,13,13,13,13,13,13,13,13, + 15,15,15,15,15,15,0,0,0,26,7,7,7,7,7,7, + 0,0,10,10,0,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,0,0,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,0,7,7,7,7,7,7,7,7,7,0,7,0,0, + 7,7,7,7,7,7,7,0,0,0,12,0,0,0,0,10, + 10,10,12,12,12,0,12,0,10,10,10,10,10,10,10,10, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,10,10,21,0,0,0,0,0,0,0,0,0,0,0, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,12,7,7,12,12,12,12,12,12,12,0,0,0,0,23, + 7,7,7,7,7,7,6,12,12,12,12,12,12,12,12,21, + 13,13,13,13,13,13,13,13,13,13,21,21,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,7,7,0,7,0,0,7,7,0,7,0,0,7,0,0, + 0,0,0,0,7,7,7,7,0,7,7,7,7,7,7,7, + 0,7,7,7,0,7,0,7,0,0,7,7,0,7,7,7, + 7,12,7,7,12,12,12,12,12,12,0,12,12,7,0,0, + 7,7,7,7,7,0,6,0,12,12,12,12,12,12,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,7,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,26,26,26,21,21,21,21,21,21,21,21,21,21,21,21, + 21,21,21,26,26,26,26,26,12,12,26,26,26,26,26,26, + 13,13,13,13,13,13,13,13,13,13,15,15,15,15,15,15, + 15,15,15,15,26,12,26,12,26,12,22,18,22,18,10,10, + 7,7,7,7,7,7,7,7,0,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0, + 0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,10, + 12,12,12,12,12,21,12,12,7,7,7,7,0,0,0,0, + 12,12,12,12,12,12,12,12,0,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,0,26,26, + 26,26,26,26,26,26,12,26,26,26,26,26,26,0,26,26, + 21,21,21,21,21,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,10,10,12,12,12, + 12,10,12,12,12,12,12,12,10,12,12,10,10,12,12,7, + 13,13,13,13,13,13,13,13,13,13,21,21,21,21,21,21, + 7,7,7,7,7,7,10,10,12,12,7,7,7,7,12,12, + 12,7,10,10,10,7,7,10,10,10,10,10,10,10,7,7, + 7,12,12,12,12,7,7,7,7,7,7,7,7,7,7,7, + 7,7,12,10,10,12,12,10,10,10,10,10,10,12,7,10, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,26,26, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,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7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,22,18,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,21,21,21,14,14, + 14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,7,7, + 7,7,12,12,12,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,12,12,12,21,21,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,12,12,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,7,7, + 7,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,1,1,10,12,12,12,12,12,12,12,10,10, + 10,10,10,10,10,10,12,10,10,12,12,12,12,12,12,12, + 12,12,12,12,21,21,21,6,21,21,21,23,7,12,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0, + 21,21,21,21,21,21,17,21,21,21,21,12,12,12,29,0, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,6,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,12,7,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,0, + 12,12,12,10,10,10,10,12,12,10,10,10,0,0,0,0, + 10,10,12,10,10,10,10,10,10,12,12,12,0,0,0,0, + 26,0,0,0,21,21,13,13,13,13,13,13,13,13,13,13, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,7,7,7,7,7,7,7,10,10,0,0,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,21,21, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,12,12,10,10,10,0,0,21,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,12,12,12,10,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,12,10,12,12,12,12,12,10,12,10,10,10, + 10,10,12,10,10,7,7,7,7,7,7,7,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,21,21,21,21,21,21, + 21,26,26,26,26,26,26,26,26,26,26,12,12,12,12,12, + 12,12,12,12,26,26,26,26,26,26,26,26,26,0,0,0, + 12,12,10,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,10,12,12,12,12,10,10,12,12,10,0,0,0,7,7, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,10,10,10,10,10,10,10,10,12,12,12,12, + 12,12,12,12,10,10,12,12,0,0,0,21,21,21,21,21, + 13,13,13,13,13,13,13,13,13,13,0,0,0,7,7,7, + 13,13,13,13,13,13,13,13,13,13,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,6,6,6,6,6,6,21,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12, + 9,5,9,5,9,5,9,5,9,5,9,5,9,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24, + 0,0,5,5,5,0,5,5,9,9,9,9,8,24,24,0, + 29,29,29,29,29,29,29,29,29,29,29,1,1,1,1,1, + 17,17,17,17,17,17,21,21,20,19,22,20,20,19,22,20, + 21,21,21,21,21,21,21,21,27,28,1,1,1,1,1,29, + 21,21,21,21,21,21,21,21,21,20,19,21,21,21,21,16, + 16,21,21,21,25,22,18,21,21,21,21,21,21,21,21,21, + 21,21,25,21,16,21,21,21,21,21,21,21,21,21,21,29, + 1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1, + 15,5,0,0,15,15,15,15,15,15,25,25,25,22,18,5, + 15,15,15,15,15,15,15,15,15,15,25,25,25,22,18,0, + 6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0, + 23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23, + 23,23,23,23,23,23,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,11,11,11, + 11,12,11,11,11,12,12,12,12,12,12,12,12,12,12,12, + 12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,9,26,26,26,26,9,26,26,5,9,9,9,5,5, + 9,9,9,5,26,9,26,26,26,9,9,9,9,9,26,26, + 26,26,26,26,9,26,9,26,9,26,9,9,9,9,26,5, + 9,9,9,9,5,7,7,7,7,5,26,26,5,5,9,9, + 25,25,25,25,25,9,5,5,5,5,26,25,26,26,5,26, + 0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,9,5,14,14,14,14,0,0,0,0,0,0,0, + 25,25,25,25,25,26,26,26,26,26,25,25,26,26,26,26, + 25,26,26,25,26,26,25,26,26,26,26,26,26,26,25,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,25,25, + 26,26,25,26,25,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,25,25,25,25,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 25,25,26,26,26,26,26,26,26,22,18,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,25,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,25,25,25,25, + 25,25,26,26,26,26,26,26,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,25,26,26,26,26,26,26,26,26, + 26,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,0,0,0, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,26,26,26,26,0,26,26,26,26,0,0,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,0,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,0,26,0,26, + 26,26,26,0,0,0,26,0,26,26,26,26,26,26,26,0, + 0,26,26,26,26,26,26,26,22,18,22,18,22,18,22,18, + 22,18,22,18,22,18,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,26,0,0,0,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 0,26,26,26,26,26,26,26,26,26,26,26,26,26,26,0, + 25,25,25,25,25,22,18,25,25,25,25,0,25,0,0,0, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,22,18,22,18,22,18,22,18,22,18, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,22,18,22,18,22,18,22,18,22,18,22,18,22, + 18,22,18,22,18,22,18,22,18,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,22,18,22,18,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,22,18,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 25,25,25,25,25,25,25,25,25,25,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5,5,5,5, + 5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,6, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 21,21,20,19,20,19,21,21,21,20,19,21,20,19,21,21, + 21,21,21,21,21,21,21,17,21,21,17,21,20,19,21,21, + 20,19,22,18,22,18,22,18,22,18,21,21,21,21,21,6, + 21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,0,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,0,0,0,0, + 29,21,21,21,26,6,7,14,22,18,22,18,22,18,22,18, + 22,18,26,26,22,18,22,18,22,18,22,18,17,22,18,18, + 26,14,14,14,14,14,14,14,14,14,12,12,12,12,12,12, + 17,6,6,6,6,6,26,26,14,14,14,6,7,21,26,26, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,0,12,12,24,24,6,6,7, + 17,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,21,6,6,6,7, + 0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 0,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0, + 26,26,15,15,15,15,26,26,26,26,26,26,26,26,26,26, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,0, + 15,15,15,15,15,15,15,15,15,15,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,0,0,0,0,0,0,0,0,0,0,0,0, + 26,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 15,15,15,15,15,15,15,15,15,15,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 0}; +static const guint8 unicode_category_table1 [] = { + /* ==== 4DC0-4E00 ==== */ + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 0}; +static const guint8 unicode_category_table2 [] = { + /* ==== A000-AA80 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,6,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7, + 7,7,12,7,7,7,12,7,7,7,7,12,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,10,10,12,12,10,26,26,26,26,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,21,21,21,21,0,0,0,0,0,0,0,0, + 10,10,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,12,0,0,0,0,0,0,0,0,0,21,21, + 13,13,13,13,13,13,13,13,13,13,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 13,13,13,13,13,13,13,13,13,13,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,12,12,12,12,12,12,12,12,21,21, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,12,12,12,12,12,12,12,12,12, + 12,12,10,10,0,0,0,0,0,0,0,0,0,0,0,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,12,12,12,12,12,12,10, + 10,12,12,10,10,12,12,0,0,0,0,0,0,0,0,0, + 7,7,7,12,7,7,7,7,7,7,7,7,12,10,0,0, + 13,13,13,13,13,13,13,13,13,13,0,0,21,21,21,21, + 0}; +static const guint8 unicode_category_table3 [] = { + /* ==== F900-10000 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7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,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,23,26,0,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 21,21,21,21,21,21,21,22,18,21,0,0,0,0,0,0, + 12,12,12,12,12,12,12,0,0,0,0,0,0,0,0,0, + 21,17,17,16,16,22,18,22,18,22,18,22,18,22,18,22, + 18,22,18,22,18,21,21,22,18,21,21,21,21,16,16,16, + 21,21,21,0,21,21,21,21,17,22,18,22,18,22,18,21, + 21,21,25,17,25,25,25,0,21,23,21,21,0,0,0,0, + 7,7,7,7,7,0,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,0,0,1, + 0,21,21,21,23,21,21,21,22,18,21,25,21,17,21,21, + 13,13,13,13,13,13,13,13,13,13,21,21,25,25,25,21, + 21,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,22,21,18,24,16, + 24,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,22,25,18,25,22, + 18,21,22,18,21,21,7,7,7,7,7,7,7,7,7,7, + 6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,0, + 0,0,7,7,7,7,7,7,0,0,7,7,7,7,7,7, + 0,0,7,7,7,7,7,7,0,0,7,7,7,0,0,0, + 23,23,25,24,26,23,23,0,26,25,25,25,25,26,26,0, + 0,0,0,0,0,0,0,0,0,1,1,1,26,26,0}; +static const guint8 unicode_category_table4 [] = { + /* ==== 10000-104C0 ==== */ + 7,7,7,7,7,7,7,7,7,7,7,7,0,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,7,7,0,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,0,0,0,0,0, + 21,21,26,0,0,0,0,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,0,0,0,26,26,26,26,26,26,26,26,26, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,15,15,15,15,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26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,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,15,15,15,15,0,0,0,0,0,21, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,0,0,0,0,0,21, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 7,12,12,12,0,12,12,0,0,0,0,0,12,12,12,12, + 7,7,7,7,0,7,7,7,0,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,0,0,0,0,12,12,12,0,0,0,0,12, + 15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0, + 21,21,21,21,21,21,21,21,21,0}; +static const guint8 unicode_category_table6 [] = { + /* ==== 12000-12480 ==== */ + 7,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0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0, + 21,21,21,21,0}; +static const guint8 unicode_category_table7 [] = { + /* ==== 1D000-1D800 ==== */ + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,10,10,12,12,12,26,26,26,10,10,10, + 10,10,10,1,1,1,1,1,1,1,1,12,12,12,12,12, + 12,12,12,26,26,12,12,12,12,12,12,12,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,12,12,12,12,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,12,12,12,26,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,0,0,0,0,0,0,0,0,0, + 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,5, + 5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,9,0,9,9, + 0,0,9,0,0,9,9,0,0,9,9,9,9,0,9,9, + 9,9,9,9,9,9,5,5,5,5,0,5,0,5,5,5, + 5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9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,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,25,5,5,5,5, + 5,5,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,25,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,25,5,5,5,5,5,5,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,25,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,25, + 5,5,5,5,5,5,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,25, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,25,5,5,5,5,5,5, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,25,5,5,5,5,5,5, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 5,5,5,25,5,5,5,5,5,5,9,5,0,0,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13, + 0}; +static const guint8 unicode_category_table8 [] = { + /* ==== 1F000-1F0C0 ==== */ + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,0,0,0,0, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, + 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,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7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,0}; +static const guint8 unicode_category_table10 [] = { + /* ==== E0000-E0200 ==== */ + 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 0}; +static const guint8 *unicode_category [11] = { + unicode_category_table0, + unicode_category_table1, + unicode_category_table2, + unicode_category_table3, + unicode_category_table4, + unicode_category_table5, + unicode_category_table6, + unicode_category_table7, + unicode_category_table8, + unicode_category_table9, + unicode_category_table10 +}; + +static const guint8 simple_case_map_ranges_count = 9; +static const CodePointRange simple_case_map_ranges [] = { +{0x000040, 0x000600}, +{0x001000, 0x0010D0}, +{0x001D00, 0x002000}, +{0x002100, 0x0021C0}, +{0x002480, 0x002500}, +{0x002C00, 0x002D80}, +{0x00A640, 0x00A7C0}, +{0x00FF20, 0x00FF80}, +{0x010400, 0x010480}, +{0, 0}}; +static const guint16 simple_upper_case_mapping_lowarea_table0 [] = { + /* ==== 40-600 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F, + 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x39C,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF, + 0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x178, + 0,0x100,0,0x102,0,0x104,0,0x106,0,0x108,0,0x10A,0,0x10C,0,0x10E, + 0,0x110,0,0x112,0,0x114,0,0x116,0,0x118,0,0x11A,0,0x11C,0,0x11E, + 0,0x120,0,0x122,0,0x124,0,0x126,0,0x128,0,0x12A,0,0x12C,0,0x12E, + 0,0x49,0,0x132,0,0x134,0,0x136,0,0,0x139,0,0x13B,0,0x13D,0, + 0x13F,0,0x141,0,0x143,0,0x145,0,0x147,0,0,0x14A,0,0x14C,0,0x14E, + 0,0x150,0,0x152,0,0x154,0,0x156,0,0x158,0,0x15A,0,0x15C,0,0x15E, + 0,0x160,0,0x162,0,0x164,0,0x166,0,0x168,0,0x16A,0,0x16C,0,0x16E, + 0,0x170,0,0x172,0,0x174,0,0x176,0,0,0x179,0,0x17B,0,0x17D,0x53, + 0x243,0,0,0x182,0,0x184,0,0,0x187,0,0,0,0x18B,0,0,0, + 0,0,0x191,0,0,0x1F6,0,0,0,0x198,0x23D,0,0,0,0x220,0, + 0,0x1A0,0,0x1A2,0,0x1A4,0,0,0x1A7,0,0,0,0,0x1AC,0,0, + 0x1AF,0,0,0,0x1B3,0,0x1B5,0,0,0x1B8,0,0,0,0x1BC,0,0x1F7, + 0,0,0,0,0,0x1C4,0x1C4,0,0x1C7,0x1C7,0,0x1CA,0x1CA,0,0x1CD,0, + 0x1CF,0,0x1D1,0,0x1D3,0,0x1D5,0,0x1D7,0,0x1D9,0,0x1DB,0x18E,0,0x1DE, + 0,0x1E0,0,0x1E2,0,0x1E4,0,0x1E6,0,0x1E8,0,0x1EA,0,0x1EC,0,0x1EE, + 0,0,0x1F1,0x1F1,0,0x1F4,0,0,0,0x1F8,0,0x1FA,0,0x1FC,0,0x1FE, + 0,0x200,0,0x202,0,0x204,0,0x206,0,0x208,0,0x20A,0,0x20C,0,0x20E, + 0,0x210,0,0x212,0,0x214,0,0x216,0,0x218,0,0x21A,0,0x21C,0,0x21E, + 0,0,0,0x222,0,0x224,0,0x226,0,0x228,0,0x22A,0,0x22C,0,0x22E, + 0,0x230,0,0x232,0,0,0,0,0,0,0,0,0x23B,0,0,0, + 0,0,0x241,0,0,0,0,0x246,0,0x248,0,0x24A,0,0x24C,0,0x24E, + 0x2C6F,0x2C6D,0,0x181,0x186,0,0x189,0x18A,0,0x18F,0,0x190,0,0,0,0, + 0x193,0,0,0x194,0,0,0,0,0x197,0x196,0,0x2C62,0,0,0,0x19C, + 0,0x2C6E,0x19D,0,0,0x19F,0,0,0,0,0,0,0,0x2C64,0,0, + 0x1A6,0,0,0x1A9,0,0,0,0,0x1AE,0x244,0x1B1,0x1B2,0x245,0,0,0, + 0,0,0x1B7,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0x399,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x370,0,0x372,0,0,0,0x376,0,0,0,0x3FD,0x3FE,0x3FF,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0x386,0x388,0x389,0x38A, + 0,0x391,0x392,0x393,0x394,0x395,0x396,0x397,0x398,0x399,0x39A,0x39B,0x39C,0x39D,0x39E,0x39F, + 0x3A0,0x3A1,0x3A3,0x3A3,0x3A4,0x3A5,0x3A6,0x3A7,0x3A8,0x3A9,0x3AA,0x3AB,0x38C,0x38E,0x38F,0, + 0x392,0x398,0,0,0,0x3A6,0x3A0,0x3CF,0,0x3D8,0,0x3DA,0,0x3DC,0,0x3DE, + 0,0x3E0,0,0x3E2,0,0x3E4,0,0x3E6,0,0x3E8,0,0x3EA,0,0x3EC,0,0x3EE, + 0x39A,0x3A1,0x3F9,0,0,0x395,0,0,0x3F7,0,0,0x3FA,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x410,0x411,0x412,0x413,0x414,0x415,0x416,0x417,0x418,0x419,0x41A,0x41B,0x41C,0x41D,0x41E,0x41F, + 0x420,0x421,0x422,0x423,0x424,0x425,0x426,0x427,0x428,0x429,0x42A,0x42B,0x42C,0x42D,0x42E,0x42F, + 0x400,0x401,0x402,0x403,0x404,0x405,0x406,0x407,0x408,0x409,0x40A,0x40B,0x40C,0x40D,0x40E,0x40F, + 0,0x460,0,0x462,0,0x464,0,0x466,0,0x468,0,0x46A,0,0x46C,0,0x46E, + 0,0x470,0,0x472,0,0x474,0,0x476,0,0x478,0,0x47A,0,0x47C,0,0x47E, + 0,0x480,0,0,0,0,0,0,0,0,0,0x48A,0,0x48C,0,0x48E, + 0,0x490,0,0x492,0,0x494,0,0x496,0,0x498,0,0x49A,0,0x49C,0,0x49E, + 0,0x4A0,0,0x4A2,0,0x4A4,0,0x4A6,0,0x4A8,0,0x4AA,0,0x4AC,0,0x4AE, + 0,0x4B0,0,0x4B2,0,0x4B4,0,0x4B6,0,0x4B8,0,0x4BA,0,0x4BC,0,0x4BE, + 0,0,0x4C1,0,0x4C3,0,0x4C5,0,0x4C7,0,0x4C9,0,0x4CB,0,0x4CD,0x4C0, + 0,0x4D0,0,0x4D2,0,0x4D4,0,0x4D6,0,0x4D8,0,0x4DA,0,0x4DC,0,0x4DE, + 0,0x4E0,0,0x4E2,0,0x4E4,0,0x4E6,0,0x4E8,0,0x4EA,0,0x4EC,0,0x4EE, + 0,0x4F0,0,0x4F2,0,0x4F4,0,0x4F6,0,0x4F8,0,0x4FA,0,0x4FC,0,0x4FE, + 0,0x500,0,0x502,0,0x504,0,0x506,0,0x508,0,0x50A,0,0x50C,0,0x50E, + 0,0x510,0,0x512,0,0x514,0,0x516,0,0x518,0,0x51A,0,0x51C,0,0x51E, + 0,0x520,0,0x522,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0x531,0x532,0x533,0x534,0x535,0x536,0x537,0x538,0x539,0x53A,0x53B,0x53C,0x53D,0x53E,0x53F, + 0x540,0x541,0x542,0x543,0x544,0x545,0x546,0x547,0x548,0x549,0x54A,0x54B,0x54C,0x54D,0x54E,0x54F, + 0x550,0x551,0x552,0x553,0x554,0x555,0x556,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0}; +static const guint16 simple_upper_case_mapping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,0,0,0,0,0,0,0,0,0, + 0x1FE8,0x1FE9,0,0,0,0x1FEC,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0x1FFC,0,0,0,0,0,0,0,0,0,0,0,0}; +static const guint16 simple_upper_case_mapping_lowarea_table3 [] = { + /* ==== 2100-21C0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x2132,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168,0x2169,0x216A,0x216B,0x216C,0x216D,0x216E,0x216F, + 0,0,0,0,0x2183,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_upper_case_mapping_lowarea_table4 [] = { + /* ==== 2480-2500 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x24B6,0x24B7,0x24B8,0x24B9,0x24BA,0x24BB,0x24BC,0x24BD,0x24BE,0x24BF,0x24C0,0x24C1,0x24C2,0x24C3,0x24C4,0x24C5, + 0x24C6,0x24C7,0x24C8,0x24C9,0x24CA,0x24CB,0x24CC,0x24CD,0x24CE,0x24CF,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_upper_case_mapping_lowarea_table5 [] = { + /* ==== 2C00-2D80 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x2C00,0x2C01,0x2C02,0x2C03,0x2C04,0x2C05,0x2C06,0x2C07,0x2C08,0x2C09,0x2C0A,0x2C0B,0x2C0C,0x2C0D,0x2C0E,0x2C0F, + 0x2C10,0x2C11,0x2C12,0x2C13,0x2C14,0x2C15,0x2C16,0x2C17,0x2C18,0x2C19,0x2C1A,0x2C1B,0x2C1C,0x2C1D,0x2C1E,0x2C1F, + 0x2C20,0x2C21,0x2C22,0x2C23,0x2C24,0x2C25,0x2C26,0x2C27,0x2C28,0x2C29,0x2C2A,0x2C2B,0x2C2C,0x2C2D,0x2C2E,0, +0,0x2C60,0,0,0,0x23A,0x23E,0,0x2C67,0,0x2C69,0,0x2C6B,0,0,0, + 0,0,0,0x2C72,0,0,0x2C75,0,0,0,0,0,0,0,0,0, +0,0x2C80,0,0x2C82,0,0x2C84,0,0x2C86,0,0x2C88,0,0x2C8A,0,0x2C8C,0,0x2C8E, + 0,0x2C90,0,0x2C92,0,0x2C94,0,0x2C96,0,0x2C98,0,0x2C9A,0,0x2C9C,0,0x2C9E, + 0,0x2CA0,0,0x2CA2,0,0x2CA4,0,0x2CA6,0,0x2CA8,0,0x2CAA,0,0x2CAC,0,0x2CAE, + 0,0x2CB0,0,0x2CB2,0,0x2CB4,0,0x2CB6,0,0x2CB8,0,0x2CBA,0,0x2CBC,0,0x2CBE, + 0,0x2CC0,0,0x2CC2,0,0x2CC4,0,0x2CC6,0,0x2CC8,0,0x2CCA,0,0x2CCC,0,0x2CCE, + 0,0x2CD0,0,0x2CD2,0,0x2CD4,0,0x2CD6,0,0x2CD8,0,0x2CDA,0,0x2CDC,0,0x2CDE, + 0,0x2CE0,0,0x2CE2,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x10A0,0x10A1,0x10A2,0x10A3,0x10A4,0x10A5,0x10A6,0x10A7,0x10A8,0x10A9,0x10AA,0x10AB,0x10AC,0x10AD,0x10AE,0x10AF, + 0x10B0,0x10B1,0x10B2,0x10B3,0x10B4,0x10B5,0x10B6,0x10B7,0x10B8,0x10B9,0x10BA,0x10BB,0x10BC,0x10BD,0x10BE,0x10BF, + 0x10C0,0x10C1,0x10C2,0x10C3,0x10C4,0x10C5,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_upper_case_mapping_lowarea_table6 [] = { + /* ==== A640-A7C0 ==== */ + 0,0xA640,0,0xA642,0,0xA644,0,0xA646,0,0xA648,0,0xA64A,0,0xA64C,0,0xA64E, + 0,0xA650,0,0xA652,0,0xA654,0,0xA656,0,0xA658,0,0xA65A,0,0xA65C,0,0xA65E, + 0,0,0,0xA662,0,0xA664,0,0xA666,0,0xA668,0,0xA66A,0,0xA66C,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0xA680,0,0xA682,0,0xA684,0,0xA686,0,0xA688,0,0xA68A,0,0xA68C,0,0xA68E, + 0,0xA690,0,0xA692,0,0xA694,0,0xA696,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0xA722,0,0xA724,0,0xA726,0,0xA728,0,0xA72A,0,0xA72C,0,0xA72E, + 0,0,0,0xA732,0,0xA734,0,0xA736,0,0xA738,0,0xA73A,0,0xA73C,0,0xA73E, + 0,0xA740,0,0xA742,0,0xA744,0,0xA746,0,0xA748,0,0xA74A,0,0xA74C,0,0xA74E, + 0,0xA750,0,0xA752,0,0xA754,0,0xA756,0,0xA758,0,0xA75A,0,0xA75C,0,0xA75E, + 0,0xA760,0,0xA762,0,0xA764,0,0xA766,0,0xA768,0,0xA76A,0,0xA76C,0,0xA76E, + 0,0,0,0,0,0,0,0,0,0,0xA779,0,0xA77B,0,0,0xA77E, + 0,0xA780,0,0xA782,0,0xA784,0,0xA786,0,0,0,0,0xA78B,0}; +static const guint16 simple_upper_case_mapping_lowarea_table7 [] = { + /* ==== FF20-FF80 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,0xFF28,0xFF29,0xFF2A,0xFF2B,0xFF2C,0xFF2D,0xFF2E,0xFF2F, + 0xFF30,0xFF31,0xFF32,0xFF33,0xFF34,0xFF35,0xFF36,0xFF37,0xFF38,0xFF39,0xFF3A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 *simple_upper_case_mapping_lowarea [] = { + simple_upper_case_mapping_lowarea_table0, + simple_upper_case_mapping_lowarea_table1, + simple_upper_case_mapping_lowarea_table2, + simple_upper_case_mapping_lowarea_table3, + simple_upper_case_mapping_lowarea_table4, + simple_upper_case_mapping_lowarea_table5, + simple_upper_case_mapping_lowarea_table6, + simple_upper_case_mapping_lowarea_table7}; +static const int simple_upper_case_mapping_lowarea_table_count = 8; + +static const guint32 simple_upper_case_mapping_higharea_table0 [] = { + /* ==== 10400-10480 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0x10400,0x10401,0x10402,0x10403,0x10404,0x10405,0x10406,0x10407, + 0x10408,0x10409,0x1040A,0x1040B,0x1040C,0x1040D,0x1040E,0x1040F,0x10410,0x10411,0x10412,0x10413,0x10414,0x10415,0x10416,0x10417, + 0x10418,0x10419,0x1041A,0x1041B,0x1041C,0x1041D,0x1041E,0x1041F,0x10420,0x10421,0x10422,0x10423,0x10424,0x10425,0x10426,0x10427, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint32 *simple_upper_case_mapping_higharea [] = { + simple_upper_case_mapping_higharea_table0}; + +static const guint16 simple_lower_case_mapping_lowarea_table0 [] = { + /* ==== 40-600 ==== */ + 0,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F, + 0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF, + 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x101,0,0x103,0,0x105,0,0x107,0,0x109,0,0x10B,0,0x10D,0,0x10F,0, + 0x111,0,0x113,0,0x115,0,0x117,0,0x119,0,0x11B,0,0x11D,0,0x11F,0, + 0x121,0,0x123,0,0x125,0,0x127,0,0x129,0,0x12B,0,0x12D,0,0x12F,0, + 0x69,0,0x133,0,0x135,0,0x137,0,0,0x13A,0,0x13C,0,0x13E,0,0x140, + 0,0x142,0,0x144,0,0x146,0,0x148,0,0,0x14B,0,0x14D,0,0x14F,0, + 0x151,0,0x153,0,0x155,0,0x157,0,0x159,0,0x15B,0,0x15D,0,0x15F,0, + 0x161,0,0x163,0,0x165,0,0x167,0,0x169,0,0x16B,0,0x16D,0,0x16F,0, + 0x171,0,0x173,0,0x175,0,0x177,0,0xFF,0x17A,0,0x17C,0,0x17E,0,0, + 0,0x253,0x183,0,0x185,0,0x254,0x188,0,0x256,0x257,0x18C,0,0,0x1DD,0x259, + 0x25B,0x192,0,0x260,0x263,0,0x269,0x268,0x199,0,0,0,0x26F,0x272,0,0x275, + 0x1A1,0,0x1A3,0,0x1A5,0,0x280,0x1A8,0,0x283,0,0,0x1AD,0,0x288,0x1B0, + 0,0x28A,0x28B,0x1B4,0,0x1B6,0,0x292,0x1B9,0,0,0,0x1BD,0,0,0, + 0,0,0,0,0x1C6,0x1C6,0,0x1C9,0x1C9,0,0x1CC,0x1CC,0,0x1CE,0,0x1D0, + 0,0x1D2,0,0x1D4,0,0x1D6,0,0x1D8,0,0x1DA,0,0x1DC,0,0,0x1DF,0, + 0x1E1,0,0x1E3,0,0x1E5,0,0x1E7,0,0x1E9,0,0x1EB,0,0x1ED,0,0x1EF,0, + 0,0x1F3,0x1F3,0,0x1F5,0,0x195,0x1BF,0x1F9,0,0x1FB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3B4,0x3B5,0x3B6,0x3B7,0x3B8,0x3B9,0x3BA,0x3BB,0x3BC,0x3BD,0x3BE,0x3BF, + 0x3C0,0x3C1,0,0x3C3,0x3C4,0x3C5,0x3C6,0x3C7,0x3C8,0x3C9,0x3CA,0x3CB,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3D7, + 0,0,0,0,0,0,0,0,0x3D9,0,0x3DB,0,0x3DD,0,0x3DF,0, + 0x3E1,0,0x3E3,0,0x3E5,0,0x3E7,0,0x3E9,0,0x3EB,0,0x3ED,0,0x3EF,0, + 0,0,0,0,0x3B8,0,0,0x3F8,0,0x3F2,0x3FB,0,0,0x37B,0x37C,0x37D, + 0x450,0x451,0x452,0x453,0x454,0x455,0x456,0x457,0x458,0x459,0x45A,0x45B,0x45C,0x45D,0x45E,0x45F, + 0x430,0x431,0x432,0x433,0x434,0x435,0x436,0x437,0x438,0x439,0x43A,0x43B,0x43C,0x43D,0x43E,0x43F, + 0x440,0x441,0x442,0x443,0x444,0x445,0x446,0x447,0x448,0x449,0x44A,0x44B,0x44C,0x44D,0x44E,0x44F, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x461,0,0x463,0,0x465,0,0x467,0,0x469,0,0x46B,0,0x46D,0,0x46F,0, + 0x471,0,0x473,0,0x475,0,0x477,0,0x479,0,0x47B,0,0x47D,0,0x47F,0, + 0x481,0,0,0,0,0,0,0,0,0,0x48B,0,0x48D,0,0x48F,0, + 0x491,0,0x493,0,0x495,0,0x497,0,0x499,0,0x49B,0,0x49D,0,0x49F,0, + 0x4A1,0,0x4A3,0,0x4A5,0,0x4A7,0,0x4A9,0,0x4AB,0,0x4AD,0,0x4AF,0, + 0x4B1,0,0x4B3,0,0x4B5,0,0x4B7,0,0x4B9,0,0x4BB,0,0x4BD,0,0x4BF,0, + 0x4CF,0x4C2,0,0x4C4,0,0x4C6,0,0x4C8,0,0x4CA,0,0x4CC,0,0x4CE,0,0, + 0x4D1,0,0x4D3,0,0x4D5,0,0x4D7,0,0x4D9,0,0x4DB,0,0x4DD,0,0x4DF,0, + 0x4E1,0,0x4E3,0,0x4E5,0,0x4E7,0,0x4E9,0,0x4EB,0,0x4ED,0,0x4EF,0, + 0x4F1,0,0x4F3,0,0x4F5,0,0x4F7,0,0x4F9,0,0x4FB,0,0x4FD,0,0x4FF,0, + 0x501,0,0x503,0,0x505,0,0x507,0,0x509,0,0x50B,0,0x50D,0,0x50F,0, + 0x511,0,0x513,0,0x515,0,0x517,0,0x519,0,0x51B,0,0x51D,0,0x51F,0, + 0x521,0,0x523,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0x561,0x562,0x563,0x564,0x565,0x566,0x567,0x568,0x569,0x56A,0x56B,0x56C,0x56D,0x56E,0x56F, + 0x570,0x571,0x572,0x573,0x574,0x575,0x576,0x577,0x578,0x579,0x57A,0x57B,0x57C,0x57D,0x57E,0x57F, + 0x580,0x581,0x582,0x583,0x584,0x585,0x586,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0}; +static const guint16 simple_lower_case_mapping_lowarea_table1 [] = { + /* ==== 1000-10D0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0x1F76,0x1F77,0,0,0,0, + 0,0,0,0,0,0,0,0,0x1FE0,0x1FE1,0x1F7A,0x1F7B,0x1FE5,0,0,0, + 0,0,0,0,0,0,0,0,0x1F78,0x1F79,0x1F7C,0x1F7D,0x1FF3,0,0,0}; +static const guint16 simple_lower_case_mapping_lowarea_table3 [] = { + /* ==== 2100-21C0 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0x3C9,0,0,0,0x6B,0xE5,0,0,0,0, + 0,0,0x214E,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,0x2178,0x2179,0x217A,0x217B,0x217C,0x217D,0x217E,0x217F, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0x2184,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_lower_case_mapping_lowarea_table4 [] = { + /* ==== 2480-2500 ==== */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0x24D0,0x24D1,0x24D2,0x24D3,0x24D4,0x24D5,0x24D6,0x24D7,0x24D8,0x24D9, + 0x24DA,0x24DB,0x24DC,0x24DD,0x24DE,0x24DF,0x24E0,0x24E1,0x24E2,0x24E3,0x24E4,0x24E5,0x24E6,0x24E7,0x24E8,0x24E9, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_lower_case_mapping_lowarea_table5 [] = { + /* ==== 2C00-2D80 ==== */ + 0x2C30,0x2C31,0x2C32,0x2C33,0x2C34,0x2C35,0x2C36,0x2C37,0x2C38,0x2C39,0x2C3A,0x2C3B,0x2C3C,0x2C3D,0x2C3E,0x2C3F, + 0x2C40,0x2C41,0x2C42,0x2C43,0x2C44,0x2C45,0x2C46,0x2C47,0x2C48,0x2C49,0x2C4A,0x2C4B,0x2C4C,0x2C4D,0x2C4E,0x2C4F, + 0x2C50,0x2C51,0x2C52,0x2C53,0x2C54,0x2C55,0x2C56,0x2C57,0x2C58,0x2C59,0x2C5A,0x2C5B,0x2C5C,0x2C5D,0x2C5E,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x2C61,0,0x26B,0x1D7D,0x27D,0,0,0x2C68,0,0x2C6A,0,0x2C6C,0,0x251,0x271,0x250, + 0,0,0x2C73,0,0,0x2C76,0,0,0,0,0,0,0,0,0,0, +0x2C81,0,0x2C83,0,0x2C85,0,0x2C87,0,0x2C89,0,0x2C8B,0,0x2C8D,0,0x2C8F,0, + 0x2C91,0,0x2C93,0,0x2C95,0,0x2C97,0,0x2C99,0,0x2C9B,0,0x2C9D,0,0x2C9F,0, + 0x2CA1,0,0x2CA3,0,0x2CA5,0,0x2CA7,0,0x2CA9,0,0x2CAB,0,0x2CAD,0,0x2CAF,0, + 0x2CB1,0,0x2CB3,0,0x2CB5,0,0x2CB7,0,0x2CB9,0,0x2CBB,0,0x2CBD,0,0x2CBF,0, + 0x2CC1,0,0x2CC3,0,0x2CC5,0,0x2CC7,0,0x2CC9,0,0x2CCB,0,0x2CCD,0,0x2CCF,0, + 0x2CD1,0,0x2CD3,0,0x2CD5,0,0x2CD7,0,0x2CD9,0,0x2CDB,0,0x2CDD,0,0x2CDF,0, + 0x2CE1,0,0x2CE3,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 simple_lower_case_mapping_lowarea_table6 [] = { + /* ==== A640-A7C0 ==== */ + 0xA641,0,0xA643,0,0xA645,0,0xA647,0,0xA649,0,0xA64B,0,0xA64D,0,0xA64F,0, + 0xA651,0,0xA653,0,0xA655,0,0xA657,0,0xA659,0,0xA65B,0,0xA65D,0,0xA65F,0, + 0,0,0xA663,0,0xA665,0,0xA667,0,0xA669,0,0xA66B,0,0xA66D,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0xA681,0,0xA683,0,0xA685,0,0xA687,0,0xA689,0,0xA68B,0,0xA68D,0,0xA68F,0, + 0xA691,0,0xA693,0,0xA695,0,0xA697,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0xA723,0,0xA725,0,0xA727,0,0xA729,0,0xA72B,0,0xA72D,0,0xA72F,0, + 0,0,0xA733,0,0xA735,0,0xA737,0,0xA739,0,0xA73B,0,0xA73D,0,0xA73F,0, + 0xA741,0,0xA743,0,0xA745,0,0xA747,0,0xA749,0,0xA74B,0,0xA74D,0,0xA74F,0, + 0xA751,0,0xA753,0,0xA755,0,0xA757,0,0xA759,0,0xA75B,0,0xA75D,0,0xA75F,0, + 0xA761,0,0xA763,0,0xA765,0,0xA767,0,0xA769,0,0xA76B,0,0xA76D,0,0xA76F,0, + 0,0,0,0,0,0,0,0,0,0xA77A,0,0xA77C,0,0x1D79,0xA77F,0, + 0xA781,0,0xA783,0,0xA785,0,0xA787,0,0,0,0,0xA78C,0,0}; +static const guint16 simple_lower_case_mapping_lowarea_table7 [] = { + /* ==== FF20-FF80 ==== */ + 0,0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47,0xFF48,0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F, + 0xFF50,0xFF51,0xFF52,0xFF53,0xFF54,0xFF55,0xFF56,0xFF57,0xFF58,0xFF59,0xFF5A,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint16 *simple_lower_case_mapping_lowarea [] = { + simple_lower_case_mapping_lowarea_table0, + simple_lower_case_mapping_lowarea_table1, + simple_lower_case_mapping_lowarea_table2, + simple_lower_case_mapping_lowarea_table3, + simple_lower_case_mapping_lowarea_table4, + simple_lower_case_mapping_lowarea_table5, + simple_lower_case_mapping_lowarea_table6, + simple_lower_case_mapping_lowarea_table7}; +static const int simple_lower_case_mapping_lowarea_table_count = 8; + +static const guint32 simple_lower_case_mapping_higharea_table0 [] = { + /* ==== 10400-10480 ==== */ + 0x10428,0x10429,0x1042A,0x1042B,0x1042C,0x1042D,0x1042E,0x1042F,0x10430,0x10431,0x10432,0x10433,0x10434,0x10435,0x10436,0x10437, + 0x10438,0x10439,0x1043A,0x1043B,0x1043C,0x1043D,0x1043E,0x1043F,0x10440,0x10441,0x10442,0x10443,0x10444,0x10445,0x10446,0x10447, + 0x10448,0x10449,0x1044A,0x1044B,0x1044C,0x1044D,0x1044E,0x1044F,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0}; +static const guint32 *simple_lower_case_mapping_higharea [] = { + simple_lower_case_mapping_higharea_table0}; + + +static const SimpleTitlecaseMapping simple_titlecase_mapping [] = { + {0x0001C4, 0x000000, 0x0001C5}, + {0x0001C5, 0x0001C4, 0x0001C5}, + {0x0001C6, 0x0001C4, 0x0001C5}, + {0x0001C7, 0x000000, 0x0001C8}, + {0x0001C8, 0x0001C7, 0x0001C8}, + {0x0001C9, 0x0001C7, 0x0001C8}, + {0x0001CA, 0x000000, 0x0001CB}, + {0x0001CB, 0x0001CA, 0x0001CB}, + {0x0001CC, 0x0001CA, 0x0001CB}, + {0x0001F1, 0x000000, 0x0001F2}, + {0x0001F2, 0x0001F1, 0x0001F2}, + {0x0001F3, 0x0001F1, 0x0001F2} +}; +static const guint8 simple_titlecase_mapping_count = 12; + +#endif + diff --git a/mta-mono/vendor/eglib/vasprintf.h b/mta-mono/vendor/eglib/vasprintf.h new file mode 100644 index 0000000..3d29454 --- /dev/null +++ b/mta-mono/vendor/eglib/vasprintf.h @@ -0,0 +1,11 @@ +#ifndef __VASPRINTF_H +#define __VASPRINTF_H + +#include +#include + +#ifndef HAVE_VASPRINTF +int vasprintf(char **ret, const char *fmt, va_list ap); +#endif + +#endif /* __VASPRINTF_H */